Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large trace shifts #2334

Merged
merged 7 commits into from
Aug 22, 2024
Merged

Large trace shifts #2334

merged 7 commits into from
Aug 22, 2024

Conversation

julienguy
Copy link
Contributor

Code to compute large trace shifts based on detection and match of spots in CCD image from an arc lamp exposure.
Example (based on data from the SM10 collimator mirror exchange):

cp $DESI_SPECTRO_REDUX/daily/calibnight/20220612/psfnight-r1-20220612.fits .
desi_preproc -i $DESI_SPECTRO_DATA/20220612/00139415/desi-00139415.fits.fz  --cam r1 preproc-r1-00139415.fits
desi_preproc -i $DESI_SPECTRO_DATA/20220613/00139516/desi-00139516.fits.fz  --cam r1 preproc-r1-00139516.fits

desi_compute_large_trace_shifts --ref-image preproc-r1-00139415.fits --image preproc-r1-00139516.fits  --ref-psf psfnight-r1-20220612.fits  -o psf-r1-first.fits --plot

# INFO:large_trace_shifts.py:87:main: Refined delta_x = 2.93 delta_y = -2.75 rms dist = 0.08

desi_compute_trace_shifts --image preproc-r1-00139516.fits --psf psf-r1-first.fits --arc-lamps --outpsf psf-r1-refined.fits

# INFO:trace_shifts.py:201:fit_trace_shifts: Subtract median(dy)=-0.029203938233156583
# INFO:trace_shifts.py:242:fit_trace_shifts: polynomial fit of measured offsets with degx=(2,2) degy=(2,2)
# INFO:trace_shifts.py:247:fit_trace_shifts: dx dy error floor = 0.000 0.000 pixels
# INFO:trace_shifts.py:249:fit_trace_shifts: check fit uncertainties are ok on edge of CCD
# INFO:trace_shifts.py:264:fit_trace_shifts: max edge shift error = 0.007 pixels
# INFO:trace_shifts.py:317:fit_trace_shifts: central shifts dx = -0.025 +- 0.001 dy = -0.005 +- 0.001 

scatter plot of measured spots CCD image coordinates for the reference and current image

Screenshot from 2024-08-22 11-10-23

blue crosses: reference spots ; red dots: current spots; orange dots: current spots with offsets subtracted

Screenshot from 2024-08-22 11-10-36

@sbailey sbailey merged commit 592e2e8 into main Aug 22, 2024
24 of 26 checks passed
@sbailey sbailey deleted the large_trace_shifts branch August 22, 2024 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants