desihub / desimeter

DESI coordinates and transformations
BSD 3-Clause "New" or "Revised" License
2 stars 4 forks source link

Postransforms #56

Closed joesilber closed 4 years ago

joesilber commented 4 years ago

Main description Positioner coordinate transformations. Math forked from postransforms.py in SVN.

Transforms are ready to use, in the pos2ptl module.

I tested 1000 combinations of random points and calibration parameters to confirm equivalence to postransforms. Test code and data set are included.

Fine print regarding angular travel ranges: The physical fiber positioner robot has hard limits on its angular travel ranges. In usage on the instrument, they are applied to the internally-tracked theta and phi angles, t_int and p_int, a.k.a. POS_T and POS_P, a.k.a. posintT and posintP.

The limit values are derived from a number of calibration parameters: PHYSICAL_RANGE_T, PHYSICAL_RANGE_P, PRINCIPLE_HARDSTOP_CLEARANCE_T, PRINCIPLE_HARDSTOP_CLEARANCE_P, SECONDARY_HARDSTOP_CLEARANCE_T, SECONDARY_HARDSTOP_CLEARANCE_P, BACKLASH, and near_full_range_reduced_hardstop_clearance_factor.

C.f. https://desi.lbl.gov/svn/code/focalplane/plate_control/trunk/petal/posmodel.py https://desi.lbl.gov/svn/code/focalplane/plate_control/trunk/petal/posconstants.py

The use of these parameters to determine range limits varies depending on the operational context.

This module makes the greatly simplifying assumption that it will not be used for instrument control, only for target selection or analyis purposes. Therefore angular range limits are NOT implemented here.

joesilber commented 4 years ago

Thank you, all suggested changes now done.

I did not spend time breaking up my previous test structure into separate functions in the new unittest. I know that would be better but costs time.

Also note that in the new unittest I set error tol = 5 um.

This is probably too loose, but awaits updates to r2s in xy2qs.