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

add ok2move script #104

Merged
merged 3 commits into from
Jun 29, 2020
Merged

add ok2move script #104

merged 3 commits into from
Jun 29, 2020

Conversation

sbailey
Copy link
Collaborator

@sbailey sbailey commented Jun 29, 2020

This PR adds an ok2move script that identifies which positioners are likely ok to move based upon the geometry to their two nearest neighbors. This is intended to be used as part of the recovery for a collision incident where positioners can get trapped between others. ok2move takes an input table of spots matched to positioners (e.g. using PR #102) and prints groups of positioners that are safe to move or optionally writes those lists to a file. It also optionally can output QA plots of the positioners in each group for a human double check before moving them (takes several minutes to generate all the plots at NERSC).

(desi) [ok2move*] desimeter $ ok2move --help
usage: ok2move [options]

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        input table of spots matched to positioners
  -o OUTPUT, --output OUTPUT
                        output file of positioners ok to move
  -g GROUPSIZE, --groupsize GROUPSIZE
                        Size of groups of positioners for output [default 50]
  --plotdir PLOTDIR     base directory for QA plots (requires --fvcimage too)
  --fvcimage FVCIMAGE   input FVC image (required if --plotdir ...)
  --extname EXTNAME     extname of FVC file to use

The output text is intended for cutting-and-pasting to ICS quick_move, and is split into groups (adjustable with --groupsize):

group0 = ['M08246','M08025','M08138','M08020','M08204','M08021','M08023','M08127','M07802','M08239','M08264','M08257','M08258','M07705','M07706','M08022','M08228','M08123','M08260','M08268','M01908','M02388','M01051','M08238','M02049','M08089','M01606','M01057','M08283','M08259','M02145','M05997','M08122','M07672','M08218','M07103','M07551','M08207','M08107','M08475','M01373','M01999','M08008','M08265','M07099','M07703','M07875','M05993','M07813','M07003']
group1 = ['M07810','M08206','M06003','M00628','M01451','M06002','M08277','M06533','M01475','M08081','M02161','M01060','M02278','M01436','M07876','M02224','M08285','M01578','M06537','M08103','M02187','M01437','M01657','M01066','M06535','M02002','M08289','M05669','M08220','M01620','M08305','M08317','M08043','M01409','M08039','M06896','M08173','M08275','M08074','M08215','M02071','M08175','M02220','M07782','M08105','M08316','M06846','M08045','M08046','M08042']
...

Example output plots:
image

In the end, the intended procedure is that one would use this to identify positioners that could be safely moved, rehome those in groups, and then remeasure the location of all positioners and rerun ok2move to identify new positioners that are not safe to move.

A potential improvement would be to identify which positioners are safe to move in +phi vs. -phi, but I'm starting with a PR for the minimally useful functionality, while trusting anti-collision checks to prevent further crashes; this PR just focuses the work on positioners that could move.

@sbailey sbailey requested a review from julienguy June 29, 2020 02:52
@julienguy julienguy merged commit 1630701 into master Jun 29, 2020
@julienguy julienguy deleted the ok2move branch September 1, 2020 22:16
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