Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration - Image copy is incorrect for STH and CHL telescopes #4

Open
genghisken opened this issue Mar 6, 2023 · 1 comment
Open

Comments

@genghisken
Copy link
Owner

When images are copied the MJD is extracted exclusively from the partial MJD embedded in the filename.

This needs to be fixed so that:

  • The MJD extract is done primarily from the exposure ID (because STH exposures that start on MJD - 1 are given the obs name of MJD)
  • The MJD extract reverts to using the MJD embedded in the first part of the filename if it can't find an exposure ID (as is the case with Pan-STARRS finders).
@genghisken
Copy link
Owner Author

Code has been altered to use the exposure name for extraction of the MJD.

if any([x in filename['image_filename'] for x in ['01a', '02a', '03a', '04a']]):
    mjd = filename['image_filename'].split('_')[2][3:8]
else:
    # Use the old way to get the MJD - relevant for finding charts.
    mjd = filename['image_filename'].split('_')[1]
    mjd = mjd.split('.')[0]
imageDestinationDirectoryName = IMAGEROOT_DESTINATION + publicSchema + '/' + mjd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant