desihub / desimeter

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

Update to spotmatch usage #152

Closed julienguy closed 3 years ago

julienguy commented 3 years ago

Update to spotmach usage in desi_fvc_proc with expected coordinates (or targets in spotmatch parlance). Runs twice spotmatch, first to match fiducials using the default transfo, and second to match positioners after the transfo has been refined using the positions of fiducials.

This method to run desi_fvc_proc was written essentially to debug spotmatch.

Example:

# get expected positions
get_poscoords --host beyonce.lbl.gov --port 5432 --password xxx --exposure-id 3191 --exposure-iter 1 --outfile expected-coords-3191-1.csv --petal-ids 1
# fit fvc image, and match with spotmatch
desi_fvc_proc -i fvc.00003191_0001.fits --use-spotmatch --expected expected-coords-3191-1.csv -o fvc.00003191_0001.csv --spotmatch-match-radius-pixels 30.
# three unmatched for this test case
plot_fvc_residuals -i fvc.00003191_0001.csv --expected --posids M06469,M07993,M06807

Figure_1

joesilber commented 3 years ago

Looks good.

Towards the end of desi_fvc_proc I see an astropy warning:

read 528 entries in /tmp/desimeter_spotmatch_output_centers.txt
/software/products/python-3.6.6.Linux64/lib/python3.6/site-packages/astropy/table/row.py:76: FutureWarning: elementwise == comparison failed and returning scalar instead; this will raise an error or perform elementwise comparison in the future.
  return self.as_void() == other
wrote fvc.00003191_0001.csv

Not sure if this is significant but maybe should be fixed.