[INSTRM-1054] Provide logic for processing SM1 calibration data Created: 20/Aug/20  Updated: 30/Sep/20  Resolved: 30/Sep/20

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

Type: Story Priority: Normal
Reporter: hassan Assignee: arnaud.lefur
Resolution: Done Votes: 0
Labels: SPS
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to INSTRM-1065 add dedicated iic commands for calibr... Done
relates to PIPE2D-423 Regular DRP processing of LAM and Sub... In Progress
relates to INSTRM-1026 Add counter for physical SM configura... Done
relates to INSTRM-1035 Add fpaMoved keyword Done
relates to INSTRM-1036 Generate hexapodMoved, gratingMoved a... Done
Story Points: 6
Sprint: SM1PD-2020 G2, SM1PD-2020 H

 Description   

In order to process SM1 calibration data (biases, darks dithered flats) through the 2D DRP pipeline using the onsite/offside YAML mechanism being developed by sogo.mineo at NAOJ, we need to implement the logic of identifying the appropriate visits that should be used.

The agreement so far is to follow the approach cloomis posted on the slack #drp-2d channel on 2020-06-10:

I have been pushing for using the sequence caller ( sequence_type ) and major iic command ( name ), and requiring that the values for those be made useful for our decisions (e.g. name ==

Unknown macro: {masterBias, masterDark, ditheredFlat}

). I still think that is an OK idea. I think it is better than simply looking at the visit-by-visit progression of the exposure types as they come off the system (bias-bias-bias-dark-arc-object-bias, etc) and deducing what to do.

This needs to be elaborated, and implemented in the ICS, and related updates made to the opDB if necessary (which will be subject to a separate, future, ticket).



 Comments   
Comment by cloomis [ 21/Aug/20 ]

We have discussed this further and can specify things a bit better.

  • sps_visit.exp_type is one of bias, dark, flat, arc, object, test. This is essential information, but is not sufficient to know whether a visit is suitable for any particular purpose. For example, it says nothing about how the lamps are configured.
  • sps_sequence.sequence_type does show the purpose behind of a group of exposures, and IIC will set it to known fixed values which can drive reductions. The above values are a good start: masterBiases, masterDarks, ditheredFlats. Data with unrecognized values should be ignored by the calibration and science DRP machinery.
  • We will have additional relevant sequence_type}}s. For instance something like {{fieldCalibs, with a flat and one or more arcs to be associated with a particular pfsConfig.
  • sps_annotation.data_flag should be checked before using a file, and rows should be be added when bad data are uncovered. I believe that the lack of sps_annotation rows for a given (pfs_visit_id, sps_camera_id) indicates that the file is assumed to be OK.

From this, we need an IIC ticket to create the right sequence_type rows.

And besides this, INSTRM-1026 needs to be made more specific.

Comment by Masayuki Tanaka [ 24/Aug/20 ]

This sounds good to me.  Let me just confirm: sps_annotation.data_flag is 0 when the data is bad, correct?  It seems all the entries in the current sps_annotation table has data_flag=0.  If we are going to assume that the lack of entry means that the data is good, we may want to use flag=1 to indicate bad data?  We may even want to change the column name to something like flag_bad_data.

Comment by hassan [ 28/Aug/20 ]

Masayuki Tanaka following discussions with cloomis fmadec and arnaud.lefur: a data_flag of 0 (zero) will indicate good data. Non-zero values indicate bad data.

So all the entries in the current sps_annotation table are good.

We all agree with keeping the current name of data_flag.

Comment by Masayuki Tanaka [ 28/Aug/20 ]

OK, I misunderstood the meaning of the flag - in an opDB copy at NAOJ, I see comments like 'just testing SW' and 'FPGA still wrong' in the sps_annotation table, and I naively interpreted the words like 'test' and 'wrong' as 'do not use'.  That is how I misunderstood the flag.  Anyhow, as long as we are clear about the meaning of the flag, we do not need to change anything here.

Comment by sogo.mineo [ 29/Sep/20 ]

We call constructPfsBias.py with masterBiases,
constructPfsDark.py with masterDarks,
constructFiberFlat.py with ditheredFlats.

I have questions:

  • What are the arguments for bootstrapDetectorMap.py's --flatId and --arcId ?
  • What are FLAT_ODD and FLAT_EVEN for constructFiberTrace.py?
  • With what should we call reduceArc.py? (Maybe ditheredArcs?)
Comment by arnaud.lefur [ 30/Sep/20 ]

implemented an currently running at Subaru.

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