bugfix: filename
This commit is contained in:
parent
7687d4f022
commit
f92bd36a76
|
|
@ -8,7 +8,7 @@ import numpy as np
|
|||
import ucf
|
||||
import configparser
|
||||
|
||||
parser = argparse.ArgumentParser(description='Reads an ucf.tar archive, downsamples it and saves it to a new ucf.tar archive. Can be used as a pipe.')
|
||||
parser = argparse.ArgumentParser(description='Packs UCF MPIIO data into a tar archive. The single output file is split into multiple files due to file size restrictions.')
|
||||
parser.add_argument('indir', metavar='dirin', help='input directory')
|
||||
parser.add_argument('iseq', metavar='iseq', help='sequence number')
|
||||
parser.add_argument('base', metavar='base', help='filebase to be archived: "uvwp" or "scal"')
|
||||
|
|
@ -52,7 +52,7 @@ if verbose:
|
|||
ftar = tarfile.open(name=file_out,mode='w',pax_headers=tarfile.USTAR_FORMAT)
|
||||
|
||||
def transform_filename(filename,iseq):
|
||||
return os.path.basename(file_in).replace('_{:04d}'.format(iseq),'')
|
||||
return os.path.basename(filename).replace('_{:04d}'.format(iseq),'')
|
||||
|
||||
# Parse parameters to construct file headers, then add it to tar
|
||||
file_in = '{}/parameters_{:04d}.asc'.format(dir_in,iseq)
|
||||
|
|
|
|||
Loading…
Reference in New Issue