Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-27085

cp_pipe photodiode.py sometimes fails to find the right file

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Invalid
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: cp_pipe
    • Labels:
      None

      Description

      The code in photodiode.py is intended to find and retrieve the BOT photodiode data.  It sometimes fails because the date extracted from dayObs doesn't match the date in expId when the date is rolling over.  By extracting the date from expId, I was able to make a change that consistently found the right file.  There are probably better fixes, but this worked.

          # Lage - This code failed sometimes because of dayObs rollover                                                                                                                                                                  
          #dayObs = getKeyFromDataId(dataRef, 'dayObs')                                                                                                                                                                                   
          #seqNum = getKeyFromDataId(dataRef, 'seqNum')                                                                                                                                                                                   
          #dayObsAsNumber = dayObs.replace('-', '')   
                                                                                                                                                                                              
          # Lage - Replaced with this, which worked consistently                                                                                                                                                                          
          expId = getKeyFromDataId(dataRef, 'expId')
          dayObsAsNumber = int(str(expId)[0:8]) - 10000000 # Convert from 3019 to 2019                                                                                                                                                    
          seqNum = int(str(expId)[8:13])    
          filePattern = 'Photodiode_Readings_%s_%06d.txt'
          diodeFilename = os.path.join(dataPath, filePattern % (dayObsAsNumber, seqNum))
      
      

        Attachments

          Activity

          Hide
          plazas Andrés Alejandro Plazas Malagón added a comment -

          Done in https://jira.lsstcorp.org/browse/DM-36335 and DM-33586

          A linearizer can be created using photodiode data (for LSSTCam) with the following pipeline: 

          https://github.com/lsst/cp_pipe/blob/main/pipelines/cpLinearityCorrected.yaml 

          Show
          plazas Andrés Alejandro Plazas Malagón added a comment - Done in  https://jira.lsstcorp.org/browse/DM-36335  and  DM-33586 A linearizer can be created using photodiode data (for LSSTCam) with the following pipeline:  https://github.com/lsst/cp_pipe/blob/main/pipelines/cpLinearityCorrected.yaml  

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            cslage Craig Lage
            Reviewers:
            Christopher Waters, Merlin Fisher-Levine
            Watchers:
            Andrés Alejandro Plazas Malagón, Craig Lage
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.