copy and paste error and new interface for test
This commit is contained in:
parent
41f09dd0f8
commit
6f20651250
|
@ -33,7 +33,7 @@ parser.set_defaults(label = [],
|
||||||
|
|
||||||
(options,filenames) = parser.parse_args()
|
(options,filenames) = parser.parse_args()
|
||||||
|
|
||||||
if len(options.label) != len(options.delta):
|
if len(options.label) != len(options.offset):
|
||||||
parser.error('number of column labels and offsets do not match.')
|
parser.error('number of column labels and offsets do not match.')
|
||||||
|
|
||||||
# --- loop over input files -------------------------------------------------------------------------
|
# --- loop over input files -------------------------------------------------------------------------
|
||||||
|
@ -57,7 +57,7 @@ for name in filenames:
|
||||||
dims = []
|
dims = []
|
||||||
offsets = []
|
offsets = []
|
||||||
|
|
||||||
for what,factor in zip(options.label,options.offset):
|
for what,offset in zip(options.label,options.offset):
|
||||||
col = table.label_index(what)
|
col = table.label_index(what)
|
||||||
if col < 0: remarks.append('column {} not found...'.format(what,type))
|
if col < 0: remarks.append('column {} not found...'.format(what,type))
|
||||||
else:
|
else:
|
||||||
|
@ -80,7 +80,7 @@ for name in filenames:
|
||||||
|
|
||||||
outputAlive = True
|
outputAlive = True
|
||||||
while outputAlive and table.data_read(): # read next data line of ASCII table
|
while outputAlive and table.data_read(): # read next data line of ASCII table
|
||||||
for col,dim,factor in zip(columns,dims,factors): # loop over items
|
for col,dim,offset in zip(columns,dims,offsets): # loop over items
|
||||||
table.data[col:col+dim] = offset + np.array(table.data[col:col+dim],'d')
|
table.data[col:col+dim] = offset + np.array(table.data[col:col+dim],'d')
|
||||||
outputAlive = table.data_write() # output processed line
|
outputAlive = table.data_write() # output processed line
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue