Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Waelthus committed Dec 11, 2024
1 parent f41e9e9 commit da900c5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
5 changes: 3 additions & 2 deletions py/picca/delta_extraction/astronomical_objects/desi_forest.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def get_header(self):
'name': 'EXPID',
'value': "-".join(str(expid) for expid in self.expid),
'comment': 'Observation expid(s)'
},
},
{
'name': 'FIBER',
'value': "-".join(str(fiber) for fiber in self.fiber),
Expand Down Expand Up @@ -192,7 +192,8 @@ def get_metadata_dtype(cls):
data
"""
dtype = super().get_metadata_dtype()
dtype += [('TARGETID', int), ('NIGHT', 'S150'), ('PETAL', 'S150'), ('TILEID', 'S150'), ('EXPID', 'S150'),('FIBER', 'S150')] #need to figure out realistic length for these strings
dtype += [('TARGETID', int), ('NIGHT', 'S150'), ('PETAL', 'S150'),
('TILEID', 'S150'), ('EXPID', 'S150'),('FIBER', 'S150')]
return dtype

@classmethod
Expand Down
1 change: 0 additions & 1 deletion py/picca/delta_extraction/data_catalogues/desi_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,6 @@ def format_data(self,
w_t = w_t[0]
if metadata_dict is not None and not self.use_non_coadded_spectra:
exp_w_t = np.where(metadata_dict["EXP_TARGETID"] == targetid)[0]

expid = metadata_dict["EXP_EXPID"][exp_w_t]
night = metadata_dict["EXP_NIGHT"][exp_w_t]
petal = metadata_dict["EXP_PETAL"][exp_w_t]
Expand Down
3 changes: 1 addition & 2 deletions py/picca/delta_extraction/data_catalogues/desi_healpix.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ def _read_resolution(color, indices):
if hdul_truth is not None:
hdul_truth.close()


if not self.use_non_coadded_spectra:
exp_targetid = exp_fibermap['TARGETID']
exp_expid = exp_fibermap['EXPID']
Expand All @@ -304,7 +303,7 @@ def _read_resolution(color, indices):
'NIGHT': night,
'EXPID': expid,
'FIBER': fiber}

forests_by_targetid, num_data = self.format_data(
catalogue,
spectrographs_data,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ def read_data(self, is_mock=False):
t1 = time.time()
self.logger.progress(f"Time spent meerging threads: {t1-t0}")
else:
raise NotImplementedError('fast healpix reading is not implemented for analyses with "num processors=1"')
raise NotImplementedError('fast healpix reading is not implemented'
'for analyses with "num processors=1"')

if len(self.forests) == 0:
raise DataError("No quasars found, stopping here")
Expand Down

0 comments on commit da900c5

Please sign in to comment.