add device
This commit is contained in:
parent
67a5821af6
commit
4108e25bcb
2 changed files with 4 additions and 1 deletions
|
@ -1 +1 @@
|
|||
__version__ = '0.1.7.0'
|
||||
__version__ = '0.1.7.1'
|
||||
|
|
|
@ -83,6 +83,7 @@ def get_exp_list(directory):
|
|||
"""
|
||||
data = []
|
||||
for exp_dir in sorted(glob.glob(os.path.join(directory, '*'))):
|
||||
regulator_name = os.path.split(exp_dir)[1].split('-')[0]
|
||||
date = os.path.split(exp_dir)[1].split('-', maxsplit=1)[1].split('_')[0]
|
||||
data_filename = glob.glob(os.path.join(exp_dir, '*.dat.gz'))[0]
|
||||
meta_filename = glob.glob(os.path.join(exp_dir, '*yml'))[0]
|
||||
|
@ -90,12 +91,14 @@ def get_exp_list(directory):
|
|||
metadata = load_metadata(meta_filename)
|
||||
metadata['date'] = date
|
||||
metadata['path'] = exp_dir
|
||||
metadata['regulator'] = regulator_name
|
||||
data.append(metadata)
|
||||
|
||||
flattened_data = []
|
||||
for line in data:
|
||||
flattened_data.append({
|
||||
'Date': line['date'],
|
||||
'Device': line['regulator'],
|
||||
'Experiment': line['exp'],
|
||||
'Sample Type': line['sample']['type'],
|
||||
'Width': line['sample']['width'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue