[INSTRM-1521] Visualize Cobra convergence Created: 05/Feb/22  Updated: 21/Apr/22  Resolved: 21/Apr/22

Status: Done
Project: Instrument control development
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Normal
Reporter: yuki.moritani Assignee: karr
Resolution: Done Votes: 0
Labels: EngRun, visualization
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to INSTRM-1277 Adding cobra information GUI in pfiGUI Done
Story Points: 4
Sprint: PreEngRun05 E, PreEngRun05 F

 Description   

This ticket is based on the discussion at the commissioning telecon in Dec 2021.

Cobra convergence status and geometry of focal plane needs to be visualized. For example, 

  • Plot(s) to easily know Cobra ID (on the focal plane, and/or on an SpS detector image)
  • Plot(s) to know disabled cobras and broken fibers
  • Plot(s) to know on-going process 
  • Plot to know convergence results (e.g., residual map, histogram) 
  • Focal plane map plotting target, fiber positions, overlaying the positions of the black spots

ASIAA already have made these plots for analysis, but it is necessary to visualize/share in real time.



 Comments   
Comment by hassan [ 25/Feb/22 ]

Chi-Hung and Jennifer will sit together to discuss work, reducing overlaps, and establish the necessary commands. Then corresponding detailed tickets will be filed.

Comment by karr [ 25/Mar/22 ]

Currently the code is in two main places - Jennifer's code in dev_ics (convergence plots, individual bad cobra plots, cumulative plots of % converged by iteration), and Chi-Hung's in ics_cobraCharmer (convergence plots, motor map and other convergence plots, histograms of convergence by iteration). The former has database integration, the latter uses numpy/FITS files, and includes some analysis code, but is properly integrated with the current geometry/calibration file setup. 

 

I will combine the two sets of code into a single cobra convergence diagnostic module with with database integration and the up to date geometry, and a combination of both sets of diagnostic plots. 

 

 

Comment by karr [ 01/Apr/22 ]

Current structure is a class which is initialized with the geometry, after which a convergence set referenced by pfsVisitId can be loaded from the database. From there, various plots can be called

  • map of convergence distance
  • map of converged / nonconverged
  • add overlays of hard-stops / broken fibres / cobras / fiducials / dots
  • map of transformation function accuracy (ie, vector plot of error in positions of ff)
  • histograms of convergence distance
  • cumulative fraction of cobras converged by iteration
  • maps of motion/convergence of individual cobras

The call will pass back a matplotlib figure. 

 

Comment by hassan [ 08/Apr/22 ]

karr will push a prototype module today to {

{dev_ics}

}

Comment by karr [ 11/Apr/22 ]

A draft version has been pushed to branch 1521. 

The notebook shows a demo of how to run the code. 

 

Comment by karr [ 21/Apr/22 ]

Will close this ticket, and open other smaller ones as changes need to be madel

Generated at Sat Feb 10 16:36:27 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.