Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
scintillation_pipeline
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LDV
scintillation_pipeline
Commits
15c42cef
Commit
15c42cef
authored
8 months ago
by
Maaijke Mevius
Browse files
Options
Downloads
Patches
Plain Diff
small bugfixes
parent
7194fe45
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#97184
passed
8 months ago
Stage: build
Stage: test
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
bin/define_tasks_from_archive.py
+1
-1
1 addition, 1 deletion
bin/define_tasks_from_archive.py
bin/scintillation_utils.py
+1
-1
1 addition, 1 deletion
bin/scintillation_utils.py
scintillation/averaging.py
+10
-4
10 additions, 4 deletions
scintillation/averaging.py
with
12 additions
and
6 deletions
bin/define_tasks_from_archive.py
+
1
−
1
View file @
15c42cef
...
...
@@ -164,7 +164,7 @@ def main():
logging
.
info
(
'
creating task for sas_id %s - dataset %s
'
,
sas_id
,
index
)
payload
=
create_payload_from_entry
(
line
,
args
.
filter
,
args
.
workflow
,
args
.
averaging_window
,
args
.
stations
)
atdb_interface
.
submit_task
(
payload
)
break
#only one dataset
if
__name__
==
'
__main__
'
:
main
()
This diff is collapsed.
Click to expand it.
bin/scintillation_utils.py
+
1
−
1
View file @
15c42cef
#!/
home/mevi
us/bin/python3
.8
#!/us
r
/bin/python3
from
argparse
import
ArgumentParser
import
os
import
logging
...
...
This diff is collapsed.
Click to expand it.
scintillation/averaging.py
+
10
−
4
View file @
15c42cef
...
...
@@ -109,6 +109,8 @@ class SmartJsonEncoder(json.JSONEncoder):
try
:
if
isinstance
(
o
,
numpy
.
int32
):
return
int
(
o
)
elif
isinstance
(
o
,
numpy
.
int64
):
return
int
(
o
)
elif
isinstance
(
o
,
numpy
.
ndarray
):
return
o
.
tolist
()
elif
isinstance
(
o
,
numpy
.
uint64
):
...
...
@@ -174,6 +176,8 @@ def extract_root_metadata(dataset):
if
not
'
TARGET
'
in
list
(
metadata
.
keys
()):
if
'
TARGETS
'
in
list
(
metadata
.
keys
()):
metadata
[
'
TARGET
'
]
=
metadata
[
'
TARGETS
'
][
-
1
].
split
(
"
_
"
)[
0
]
if
type
(
metadata
[
'
TARGET
'
])
==
list
:
metadata
[
'
TARGET
'
]
=
metadata
[
'
TARGET
'
][
-
1
].
split
(
"
_
"
)[
0
]
return
metadata
...
...
@@ -284,7 +288,6 @@ def extract_metadata(dataset):
else
:
continue
metadata_per_dynspec
[
dynspec
].
update
(
root_metadata
)
return
metadata_per_dynspec
...
...
@@ -698,10 +701,13 @@ def split_samples(dynspec_name,
:return:
"""
if
'
INCREMENT
'
in
metadata
[
'
TIME
'
].
keys
():
if
isinstance
(
metadata
[
'
TIME
'
][
'
INCREMENT
'
],
list
):
time_delta
,
*
_
=
metadata
[
'
TIME
'
][
'
INCREMENT
'
]
else
:
time_delta
=
metadata
[
'
TIME
'
][
'
INCREMENT
'
]
else
:
time_delta
=
metadata
[
'
SAMPLING_TIME
'
]
if
'
DYNSPEC_START_UTC
'
in
metadata
:
obs_start_time
=
parse_datetime_str
(
metadata
[
'
DYNSPEC_START_UTC
'
])
...
...
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