Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pykkn
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TU-DA Fluidsystemtechnik
Public
pykkn
Commits
72a3eaed
Commit
72a3eaed
authored
2 years ago
by
BastianTigges
Browse files
Options
Downloads
Plain Diff
Merge branch 'main' of git.rwth-aachen.de:fst-tuda/projects/rdm/adp-pykraken/pykkn
parents
c99cf4af
f3020f8a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
examples/example_build_multi_parameters.py
+2
-2
2 additions, 2 deletions
examples/example_build_multi_parameters.py
examples/example_parse.py
+6
-0
6 additions, 0 deletions
examples/example_parse.py
pykkn/pipeline.py
+21
-25
21 additions, 25 deletions
pykkn/pipeline.py
test.py
+5
-1
5 additions, 1 deletion
test.py
with
34 additions
and
28 deletions
examples/example_build_multi_parameters.py
+
2
−
2
View file @
72a3eaed
...
...
@@ -2,7 +2,7 @@ from pykkn.build_multi_parameters import build_multi_parameters
dic
=
{
"
list_of_parameters
"
:
[
{
"
name
"
:
"
name_of_par
ameter
_1
"
,
"
value
"
:
123
},
{
"
name
"
:
"
fan/di
ameter
"
,
"
value
"
:
123
5
,
"
units
"
:
'
m
'
},
{
"
name
"
:
"
name_of_parameter_2
"
,
"
value
"
:
456
},
{
"
name
"
:
"
name_of_parameter_3
"
,
"
value
"
:
789
},
]
...
...
@@ -12,4 +12,4 @@ list_parameters = build_multi_parameters(dic)
print
(
list_parameters
)
for
parameter
in
list_parameters
:
print
(
parameter
)
parameter
.
show
(
)
This diff is collapsed.
Click to expand it.
examples/example_parse.py
+
6
−
0
View file @
72a3eaed
...
...
@@ -48,5 +48,11 @@ msmtrun.set_storage_path("example_for_docs.h5")
msmtrun
.
store
()
result_msmtrun
=
pykkn_parse
(
"
example_for_docs.h5
"
)
result_msmtrun
.
show
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
pykkn/pipeline.py
+
21
−
25
View file @
72a3eaed
...
...
@@ -13,20 +13,18 @@ class Pipeline(Storage):
This name of pipeline should contain the following information:
\n
<measured/derived>/<capa>/<raw/scaled>
Parameters
----------
name : str
the name of the pipeline
Examples
--------
pipeline1 = Pipeline(
'
measured/capa1/raw
'
)
\n
pipeline1.attrs[
'
variable
'
] =
'
voltage
'
\n
pipeline1.attrs[
'
units
'
] =
'
volts
'
\n
pipeline1.attrs[
'
origin
'
] =
'
this
'
\n
pipeline.add([dataset1, dataset2])
\n
pipeline.add([instrument1, insturment2])
\n
Args:
name (str): the name of the pipeline
Example:
pipeline1 = Pipeline(
'
measured/capa1/raw
'
)
\n
pipeline1.attrs[
'
variable
'
] =
'
voltage
'
\n
pipeline1.attrs[
'
units
'
] =
'
volts
'
\n
pipeline1.attrs[
'
origin
'
] =
'
this
'
\n
pipeline.add([dataset1, dataset2])
\n
pipeline.add([instrument1, insturment2])
\n
"""
def
__init__
(
self
,
name
:
str
):
...
...
@@ -46,17 +44,15 @@ class Pipeline(Storage):
def
add
(
self
,
list_obj
:
List
[
Instrument
|
Dataset
]):
"""
add (multi) dataset(s) and instrument(s) into model
Parameters
----------
list_obj : List[Instrument | Dataset]
a list of Instrument or Dataset object(s)
Raises
------
TypeError
raised when the element is not the type of Instrument or Dataset
AssertionError
raised when list_obj is not a list or it is empty
Args:
list_obj (List[Instrument | Dataset]):
a list of Instrument or Dataset object(s)
Raises:
TypeError: raised when the element is not the type of Instrument
or Dataset
AssertionError: raised when list_obj is not a list or it is empty
"""
# Before extend the list of attributes
...
...
This diff is collapsed.
Click to expand it.
test.py
+
5
−
1
View file @
72a3eaed
import
components
\ No newline at end of file
from
pykkn.parse
import
pykkn_parse
object
=
pykkn_parse
(
'
C:/Users/Administrator/Desktop/HDF5_From_Martin.h5
'
)
object
.
show
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment