Commit b606abf1 authored by payno's avatar payno
Browse files

Merge branch '0.4'

parents 752e2c66 0ae9589c
Pipeline #37936 passed with stages
in 19 minutes and 34 seconds
...@@ -268,6 +268,13 @@ class HDF5TomoScan(TomoScanBase): ...@@ -268,6 +268,13 @@ class HDF5TomoScan(TomoScanBase):
if "definition" in node.attrs and node.attrs["definition"].lower() == "nxtomo": if "definition" in node.attrs and node.attrs["definition"].lower() == "nxtomo":
_logger.info(node.name + " is recognized as an NXtomo class.") _logger.info(node.name + " is recognized as an NXtomo class.")
return True return True
elif (
"instrument" in node
and "NX_class" in node["instrument"].attrs
and node["instrument"].attrs["NX_class"] == "NXinstrument"
):
instrument_node = node["instrument"]
return "detector" in node["instrument"]
else: else:
return False return False
......
...@@ -129,7 +129,7 @@ class _ScanMock: ...@@ -129,7 +129,7 @@ class _ScanMock:
radius = min(background.shape) radius = min(background.shape)
def _compute_radius_to_center(data): def _compute_radius_to_center(data):
assert data.ndim is 2 assert data.ndim == 2
xcenter = (data.shape[2]) // 2 xcenter = (data.shape[2]) // 2
ycenter = (data.shape[1]) // 2 ycenter = (data.shape[1]) // 2
y, x = numpy.ogrid[: data.shape[0], : data.shape[1]] y, x = numpy.ogrid[: data.shape[0], : data.shape[1]]
...@@ -533,7 +533,7 @@ class MockEDF(_ScanMock): ...@@ -533,7 +533,7 @@ class MockEDF(_ScanMock):
S1=0.0, S1=0.0,
S2=1.0, S2=1.0,
): ):
assert len(shape) is 3 assert len(shape) == 3
f = open(filePath, "w") f = open(filePath, "w")
f.writelines( f.writelines(
"\n".join( "\n".join(
......
...@@ -414,7 +414,7 @@ class TomoScanBase: ...@@ -414,7 +414,7 @@ class TomoScanBase:
"incoherent data information to retrieve" "incoherent data information to retrieve"
"scan extra images angle" "scan extra images angle"
) )
elif len(extraImgs) is 3: elif len(extraImgs) == 3:
res["180(1)"] = ordered_url[extraImgs[0]] res["180(1)"] = ordered_url[extraImgs[0]]
res["90(1)"] = ordered_url[extraImgs[1]] res["90(1)"] = ordered_url[extraImgs[1]]
res["0(1)"] = ordered_url[extraImgs[2]] res["0(1)"] = ordered_url[extraImgs[2]]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment