Skip to content

Commit

Permalink
Merge d45f335 into d1ca7fd
Browse files Browse the repository at this point in the history
  • Loading branch information
iprafols committed Jul 12, 2023
2 parents d1ca7fd + d45f335 commit beb8152
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions py/picca/delta_extraction/data_catalogues/desi_tile.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,14 @@ def read_file(self, filename, catalogue):
ra = fibermap['TARGET_RA']
dec = fibermap['TARGET_DEC']
tile_spec = fibermap['TILEID'][0]
if "cumulative" in self.input_directory:
night_spec = int(filename.split('thru')[-1].split('.')[0])
else:
night_spec = int(filename.split('-')[-1].split('.')[0])
try:
if "cumulative" in self.input_directory:
night_spec = int(filename.split('thru')[-1].split('.')[0])
else:
night_spec = int(filename.split('-')[-1].split('.')[0])
except ValueError:
self.logger.warning(f"In file {filename}, error reading night. Ignoring file")
return {}, 0

colors = ['B', 'R', 'Z']
ra = np.radians(ra)
Expand Down

0 comments on commit beb8152

Please sign in to comment.