|
|
@ -50,6 +50,7 @@ def parse_contents(contents, filename):
|
|
|
|
|
|
|
|
|
|
|
|
# Check instrument type
|
|
|
|
# Check instrument type
|
|
|
|
inst_type = basename.split('_')[-1]
|
|
|
|
inst_type = basename.split('_')[-1]
|
|
|
|
|
|
|
|
units = pd.read_csv(io.StringIO(decoded.decode('utf-8'))).columns[1]
|
|
|
|
if inst_type == 'WP':
|
|
|
|
if inst_type == 'WP':
|
|
|
|
df = pd.read_csv(io.StringIO(decoded.decode('utf-8')),
|
|
|
|
df = pd.read_csv(io.StringIO(decoded.decode('utf-8')),
|
|
|
|
index_col=0,
|
|
|
|
index_col=0,
|
|
|
@ -103,7 +104,7 @@ def parse_contents(contents, filename):
|
|
|
|
# Add spectral values to dataframe
|
|
|
|
# Add spectral values to dataframe
|
|
|
|
stats.loc[col, keys] = values
|
|
|
|
stats.loc[col, keys] = values
|
|
|
|
|
|
|
|
|
|
|
|
info = {'filename': filename, 'instrument type': inst_type}
|
|
|
|
info = {'filename': filename, 'instrument type': inst_type, 'units': units}
|
|
|
|
json_data = {}
|
|
|
|
json_data = {}
|
|
|
|
json_data['info'] = info
|
|
|
|
json_data['info'] = info
|
|
|
|
json_data['timeseries'] = df.to_json(orient='table')
|
|
|
|
json_data['timeseries'] = df.to_json(orient='table')
|
|
|
|