Commit 2bc0a747 authored by Peter Jansweijer's avatar Peter Jansweijer

repaired various typo's in comment

parent bb23a267
...@@ -32,7 +32,7 @@ Options: ...@@ -32,7 +32,7 @@ Options:
-ss slave serial port, default: "/dev/ttyUSB1" -ss slave serial port, default: "/dev/ttyUSB1"
-t track fiber spool temperature (using Digital Multimeter and PT100), default: False -t track fiber spool temperature (using Digital Multimeter and PT100), default: False
-o <dir> optional directory for output file storage, default: "data/" -o <dir> optional directory for output file storage, default: "data/"
-m <number> number of measurement cycles (default = 1 cyle is a sweep from -m <number> number of measurement cycles (default = 1 cycle is a sweep from
start to stop lambda) start to stop lambda)
""" """
...@@ -82,7 +82,7 @@ def run_with_limited_time(func, args, kwargs, time): ...@@ -82,7 +82,7 @@ def run_with_limited_time(func, args, kwargs, time):
############################################### ###############################################
# Found a neat python timout function on: # Found a neat python timout function on:
# https://stackoverflow.com/questions/492519/timeout-on-a-function-call # https://stackoverflow.com/questions/492519/timeout-on-a-function-call
# default retuns None when tim eout occurs # default returns None when timeout occurs
def timeout(func, args=(), kwargs={}, timeout_duration=1, default=None): def timeout(func, args=(), kwargs={}, timeout_duration=1, default=None):
import signal import signal
...@@ -126,7 +126,7 @@ def wr2wrpc(ser, cmd, prompt="slv=>"): ...@@ -126,7 +126,7 @@ def wr2wrpc(ser, cmd, prompt="slv=>"):
def sfp_ena(ser_slave): def sfp_ena(ser_slave):
# bring the link down and up again by dis-/en-abeling the TX laser # bring the link down and up again by dis-/en-abeling the TX laser
# Note that this forces the wr switch to re-sybc and bitslide but # Note that this forces the wr switch to re-sybc and bitslide but
# not the wr devidce (SPEC or CLB) connected to it; Their wr links # not the wr device (SPEC or CLB) connected to it; Their wr links
# is kept up # is kept up
wr2wrpc(ser_slave,"sfp ena 0\r","slv=>") wr2wrpc(ser_slave,"sfp ena 0\r","slv=>")
time.sleep (1) time.sleep (1)
...@@ -200,7 +200,7 @@ def wait_for_track_phase(ser_slave): ...@@ -200,7 +200,7 @@ def wait_for_track_phase(ser_slave):
# bring the link down and up again by dis-/en-abeling the TX laser # bring the link down and up again by dis-/en-abeling the TX laser
# Note that this forces the wr switch to re-sybc and bitslide but # Note that this forces the wr switch to re-sybc and bitslide but
# not the wr devidce (SPEC or CLB) connected to it; Their wr links # not the wr device (SPEC or CLB) connected to it; Their wr links
# is kept up # is kept up
sfp_ena(ser_slave) sfp_ena(ser_slave)
...@@ -222,7 +222,7 @@ def wait_for_track_phase(ser_slave): ...@@ -222,7 +222,7 @@ def wait_for_track_phase(ser_slave):
if "TRACK_PHASE" in stat_lst[6]: if "TRACK_PHASE" in stat_lst[6]:
track_phase = True track_phase = True
#except: #except:
# print ("### error occured while reading wr status.") # print ("### error occurred while reading wr status.")
# continue # continue
return(track_phase) return(track_phase)
...@@ -255,14 +255,14 @@ Options: ...@@ -255,14 +255,14 @@ Options:
-ss slave serial port, default: "/dev/ttyUSB1" -ss slave serial port, default: "/dev/ttyUSB1"
-t <IP> track fiber spool temperature (using PT100 and Digital Multimeter at IP address) -t <IP> track fiber spool temperature (using PT100 and Digital Multimeter at IP address)
-o <dir> optional directory for output file storage, default: "data/" -o <dir> optional directory for output file storage, default: "data/"
-m <number> number of measurement cycles (default = 1 cyle is a sweep from -m <number> number of measurement cycles (default = 1 cycle is a sweep from
start to stop lambda) start to stop lambda)
""" """
if __name__ == "__main__": if __name__ == "__main__":
#arguments = docopt(__doc__,version='White Rabbit controled via serial port') #arguments = docopt(__doc__,version='White Rabbit controlled via serial port')
import argparse import argparse
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument("-mserial", default="/dev/ttyUSB2") parser.add_argument("-mserial", default="/dev/ttyUSB2")
...@@ -275,7 +275,7 @@ if __name__ == "__main__": ...@@ -275,7 +275,7 @@ if __name__ == "__main__":
print("Use Slave Serial port: ",args.sserial) print("Use Slave Serial port: ",args.sserial)
print("Fiber spool temperature track: ",args.t) print("Fiber spool temperature track: ",args.t)
print("Output directory: ",args.output_dir) print("Output directory: ",args.output_dir)
print("Number of measuremnt cycles: ", args.measurements) print("Number of measurement cycles: ", args.measurements)
# add trailing slash if not present # add trailing slash if not present
output_dir = os.path.join(args.output_dir,'') output_dir = os.path.join(args.output_dir,'')
...@@ -300,7 +300,7 @@ if __name__ == "__main__": ...@@ -300,7 +300,7 @@ if __name__ == "__main__":
fixed_delay_mst=int(0) # Master (dTx + dRx) [ps] fixed_delay_mst=int(0) # Master (dTx + dRx) [ps]
fixed_delay_slv=int(0) # Slave (dTx + dRx) [ps] fixed_delay_slv=int(0) # Slave (dTx + dRx) [ps]
master_is_switch = False # If the master is a WR switch then the restart sequence is different from CLB or SPEC master_is_switch = False # If the master is a WR switch then the restart sequence is different from CLB or SPEC
master_has_tunable = True # detrmines wether the master or the slave has the tunable SFP (due to sfp functions needed master_has_tunable = True # determines whether the master or the slave has the tunable SFP (due to sfp functions needed
# this only works when master is a CLB or SPEC) # this only works when master is a CLB or SPEC)
# Master SFP (tunable) # Master SFP (tunable)
...@@ -318,12 +318,12 @@ if __name__ == "__main__": ...@@ -318,12 +318,12 @@ if __name__ == "__main__":
#itu_channel_increment = params["itu_channel_spacing"] #itu_channel_increment = params["itu_channel_spacing"]
itu_channel_increment = 1 itu_channel_increment = 1
crtt_measurement = 10 # number of crtt measurements over which the crtt is averaged crtt_measurement = 10 # number of crtt measurements over which the crtt is averaged
crtt_skip = 5 # skip first 5 crtt measurments crtt_skip = 5 # skip first 5 crtt measurements
restarts = 1 # number of link restarts over which the crtt is averaged restarts = 1 # number of link restarts over which the crtt is averaged
spool_temp = None # if not used then default None spool_temp = None # if not used then default None
if args.t != None: # open and configue Digital Multimeter with attached PT100 if args.t != None: # open and configure Digital Multimeter with attached PT100
import vxi11 import vxi11
dmm = vxi11.Instrument(args.t) dmm = vxi11.Instrument(args.t)
print(dmm.ask("*IDN?")) print(dmm.ask("*IDN?"))
...@@ -478,7 +478,7 @@ if __name__ == "__main__": ...@@ -478,7 +478,7 @@ if __name__ == "__main__":
meas_number = meas_number + 1 meas_number = meas_number + 1
print(curr_crtt, curr_drxm, curr_drxs) print(curr_crtt, curr_drxm, curr_drxs)
else: # next measurements compare bitslide check variables else: # next measurements compare bitslide check variables
# check for good measurment; criteria: # check for good measurement; criteria:
# 1) bitslides should all be equal (no hidden link resynchronizations) # 1) bitslides should all be equal (no hidden link resynchronizations)
# 2) crtt outliers bigger than 200 ps are not excepted (no hidden finetime jumps; # 2) crtt outliers bigger than 200 ps are not excepted (no hidden finetime jumps;
# a worry since wrpc-v4.1 and PPSi huge PPS offset repair) # a worry since wrpc-v4.1 and PPSi huge PPS offset repair)
...@@ -498,7 +498,7 @@ if __name__ == "__main__": ...@@ -498,7 +498,7 @@ if __name__ == "__main__":
crtt_mean = numpy.mean(crtt[(crtt_skip + 1):]) # skip first measurements crtt_mean = numpy.mean(crtt[(crtt_skip + 1):]) # skip first measurements
if args.t != None: # open and configue Digital Multimeter with attached PT100 if args.t != None: # open and configure Digital Multimeter with attached PT100
spool_temp =float(dmm.ask("MEAS:TEMP? FRTD")) spool_temp =float(dmm.ask("MEAS:TEMP? FRTD"))
print("sfp_channel: ", sfp_ch ,"itu_channel: ", ch ,"crtt avarage over "+str(crtt_measurement)+" measurments: "+str(crtt_mean)+" fiber-spool temp: "+str(spool_temp)) print("sfp_channel: ", sfp_ch ,"itu_channel: ", ch ,"crtt avarage over "+str(crtt_measurement)+" measurments: "+str(crtt_mean)+" fiber-spool temp: "+str(spool_temp))
......
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