Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review 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
RadioObservatory
LOFAR
Commits
20eeb570
Commit
20eeb570
authored
4 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
TMSS-604
: fixed output dataproduct filtering
parent
59f76319
No related branches found
No related tags found
1 merge request
!383
Resolve TMSS-604 "Dataproduct specs"
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
SAS/TMSS/backend/src/tmss/tmssapp/adapters/parset.py
+2
-10
2 additions, 10 deletions
SAS/TMSS/backend/src/tmss/tmssapp/adapters/parset.py
with
2 additions
and
10 deletions
SAS/TMSS/backend/src/tmss/tmssapp/adapters/parset.py
+
2
−
10
View file @
20eeb570
...
...
@@ -107,11 +107,7 @@ def _convert_correlator_settings_to_parset_dict(subtask: models.Subtask, spec: d
parset
[
beam_prefix
+
"
Correlator.angle2
"
]
=
phase_center
[
'
pointing
'
][
'
angle2
'
]
# TODO: do not use SubtaskOutput.objects.filter but make subtask.subtask_outputs work
subtask_outputs
=
list
(
models
.
SubtaskOutput
.
objects
.
filter
(
subtask_id
=
subtask
.
id
))
subtask_output_ids
=
[
o
.
id
for
o
in
subtask_outputs
]
dataproducts
=
list
(
models
.
Dataproduct
.
objects
.
filter
(
producer_id__in
=
subtask_output_ids
).
filter
(
dataformat
=
Dataformat
.
Choices
.
MEASUREMENTSET
.
value
).
filter
(
datatype
=
Datatype
.
Choices
.
VISIBILITIES
))
dataproducts
=
list
(
subtask
.
output_dataproducts
.
filter
(
dataformat__value
=
Dataformat
.
Choices
.
MEASUREMENTSET
.
value
).
filter
(
datatype__value
=
Datatype
.
Choices
.
VISIBILITIES
.
value
).
order_by
(
'
filename
'
))
# marshall dataproducts, but only if they're supplied. in some use cases, we want a parset before the subtask is scheduled.
correlator_dataproducts
=
[]
...
...
@@ -138,12 +134,8 @@ def _convert_beamformer_settings_to_parset_dict(subtask: models.Subtask, spec: d
parset
=
{}
# TODO: do not use SubtaskOutput.objects.filter but make subtask.subtask_outputs work
subtask_outputs
=
list
(
models
.
SubtaskOutput
.
objects
.
filter
(
subtask_id
=
subtask
.
id
))
subtask_output_ids
=
[
o
.
id
for
o
in
subtask_outputs
]
# TODO: don't assume ordering by filename is sufficient: we need to inspect the dataproduct properties to make sure saps and subbands are in the correct order
dataproducts
=
list
(
models
.
Dataproduct
.
objects
.
filter
(
producer_id__in
=
subtask_output_ids
)
.
filter
(
dataformat
=
Dataformat
.
Choices
.
M
EA
SUREMENTSET
.
value
).
filter
(
datatype
=
Datatype
.
Choices
.
TIME_SERIES
.
value
).
order_by
(
'
filename
'
))
dataproducts
=
list
(
subtask
.
output_dataproducts
.
filter
(
dataformat
__value
=
Dataformat
.
Choices
.
B
EA
MFORMED
.
value
).
filter
(
datatype
__value
=
Datatype
.
Choices
.
TIME_SERIES
.
value
).
order_by
(
'
filename
'
))
# Lists of coherent and incoherent dataproducts that will be produced, in the order COBALT wants them
coherent_dataproducts
=
[]
...
...
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