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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
c100f991
Commit
c100f991
authored
8 years ago
by
Tammo Jan Dijkema
Browse files
Options
Downloads
Patches
Plain Diff
Task #10121: DPPP_DDECal: make propagating solutions optional
parent
d1045047
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_DDECal/include/DPPP_DDECal/DDECal.h
+3
-2
3 additions, 2 deletions
CEP/DP3/DPPP_DDECal/include/DPPP_DDECal/DDECal.h
CEP/DP3/DPPP_DDECal/src/DDECal.cc
+19
-12
19 additions, 12 deletions
CEP/DP3/DPPP_DDECal/src/DDECal.cc
with
22 additions
and
14 deletions
CEP/DP3/DPPP_DDECal/include/DPPP_DDECal/DDECal.h
+
3
−
2
View file @
c100f991
...
...
@@ -95,8 +95,8 @@ namespace LOFAR {
private:
// Initialize
the parmdb
void
init
H5Parm
();
// Initialize
solutions
void
init
ializeSolutions
();
//# Data members.
DPInput
*
itsInput
;
...
...
@@ -122,6 +122,7 @@ namespace LOFAR {
H5Parm
itsH5Parm
;
string
itsMode
;
bool
itsPropagateSolutions
;
uint
itsTimeStep
;
uint
itsSolInt
;
uint
itsStepInSolInt
;
...
...
This diff is collapsed.
Click to expand it.
CEP/DP3/DPPP_DDECal/src/DDECal.cc
+
19
−
12
View file @
c100f991
...
...
@@ -75,6 +75,8 @@ namespace LOFAR {
parset
.
getString
(
"msin"
)
+
"/instrument.h5"
)),
itsH5Parm
(
itsH5ParmName
),
itsPropagateSolutions
(
parset
.
getBool
(
prefix
+
"propagatesolutions"
,
false
)),
itsTimeStep
(
0
),
itsSolInt
(
parset
.
getInt
(
prefix
+
"solint"
,
1
)),
itsStepInSolInt
(
0
),
...
...
@@ -315,6 +317,19 @@ namespace LOFAR {
os
<<
itsNIter
[
itsNIter
.
size
()
-
1
]
<<
"]"
<<
endl
;
}
void
DDECal
::
initializeSolutions
()
{
if
(
itsTimeStep
/
itsSolInt
>
0
&&
itsPropagateSolutions
)
{
// initialize solutions with those of the previous step
itsSols
[
itsTimeStep
/
itsSolInt
]
=
itsSols
[
itsTimeStep
/
itsSolInt
-
1
];
}
else
{
// initialize solutions with 1.
for
(
vector
<
vector
<
DComplex
>
>::
iterator
solveciter
=
itsSols
[
itsTimeStep
/
itsSolInt
].
begin
();
solveciter
!=
itsSols
[
itsTimeStep
/
itsSolInt
].
end
();
++
solveciter
)
{
(
*
solveciter
).
assign
(
itsDirections
.
size
()
*
info
().
antennaNames
().
size
(),
1.0
);
}
}
}
bool
DDECal
::
process
(
const
DPBuffer
&
bufin
)
{
itsTimer
.
start
();
...
...
@@ -366,16 +381,8 @@ namespace LOFAR {
itsAvgTime
+=
itsAvgTime
+
bufin
.
getTime
();
if
(
itsStepInSolInt
==
itsSolInt
-
1
)
{
if
(
itsTimeStep
/
itsSolInt
>
0
)
{
// initialize solutions with those of the previous step
itsSols
[
itsTimeStep
/
itsSolInt
]
=
itsSols
[
itsTimeStep
/
itsSolInt
-
1
];
}
else
{
// initialize solutions with 1.
for
(
vector
<
vector
<
DComplex
>
>::
iterator
solveciter
=
itsSols
[
itsTimeStep
/
itsSolInt
].
begin
();
solveciter
!=
itsSols
[
itsTimeStep
/
itsSolInt
].
end
();
++
solveciter
)
{
(
*
solveciter
).
assign
(
itsDirections
.
size
()
*
info
().
antennaNames
().
size
(),
1.0
);
}
}
initializeSolutions
();
itsTimerSolve
.
start
();
MultiDirSolver
::
SolveResult
solveResult
=
itsMultiDirSolver
.
process
(
itsDataPtrs
,
itsModelDataPtrs
,
...
...
@@ -565,8 +572,8 @@ namespace LOFAR {
itsTimer
.
start
();
if
(
itsStepInSolInt
!=
0
)
{
//
initialize
s
olutions
with those of the previous step
itsSols
[
itsTimeStep
/
itsSolInt
]
=
itsSols
[
itsTimeStep
/
itsSolInt
-
1
];
initialize
S
olutions
();
//shrink itsDataPtrs, itsModelDataPtrs
std
::
vector
<
casacore
::
Complex
*>
(
itsDataPtrs
.
begin
(),
itsDataPtrs
.
begin
()
+
itsStepInSolInt
).
swap
(
itsDataPtrs
);
...
...
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