Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
LINC
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
Container Registry
Model registry
Operate
Environments
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
ResearchAndDevelopment
LINC
Commits
0ad7ad9c
Commit
0ad7ad9c
authored
5 years ago
by
Mattia Mancini
Browse files
Options
Downloads
Patches
Plain Diff
Add LoSoTo reweight
Former-commit-id:
47d2992e
Former-commit-id:
4a98ba65
parent
9dc0e458
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+8
-0
8 additions, 0 deletions
.gitlab-ci.yml
steps/LoSoTo.Reweight.cwl
+81
-0
81 additions, 0 deletions
steps/LoSoTo.Reweight.cwl
steps/utils.js
+2
-1
2 additions, 1 deletion
steps/utils.js
test_jobs/losoto_reweight.json
+4
-0
4 additions, 0 deletions
test_jobs/losoto_reweight.json
with
95 additions
and
1 deletion
.gitlab-ci.yml
+
8
−
0
View file @
0ad7ad9c
...
@@ -135,6 +135,14 @@ losoto_interpolate:
...
@@ -135,6 +135,14 @@ losoto_interpolate:
allow_failure
:
true
allow_failure
:
true
script
:
script
:
-
cwl-runner --no-container steps/LoSoTo.Interpolate.cwl test_jobs/losoto_interpolate.json
-
cwl-runner --no-container steps/LoSoTo.Interpolate.cwl test_jobs/losoto_interpolate.json
losoto_reweight
:
stage
:
test_steps
allow_failure
:
true
script
:
-
cwl-runner --no-container steps/LoSoTo.Reweight.cwl test_jobs/losoto_reweight.json
losoto_residual
:
losoto_residual
:
stage
:
test_steps
stage
:
test_steps
allow_failure
:
true
allow_failure
:
true
...
...
This diff is collapsed.
Click to expand it.
steps/LoSoTo.Reweight.cwl
0 → 100644
+
81
−
0
View file @
0ad7ad9c
#!/usr/bin/env cwl-runner
class: CommandLineTool
cwlVersion: v1.0
id: losoto_reweight
$namespaces:
lofar: https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl
doc: |
Change the the weight values.
Parameters
requirements:
InlineJavascriptRequirement:
expressionLib:
- { $include: utils.js}
InitialWorkDirRequirement:
listing:
- entryname: 'parset.config'
entry: $(get_losoto_config('REWEIGHT').join('\n'))
- entryname: $(inputs.input_h5parm.basename)
entry: $(inputs.input_h5parm)
writable: true
baseCommand: "losoto"
arguments:
- $(inputs.input_h5parm.basename)
- parset.config
hints:
DockerRequirement:
dockerPull: lofareosc/lofar-pipeline-ci:latest
inputs:
- id: input_h5parm
type: File
format: lofar:#H5Parm
- id: soltab
type: string
doc: "Solution table"
- id: mode
default: 'uniform'
type:
- type: enum
symbols:
- uniform
- window
- copy
doc: One of 'uniform' (single value), 'window' (sliding window in time), or 'copy' (copy from another table), by default 'uniform'.
- id: weightVal
type: float?
doc: Set weights to this values (0=flagged), by default 1.
- id: nmedian
type: int?
doc: |
Median window size in number of timeslots for 'window' mode.
If nonzero, a median-smoothed version of the input values is
subtracted to detrend them. If 0, no smoothing or subtraction is
done, by default 3.
- id: nstddev
type: int?
doc: Standard deviation window size in number of timeslots for 'window' mode, by default 251.
- id: soltabImport
type: string?
doc: Name of a soltab. Copy weights from this soltab (must have same axes shape), by default none.
- id: flagBad
type: boolean?
doc: Re-apply flags to bad values (1 for amp, 0 for other tables), by default False.
outputs:
- id: output_h5parm
type: File
format: lofar:#H5Parm
outputBinding:
glob: $(inputs.input_h5parm.basename)
$schema:
- https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl
This diff is collapsed.
Click to expand it.
steps/utils.js
+
2
−
1
View file @
0ad7ad9c
function
get_losoto_config
(
step_name
)
{
function
get_losoto_config
(
step_name
)
{
var
par
=
[
'
soltab =
'
+
inputs
.
soltab
]
var
par
=
[
'
soltab =
'
+
inputs
.
soltab
]
if
(
inputs
.
ncpu
!==
null
)
par
.
push
(
'
ncpu=
'
+
inputs
.
ncpu
);
if
(
inputs
.
ncpu
!==
null
&&
inputs
.
ncpu
!==
undefined
)
par
.
push
(
'
ncpu=
'
+
inputs
.
ncpu
);
console
.
log
(
inputs
,
par
)
par
.
push
(
"
[
"
+
step_name
+
"
]
"
)
par
.
push
(
"
[
"
+
step_name
+
"
]
"
)
par
.
push
(
'
operation=
'
+
step_name
)
par
.
push
(
'
operation=
'
+
step_name
)
for
(
var
field_name
in
inputs
){
for
(
var
field_name
in
inputs
){
...
...
This diff is collapsed.
Click to expand it.
test_jobs/losoto_reweight.json
0 → 100644
+
4
−
0
View file @
0ad7ad9c
{
"input_h5parm"
:
{
"class"
:
"File"
,
"path"
:
"/data/example.h5"
,
"format"
:
"lofar:#H5Parm"
},
"soltab"
:
"sol000/phase000"
}
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