[INSTRM-1737] Set OBJECT card a bit more carefully. Created: 04/Oct/22  Updated: 20/May/23

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

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

Attachments: PNG File Usecase_INSTRM1737.png    
Issue Links:
Relates
relates to INSTRM-1767 OBJECT key value incorrect for certai... Open
Story Points: 2

 Description   

We get the value of the FITS OBJECT card directly from the Gen2 PFS.OBJECT key, which is set by the PFS pfs_kansoku routines on Gen2 only when we (PFS) are running. To avoid stale values, we need to be a bit more careful.

For SPS files (PFSA/PFSB), we can use the SM's lightSource value. If it is "pfi", use PFS.OBJECT, otherwise just use the lightSource ("dcb", "dcb2", "sunss", "none"). This does depend on the Gen2 kansoku scripts updating OBJECT correctly, but that is out of our hands.

For AGCC, we should use PFS.OBJECT if any of the active lightSources are "pfi". Else we should use "unknown" for now, I think. We will eventually have a mechanism for telling that we are on the TUE system, but we don't know the details of that yet.

For MCS, we should probably use the same scheme as AGCC. Maybe use the pfsDesign if we are on the PFI? That feels wrong to me, given that we do have the design itself.



 Comments   
Comment by yuki.moritani [ 04/Oct/22 ]

For PFI (PFSC/PFSD) file, I guess there is a case where test MCS camera (71M) is used.

Comment by yuki.moritani [ 28/Oct/22 ]

As talked in ICS/PFI+MCS telecon on 14 October 2022,  I'm trying to summarise the use cases:

Because the subsystems are used rather independently off the telescope, the table is a little complicated (I'm sorry). The right column shows proposed OBJECT card. Since there are many cases, I'd propose simply to use PFS.OBJECT key when command is sent from Gen2, and use "unknown" for any other cases, if it is feasible (red letter in the figure)...

Comment by cloomis [ 16/Dec/22 ]

I'm just committing the PFSA changes now, though PFSB will get those. The logic is close to what was proposed:

if data-typ in {bias, dark}:
    object = 'dark'
elif lightSource in {dub, dcb2, sunss}:
    object = lightSource
else:
    object = gen2.pfs.object 

If this is OK I'll merge the ics_utils and ccdActor parts and tag and install those.

Comment by arnaud.lefur [ 20/May/23 ]

just adding another case for arc/flats taken on the telescope, set object to 'lamps' ?

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