Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
XRD
darfix
Commits
b5ed5d08
Commit
b5ed5d08
authored
May 31, 2021
by
Julia Garriga Ferrer
Browse files
[core][dataset] Add method for obtaining metadata info for a key
parent
118e61ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
darfix/core/dataset.py
View file @
b5ed5d08
...
...
@@ -404,6 +404,10 @@ class Dataset():
_logger
.
info
(
"Dimension {} of size {} has been added for reshaping"
.
format
(
dimension
.
name
,
dimension
.
size
))
def
get_metadata_values
(
self
,
kind
,
key
):
return
numpy
.
unique
([
data
.
get_value
(
kind
=
kind
,
name
=
key
)[
0
]
for
data
in
self
.
data
.
metadata
])
def
__compute_changing_value
(
self
,
values
,
changing_value
=
1
):
"""
Recursive method used to calculate how fast is a dimension. The speed of a dimension is the number of
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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