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

          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.