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
payno
id06workflow
Commits
7793e7cd
Commit
7793e7cd
authored
Nov 28, 2018
by
payno
Browse files
[core] add get(axis) function for :class:`AcquisitionDims`
parent
ad013952
Changes
1
Hide whitespace changes
Inline
Side-by-side
id06workflow/core/experiment/__init__.py
View file @
7793e7cd
...
...
@@ -369,6 +369,18 @@ class AcquisitionDims(object):
max_index
=
max
(
max_index
,
index
)
return
max
(
max_index
,
0
)
+
1
def
get
(
self
,
axis
):
"""
:param int axis: axis for which we want the dimension definition
:return: the requested dim if exists
"""
assert
type
(
axis
)
is
int
if
axis
in
self
.
__dims
:
return
self
.
__dims
[
axis
]
else
:
return
None
@
property
def
shape
(
self
):
"""
...
...
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