Commit 096e85f7 authored by payno's avatar payno
Browse files

Merge branch 'fix_for_axis' into 'master'

Fix for axis

See merge request !15
parents 29165b1d ed419cd3
Pipeline #28310 passed with stages
in 4 minutes and 46 seconds
...@@ -146,7 +146,7 @@ class EDFTomoScan(TomoScanBase): ...@@ -146,7 +146,7 @@ class EDFTomoScan(TomoScanBase):
:return: image dim1 :return: image dim1
:rtype: int :rtype: int
""" """
if self.__dim1 is None: if self.__dim1 is None and self.path is not None:
self.__dim1, self.__dim2 = EDFTomoScan.get_dim1_dim2(scan=self.path) self.__dim1, self.__dim2 = EDFTomoScan.get_dim1_dim2(scan=self.path)
return self.__dim1 return self.__dim1
...@@ -158,21 +158,21 @@ class EDFTomoScan(TomoScanBase): ...@@ -158,21 +158,21 @@ class EDFTomoScan(TomoScanBase):
:return: image dim2 :return: image dim2
:rtype: int :rtype: int
""" """
if self.__dim2 is None: if self.__dim2 is None and self.path is not None:
self.__dim1, self.__dim2 = EDFTomoScan.get_dim1_dim2(scan=self.path) self.__dim1, self.__dim2 = EDFTomoScan.get_dim1_dim2(scan=self.path)
return self.__dim2 return self.__dim2
@property @property
@docstring(TomoScanBase.ff_interval) @docstring(TomoScanBase.ff_interval)
def ff_interval(self) -> Union[None, int]: def ff_interval(self) -> Union[None, int]:
if self.__ref_on is None: if self.__ref_on is None and self.path is not None:
self.__ref_on = EDFTomoScan.get_ff_interval(scan=self.path) self.__ref_on = EDFTomoScan.get_ff_interval(scan=self.path)
return self.__ref_on return self.__ref_on
@property @property
@docstring(TomoScanBase.scan_range) @docstring(TomoScanBase.scan_range)
def scan_range(self) -> Union[None, int]: def scan_range(self) -> Union[None, int]:
if self.__scan_range is None: if self.__scan_range is None and self.path is not None:
self.__scan_range = EDFTomoScan.get_scan_range(scan=self.path) self.__scan_range = EDFTomoScan.get_scan_range(scan=self.path)
return self.__scan_range return self.__scan_range
...@@ -182,7 +182,7 @@ class EDFTomoScan(TomoScanBase): ...@@ -182,7 +182,7 @@ class EDFTomoScan(TomoScanBase):
""" """
flats are given as a dictionary with index as key and DataUrl as flats are given as a dictionary with index as key and DataUrl as
value""" value"""
if self._flats is None: if self._flats is None and self.path is not None:
self._flats = self.get_refs_url(scan_path=self.path) self._flats = self.get_refs_url(scan_path=self.path)
return self._flats return self._flats
...@@ -218,7 +218,7 @@ class EDFTomoScan(TomoScanBase): ...@@ -218,7 +218,7 @@ class EDFTomoScan(TomoScanBase):
@property @property
@docstring(TomoScanBase.darks) @docstring(TomoScanBase.darks)
def darks(self) -> dict: def darks(self) -> dict:
if self._darks is None: if self._darks is None and self.path is not None:
self._darks = self.get_darks_url(scan_path=self.path) self._darks = self.get_darks_url(scan_path=self.path)
return self._darks return self._darks
...@@ -661,3 +661,9 @@ class EDFTomoScan(TomoScanBase): ...@@ -661,3 +661,9 @@ class EDFTomoScan(TomoScanBase):
return info return info
return None return None
def get_range(self):
if self.path is not None:
return self.get_scan_range(self.path)
else:
return None
Markdown is supported
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