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
183aae55
Commit
183aae55
authored
8 years ago
by
Tammo Jan Dijkema
Browse files
Options
Downloads
Patches
Plain Diff
Task #9273: DPPP applycal now accepts ScalarPhase as alias for CommonScalarPhase
parent
b3a92bf5
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CEP/DP3/DPPP/src/ApplyCal.cc
+16
-7
16 additions, 7 deletions
CEP/DP3/DPPP/src/ApplyCal.cc
CEP/DP3/DPPP/test/tApplyCal2.run
+18
-0
18 additions, 0 deletions
CEP/DP3/DPPP/test/tApplyCal2.run
with
34 additions
and
7 deletions
CEP/DP3/DPPP/src/ApplyCal.cc
+
16
−
7
View file @
183aae55
...
@@ -70,6 +70,15 @@ namespace LOFAR {
...
@@ -70,6 +70,15 @@ namespace LOFAR {
if
(
itsCorrectType
==
"fulljones"
&&
itsUpdateWeights
)
{
if
(
itsCorrectType
==
"fulljones"
&&
itsUpdateWeights
)
{
ASSERTSTR
(
itsInvert
,
"Updating weights has not been implemented for invert=false and fulljones"
);
ASSERTSTR
(
itsInvert
,
"Updating weights has not been implemented for invert=false and fulljones"
);
}
}
ASSERT
(
itsCorrectType
==
"gain"
||
itsCorrectType
==
"fulljones"
||
itsCorrectType
==
"tec"
||
itsCorrectType
==
"clock"
||
itsCorrectType
==
"scalarphase"
||
itsCorrectType
==
"commonscalarphase"
||
itsCorrectType
==
"scalaramplitude"
||
itsCorrectType
==
"commonscalaramplitude"
||
itsCorrectType
==
"rotationangle"
||
itsCorrectType
==
"commonrotationangle"
||
itsCorrectType
==
"rotationmeasure"
);
if
(
itsCorrectType
.
substr
(
0
,
6
)
==
"common"
)
{
itsCorrectType
=
itsCorrectType
.
substr
(
6
);
}
}
}
ApplyCal
::
ApplyCal
()
ApplyCal
::
ApplyCal
()
...
@@ -172,13 +181,13 @@ namespace LOFAR {
...
@@ -172,13 +181,13 @@ namespace LOFAR {
itsParmExprs
.
push_back
(
"Clock:0"
);
itsParmExprs
.
push_back
(
"Clock:0"
);
itsParmExprs
.
push_back
(
"Clock:1"
);
itsParmExprs
.
push_back
(
"Clock:1"
);
}
}
}
else
if
(
itsCorrectType
==
"
common
rotationangle"
)
{
}
else
if
(
itsCorrectType
==
"rotationangle"
)
{
itsParmExprs
.
push_back
(
"{Common,}RotationAngle"
);
itsParmExprs
.
push_back
(
"{Common,}RotationAngle"
);
}
else
if
(
itsCorrectType
==
"
common
scalarphase"
)
{
}
else
if
(
itsCorrectType
==
"scalarphase"
)
{
itsParmExprs
.
push_back
(
"{Common,}ScalarPhase"
);
itsParmExprs
.
push_back
(
"{Common,}ScalarPhase"
);
}
else
if
(
itsCorrectType
==
"rotationmeasure"
)
{
}
else
if
(
itsCorrectType
==
"rotationmeasure"
)
{
itsParmExprs
.
push_back
(
"RotationMeasure"
);
itsParmExprs
.
push_back
(
"RotationMeasure"
);
}
else
if
(
itsCorrectType
==
"
common
scalaramplitude"
)
{
}
else
if
(
itsCorrectType
==
"scalaramplitude"
)
{
itsParmExprs
.
push_back
(
"{Common,}ScalarAmplitude"
);
itsParmExprs
.
push_back
(
"{Common,}ScalarAmplitude"
);
}
}
else
{
else
{
...
@@ -448,7 +457,7 @@ namespace LOFAR {
...
@@ -448,7 +457,7 @@ namespace LOFAR {
parmvalues
[
1
][
ant
][
tf
]
*
freq
*
casa
::
C
::
_2pi
);
parmvalues
[
1
][
ant
][
tf
]
*
freq
*
casa
::
C
::
_2pi
);
}
}
}
}
else
if
(
itsCorrectType
==
"
common
rotationangle"
)
{
else
if
(
itsCorrectType
==
"rotationangle"
)
{
double
phi
=
parmvalues
[
0
][
ant
][
tf
];
double
phi
=
parmvalues
[
0
][
ant
][
tf
];
if
(
itsInvert
)
{
if
(
itsInvert
)
{
phi
=
-
phi
;
phi
=
-
phi
;
...
@@ -474,11 +483,11 @@ namespace LOFAR {
...
@@ -474,11 +483,11 @@ namespace LOFAR {
itsParms
(
2
,
ant
,
tf
)
=
sinv
;
itsParms
(
2
,
ant
,
tf
)
=
sinv
;
itsParms
(
3
,
ant
,
tf
)
=
cosv
;
itsParms
(
3
,
ant
,
tf
)
=
cosv
;
}
}
else
if
(
itsCorrectType
==
"
common
scalarphase"
)
{
else
if
(
itsCorrectType
==
"scalarphase"
)
{
itsParms
(
0
,
ant
,
tf
)
=
polar
(
1.
,
parmvalues
[
0
][
ant
][
tf
]);
itsParms
(
0
,
ant
,
tf
)
=
polar
(
1.
,
parmvalues
[
0
][
ant
][
tf
]);
itsParms
(
1
,
ant
,
tf
)
=
polar
(
1.
,
parmvalues
[
0
][
ant
][
tf
]);
itsParms
(
1
,
ant
,
tf
)
=
polar
(
1.
,
parmvalues
[
0
][
ant
][
tf
]);
}
}
else
if
(
itsCorrectType
==
"
common
scalaramplitude"
)
{
else
if
(
itsCorrectType
==
"scalaramplitude"
)
{
itsParms
(
0
,
ant
,
tf
)
=
parmvalues
[
0
][
ant
][
tf
];
itsParms
(
0
,
ant
,
tf
)
=
parmvalues
[
0
][
ant
][
tf
];
itsParms
(
1
,
ant
,
tf
)
=
parmvalues
[
0
][
ant
][
tf
];
itsParms
(
1
,
ant
,
tf
)
=
parmvalues
[
0
][
ant
][
tf
];
}
}
...
@@ -501,7 +510,7 @@ namespace LOFAR {
...
@@ -501,7 +510,7 @@ namespace LOFAR {
uint
numParms
;
uint
numParms
;
if
(
itsCorrectType
==
"fulljones"
||
if
(
itsCorrectType
==
"fulljones"
||
itsCorrectType
==
"
common
rotationangle"
||
itsCorrectType
==
"rotationangle"
||
itsCorrectType
==
"rotationmeasure"
)
{
itsCorrectType
==
"rotationmeasure"
)
{
numParms
=
4
;
numParms
=
4
;
}
}
...
...
This diff is collapsed.
Click to expand it.
CEP/DP3/DPPP/test/tApplyCal2.run
+
18
−
0
View file @
183aae55
...
@@ -79,3 +79,21 @@ EOL
...
@@ -79,3 +79,21 @@ EOL
../../src/NDPPP
msin
=
tNDPPP-generic.MS
msout
=
.
msout.datacolumn
=
DATA3
steps
=[
applycal] applycal.parmdb
=
tApplyCal.parmdb applycal.correction
=
commonscalarphase
showcounts
=
false
../../src/NDPPP
msin
=
tNDPPP-generic.MS
msout
=
.
msout.datacolumn
=
DATA3
steps
=[
applycal] applycal.parmdb
=
tApplyCal.parmdb applycal.correction
=
commonscalarphase
showcounts
=
false
$taqlexe
'select from tNDPPP-generic.MS where not(all(DATA~=DATA3))'
>
taql.out
$taqlexe
'select from tNDPPP-generic.MS where not(all(DATA~=DATA3))'
>
taql.out
diff taql.out taql.ref
||
exit
1
diff taql.out taql.ref
||
exit
1
echo
;
echo
"Testing ScalarAmplitude values"
rm
-rf
tApplyCal.parmdb
../../../../ParmDB/src/parmdbm
<<
EOL
open table="tApplyCal.parmdb"
add ScalarAmplitude:CS001HBA0 values=[3.,3.,3.,3.], domain=[10e6, 200e6, 4472025735, 4972025795], shape=[2,2], shape=[2,2]
add ScalarAmplitude:CS002HBA0 values=[3.,3.,3.,3.], domain=[10e6, 200e6, 4472025735, 4972025795], shape=[2,2], shape=[2,2]
add ScalarAmplitude:CS002HBA1 values=[3.,3.,3.,3.], domain=[10e6, 200e6, 4472025735, 4972025795], shape=[2,2], shape=[2,2]
add ScalarAmplitude:CS004HBA1 values=[3.,3.,3.,3.], domain=[10e6, 200e6, 4472025735, 4972025795], shape=[2,2], shape=[2,2]
add ScalarAmplitude:RS106HBA values=[3.,3.,3.,3.], domain=[10e6, 200e6, 4472025735, 4972025795], shape=[2,2], shape=[2,2]
add ScalarAmplitude:RS208HBA values=[3.,3.,3.,3.], domain=[10e6, 200e6, 4472025735, 4972025795], shape=[2,2], shape=[2,2]
add ScalarAmplitude:RS305HBA values=[3.,3.,3.,3.], domain=[10e6, 200e6, 4472025735, 4972025795], shape=[2,2], shape=[2,2]
add ScalarAmplitude:RS307HBA values=[3.,3.,3.,3.], domain=[10e6, 200e6, 4472025735, 4972025795], shape=[2,2], shape=[2,2]
EOL
../../src/NDPPP
msin
=
tNDPPP-generic.MS
msout
=
.
msout.datacolumn
=
DATA3
steps
=[
applycal] applycal.parmdb
=
tApplyCal.parmdb applycal.correction
=
scalaramplitude
showcounts
=
false
$taqlexe
'select from tNDPPP-generic.MS where not(all(DATA~=9*DATA3))'
>
taql.out
diff taql.out taql.ref
||
exit
1
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