[INSTRM-864] Create Gen2 entrypoints for *published* IIC commands which control SPS Created: 19/Dec/19  Updated: 15/Oct/21  Resolved: 01/Oct/21

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

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

Issue Links:
Blocks
blocks INSTRM-778 Post-delivery, pre-operations SM1 cha... Done
is blocked by INSTRM-789 Add "sps expose" command to iicActor,... Done
is blocked by INSTRM-1342 make IIC arc/flat compatible with dcb... Done
Story Points: 3
Sprint: EngRun03

 Description   

Once we have the IIC commands to control the SPS, add the published ones to the Gen2 interface files.



 Comments   
Comment by yuki.moritani [ 10/May/20 ]

Looking the published commands, I think the following are needed for eng./sci. observations:

  • doExpose
  • doBias
  • doDark
  • doArc (to use the engineering fibers)
  • custom
  • abort

I think the following are needed, but using with PFIlamp.

  • ditheredFlats
  • ditheredArcs

I'm not sure if we need to execute the following from Gen2 (probably not):

  • doFlat (as it is for DCB)
  • slitThroughFocus
  • detThroughFocus

 

arnaud.lefur  I have a few questions.

  1. Is it possible to execute dither commands without turning on any dcb lamp? It seems that halogen will be on for flat...
  2. Shutter is controlled automatically for individual exposure type (object, dark, bias). Is this correct?
  3. How do you tread medium resolution? I guess currently defined cameras are b1 or r1 (no m1)... and I couldn't find how a command to move the red grating other than 'custom' command...
Comment by arnaud.lefur [ 11/May/20 ]
  1. you're right for ditheredFlats I'm automatically switching on halogen, once we got PFIlamp we'll need to treat this differently.
  2. that's correct.
  3. it hasn't been specifically treated yet, but there soon will be a sps go low/med command. 
Comment by yuki.moritani [ 19/May/20 ]

Thank you for your answers, Arnaud. I'll then work on the first group now...

 

I have come up with another question...   Commas "," are used in the option (parameter) cam  (cam=b1,r1 for instance), but I'm afraid comma is reserved letter in .sk file.

eric , is it correct that commas are used only at the end of line (async command) it is prohibited to use anywhere else? I mean, doesn't it work?

:Parameter
CAMERA="b1,r1"

...

:main_start
 Exec PFS PFSCMD ACTOR="iic" CMD="bias cam=$CAMERA (I skip other parameters)"

...
Comment by eric [ 19/May/20 ]

Commas are no problem inside strings. So if you pass a quoted string there will be no problem.

Comment by yuki.moritani [ 19/May/20 ]

I understood it. Thank you.

Comment by eric [ 19/May/20 ]

to clarify, your command here should be fine.

Comment by yuki.moritani [ 08/Sep/21 ]

comment by yuki.moritani  on 26/Aug/21 4:40 AM, copied over from INSTRM-865: 
 
For Engineering run in September 2021, the following command needs to be developed

  • IIC entry points for arc/trace/dithered-flat acquisition using pfi lamp, which is analogy of DCB data acquisition.
Comment by yuki.moritani [ 08/Sep/21 ]

comment by cloomis on 26/Aug/21 6:44 AM, copied over from INSTRM-865:
 
I think Arnaud and I are hoping that DCB and pfilamps are similar enough that we will not need different IIC commands. Basically, if the commanded SMs are all connected to the PFI or to the DCB, the iicActor and spsActor will control the appropriate light source with the same commands. If they are not, the IIC command will be rejected.

I believe that the only significant differences are that one light source has an HgCd lamp and the other an HgAr lamp, and that we need to make sure that the pfilamps never get turned on when inappropriate. I don't think either merits separate commands.

Does that make sense?

Comment by yuki.moritani [ 08/Sep/21 ]

comment by yuki.moritani on 26/Aug/21 7:33 PM, copied over from INSTRM-865:
 

OK, it is cared with INSTRM-1342

How do you treat fan control? Could you remind me that you always turn on/off per exposure, or keep the lamp on in a sequence?

Comment by yuki.moritani [ 08/Sep/21 ]

comment by cloomis on 26/Aug/21 7:42 PM, copied over from INSTRM-865
 
The fan is controlled automatically by the core pfilamps pi code. Warmup for subsequent HgCd exposures can be shorter, but that is handled between the sps and pfilamps actors: the spsActor does not have to wait as long.

OK, yes, part of INSTRM-1342 is to handle waiting for the lamps to become ready.

Comment by yuki.moritani [ 18/Sep/21 ]

eric I have one question about handling double-quotation

to take SpS exposure OFS command is as follows

oneCmd.py iic scienceTrace halogen=300 name="pfiLamps" comments="testing exposure time"

Using DD command, this should be passed as follows.

exec pfs pfscmd actor=ics cmd="scienceTrace halogen=300 name="pfiLamps" comments="testing exposure time""

That is, double-quotation needs to be passed.
Could you tell how to do it? When I tried to pass double quotation using back-slash for DD command to set message, it failed.

 

Comment by cloomis [ 18/Sep/21 ]

I agree that we need to know how to nest quoted strings, but I also think that for this particular ticket ("... published IIC commands...") we cannot use the pfscmd mechanism: all the primary observing commands need dedicated PARA commands. That would allow, in this case, exec pfs scienceTrace halogen=300 name="pfiLamps" comment="testing exposure time".

We still intend to disable pfscmd during normal operations, right?

Comment by yuki.moritani [ 18/Sep/21 ]

OK. I didn't know or forgot your plan...

I agree to the idea to create dedicated DD command for science operation, but for engineering run (it is nice to have, indeed,), but you may want to use the current pfscmd command for the time being, as we took MCS data in 2019...?

Comment by eric [ 21/Sep/21 ]

Quick answer: use square bracket quotes:

 

exec pfs pfscmd actor=ics cmd=[scienceTrace halogen=300 name="pfiLamps" comments="testing exposure time"]
 
 

In the long run, I will enhance the lexer to handle escaped nested quotes.

Comment by eric [ 21/Sep/21 ]

I've modified the lexer to handle single and double quotes, with nested escapes.  So you can now do:

exec pfs pfscmd actor=ics cmd='scienceTrace halogen=300 name="pfiLamps" comments="testing exposure time"'

if you prefer.

Strings are interpolated in oscript, and interpolation characters &, ! and @ need to be double-escaped to pass through the decoder. So if you need to pass one of these three characters, use double backslash
preceding it.

Comment by yuki.moritani [ 01/Oct/21 ]

As basic (primitive) gen2 .sk command was made for September run, I close this ticket for now.

For real operation, more dedicated entrypoints (.dd commands) are needed, rather than just passing iic commands.

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