<html><body>
<p>4 new commits in yt:</p>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/171a0b20f8c0/">https://bitbucket.org/yt_analysis/yt/commits/171a0b20f8c0/</a> Changeset: 171a0b20f8c0 Branch: yt User: chummels Date: 2016-04-01 23:23:41+00:00 Summary: Correcting chemical formulas to treat electrons with -1 charge. Affected #: 1 file</p>
<p>diff -r d18f33211199f71e2fac4d927307b015d513a328 -r 171a0b20f8c047a5206158c070c34eecc0e8a6f7 yt/utilities/chemical_formulas.py --- a/yt/utilities/chemical_formulas.py +++ b/yt/utilities/chemical_formulas.py @@ -29,6 +29,9 @@</p>
<pre> charge = -int(ionization[1:])
else:
raise NotImplementedError</pre>
<p>+ elif self.formula_string.startswith('El'): + molecule = self.formula_string + charge = -1</p>
<pre> else:
molecule = self.formula_string
charge = 0</pre>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/65b01600c5d8/">https://bitbucket.org/yt_analysis/yt/commits/65b01600c5d8/</a> Changeset: 65b01600c5d8 Branch: yt User: chummels Date: 2016-04-01 23:47:22+00:00 Summary: Adding species aliases mapping neutral species fields to “MM_p0_” fields. Affected #: 1 file</p>
<p>diff -r 171a0b20f8c047a5206158c070c34eecc0e8a6f7 -r 65b01600c5d8ffd087dfd5d5b39eab0989e44113 yt/fields/species_fields.py --- a/yt/fields/species_fields.py +++ b/yt/fields/species_fields.py @@ -114,6 +114,24 @@</p>
<pre> particle_type = particle_type,
units = unit_system["number_density"])
</pre>
<p>+def add_species_aliases(registry, ftype, alias_species, species): + """ + This takes a field registry, a fluid type, and two species names. + The first species name is one you wish to alias to an existing species + name. For instance you might alias all “H_p0” fields to “H_” fields + to indicate that “H_” fields are really just neutral hydrogen fields. + This function registers field aliases for the density, number_density, + mass, and fraction fields between the two species given in the arguments. + """ + registry.alias((ftype, “%s_density” % alias_species), + (ftype, “%s_density” % species)) + registry.alias((ftype, “%s_fraction” % alias_species), + (ftype, “%s_fraction” % species)) + registry.alias((ftype, “%s_number_density” % alias_species), + (ftype, “%s_number_density” % species)) + registry.alias((ftype, “%s_mass” % alias_species), + (ftype, “%s_mass” % species)) +</p>
<pre>def add_nuclei_density_fields(registry, ftype,
particle_type = False):
unit_system = registry.ds.unit_system</pre>
<p>@@ -181,4 +199,9 @@</p>
<pre># Skip it
continue
func(registry, ftype, species, particle_type)</pre>
<p>+ # Adds aliases for all neutral species from their raw “MM_” + # species to “MM_p0_” species to be explicit. + if (ChemicalFormula(species).charge == 0): + alias_species = “%s_p0” % species.split('_')[0] + add_species_aliases(registry, “gas”, alias_species, species)</p>
<pre>add_nuclei_density_fields(registry, ftype, particle_type=particle_type)</pre>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/d0da53659fbb/">https://bitbucket.org/yt_analysis/yt/commits/d0da53659fbb/</a> Changeset: d0da53659fbb Branch: yt User: chummels Date: 2016-04-01 23:47:43+00:00 Summary: Adding note about YTEP-0003 Affected #: 1 file</p>
<p>diff -r 65b01600c5d8ffd087dfd5d5b39eab0989e44113 -r d0da53659fbb11f15c403937ac00ad51e018030c yt/fields/species_fields.py --- a/yt/fields/species_fields.py +++ b/yt/fields/species_fields.py @@ -201,6 +201,7 @@</p>
<pre>func(registry, ftype, species, particle_type)
# Adds aliases for all neutral species from their raw "MM_"
# species to "MM_p0_" species to be explicit.</pre>
<p>+ # See YTEP-0003 for more details.</p>
<pre> if (ChemicalFormula(species).charge == 0):
alias_species = "%s_p0" % species.split('_')[0]
add_species_aliases(registry, "gas", alias_species, species)</pre>
<p><a href="https://bitbucket.org/yt_analysis/yt/commits/068a53069cdf/">https://bitbucket.org/yt_analysis/yt/commits/068a53069cdf/</a> Changeset: 068a53069cdf Branch: yt User: ngoldbaum Date: 2016-04-06 18:06:06+00:00 Summary: Merged in chummels/yt (pull request #2105)</p>
<p>Adding neutral species aliases as described in YTEP 0003 Affected #: 2 files</p>
<p>diff -r 179a73a7e7f479572d0b9039feee73f75360fd3d -r 068a53069cdff7da3ad9597a7bb868fcafabecb2 yt/fields/species_fields.py --- a/yt/fields/species_fields.py +++ b/yt/fields/species_fields.py @@ -114,6 +114,24 @@</p>
<pre> particle_type = particle_type,
units = unit_system["number_density"])
</pre>
<p>+def add_species_aliases(registry, ftype, alias_species, species): + """ + This takes a field registry, a fluid type, and two species names. + The first species name is one you wish to alias to an existing species + name. For instance you might alias all “H_p0” fields to “H_” fields + to indicate that “H_” fields are really just neutral hydrogen fields. + This function registers field aliases for the density, number_density, + mass, and fraction fields between the two species given in the arguments. + """ + registry.alias((ftype, “%s_density” % alias_species), + (ftype, “%s_density” % species)) + registry.alias((ftype, “%s_fraction” % alias_species), + (ftype, “%s_fraction” % species)) + registry.alias((ftype, “%s_number_density” % alias_species), + (ftype, “%s_number_density” % species)) + registry.alias((ftype, “%s_mass” % alias_species), + (ftype, “%s_mass” % species)) +</p>
<pre>def add_nuclei_density_fields(registry, ftype,
particle_type = False):
unit_system = registry.ds.unit_system</pre>
<p>@@ -181,4 +199,10 @@</p>
<pre># Skip it
continue
func(registry, ftype, species, particle_type)</pre>
<p>+ # Adds aliases for all neutral species from their raw “MM_” + # species to “MM_p0_” species to be explicit. + # See YTEP-0003 for more details. + if (ChemicalFormula(species).charge == 0): + alias_species = “%s_p0” % species.split('_')[0] + add_species_aliases(registry, “gas”, alias_species, species)</p>
<pre>add_nuclei_density_fields(registry, ftype, particle_type=particle_type)</pre>
<p>diff -r 179a73a7e7f479572d0b9039feee73f75360fd3d -r 068a53069cdff7da3ad9597a7bb868fcafabecb2 yt/utilities/chemical_formulas.py --- a/yt/utilities/chemical_formulas.py +++ b/yt/utilities/chemical_formulas.py @@ -29,6 +29,9 @@</p>
<pre> charge = -int(ionization[1:])
else:
raise NotImplementedError</pre>
<p>+ elif self.formula_string.startswith('El'): + molecule = self.formula_string + charge = -1</p>
<pre> else:
molecule = self.formula_string
charge = 0</pre>
<p>Repository URL: <a href="https://bitbucket.org/yt_analysis/yt/">https://bitbucket.org/yt_analysis/yt/</a></p>
<p>—</p>
<p>This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.</p>
<img src="http://link.bitbucket.org/wf/open?upn=ll4ctv0L-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27BtWrGdwqVvVoQ1rlaV9orPrpUb6y4t1IcLWEVw1HwY-2Fe5kxoAafqLYE2jEzzbLGdbtUyNUS7qI46vSUzb1VS-2FF7Oqv-2BrVEHKWBI9DOW9UCtA7zP-2BsWqDJP55c2iSbf9iE60-2FVy3kbVqtPwiX-2FeVzH8Gs7rDyWtWWTe1BAth19fFF9mcp-2FBMT25vtyT2wGA0Yg-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;"/>
</body></html>