[yt-svn] commit/yt: 3 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon Oct 6 16:21:33 PDT 2014
3 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/bbe8c22a689f/
Changeset: bbe8c22a689f
Branch: yt
User: brittonsmith
Date: 2014-10-05 21:24:25+00:00
Summary: Adding nuclei density fields to species fields plugin.
Affected #: 2 files
diff -r 05de9b2f84be6cc8b933f0af75ac211a57a44d7d -r bbe8c22a689f422dbcf5b32dbba4381525597359 yt/fields/species_fields.py
--- a/yt/fields/species_fields.py
+++ b/yt/fields/species_fields.py
@@ -178,3 +178,4 @@
# Skip it
continue
func(registry, ftype, species, particle_type)
+ add_nuclei_density_fields(registry, ftype, particle_type=particle_type)
diff -r 05de9b2f84be6cc8b933f0af75ac211a57a44d7d -r bbe8c22a689f422dbcf5b32dbba4381525597359 yt/frontends/enzo/fields.py
--- a/yt/frontends/enzo/fields.py
+++ b/yt/frontends/enzo/fields.py
@@ -20,9 +20,6 @@
FieldInfoContainer
from yt.units.yt_array import \
YTArray
-from yt.fields.species_fields import \
- add_nuclei_density_fields, \
- add_species_field_by_density
from yt.utilities.physical_constants import \
mh, me, mp, \
mass_sun_cgs
@@ -152,7 +149,6 @@
for sp in species_names:
self.add_species_field(sp)
self.species_names.append(known_species_names[sp])
- add_nuclei_density_fields(self, "gas")
def setup_fluid_fields(self):
# Now we conditionally load a few other things.
https://bitbucket.org/yt_analysis/yt/commits/da76ac89f895/
Changeset: da76ac89f895
Branch: yt
User: brittonsmith
Date: 2014-10-06 14:58:06+00:00
Summary: Adding nuclei density field test.
Affected #: 1 file
diff -r bbe8c22a689f422dbcf5b32dbba4381525597359 -r da76ac89f8952078e09c9c1526f210c775a2f7c1 yt/frontends/enzo/tests/test_outputs.py
--- a/yt/frontends/enzo/tests/test_outputs.py
+++ b/yt/frontends/enzo/tests/test_outputs.py
@@ -90,3 +90,13 @@
ds = data_dir_load(ecp)
# Now we test our species fields
yield check_color_conservation(ds)
+
+ at requires_ds(ecp, big_data=True)
+def test_nuclei_density_fields():
+ ds = data_dir_load(ecp)
+ ad = ds.all_data()
+ yield assert_array_equal, ad["H_nuclei_density"], \
+ (ad["H_number_density"] + ad["H_p1_number_density"])
+ yield assert_array_equal, ad["He_nuclei_density"], \
+ (ad["He_number_density"] + ad["He_p1_number_density"] +
+ ad["He_p2_number_density"])
https://bitbucket.org/yt_analysis/yt/commits/0f7b97ccc551/
Changeset: 0f7b97ccc551
Branch: yt
User: ChrisMalone
Date: 2014-10-06 23:21:26+00:00
Summary: Merged in brittonsmith/yt (pull request #1240)
[BUGFIX] Fixing nuclei density fields.
Affected #: 3 files
diff -r 65fe85b6263082743e728c3ef6666addfa48897f -r 0f7b97ccc551773ca725ba3209d0364b391793af yt/fields/species_fields.py
--- a/yt/fields/species_fields.py
+++ b/yt/fields/species_fields.py
@@ -178,3 +178,4 @@
# Skip it
continue
func(registry, ftype, species, particle_type)
+ add_nuclei_density_fields(registry, ftype, particle_type=particle_type)
diff -r 65fe85b6263082743e728c3ef6666addfa48897f -r 0f7b97ccc551773ca725ba3209d0364b391793af yt/frontends/enzo/fields.py
--- a/yt/frontends/enzo/fields.py
+++ b/yt/frontends/enzo/fields.py
@@ -20,9 +20,6 @@
FieldInfoContainer
from yt.units.yt_array import \
YTArray
-from yt.fields.species_fields import \
- add_nuclei_density_fields, \
- add_species_field_by_density
from yt.utilities.physical_constants import \
mh, me, mp, \
mass_sun_cgs
@@ -152,7 +149,6 @@
for sp in species_names:
self.add_species_field(sp)
self.species_names.append(known_species_names[sp])
- add_nuclei_density_fields(self, "gas")
def setup_fluid_fields(self):
# Now we conditionally load a few other things.
diff -r 65fe85b6263082743e728c3ef6666addfa48897f -r 0f7b97ccc551773ca725ba3209d0364b391793af yt/frontends/enzo/tests/test_outputs.py
--- a/yt/frontends/enzo/tests/test_outputs.py
+++ b/yt/frontends/enzo/tests/test_outputs.py
@@ -90,3 +90,13 @@
ds = data_dir_load(ecp)
# Now we test our species fields
yield check_color_conservation(ds)
+
+ at requires_ds(ecp, big_data=True)
+def test_nuclei_density_fields():
+ ds = data_dir_load(ecp)
+ ad = ds.all_data()
+ yield assert_array_equal, ad["H_nuclei_density"], \
+ (ad["H_number_density"] + ad["H_p1_number_density"])
+ yield assert_array_equal, ad["He_nuclei_density"], \
+ (ad["He_number_density"] + ad["He_p1_number_density"] +
+ ad["He_p2_number_density"])
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list