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

    • Bug
    • Status: Invalid
    • Resolution: Done
    • None
    • cp_pipe
    • None
    • Data Release Production
    • No

    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

          cslage Craig Lage created issue -
          czw Christopher Waters made changes -
          Field Original Value New Value
          Epic Link DM-26800 [ 439752 ]
          czw Christopher Waters made changes -
          Team Data Release Production [ 10301 ]
          czw Christopher Waters made changes -
          Epic Link DM-26800 [ 439752 ] DM-27952 [ 442725 ]
          yusra Yusra AlSayyad made changes -
          Epic Link DM-27952 [ 442725 ] DM-29159 [ 458527 ]
          yusra Yusra AlSayyad made changes -
          Epic Link DM-29159 [ 458527 ] DM-30478 [ 509211 ]
          czw Christopher Waters made changes -
          Epic Link DM-30478 [ 509211 ] DM-30539 [ 511197 ]
          yusra Yusra AlSayyad made changes -
          Epic Link DM-30539 [ 511197 ] DM-30546 [ 511212 ]
          czw Christopher Waters made changes -
          Epic Link DM-30546 [ 511212 ] DM-30554 [ 511220 ]
          yusra Yusra AlSayyad made changes -
          Epic Link DM-30554 [ 511220 ] DM-32156 [ 779836 ]
          yusra Yusra AlSayyad made changes -
          Epic Link DM-32156 [ 779836 ] DM-32163 [ 779863 ]
          yusra Yusra AlSayyad made changes -
          Epic Link DM-32163 [ 779863 ] DM-32170 [ 779886 ]
          plazas Andrés Alejandro Plazas Malagón made changes -
          Resolution Done [ 10000 ]
          Status To Do [ 10001 ] Invalid [ 11005 ]

          People

            Unassigned Unassigned
            cslage Craig Lage
            Christopher Waters, Merlin Fisher-Levine
            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.