Commit b2614888 authored by payno's avatar payno
Browse files

[edfscan] make sure path exists before call of some processing

parent 62505148
......@@ -146,7 +146,7 @@ class EDFTomoScan(TomoScanBase):
:return: image dim1
: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)
return self.__dim1
......@@ -158,21 +158,21 @@ class EDFTomoScan(TomoScanBase):
:return: image dim2
: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)
return self.__dim2
@property
@docstring(TomoScanBase.ff_interval)
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)
return self.__ref_on
@property
@docstring(TomoScanBase.scan_range)
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)
return self.__scan_range
......@@ -182,7 +182,7 @@ class EDFTomoScan(TomoScanBase):
"""
flats are given as a dictionary with index as key and DataUrl as
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)
return self._flats
......@@ -218,7 +218,7 @@ class EDFTomoScan(TomoScanBase):
@property
@docstring(TomoScanBase.darks)
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)
return self._darks
......
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