[INSTRM-1296] Add IIC commands for main FPS routines. Created: 21/Jun/21  Updated: 15/Oct/21  Resolved: 09/Sep/21

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

Type: Task Priority: Normal
Reporter: cloomis Assignee: arnaud.lefur
Resolution: Done Votes: 0
Labels: EngRun
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
is blocked by INSTRM-1297 Add visit= argument to main fps commands Done
is blocked by INSTRM-1305 rename sps_sequence to iic_sequence i... Done
Story Points: 4
Sprint: EngRun03
Reviewers: cloomis

 Description   

The following are the main FPS commands which require a visit id, and so must be commanded from iic. Note that there are a couple of cosmetic changes from the existing code; please use this list.

  ('moveToPfsDesign', '<visit> <pfsDesign>', ),
  ('movePhiToAngle', '<visit> <angle> <iteration>', ),
  ('moveToHome', '<visit> @(phi|theta|all)', ),
  ('moveToSafePosition', '<visit>', ),
  ('gotoVerticalFromPhi60', '<visit>', ),
  ('makeMotorMap', '<visit> @(phi|theta) <stepsize> <repeat> [@slowOnly]', ),
  ('makeOntimeMap', '<visit> @(phi|theta)', ),
  ('angleConvergenceTest', '<visit> @(phi|theta) <angleTargets>', ),
  ('targetConvergenceTest', '<visit> @(ontime|speed) <totalTargets> <maxsteps>', ),
  ('motorOntimeSearch', '<visit> @(phi|theta)', ),

I imagine we will rename gotoVerticalFromPhi60, but perhaps not right now.



 Comments   
Comment by arnaud.lefur [ 22/Jun/21 ]

fair enough, so these are the equivalent of an _sps expose visit=.. _basically ?
So we would need one iic command/sequence per fps command ?
Do we need external argument at the iic level, duplicate=.. for instance to run the same fps command several times ?

Comment by cloomis [ 22/Jun/21 ]

Yes, one iic sequence per command. Umm, resources would be the MCS, the SPS back-illuminators, FPS itself, and possibly some internal PEB illuminator (for the fiducials).

No duplicates. Internally there is that repeat for makeMotorMap but I suspect it can't be used because of the 100-frame limit, and the making a motor map is such a huge process that supporting duplicates at the iic level is a bit crazy.

Hmm. The existing FpsCmd.py predates integration of PfsDesign. I just added a <pfsDesign> argument to moveToPfsDesign, but it is not quite obvious how `iic` should get the design. It will be provided by some external program.

The existing boresight commands are real and must be kept functional. The set of them run in a slightly odd dance.

Comment by arnaud.lefur [ 23/Jun/21 ]

I made some good progress today, now I need to fix some opdb issues.

2021-06-22T17:25:19.299 iic f text="command failed: IntegrityError('(psycopg2.errors.ForeignKeyViolation) insert or update on table \"visit_set\" violates foreign key constraint \"visit_set_pfs_visit_id_fkey\"\nDETAIL:  Key (pfs_visit_id)=(311) is not present in table \"sps_visit\".\n') in do_execute() at /home/arnaud/miniconda3/lib/python3.7/site-packages/sqlalchemy/engine/default.py:588"

which means that visit_set and sps_visit are linked somehow.
but if sps_sequence=> iic_sequence, mcs_visit would also to be tracked in visit_set.

Comment by arnaud.lefur [ 09/Sep/21 ]

still a bit crude but mergeable

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