recovering from missing smalldata
This commit is contained in:
@@ -17,10 +17,13 @@ def scan_info(run_number, base_path=None, small_data=True):
|
||||
|
||||
scan = SFScanInfo(f"{base_path}run{run_number:04}/meta/scan.json")
|
||||
|
||||
if small_data:
|
||||
for i in range(len(scan.readbacks)):
|
||||
sd_path_for_step=heuristic_extract_smalldata_path()+'run'+str(run_number).zfill(4)+'/acq'+str(i+1).zfill(4)+'.smalldata.h5'
|
||||
scan.info['scan_files'][i].append(sd_path_for_step)
|
||||
try:
|
||||
if small_data:
|
||||
for i in range(len(scan.readbacks)):
|
||||
sd_path_for_step=heuristic_extract_smalldata_path()+'run'+str(run_number).zfill(4)+'/acq'+str(i+1).zfill(4)+'.smalldata.h5'
|
||||
scan.info['scan_files'][i].append(sd_path_for_step)
|
||||
except KeyError:
|
||||
logger.warn("Failed to load smalldata.")
|
||||
|
||||
return scan
|
||||
|
||||
|
||||
Reference in New Issue
Block a user