desihub / desitarget

DESI Targeting
BSD 3-Clause "New" or "Revised" License
18 stars 23 forks source link

Allow initial ledgers to use a preordained timestamp #739

Closed geordie666 closed 3 years ago

geordie666 commented 3 years ago

This PR adds an option to pass a timestamp when making initial ledgers. The passed timestamp will then be used in place of the TIMESTAMP column generated by make_mtl(). MWS_FAINT targets can be exempted from this forced timestamp, and will instead adopt the usual "recent" timestamp generated by make_mtl().

The purpose of these changes is to address the issue where 1.0.0 ledgers (and target files) were generated without MWS_FAINT targets, as fixed in #733. This PR should allow 1.1.0 ledgers to be generated with TIMESTAMPs that correspond to 1.0.0 ledgers for all targets except MWS_FAINT, as suggested by @sbailey.

Some other minor updates are included in this PR:

geordie666 commented 3 years ago

A few example ledgers that include timestamps that have been "forced" for every target class except MWS_FAINT are available at NERSC in /global/cscratch1/sd/adamyers/PR739.

coveralls commented 3 years ago

Coverage Status

Coverage decreased (-0.1%) to 58.975% when pulling 2f0c7a0981511e03565632acddf65e27ff31f52d on ADM-hack-init-MTL into f2c6d4d2f4def25f6c79e1dfe235839640e73d9b on master.

geordie666 commented 3 years ago

@sbailey: I think this is ready to merge, and I'd like to merge it in about an hour so I can tackle the MTL loop after lunch without worrying about creating merge conflicts.

sbailey commented 3 years ago

Thanks for the explanation, looks good. Merging now.