code: def int2mjd(d, loc):
      
  
      # needs to take merge pkl dict
  
      if len(loc):
          intcol = d['featureind'].index('int')
          segmentcol = d['featureind'].index('segment')
          if d.has_key('segmenttimesdict'):  # using merged pkl
              scancol = d['featureind'].index('scan')
              t0 = np.array([d['segmenttimesdict'][loc[i,scancol]][loc[i,segmentcol],0] for i in range(len(loc))])
          else:
              t0 = d['segmenttimes'][loc[:,segmentcol]][:,0]
          return (t0 + (d['inttime']/(24*3600.))*loc[:,intcol]) * 24*3600
      else:
          return np.array([])
docs: Function to convert segment+integration into mjd seconds.