genghisken / psat-server

Core python3 and C++ code for ATLAS and Pan-STARRS science servers
MIT License
1 stars 0 forks source link

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

Open genghisken opened 1 year ago

genghisken commented 1 year ago

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

This needs to be fixed so that:

genghisken commented 1 year ago

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