more tests that rely on /sf fixed

This commit is contained in:
2023-04-03 16:36:55 +02:00
parent c4f7b845a0
commit 289404c669

View File

@@ -4,6 +4,7 @@ import logging
logger = logging.getLogger()
import numpy as np
import sfdata
from sfdata import SFDataFiles, sfdatafile, SFScanInfo, SFProcFile
from xraydb import material_mu
from joblib import Parallel, delayed, cpu_count
@@ -93,11 +94,15 @@ def print_run_info(
print(f"Total file size: {total_size/(1024*1024*1024):.1f} GB\n")
for step in scan:
ch = step.channels
print("\n".join([str(c) for c in ch]))
# print only channels for first step
break
try:
for step in scan:
ch = step.channels
print("\n".join([str(c) for c in ch]))
# print only channels for first step
break
except sfdata.errors.NoUseableFileError:
logger.warning("Cannot access files on /sf...")
def number_of_steps(scan_number_or_scan):
"""Returns number of steps for a scan object or run number"""