Add manual choice of active roi
This commit is contained in:
parent
b5cac158a4
commit
da7099a924
1 changed files with 7 additions and 2 deletions
|
|
@ -12,7 +12,7 @@ def split_scan_data(data: dict, options={}) -> list:
|
||||||
As of now only picks out xmap_rois (fluoresence mode) and for Mn, Fe, Co and Ni K-edges.'''
|
As of now only picks out xmap_rois (fluoresence mode) and for Mn, Fe, Co and Ni K-edges.'''
|
||||||
|
|
||||||
|
|
||||||
required_options = ['log', 'logfile', 'save', 'save_folder', 'replace', 'add_rois', 'return']
|
required_options = ['log', 'logfile', 'save', 'save_folder', 'replace', 'active_roi', 'add_rois', 'return']
|
||||||
|
|
||||||
default_options = {
|
default_options = {
|
||||||
'log': False,
|
'log': False,
|
||||||
|
|
@ -20,6 +20,7 @@ def split_scan_data(data: dict, options={}) -> list:
|
||||||
'save': False, # whether to save the files or not
|
'save': False, # whether to save the files or not
|
||||||
'save_folder': '.', # root folder of where to save the files
|
'save_folder': '.', # root folder of where to save the files
|
||||||
'replace': False, # whether to replace the files if they already exist
|
'replace': False, # whether to replace the files if they already exist
|
||||||
|
'active_roi': None,
|
||||||
'add_rois': False, # Whether to add the rois of individual scans of the same edge together
|
'add_rois': False, # Whether to add the rois of individual scans of the same edge together
|
||||||
'return': True
|
'return': True
|
||||||
}
|
}
|
||||||
|
|
@ -200,7 +201,11 @@ def read_data(data: dict, options={}) -> pd.DataFrame:
|
||||||
|
|
||||||
scan_data = pd.read_csv(filename)
|
scan_data = pd.read_csv(filename)
|
||||||
|
|
||||||
|
if not options['active_roi']:
|
||||||
scan_data = scan_data[[determine_active_roi(scan_data)]]
|
scan_data = scan_data[[determine_active_roi(scan_data)]]
|
||||||
|
else:
|
||||||
|
scan_data = scan_data[options['active_roi']]
|
||||||
|
|
||||||
xanes_data = pd.concat([xanes_data, scan_data], axis=1)
|
xanes_data = pd.concat([xanes_data, scan_data], axis=1)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue