Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tomotools
tomoscan
Commits
93a23789
Commit
93a23789
authored
Feb 25, 2020
by
payno
Browse files
add pixel size getter
parent
8024fc15
Pipeline
#21845
failed with stages
in 59 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tomoscan/esrf/edfscan.py
View file @
93a23789
...
...
@@ -417,7 +417,7 @@ class EDFTomoScan(TomoScanBase):
return
self
.
__energy
@
staticmethod
def
_get_pixel_size
(
scan
:
str
)
->
Union
[
None
,
in
t
]:
def
_get_pixel_size
(
scan
:
str
)
->
Union
[
None
,
floa
t
]:
if
os
.
path
.
isdir
(
scan
)
is
False
:
return
None
value
=
EDFTomoScan
.
retrieve_information
(
scan
=
scan
,
...
...
tomoscan/scanbase.py
View file @
93a23789
...
...
@@ -142,9 +142,15 @@ class TomoScanBase:
raise
NotImplementedError
(
'Base class'
)
@
property
def
pixel_size
(
self
)
->
Union
[
None
,
in
t
]:
def
pixel_size
(
self
)
->
Union
[
None
,
floa
t
]:
raise
NotImplementedError
(
'Base class'
)
def
get_pixel_size
(
self
,
unit
=
'm'
)
->
Union
[
None
,
float
]:
if
self
.
pixel_size
:
return
self
.
pixel_size
/
MetricSystem
.
from_value
(
unit
)
else
:
return
None
@
property
def
dim_1
(
self
)
->
Union
[
None
,
int
]:
raise
NotImplementedError
(
'Base class'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment