def __init__(self, start_time=None, script_logfile=None, data_logfile=None): if start_time is None: self.start_time = time.time() else: self.start_time = start_time if script_logfile is None: self.script_logdir = pathnames.default_script_logdir( self.start_time) self.script_logfile = pathnames.default_script_logfile( self.start_time) else: self.script_logdir = os.path.split(script_logfile)[0] self.script_logfile = script_logfile if data_logfile is None: self.data_logdir = pathnames.default_data_logdir(self.start_time) self.data_logfile = pathnames.default_data_logfile(self.start_time) else: self.data_logdir = os.path.split(data_logfile)[0] self.data_logfile = data_logfile self.init_script_logging() self.script_log.info('initalized script logger') self.script_log.info('logging to %s' % self.script_logfile) self.init_data_logging() self.script_log.info('initialized data logger') self.script_log.info('storing data to %s' % self.data_logfile)
parser.add_argument( '-b', '--board', type=str, default=pathnames.default_board_file(start_time), help='path to .json file containing chip set info (default: %(default)s)') parser.add_argument('-c', '--chip', type=int, nargs='*', help='The chip ID(s) to configure', default=[]) parser.add_argument( '-t', '--threshold_rate', type=float, default=0.9, help='Threshold rate for configuring chips (optional, units: Hz, default:' ' %(default)s)') args = parser.parse_args() board_info = json.load(open(args.board, 'r')) for chip in board_info['chip_set']: if (not args.chip) or chip[0] in args.chip: command = ('python configure_chips.py ' '-o %s -v --chips %d --threshold_rate %f' % (\ pathnames.default_script_logdir(start_time), chip[0], args.threshold_rate)) print(command) system(command)
import json import os start_time = time.localtime() default_config = 'physics.json' parser = argparse.ArgumentParser() parser.add_argument( '-b', '--board', default=pathnames.default_board_file(start_time), help='input file containing chipset info (optional, default: ' '%(default)s)') parser.add_argument('-o', '--outdir', default=pathnames.default_script_logdir(start_time), help='output directory for log file and data files ' '(optional, default: %(default)s)') parser.add_argument('-v', '--verbose', action='store_true') parser.add_argument('--global_threshold', default=0, type=int, help='(optional, default: %(default)s)') parser.add_argument('-t', '--run_time', default=0.05, type=float, help='(optional, units: sec, default: %(default)s)') parser.add_argument( '-s', '--configuration_file',
from os import system import sys from larpix.quickstart import board_info_map import helpers.pathnames as pathnames import time import argparse import json start_time = time.localtime() parser = argparse.ArgumentParser() parser.add_argument('-b', '--board', type=str, default=pathnames.default_board_file(start_time), help='path to .json file containing chip set info (default: %(default)s)') parser.add_argument('-c', '--chip', type=int, nargs='*', help='The chip ID(s) to measure', default=[]) args = parser.parse_args() board_info = json.load(open(args.board,'r')) for chip in board_info['chip_set']: if (not args.chip) or chip[0] in args.chip: command = ('python check_pedestal_width_low_threshold.py ' '-o %s -v --chips %d' % (pathnames.default_script_logdir(start_time), chip[0])) print(command) system(command)
from os import system import sys from larpix.quickstart import board_info_map import helpers.pathnames as pathnames import time import argparse import json start_time = time.localtime() parser = argparse.ArgumentParser() parser.add_argument('-b', '--board', type=str, default=pathnames.default_board_file(start_time), help='path to .json file containing chip set info (default: %(default)s)') parser.add_argument('-c', '--chip', type=int, nargs='*', help='The chip ID(s) to configure', default=[]) args = parser.parse_args() board_info = json.load(open(args.board,'r')) for chip in board_info['chip_set']: if (not args.chip) or chip[0] in args.chip: command = ('python check_leakage.py -o %s -v --chips %d' % (pathnames.default_script_logdir(start_time), chip[0])) print(command) system(command)