Skip to content
GitLab
Explore
Sign in
Register
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
39f64d7f
Commit
39f64d7f
authored
4 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
TMSS: adapted for test observation
parent
9e39ce94
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SAS/TMSS/src/tmss/tmssapp/adapters/parset.py
+32
-16
32 additions, 16 deletions
SAS/TMSS/src/tmss/tmssapp/adapters/parset.py
with
32 additions
and
16 deletions
SAS/TMSS/src/tmss/tmssapp/adapters/parset.py
+
32
−
16
View file @
39f64d7f
...
...
@@ -28,11 +28,6 @@ def _convert_to_parset_for_observationcontrol_schema(subtask: models.Subtask) ->
spec
=
add_defaults_to_json_object_for_schema
(
subtask
.
specifications_doc
,
subtask
.
specifications_template
.
schema
)
parset
=
dict
()
# parameterset has no proper assignment operators, so take detour via dict...
# mandatory "fixed" keys for MACScheduler and ObservationControl
parset
[
"
prefix
"
]
=
"
LOFAR.
"
parset
[
"
Observation.claimPeriod
"
]
=
35
parset
[
"
Observation.preparePeriod
"
]
=
20
parset
[
"
Observation.ObsID
"
]
=
subtask
.
pk
parset
[
"
Observation.momID
"
]
=
-
1
# Needed by MACScheduler
parset
[
"
Observation.otdbID
"
]
=
-
1
# Needed by MACScheduler; should/can this be the same as subtask.pk?
...
...
@@ -77,15 +72,14 @@ def _convert_to_parset_for_observationcontrol_schema(subtask: models.Subtask) ->
parset
[
beam_prefix
+
"
angle1
"
]
=
analog_beam
[
'
angle1
'
]
parset
[
beam_prefix
+
"
angle2
"
]
=
analog_beam
[
'
angle2
'
]
cobalt_prefix
=
"
Observation.ObservationControl.OnlineControl.
"
parset
[
cobalt_prefix
+
"
Cobalt.realTime
"
]
=
True
parset
[
cobalt_prefix
+
"
Cobalt.blockSize
"
]
=
spec
[
'
COBALT
'
][
'
blocksize
'
]
parset
[
cobalt_prefix
+
"
Cobalt.correctBandPass
"
]
=
spec
[
'
COBALT
'
][
'
bandpass_correction
'
]
parset
[
cobalt_prefix
+
"
Cobalt.delayCompensation
"
]
=
spec
[
'
COBALT
'
][
'
delay_compensation
'
]
parset
[
"
Observation.ObservationControl.OnlineControl.Cobalt.realTime
"
]
=
True
parset
[
"
Observation.ObservationControl.OnlineControl.Cobalt.blockSize
"
]
=
spec
[
'
COBALT
'
][
'
blocksize
'
]
parset
[
"
Observation.ObservationControl.OnlineControl.Cobalt.correctBandPass
"
]
=
spec
[
'
COBALT
'
][
'
bandpass_correction
'
]
parset
[
"
Observation.ObservationControl.OnlineControl.Cobalt.delayCompensation
"
]
=
spec
[
'
COBALT
'
][
'
delay_compensation
'
]
parset
[
cobalt_prefix
+
"
Cobalt.Correlator.nrChannelsPerSubband
"
]
=
spec
[
'
COBALT
'
][
'
correlator
'
][
'
channels_per_subband
'
]
parset
[
cobalt_prefix
+
"
Cobalt.Correlator.nrBlocksPerIntegration
"
]
=
spec
[
'
COBALT
'
][
'
correlator
'
][
'
blocks_per_integration
'
]
parset
[
cobalt_prefix
+
"
Cobalt.Correlator.nrIntegrationsPerBlock
"
]
=
spec
[
'
COBALT
'
][
'
correlator
'
][
'
integrations_per_block
'
]
parset
[
"
Observation.ObservationControl.OnlineControl.
Cobalt.Correlator.nrChannelsPerSubband
"
]
=
spec
[
'
COBALT
'
][
'
correlator
'
][
'
channels_per_subband
'
]
parset
[
"
Observation.ObservationControl.OnlineControl.
Cobalt.Correlator.nrBlocksPerIntegration
"
]
=
spec
[
'
COBALT
'
][
'
correlator
'
][
'
blocks_per_integration
'
]
parset
[
"
Observation.ObservationControl.OnlineControl.
Cobalt.Correlator.nrIntegrationsPerBlock
"
]
=
spec
[
'
COBALT
'
][
'
correlator
'
][
'
integrations_per_block
'
]
parset
[
"
Observation.DataProducts.Output_Correlated.enabled
"
]
=
True
parset
[
"
Observation.Cluster.ProcessingCluster.clusterName
"
]
=
subtask
.
cluster
or
"
CEP4
"
...
...
@@ -96,9 +90,31 @@ def _convert_to_parset_for_observationcontrol_schema(subtask: models.Subtask) ->
subtask_outputs
=
list
(
models
.
SubtaskOutput
.
objects
.
filter
(
subtask_id
=
subtask
.
id
))
for
subtask_output
in
subtask_outputs
:
dataproducts
=
list
(
models
.
Dataproduct
.
objects
.
filter
(
producer_id
=
subtask_output
.
id
))
for
dataproduct
in
dataproducts
:
parset
[
"
Observation.DataProducts.Output_Correlated.filenames
"
].
append
(
dataproduct
.
filename
)
parset
[
"
Observation.DataProducts.Output_Correlated.locations
"
].
append
(
dataproduct
.
directory
)
parset
[
"
Observation.DataProducts.Output_Correlated.filenames
"
]
=
"
[%s]
"
%
'
,
'
.
join
(
dp
.
filename
for
dp
in
dataproducts
)
parset
[
"
Observation.DataProducts.Output_Correlated.locations
"
]
=
"
[%s]
"
%
'
,
'
.
join
(
dp
.
directory
for
dp
in
dataproducts
)
# various additional 'Control' settings which seem to be needed for MAC
parset
[
"
prefix
"
]
=
"
LOFAR.
"
parset
[
"
Observation.claimPeriod
"
]
=
35
parset
[
"
Observation.preparePeriod
"
]
=
20
parset
[
"
ObservationControl.OnlineControl.CorrAppl.CorrProc._executable
"
]
=
"
CN_Processing
"
parset
[
"
ObservationControl.OnlineControl.CorrAppl.CorrProc._hostname
"
]
=
"
cbmmaster
"
parset
[
"
ObservationControl.OnlineControl.CorrAppl.CorrProc._nodes
"
]
=
[]
parset
[
"
ObservationControl.OnlineControl.CorrAppl.CorrProc._startstopType
"
]
=
"
bgl
"
parset
[
"
ObservationControl.OnlineControl.CorrAppl.CorrProc.workingdir
"
]
=
"
/opt/lofar/bin/
"
parset
[
"
ObservationControl.OnlineControl.CorrAppl._hostname
"
]
=
"
cbmmaster
"
parset
[
"
ObservationControl.OnlineControl.CorrAppl.extraInfo
"
]
=
'
[
"
PIC
"
,
"
Cobalt
"
]
'
parset
[
"
ObservationControl.OnlineControl.CorrAppl.procesOrder
"
]
=
[]
parset
[
"
ObservationControl.OnlineControl.CorrAppl.processes
"
]
=
'
[
"
CorrProc
"
]
'
parset
[
"
ObservationControl.OnlineControl._hostname
"
]
=
'
CCU001
'
parset
[
"
ObservationControl.OnlineControl.applOrder
"
]
=
'
[
"
CorrAppl
"
]
'
parset
[
"
ObservationControl.OnlineControl.applications
"
]
=
'
[
"
CorrAppl
"
]
'
parset
[
"
ObservationControl.OnlineControl.inspectionHost
"
]
=
'
head01.cep4.control.lofar
'
parset
[
"
ObservationControl.OnlineControl.inspectionProgram
"
]
=
'
inspection-plots-observation.sh
'
parset
[
"
ObservationControl.StationControl._hostname
"
]
=
parset
[
"
Observation.VirtualInstrument.stationList
"
]
parset
[
"
ObservationControl.StationControl.aartfaacPiggybackAllowed
"
]
=
False
parset
[
"
ObservationControl.StationControl.tbbPiggybackAllowed
"
]
=
False
# convert dict to real parameterset, and return it
parset
=
parameterset
(
parset
)
...
...
This diff is collapsed.
Click to expand it.
Jorrit Schaap
@schaap
mentioned in commit
a25f7368
·
4 years ago
mentioned in commit
a25f7368
mentioned in commit a25f7368443f38299ea5b70fed748f708547398b
Toggle commit list
Jorrit Schaap
@schaap
mentioned in commit
562b3482
·
4 years ago
mentioned in commit
562b3482
mentioned in commit 562b34820e93d8792c22e8fa04c64cedd08441b7
Toggle commit list
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