Skip to content

Commit

Permalink
Added option for zmin and zmax
Browse files Browse the repository at this point in the history
  • Loading branch information
HiramHerrera committed Aug 14, 2024
1 parent 8340561 commit 2f0ff51
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 7 additions & 1 deletion py/desisim/scripts/gen_qso_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ def main():

parser.add_argument("--exptime", type=float, default=None, required=False,
help='Exposure time to assign to all targets in the mock catalog')

parser.add_argument("--zmin", type=float, default=1.7, required=False,
help='Minimum redshift')

parser.add_argument("--zmax", type=float, default=10.0, required=False,
help='Maximum redshift')

parser.add_argument("--release", type=str, default='jura', choices=['iron','jura','Y5'], required=False,
help='DESI survey release to reproduce')
Expand All @@ -47,7 +53,7 @@ def main():
# Note: For Y1 and Y3 mocks (and probably Y5 too) the target selection redshift distribution
# from Chaussidon et al. 2022 works better to match QSO targets Iron catalog.
# The option distribution='from_data' should be a better option once I finish implementing it.
survey.apply_redshift_dist(distribution='target_selection', zmin=1.8)
survey.apply_redshift_dist(distribution='target_selection', zmin=args.zmin, zmax=args.zmax)

# Apply NPASS geometry either from a release or a custom tiles file.
survey.apply_data_geometry(release=args.release, tilefile=args.tiles_file)
Expand Down
1 change: 0 additions & 1 deletion py/desisim/survey_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ def assign_exposures(self,exptime=None):
log.warning('Effective exposure time TSNR2_LRG column not found in observed data catalog.')
log.warning('Will compute effective exposure time from alternative templates.')
if 'TSNR2_LYA' in self.data.colnames:
log.warning('TSNR2_LRG column not found in observed data catalog.')
log.info('Getting effective exposure time in data catalog by 11.8*TSNR2_LYA.')
exptime_data = 11.8*self.data['TSNR2_LYA']
elif 'TSNR2_QSO' in self.data.colnames:
Expand Down

0 comments on commit 2f0ff51

Please sign in to comment.