Skip to content

Commit

Permalink
add comment documenting DAYOBS calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
jchiang87 committed May 23, 2024
1 parent fcb8cbe commit a16ecce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion imsim/ccd.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ def parse(item, type, default):
image.header['MJD'] = mjd
image.header['MJD-OBS'] = mjd_obs, 'Start of exposure'
# Subtract half-day offset from mjd-obs for dayobs calculation
# following Rubin convention.
# following Rubin convention. See
# https://github.com/lsst/astro_metadata_translator/blob/w.2024.19/python/astro_metadata_translator/translator.py#L1065
# and Appendix A of https://docushare.lsst.org/docushare/dsweb/Get/LSE-400
dayobs = astropy.time.Time(mjd_obs - 0.5, format='mjd').strftime('%Y%m%d')
image.header['DAYOBS'] = dayobs
image.header['SEQNUM'] = seqnum
Expand Down

0 comments on commit a16ecce

Please sign in to comment.