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
5cf03ade
Commit
5cf03ade
authored
8 years ago
by
Tammo Jan Dijkema
Browse files
Options
Downloads
Patches
Plain Diff
Task #9787: DPPP gaincal: consider all flags in solint
parent
04b84dcf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CEP/DP3/DPPP/include/DPPP/GainCal.h
+1
-10
1 addition, 10 deletions
CEP/DP3/DPPP/include/DPPP/GainCal.h
CEP/DP3/DPPP/src/GainCal.cc
+1
-54
1 addition, 54 deletions
CEP/DP3/DPPP/src/GainCal.cc
CEP/DP3/DPPP/src/StefCal.cc
+8
-1
8 additions, 1 deletion
CEP/DP3/DPPP/src/StefCal.cc
with
10 additions
and
65 deletions
CEP/DP3/DPPP/include/DPPP/GainCal.h
+
1
−
10
View file @
5cf03ade
...
...
@@ -95,14 +95,6 @@ namespace LOFAR {
// Invert solution (for applying it)
casa
::
Cube
<
casa
::
DComplex
>
invertSol
(
const
casa
::
Cube
<
casa
::
DComplex
>&
sol
);
// Counts the number of antennas with non-flagged data,
// Set a map for the used antennas in iS, returns the number of antennas
void
setAntennaMaps
(
const
casa
::
Bool
*
flag
,
uint
freqCell
);
// Remove rows and colums corresponding to antennas with too much
// flagged data from vis and mvis
void
removeDeadAntennas
();
// Fills the matrices itsVis and itsMVis
void
fillMatrices
(
casa
::
Complex
*
model
,
casa
::
Complex
*
data
,
float
*
weight
,
const
casa
::
Bool
*
flag
);
...
...
@@ -153,11 +145,10 @@ namespace LOFAR {
uint
itsMaxIter
;
double
itsTolerance
;
bool
itsPropagateSolutions
;
// Not used currently, TODO: use this
bool
itsPropagateSolutions
;
uint
itsSolInt
;
// Time cell size
uint
itsNChan
;
// Frequency cell size
uint
itsNFreqCells
;
uint
itsMinBLperAnt
;
uint
itsTimeSlotsPerParmUpdate
;
uint
itsConverged
;
...
...
This diff is collapsed.
Click to expand it.
CEP/DP3/DPPP/src/GainCal.cc
+
1
−
54
View file @
5cf03ade
...
...
@@ -83,7 +83,6 @@ namespace LOFAR {
itsSolInt
(
parset
.
getInt
(
prefix
+
"solint"
,
1
)),
itsNChan
(
parset
.
getInt
(
prefix
+
"nchan"
,
0
)),
itsNFreqCells
(
0
),
itsMinBLperAnt
(
parset
.
getInt
(
prefix
+
"minblperant"
,
4
)),
itsTimeSlotsPerParmUpdate
(
parset
.
getInt
(
prefix
+
"timeslotsperparmupdate"
,
500
)),
itsConverged
(
0
),
...
...
@@ -329,7 +328,7 @@ namespace LOFAR {
// Start new solution interval
for
(
uint
freqCell
=
0
;
freqCell
<
itsNFreqCells
;
freqCell
++
)
{
setAntennaMaps
(
flag
,
freqCell
);
iS
[
freqCell
].
clearStationFlagged
(
);
iS
[
freqCell
].
resetVis
();
}
}
...
...
@@ -475,58 +474,6 @@ namespace LOFAR {
}
}
void
GainCal
::
setAntennaMaps
(
const
Bool
*
flag
,
uint
freqCell
)
{
uint
nCr
=
info
().
ncorr
();
uint
nCh
=
info
().
nchan
();
uint
nBl
=
info
().
nbaselines
();
iS
[
freqCell
].
clearStationFlagged
();
casa
::
Vector
<
casa
::
uInt
>
dataPerAntenna
;
// nAnt
dataPerAntenna
.
resize
(
info
().
antennaNames
().
size
());
// TODO: implement smarter graph algorithm here that requires
// less than O(n_ant^3) worst case operations.
bool
flaggedAntsAdded
=
true
;
uint
loopcount
=
0
;
while
(
flaggedAntsAdded
)
{
dataPerAntenna
=
0
;
for
(
uint
bl
=
0
;
bl
<
nBl
;
++
bl
)
{
uint
ant1
=
info
().
getAnt1
()[
bl
];
uint
ant2
=
info
().
getAnt2
()[
bl
];
if
(
ant1
==
ant2
)
{
continue
;
}
uint
chmax
=
min
((
freqCell
+
1
)
*
itsNChan
,
nCh
);
for
(
uint
ch
=
freqCell
*
itsNChan
;
ch
<
chmax
;
++
ch
)
{
for
(
uint
cr
=
0
;
cr
<
nCr
;
++
cr
)
{
if
(
!
(
flag
[
bl
*
nCr
*
nCh
+
ch
*
nCr
+
cr
]
||
iS
[
freqCell
].
getStationFlagged
()[
ant1
]
||
iS
[
freqCell
].
getStationFlagged
()[
ant2
]
))
{
dataPerAntenna
(
ant1
)
++
;
dataPerAntenna
(
ant2
)
++
;
}
}
}
}
flaggedAntsAdded
=
false
;
for
(
uint
ant
=
0
;
ant
<
info
().
antennaNames
().
size
();
++
ant
)
{
if
(
dataPerAntenna
(
ant
)
>
nCr
*
itsMinBLperAnt
)
{
iS
[
freqCell
].
getStationFlagged
()[
ant
]
=
false
;
// Index in stefcal numbering
}
else
{
// Not enough data
//cout<<"flagging station "<<ant<<", "<<dataPerAntenna(ant)<<endl;
if
(
!
iS
[
freqCell
].
getStationFlagged
()[
ant
])
{
iS
[
freqCell
].
getStationFlagged
()[
ant
]
=
true
;
flaggedAntsAdded
=
true
;
}
}
}
loopcount
++
;
}
}
void
GainCal
::
stefcal
()
{
itsTimerSolve
.
start
();
...
...
This diff is collapsed.
Click to expand it.
CEP/DP3/DPPP/src/StefCal.cc
+
8
−
1
View file @
5cf03ade
...
...
@@ -285,7 +285,13 @@ namespace LOFAR {
vis_p
=&
_vis
(
IPosition
(
6
,
0
,
1
,
time
,
ch
,
1
,
st1
));
for
(
uint
st2
=
0
;
st2
<
_nSt
;
++
st2
)
{
t
(
3
)
+=
conj
(
_z
(
st2
+
_nSt
*
ch
+
_nSt
*
_nChan
*
time
,
3
))
*
vis_p
[
st2
];
}
// itsVis(IPosition(6,st2,1,time,ch,1,st1))
}
}
DComplex
invdet
=
1.
/
(
w
(
0
)
*
w
(
3
)
-
w
(
1
)
*
w
(
2
));
DComplex
invdet
=
w
(
0
)
*
w
(
3
)
-
w
(
1
)
*
w
(
2
);
if
(
abs
(
invdet
)
==
0
)
{
_stationFlagged
[
st1
]
=
true
;
_g
(
st1
,
0
)
=
0
;
continue
;
}
invdet
=
1.
/
invdet
;
_g
(
st1
,
0
)
=
invdet
*
(
w
(
3
)
*
t
(
0
)
-
w
(
1
)
*
t
(
2
)
);
_g
(
st1
,
1
)
=
invdet
*
(
w
(
3
)
*
t
(
1
)
-
w
(
1
)
*
t
(
3
)
);
_g
(
st1
,
2
)
=
invdet
*
(
w
(
0
)
*
t
(
2
)
-
w
(
2
)
*
t
(
0
)
);
...
...
@@ -333,6 +339,7 @@ namespace LOFAR {
//cout<<", w="<<ww<<" ";
if
(
ww
==
0
)
{
_stationFlagged
[
st1
%
_nSt
]
=
true
;
_g
(
st1
,
0
)
=
0
;
continue
;
}
_g
(
st1
,
0
)
=
tt
/
ww
;
...
...
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