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

Focus scan analysis #1027

Merged
merged 7 commits into from
Nov 18, 2020
Merged

Focus scan analysis #1027

merged 7 commits into from
Nov 18, 2020

Conversation

julienguy
Copy link
Contributor

Add script desi_focus to analyse a sequence of focus scans.

  • preprocess exposures
  • detect spots, fit gaussian per spot per exposure and save as csv table
  • merge tables, bin or match values of given fiber/wavelength
  • best fit focus for each bin or spot
  • fit best focus plane as a function of xccd , yccd
  • convert to gauge offsets for the 3 screws adjusting the cryostat piston and tilt

Example for SM10 red camera

desi_focus -i /global/homes/j/jguy/data/20200109/0003924{1,2,3,4,6,7,8}/desi-000*.fits.fz -o . --cam r1 --offsets=-150,-100,-50,0,50,100,150 --gauges=60.750,60.946,61.084 --plot --testslit

Average best fit piston
focus-scan

Sigma values for best exposure (note some fibers are off in test slit)
best-exposure-39246

Best focus per spot (wavelength, fiber) and best plane fit
best-focus-plane

Comparison with analysis of AMU team for some spectrographs

Spec  AMU  This_work    Difference
------------------------------------------------------------------------
    TOP LEFT RIGHT TOP LEFT RIGHT TOP LEFT RIGHT
SM7 60.601 61.451 61.597 60.585 61.479 61.583 -0.016 0.028 -0.014
SM8 60.698 60.927 60.936 60.699 60.928 60.927 0.001 0.001 -0.009
SM9 60.885 61.065 61.259 60.886 61.070 61.237 0.001 0.005 -0.022
SM10 60.728 61.035 61.202 60.737 61.034 61.177 0.009 -0.001 -0.025

@sbailey
Copy link
Contributor

sbailey commented Nov 13, 2020

Overall, looks good, though please add docstrings for all functions for long term maintainability, including defining the return values of functions.

@sbailey sbailey merged commit 0109461 into master Nov 18, 2020
@sbailey sbailey deleted the focus branch November 18, 2020 00:13
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.

None yet

2 participants