[yt-svn] commit/yt: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Thu May 23 03:11:05 PDT 2013
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/929e09acf2db/
Changeset: 929e09acf2db
Branch: yt
User: brittonsmith
Date: 2013-05-22 18:10:14
Summary: Using a separate list to store fields than the one from the keyword arg since the list is being modified.
This fixes a strange bug I was seeing where multiple copies of the velocity fields were getting made and
modified multiple times, leading to indexing errors.
Affected #: 1 file
diff -r 1158e48daef21366b34aa9f123ae4fd8f1a5bf54 -r 929e09acf2dbef3c85c055b90e6476a9abe35d87 yt/analysis_modules/cosmological_observation/light_ray/light_ray.py
--- a/yt/analysis_modules/cosmological_observation/light_ray/light_ray.py
+++ b/yt/analysis_modules/cosmological_observation/light_ray/light_ray.py
@@ -321,17 +321,18 @@
# Initialize data structures.
self._data = {}
if fields is None: fields = []
- all_fields = [field for field in fields]
+ data_fields = fields[:]
+ all_fields = fields[:]
all_fields.extend(['dl', 'dredshift', 'redshift'])
if get_nearest_halo:
all_fields.extend(['x', 'y', 'z', 'nearest_halo'])
all_fields.extend(['nearest_halo_%s' % field \
for field in nearest_halo_fields])
- fields.extend(['x', 'y', 'z'])
+ data_fields.extend(['x', 'y', 'z'])
if get_los_velocity:
all_fields.extend(['x-velocity', 'y-velocity',
'z-velocity', 'los_velocity'])
- fields.extend(['x-velocity', 'y-velocity', 'z-velocity'])
+ data_fields.extend(['x-velocity', 'y-velocity', 'z-velocity'])
all_ray_storage = {}
for my_storage, my_segment in parallel_objects(self.light_ray_solution,
@@ -373,7 +374,7 @@
(sub_ray['dts'] *
vector_length(sub_segment[0],
sub_segment[1]))])
- for field in fields:
+ for field in data_fields:
sub_data[field] = np.concatenate([sub_data[field],
(sub_ray[field])])
https://bitbucket.org/yt_analysis/yt/commits/0a8cfd079b16/
Changeset: 0a8cfd079b16
Branch: yt
User: MatthewTurk
Date: 2013-05-23 12:10:57
Summary: Merged in brittonsmith/yt (pull request #509)
Fixing Issue #574
Affected #: 1 file
diff -r 533cf0c4fe18d781e84492fc238a2ff16fc7a511 -r 0a8cfd079b16aee3250d5c5f7ab5eaa4f16fd5d0 yt/analysis_modules/cosmological_observation/light_ray/light_ray.py
--- a/yt/analysis_modules/cosmological_observation/light_ray/light_ray.py
+++ b/yt/analysis_modules/cosmological_observation/light_ray/light_ray.py
@@ -321,17 +321,18 @@
# Initialize data structures.
self._data = {}
if fields is None: fields = []
- all_fields = [field for field in fields]
+ data_fields = fields[:]
+ all_fields = fields[:]
all_fields.extend(['dl', 'dredshift', 'redshift'])
if get_nearest_halo:
all_fields.extend(['x', 'y', 'z', 'nearest_halo'])
all_fields.extend(['nearest_halo_%s' % field \
for field in nearest_halo_fields])
- fields.extend(['x', 'y', 'z'])
+ data_fields.extend(['x', 'y', 'z'])
if get_los_velocity:
all_fields.extend(['x-velocity', 'y-velocity',
'z-velocity', 'los_velocity'])
- fields.extend(['x-velocity', 'y-velocity', 'z-velocity'])
+ data_fields.extend(['x-velocity', 'y-velocity', 'z-velocity'])
all_ray_storage = {}
for my_storage, my_segment in parallel_objects(self.light_ray_solution,
@@ -373,7 +374,7 @@
(sub_ray['dts'] *
vector_length(sub_segment[0],
sub_segment[1]))])
- for field in fields:
+ for field in data_fields:
sub_data[field] = np.concatenate([sub_data[field],
(sub_ray[field])])
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