09: Run batch, add prefix mechanism
This commit is contained in:
@ -62,6 +62,7 @@ def main():
|
||||
parser.add_argument('-m', type=int, default=2, help='Number M of sweeps per measurement')
|
||||
parser.add_argument('-o', type=int, default=30, help='Time in seconds between file outputs')
|
||||
parser.add_argument('-f', help='Output filename')
|
||||
parser.add_argument('-p', type=str, default='data_', help='Data output filename prefix')
|
||||
args = parser.parse_args()
|
||||
|
||||
# perform sanity checks on the arguments
|
||||
@ -85,7 +86,7 @@ def main():
|
||||
measurements = args.n or 0
|
||||
if args.f is None:
|
||||
# construct a filename from the parameters plus a timestamp (to avoid overwriting)
|
||||
output_filename = "data_l{}_k{}_w{}_d{}_{}.hdf5".format(lamb,kappa,width,delta,time.strftime("%Y%m%d%H%M%S"))
|
||||
output_filename = "{}l{}_k{}_w{}_d{}_{}.hdf5".format(args.p,lamb,kappa,width,delta,time.strftime("%Y%m%d%H%M%S"))
|
||||
else:
|
||||
output_filename = args.f
|
||||
|
||||
|
||||
Reference in New Issue
Block a user