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: To Do
    • Resolution: Unresolved
    • 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

          There are no comments yet on this issue.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            cslage Craig Lage
            Reviewers:
            Christopher Waters, Merlin Fisher-Levine
            Watchers:
            Craig Lage
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: