desihub / desimeter

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

incorrect z=0 assumption? #60

Closed joesilber closed 4 years ago

joesilber commented 4 years ago

When calling ptl2fp, with an argument of zptl=None, a dummy vector is generated for ptlz full of zeros: https://github.com/desihub/desimeter/blob/f3e2500d70e91ea72b180fb2ce5f6493ecc5b6d2/py/desimeter/transform/ptl2fp.py#L85-L88

But this does not match the curved focal surface. I would have thought we need to instead:

  1. Calculate r_ptl = np.hypot(xptl, yptl).
  2. Estimate z_ptl using a function like R2Z_lookup() in posconstants.py. (https://desi.lbl.gov/trac/browser/code/focalplane/plate_control/trunk/petal/posconstants.py#L66)

Easy to add this r2z (and z2r) to the desimeter transforms package if desired.

I might not be understanding some subtlety of how the "ptl" coordinates are meant to be interpreted.

julienguy commented 4 years ago

please go ahead and fix this @joesilber . I had been lazy and added this zptl=None default as a short cut to produce some plots.

joesilber commented 4 years ago

Ok great will do

sbailey commented 4 years ago

Agreed with @julienguy. This is an oversight / shortcut; nothing subtle.

joesilber commented 4 years ago

Closed in PR #59