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
ad003716
Commit
ad003716
authored
4 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
TMSS-190
: (and
TMSS-152
) use/borrow QA spec from target if not given for calibrator obs
parent
76d477bc
No related branches found
No related tags found
1 merge request
!252
Resolve TMSS-190
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SAS/TMSS/src/tmss/tmssapp/subtasks.py
+18
-0
18 additions, 0 deletions
SAS/TMSS/src/tmss/tmssapp/subtasks.py
with
18 additions
and
0 deletions
SAS/TMSS/src/tmss/tmssapp/subtasks.py
+
18
−
0
View file @
ad003716
...
@@ -246,6 +246,15 @@ def create_qafile_subtask_from_observation_subtask(observation_subtask: Subtask)
...
@@ -246,6 +246,15 @@ def create_qafile_subtask_from_observation_subtask(observation_subtask: Subtask)
SubtaskType
.
Choices
.
QA_FILES
.
value
,
observation_subtask
.
pk
))
SubtaskType
.
Choices
.
QA_FILES
.
value
,
observation_subtask
.
pk
))
obs_task_spec
=
observation_subtask
.
task_blueprint
.
specifications_doc
obs_task_spec
=
observation_subtask
.
task_blueprint
.
specifications_doc
if
"
QA
"
not
in
obs_task_spec
:
# use QA settings from target obs for calibrators which have no QA spec.
target_task_blueprint
=
get_related_target_observation_task_blueprint
(
observation_subtask
.
task_blueprint
)
if
target_task_blueprint
is
not
None
:
obs_task_spec
=
target_task_blueprint
.
specifications_doc
logger
.
info
(
"
Using QA settings for calibrator observation task_blueprint id=%s from target observation task_blueprint id=%s to create QA subtasks
"
,
observation_subtask
.
task_blueprint
.
id
,
target_task_blueprint
.
id
)
obs_task_qafile_spec
=
obs_task_spec
.
get
(
"
QA
"
,
{}).
get
(
"
file_conversion
"
,
{})
obs_task_qafile_spec
=
obs_task_spec
.
get
(
"
QA
"
,
{}).
get
(
"
file_conversion
"
,
{})
if
not
obs_task_qafile_spec
.
get
(
"
enabled
"
,
False
):
if
not
obs_task_qafile_spec
.
get
(
"
enabled
"
,
False
):
...
@@ -310,6 +319,15 @@ def create_qaplots_subtask_from_qafile_subtask(qafile_subtask: Subtask) -> Subta
...
@@ -310,6 +319,15 @@ def create_qaplots_subtask_from_qafile_subtask(qafile_subtask: Subtask) -> Subta
qafile_subtask
.
specifications_template
.
type
,
SubtaskType
.
Choices
.
QA_FILES
.
value
))
qafile_subtask
.
specifications_template
.
type
,
SubtaskType
.
Choices
.
QA_FILES
.
value
))
obs_task_spec
=
qafile_subtask
.
task_blueprint
.
specifications_doc
obs_task_spec
=
qafile_subtask
.
task_blueprint
.
specifications_doc
if
"
QA
"
not
in
obs_task_spec
:
# use QA settings from target obs for calibrators which have no QA spec.
target_task_blueprint
=
get_related_target_observation_task_blueprint
(
qafile_subtask
.
task_blueprint
)
if
target_task_blueprint
is
not
None
:
obs_task_spec
=
target_task_blueprint
.
specifications_doc
logger
.
info
(
"
Using QA settings for calibrator observation task_blueprint id=%s from target observation task_blueprint id=%s to create QA subtasks
"
,
qafile_subtask
.
task_blueprint
.
id
,
target_task_blueprint
.
id
)
obs_task_qaplots_spec
=
obs_task_spec
.
get
(
"
QA
"
,
{}).
get
(
"
plots
"
,
{})
obs_task_qaplots_spec
=
obs_task_spec
.
get
(
"
QA
"
,
{}).
get
(
"
plots
"
,
{})
if
not
obs_task_qaplots_spec
.
get
(
"
enabled
"
,
False
):
if
not
obs_task_qaplots_spec
.
get
(
"
enabled
"
,
False
):
...
...
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