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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LDV
scintillation_pipeline
Commits
51977e92
Commit
51977e92
authored
2 years ago
by
Mattia Mancini
Browse files
Options
Downloads
Patches
Plain Diff
Address referee comments
parent
2466f4b1
No related branches found
No related tags found
No related merge requests found
Pipeline
#33356
failed
2 years ago
Stage: build
Stage: test
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+53
-0
53 additions, 0 deletions
README.md
setup.py
+8
-1
8 additions, 1 deletion
setup.py
tests/test_metadata.py
+4
-0
4 additions, 0 deletions
tests/test_metadata.py
with
65 additions
and
1 deletion
README.md
+
53
−
0
View file @
51977e92
...
@@ -4,3 +4,56 @@
...
@@ -4,3 +4,56 @@
The Scintillation Pipeline produces from LOFAR scintillation dataproducts a set of previews and metadata
The Scintillation Pipeline produces from LOFAR scintillation dataproducts a set of previews and metadata
able to describe the observation characteristics.
able to describe the observation characteristics.
## Install the tool locally
To use the tool to inspect a Dynspec dataset locally you can install it
by executing the following command
```
bash
python setup.py
install
```
It is suggested to run it in a virtualenv
## How to run the command
Once installed you can find the help of the command by typing:
```
bash
$
scintillation_utils.py
--help
usage: scintillation_utils.py
[
-h
]
[
--samples_size
SAMPLES_SIZE]
[
--averaging_window
AVERAGING_WINDOW]
[
--export_only_station
EXPORT_ONLY_STATION] scintillation_dataset output_directory
Scintillation averaging script
positional arguments:
scintillation_dataset
Scintillation dataset
[
e.g. Dynspec_rebinned_L271905_SAP000.h5]
output_directory Output directory
optional arguments:
-h
,
--help
show this
help
message and
exit
--samples_size
SAMPLES_SIZE
Samples size
in
seconds
--averaging_window
AVERAGING_WINDOW
Averaging window
in
seconds
--export_only_station
EXPORT_ONLY_STATION
```
For example if you want to process the dataset
**dynspec.h5**
and save the result in a directory named
**out_dynspect**
you can just run the command
```
bash
$
scintillation_utils.py dynspec.h5 out_dynspect
```
## How to run the pipeline
If you want to run the CWL pipeline to dowload and process the dataset this is the command to execute
```
bash
cwltool cwl/scintillation_preview_generation.cwl
--surls
srm://lta_site_url/path/filename.tar
```
Other optional parameters can be specified a description is printed by executing the command
```
bash
cwltool cwl/scintillation_preview_generation.cwl
--help
```
_Note that to download the data from srm url you use a GRID proxy.
Check this
[
link
](
https://drupal.star.bnl.gov/STAR/book/export/html/3182
)
for reference._
\ No newline at end of file
This diff is collapsed.
Click to expand it.
setup.py
+
8
−
1
View file @
51977e92
import
setuptools
import
setuptools
from
setuptools
import
setup
from
setuptools
import
setup
import
os
requirements_file_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'
requirements.txt
'
)
install_requires
=
[]
with
open
(
requirements_file_path
,
'
r
'
)
as
f_in
:
install_requires
=
f_in
.
read
().
split
(
'
\n
'
)
setup
(
setup
(
name
=
'
scintillation_tools
'
,
name
=
'
scintillation_tools
'
,
...
@@ -11,5 +17,6 @@ setup(
...
@@ -11,5 +17,6 @@ setup(
author_email
=
'
mancini@astron.nl
'
,
author_email
=
'
mancini@astron.nl
'
,
description
=
'
Utils to process scintillation h5 files
'
,
description
=
'
Utils to process scintillation h5 files
'
,
test_suite
=
'
tests
'
,
test_suite
=
'
tests
'
,
scripts
=
[
'
bin/scintillation_utils.py
'
]
scripts
=
[
'
bin/scintillation_utils.py
'
],
install_requires
=
install_requires
)
)
This diff is collapsed.
Click to expand it.
tests/test_metadata.py
+
4
−
0
View file @
51977e92
...
@@ -20,6 +20,10 @@ class TestMetadata(unittest.TestCase):
...
@@ -20,6 +20,10 @@ class TestMetadata(unittest.TestCase):
metadata_per_dynspec
=
extract_metadata
(
dataset
)
metadata_per_dynspec
=
extract_metadata
(
dataset
)
metadata
,
*
_
=
metadata_per_dynspec
.
values
()
metadata
,
*
_
=
metadata_per_dynspec
.
values
()
compute_start_end_azimuth_elevation
(
metadata
)
compute_start_end_azimuth_elevation
(
metadata
)
self
.
assertIn
(
'
point_start_azimuth
'
,
metadata
)
self
.
assertIn
(
'
point_start_elevation
'
,
metadata
)
self
.
assertIn
(
'
point_end_azimuth
'
,
metadata
)
self
.
assertIn
(
'
point_end_elevation
'
,
metadata
)
@unittest.skipUnless
(
is_test_data_present
(),
'
test data is missing
'
)
@unittest.skipUnless
(
is_test_data_present
(),
'
test data is missing
'
)
def
test_fields_name
(
self
):
def
test_fields_name
(
self
):
...
...
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