SLOTUTC is a tool to fix the UTC time in SALTICAM slot mode imaging. Because of a timing errror in OS being used, the clock loses time between seconds and the UTC time is inaccurate between updates of the system clock (which is currently updated at the beginning of each second.
As such this program reads in a set of slotmode data and calculates what the true exposure plus deadtime is. Once calculated, it will go through the images and correct the UTC times to the correct value. This process assumes that the UTC time for an image right after the second turns is a fiducial time. In addition, the program will fix the timing for a series of frames where the timing of the frames is based on the reading out the wrong number of frames.
Note
This information belongs in the SVN logfile.
Calculates the real exposure time. This makes the following assumptions: #. That the measurement after the turn of the second is a fiducial #. That there is an integer number of frames between each fiducial exposure #. We then set up a metric which is Y=np.sum(i-int(i)) where i=dt/t_exp #. Then the minimum of Y is found between the requested exposure time and the median time difference #. And the best exposure time is the time at that minimum
returns median exposure time and real exposure time
Find the real exposure+dead time
returns float
Merit function to determine best time Weighted for the number of objects in each step
return float