Open joesilber opened 4 years ago
On further thought, this thermal model might not be required. But only if we can guarantee that everything (targeting, astrometry, move commands, and calibration) at the focalplane is done with scale determined by exactly the same algorithm every time.
Joe, we will fit for a scale factor of the whole transformation from sky to focal plane coordinates when analyzing the location of stars on the GFA CCD obtained during the acquisition exposure. Wouldn't this scale factor be sufficient to account for the most important dilatation term? What do you think would be the residuals to that?
We need a thermal-mechanical model. To give a sense of scale, metrology is generally done at ~22C (I need to verify from actual reports), whereas at Mayall the focal plane is nominally operated at 11C. It is mostly aluminum (~24 ppm/C), hence metrology data will be too large by a factor 2.64e-4, or 214 um across the 812 mm diameter.
I believe this needs to occur prior to performing the fit, e.g. sometime before this line: https://github.com/desihub/desimeter/blob/5926626eb19f944510ec460c99dff6f64eb6f914/py/desimeter/transform/fvc2fp/zb.py#L179-L180
Thermal model should be done in a separate module, not spaghettied into zb or poly2d or the like. Also, note the duplicated metrology-loading code in the fit functions. See issue #26.
One option is we move the metrology loading code directly into the base class. And immediately after loading the metrology, apply the thermal model. I'm still wrapping my head around how you guys want your code structured, and where you think interfaces should lie. But anyway, probably better not to bury metrology data prep in specific implementations of fit().
Perhaps best would to make a clean module called like "metrology.py", and it does all the loading and prep of that data, including thermal model etc.
The thermal model may be simple (single fixed temperature at 11C, lacking any real knowledge) or more complex (looking up current temperature sensors---there are many---at the focal plane, either from the online DB, from archived DB, or real-time requests to the hardware. Or even by analyzing FVC image dot separations, if we do a physical test program to correlate them with FP temperature).
Also note that the GIFs will deform somewhat differently physically from everything else, since each pair of GIFs is mounted to a titanium plate on the GFA (which in turn is retrained by an aluminum housing). It's ~10 um effect at our operating temperature. See DESI-0998.