Commit 55516231 authored by payno's avatar payno
Browse files

[TomoScanBase] add energy property

parent 73d0094e
......@@ -404,6 +404,18 @@ class EDFTomoScan(TomoScanBase):
else:
return self.__distance
@property
@docstring(TomoScanBase.energy)
def energy(self):
if self.__energy is None:
self.__energy = EDFTomoScan.retrieve_information(self.path,
None,
"Energy",
type_=float,
key_aliases=('energy', )
)
return self.__energy
@staticmethod
def _get_pixel_size(scan: str) -> Union[None, int]:
if os.path.isdir(scan) is False:
......
......@@ -160,6 +160,14 @@ class TomoScanBase:
def scan_range(self) -> Union[None, int]:
raise NotImplementedError('Base class')
@property
def energy(self) -> Union[None, float]:
"""
:return: incident beam energy in keV
"""
raise NotImplementedError('Base class')
@property
def distance(self) -> Union[None, float]:
"""
......
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