Skip to content

Commit

Permalink
Merge pull request #981 from igmhub/fix_raw_io
Browse files Browse the repository at this point in the history
fix read redshift through z_key
  • Loading branch information
iprafols authored Mar 17, 2023
2 parents f0f37f3 + 39911da commit 3d5e508
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py/picca/raw_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ def convert_transmission_to_deltas(obj_path, out_dir, in_dir=None, in_filenames=
userprint(f"ERROR: {err_msg}")
raise KeyError(err_msg)

w = hdu['Z'][:] > max(0., lambda_min / lambda_max_rest_frame - 1.)
w &= hdu['Z'][:] < max(0., lambda_max / lambda_min_rest_frame - 1.)
w = hdu[z_key][:] > max(0., lambda_min / lambda_max_rest_frame - 1.)
w &= hdu[z_key][:] < max(0., lambda_max / lambda_min_rest_frame - 1.)
objs_ra = hdu['RA'][:][w].astype('float64') * np.pi / 180.
objs_dec = hdu['DEC'][:][w].astype('float64') * np.pi / 180.
objs_thingid = objs_thingid[w]
Expand Down

0 comments on commit 3d5e508

Please sign in to comment.