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
72772b7f
Commit
72772b7f
authored
15 years ago
by
Ger van Diepen
Browse files
Options
Downloads
Patches
Plain Diff
bug 1385:
Always write WEIGHT_SPECTRUM
parent
710047cb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CEP/DP3/DPPP/src/MsFile.cc
+13
-17
13 additions, 17 deletions
CEP/DP3/DPPP/src/MsFile.cc
CEP/DP3/DPPP/src/Pipeline.cc
+0
-2
0 additions, 2 deletions
CEP/DP3/DPPP/src/Pipeline.cc
with
13 additions
and
19 deletions
CEP/DP3/DPPP/src/MsFile.cc
+
13
−
17
View file @
72772b7f
...
...
@@ -85,7 +85,7 @@ void MsFile::TableResize(ColumnDesc desc, const IPosition& ipos,
{
desc
.
setOptions
(
0
);
desc
.
setShape
(
ipos
);
desc
.
setOptions
(
ColumnDesc
::
FixedShape
+
ColumnDesc
::
Direct
);
desc
.
setOptions
(
ColumnDesc
::
FixedShape
);
if
(
table
.
tableDesc
().
isColumn
(
desc
.
name
()))
{
table
.
removeColumn
(
desc
.
name
());
}
...
...
@@ -118,7 +118,7 @@ IPosition MsFile::DetermineDATAshape(const Table& MS)
//===============>>> MsFile::Init <<<===============
void
MsFile
::
Init
(
MsInfo
&
Info
,
RunDetails
&
Details
,
int
Squashing
)
{
std
::
cout
<<
"P
lease wait, p
reparing output MS "
<<
OutName
<<
std
::
endl
;
std
::
cout
<<
"Preparing output MS "
<<
OutName
<<
std
::
endl
;
// Open the MS and obtain the description.
InMS
=
new
MeasurementSet
(
InName
);
TableDesc
tdesc
=
InMS
->
tableDesc
();
...
...
@@ -153,9 +153,6 @@ void MsFile::Init(MsInfo& Info, RunDetails& Details, int Squashing)
SetupNewTable
newtab
(
OutName
,
tempdesc
,
Table
::
NewNoReplace
);
newtab
.
bindCreate
(
dminfo
);
Table
outtable
(
newtab
);
// Copy the info and subtables.
TableCopy
::
copyInfo
(
outtable
,
temptable
);
TableCopy
::
copySubTables
(
outtable
,
temptable
);
{
// Add DATA column using tsm.
TiledColumnStMan
tsm
(
"TiledData"
,
IPosition
(
3
,
data_ipos
[
0
],
8
,
128
));
...
...
@@ -166,9 +163,10 @@ void MsFile::Init(MsInfo& Info, RunDetails& Details, int Squashing)
TiledColumnStMan
tsmf
(
"TiledFlag"
,
IPosition
(
3
,
data_ipos
[
0
],
8
,
128
*
8
));
TableResize
(
tdesc
[
"FLAG"
],
data_ipos
,
&
tsmf
,
outtable
);
}
if
(
tdesc
.
isColumn
(
"WEIGHT_SPECTRUM"
))
{
// If present, add WEIGHT_SPECTRUM column using ssm.
TableResize
(
tdesc
[
"WEIGHT_SPECTRUM"
],
data_ipos
,
0
,
outtable
);
{
// Add WEIGHT_SPECTRUM column using tsm.
TiledColumnStMan
tsmw
(
"TiledWeightSpec"
,
IPosition
(
3
,
data_ipos
[
0
],
8
,
128
));
TableResize
(
tdesc
[
"WEIGHT_SPECTRUM"
],
data_ipos
,
&
tsmw
,
outtable
);
}
// If both present handle the CORRECTED_DATA and MODEL_DATA column.
if
(
tdesc
.
isColumn
(
"CORRECTED_DATA"
)
&&
tdesc
.
isColumn
(
"MODEL_DATA"
))
...
...
@@ -200,6 +198,10 @@ void MsFile::Init(MsInfo& Info, RunDetails& Details, int Squashing)
else
{
Details
.
Columns
=
false
;
}
cout
<<
" copying info and subtables ..."
<<
endl
;
// Copy the info and subtables.
TableCopy
::
copyInfo
(
outtable
,
temptable
);
TableCopy
::
copySubTables
(
outtable
,
temptable
);
// All columns are present, so now it can be opened as an MS.
outtable
.
flush
();
...
...
@@ -349,7 +351,6 @@ void MsFile::WriteData(casa::TableIterator& Data_iter,
TimeBuffer
&
TimeData
)
{
Table
DataTable
=
*
OutMS
;
bool
doWeights
=
DataTable
.
tableDesc
().
isColumn
(
"WEIGHT_SPECTRUM"
);
int
rowcount
=
Data_iter
.
table
().
nrow
();
int
nrows
=
DataTable
.
nrow
();
int
pos
=
(
Buffer
.
Position
+
1
)
%
Buffer
.
WindowSize
;
...
...
@@ -369,10 +370,7 @@ void MsFile::WriteData(casa::TableIterator& Data_iter,
ArrayColumn
<
Double
>
uvw
(
DataTable
,
"UVW"
);
ArrayColumn
<
Complex
>
data
(
DataTable
,
"DATA"
);
ArrayColumn
<
Bool
>
flags
(
DataTable
,
"FLAG"
);
ArrayColumn
<
Float
>
weights
;
if
(
doWeights
)
{
weights
.
attach
(
DataTable
,
"WEIGHT_SPECTRUM"
);
}
ArrayColumn
<
Float
>
weights
(
DataTable
,
"WEIGHT_SPECTRUM"
);
ArrayColumn
<
Complex
>
modeldata
;
ArrayColumn
<
Complex
>
correcteddata
;
if
(
columns
)
...
...
@@ -395,9 +393,7 @@ void MsFile::WriteData(casa::TableIterator& Data_iter,
time_centroid
.
set
(
nrows
+
i
,
TimeData
.
TimeCentroid
[
0
]);
exposure
.
set
(
nrows
+
i
,
TimeData
.
Exposure
[
0
]);
interval
.
set
(
nrows
+
i
,
TimeData
.
Interval
[
0
]);
if
(
doWeights
)
{
weights
.
put
(
nrows
+
i
,
Buffer
.
Weights
[
index
].
xyPlane
(
pos
));
}
weights
.
put
(
nrows
+
i
,
Buffer
.
Weights
[
index
].
xyPlane
(
pos
));
if
(
columns
)
{
modeldata
.
put
(
nrows
+
i
,
Buffer
.
ModelData
[
index
].
xyPlane
(
pos
));
...
...
This diff is collapsed.
Click to expand it.
CEP/DP3/DPPP/src/Pipeline.cc
+
0
−
2
View file @
72772b7f
...
...
@@ -119,8 +119,6 @@ void Pipeline::Run(MsInfo* SquashedInfo, bool Columns)
TableIterator
time_iter
=
(
*
myFile
).
TimeIterator
();
int
TimeCounter
=
0
;
int
WriteCounter
=
0
;
int
step
=
myInfo
->
NumTimeslots
/
100
+
1
;
//not exact but it'll do
int
row
=
0
;
while
(
!
time_iter
.
pastEnd
())
{
BandpassData
->
Position
=
++
(
BandpassData
->
Position
)
%
BandpassData
->
WindowSize
;
myFile
->
UpdateTimeslotData
(
time_iter
,
*
myInfo
,
*
BandpassData
,
*
TimeData
);
...
...
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