Skip to content
Snippets Groups Projects
Commit d4cd603d authored by Henri Payno's avatar Henri Payno
Browse files

black

parent 5b424292
No related branches found
No related tags found
No related merge requests found
Pipeline #102740 passed
......@@ -47,7 +47,6 @@ _logger = logging.getLogger(__name__)
class EDFFrameReducer(FrameReducerBase):
RAW_FLAT_RE = "ref*.*[0-9]{3,4}_[0-9]{3,4}"
"""regular expression to discover flat files"""
......@@ -364,7 +363,6 @@ class EDFFrameReducer(FrameReducerBase):
return res, infos
def preprocess(self):
# start setup function
if self.reduced_method is ReduceMethod.NONE:
return False
......
......@@ -55,7 +55,6 @@ class MockEDFWithRawRef(_MockEDF):
electrical_current: Optional[numpy.array] = None,
count_time: Optional[numpy.array] = None,
):
self.flat_n = len(flats[list(flats.keys())[0]]) if len(flats) > 0 else 0
self.dark_n = len(flats[list(darks.keys())[0]]) if len(darks) > 0 else 0
self.flats = flats
......
......@@ -394,7 +394,6 @@ class MockHDF5(ScanMock):
y_pos=None,
z_pos=None,
):
with h5py.File(self.scan_master_file, "a") as h5_file:
entry_one = h5_file.require_group(self.scan_entry)
instrument_grp = entry_one.require_group("instrument")
......
......@@ -558,7 +558,6 @@ def test_HDF5TomoScan_nxversion():
distance=1.0,
energy=1.0,
) as scan:
hdf5scan = HDF5TomoScan(scan.master_file)
# The default behavior is to take NX 1.1 if not present in file metadata
# This is not future-proof, perhaps do a _NEXUS_PATHS_LATEST class ?
......
......@@ -333,7 +333,7 @@ def get_datasets_linked_to_vds(url: DataUrl):
to_treat = list(virtual_dataset_to_treat)
virtual_dataset_to_treat.clear()
for (file_path, dataset_path, dataset_slice) in to_treat:
for file_path, dataset_path, dataset_slice in to_treat:
if (file_path, dataset_path, dataset_slice) in already_checked:
continue
if os.path.exists(file_path):
......
......@@ -29,7 +29,6 @@ __date__ = "10/01/2022"
class BaseIdentifier:
TOMO_TYPE = None
def __init__(self, object):
......
class NEXUS_MONITOR_PATH:
DATA_PATH = "data"
......
......@@ -300,7 +300,6 @@ class NXtomo_PATH:
class NXtomo_PATH_v_1_0(NXtomo_PATH):
VERSION = 1.0
_NX_DETECTOR_PATHS = nxdetector.NEXUS_DETECTOR_PATH_V_1_0
......@@ -314,7 +313,6 @@ nx_tomo_path_v_1_0 = NXtomo_PATH_v_1_0()
class NXtomo_PATH_v_1_1(NXtomo_PATH_v_1_0):
VERSION = 1.1
_NX_DETECTOR_PATHS = nxdetector.NEXUS_DETECTOR_PATH_V_1_1
......@@ -369,7 +367,6 @@ nx_tomo_path_v_1_1 = NXtomo_PATH_v_1_1()
class NXtomo_PATH_v_1_2(NXtomo_PATH_v_1_1):
VERSION = 1.2
_NX_DETECTOR_PATHS = nxdetector.NEXUS_DETECTOR_PATH_V_1_2
......
......@@ -115,7 +115,6 @@ class _NEXUS_PATHS_V_1_0(_NEXUS_PATHS):
class _NEXUS_PATHS_V_1_1(_NEXUS_PATHS_V_1_0):
ENERGY_PATH = "instrument/beam/incident_energy"
SOURCE_NAME = "instrument/source/name"
......
......@@ -1419,7 +1419,7 @@ class TomoScanBase(TomoObject):
data_path = data_path[:-1]
return data_path, index_zfill4_pattern
for (frame_file_path, frame_index) in frames_path_and_index:
for frame_file_path, frame_index in frames_path_and_index:
if scheme == "fabio":
if not os.path.exists(frame_file_path):
continue
......@@ -1478,7 +1478,7 @@ class TomoScanBase(TomoObject):
dataset_or_group, h5py.Group
), f"expect a group not {type(dataset_or_group)}"
# browse childrens
for (name, item) in dataset_or_group.items():
for name, item in dataset_or_group.items():
if isinstance(item, h5py.Dataset):
if name.isnumeric():
if index_zfill4_pattern and not len(name) == 4:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment