[yt-svn] commit/yt: ngoldbaum: Merged in jzuhone/yt (pull request #2292)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Fri Jul 22 07:48:52 PDT 2016
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/67200f8bbde3/
Changeset: 67200f8bbde3
Branch: yt
User: ngoldbaum
Date: 2016-07-22 14:48:18+00:00
Summary: Merged in jzuhone/yt (pull request #2292)
[bugfix] Three analysis module bugfixes
Affected #: 4 files
diff -r dda861e88caf4443bf2713470cbe2964a283e565 -r 67200f8bbde35f9f6d03ba012c76cb3e64aa603c tests/tests.yaml
--- a/tests/tests.yaml
+++ b/tests/tests.yaml
@@ -50,7 +50,7 @@
local_tipsy_001:
- yt/frontends/tipsy/tests/test_outputs.py
- local_varia_002:
+ local_varia_003:
- yt/analysis_modules/radmc3d_export
- yt/frontends/moab/tests/test_c5.py
- yt/analysis_modules/photon_simulator/tests/test_spectra.py
diff -r dda861e88caf4443bf2713470cbe2964a283e565 -r 67200f8bbde35f9f6d03ba012c76cb3e64aa603c yt/analysis_modules/particle_trajectories/particle_trajectories.py
--- a/yt/analysis_modules/particle_trajectories/particle_trajectories.py
+++ b/yt/analysis_modules/particle_trajectories/particle_trajectories.py
@@ -206,7 +206,7 @@
dd_first = ds_first.all_data()
fd = dd_first._determine_fields(field)[0]
if field not in self.particle_fields:
- if self.data_series[0].field_info[fd].particle_type:
+ if self.data_series[0]._get_field_info(*fd).particle_type:
self.particle_fields.append(field)
particles = np.empty((self.num_indices,self.num_steps))
particles[:] = np.nan
@@ -339,7 +339,7 @@
"""
fid = h5py.File(filename, "w")
fields = [field for field in sorted(self.field_data.keys())]
- fid.create_dataset("particle_indices", dtype=np.int32,
+ fid.create_dataset("particle_indices", dtype=np.int64,
data=self.indices)
fid.create_dataset("particle_time", data=self.times)
for field in fields:
diff -r dda861e88caf4443bf2713470cbe2964a283e565 -r 67200f8bbde35f9f6d03ba012c76cb3e64aa603c yt/analysis_modules/photon_simulator/spectral_models.py
--- a/yt/analysis_modules/photon_simulator/spectral_models.py
+++ b/yt/analysis_modules/photon_simulator/spectral_models.py
@@ -288,7 +288,7 @@
tmpspec += np.interp(emid, e_pseudo*self.scale_factor, pseudo)*de/self.scale_factor
- return tmpspec
+ return tmpspec*self.scale_factor
def get_spectrum(self, kT):
"""
diff -r dda861e88caf4443bf2713470cbe2964a283e565 -r 67200f8bbde35f9f6d03ba012c76cb3e64aa603c yt/analysis_modules/photon_simulator/tests/test_sloshing.py
--- a/yt/analysis_modules/photon_simulator/tests/test_sloshing.py
+++ b/yt/analysis_modules/photon_simulator/tests/test_sloshing.py
@@ -106,23 +106,19 @@
convert_old_file(old_photon_file, "converted_photons.h5")
convert_old_file(old_event_file, "converted_events.h5")
- photons3 = PhotonList.from_file("converted_photons.h5")
- events3 = EventList.from_h5_file("converted_events.h5")
+ PhotonList.from_file("converted_photons.h5")
+ EventList.from_h5_file("converted_events.h5")
for k in photons1.keys():
if k == "Energy":
arr1 = uconcatenate(photons1[k])
arr2 = uconcatenate(photons2[k])
- arr3 = uconcatenate(photons3[k])
else:
arr1 = photons1[k]
arr2 = photons2[k]
- arr3 = photons3[k]
assert_almost_equal(arr1, arr2)
- assert_almost_equal(arr1, arr3)
for k in events1.keys():
assert_almost_equal(events1[k], events2[k])
- assert_almost_equal(events1[k], events3[k])
nevents = 0
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