Commit b84f5c7c authored by Peter Jansweijer's avatar Peter Jansweijer

added timestamp to measurements

parent 78e72a0f
......@@ -385,7 +385,7 @@ if __name__ == "__main__":
data_file.write(("#CRTT measurement for ITU Channel " + str(ch) + "\n").encode())
data_file.write(("#date:"+time.strftime(format("%d %b %Y"),timestamp)+"\n").encode())
data_file.write(("#time:"+time.strftime(format("%H:%M:%S"),timestamp)+"\n").encode())
data_file.write(("#sfp_channel, ITU channel, ITU wavelength, crtt [ps], drxm, drxs, fiber-spool-temp, wr-slave-temp\n").encode())
data_file.write(("#sfp_channel, ITU channel, ITU wavelength, crtt [ps], drxm, drxs, fiber-spool-temp, wr-slave-temp, meas-time\n").encode())
sfp_ch = tunable.sfp_channel(ch)
frequency = itu_conv.itu_2_frequency(ch)
......@@ -477,8 +477,9 @@ if __name__ == "__main__":
if args.t != None: # open and configure Digital Multimeter with attached PT100
spool_temp =float(dmm.ask("MEAS:TEMP? FRTD"))
meas_time = time.strftime(format("%H:%M:%S"),time.localtime())
print("sfp_channel: ", sfp_ch ,"itu_channel: ", ch ,"crtt average over "+str(crtt_measurement)+" measurements: "+str(crtt_mean)+" fiber-spool temp: "+str(spool_temp))
data_file.write((str(sfp_ch)+", "+str(ch)+", "+str(wavelength)+", "+str(crtt_mean)+", "+str(curr_drxm)+", "+str(curr_drxs)+", "+str(spool_temp)+", "+str(curr_temp)+"\n").encode())
data_file.write((str(sfp_ch)+", "+str(ch)+", "+str(wavelength)+", "+str(crtt_mean)+", "+str(curr_drxm)+", "+str(curr_drxs)+", "+str(spool_temp)+", "+str(curr_temp)+", "+str(meas_time)+"\n").encode())
except:
print ("### exception during crtt_measurements.")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment