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
ed542022
Commit
ed542022
authored
15 years ago
by
Adriaan Renting
Browse files
Options
Downloads
Patches
Plain Diff
Bug #1373: Changed handling of ColumnDesc.shape()
parent
78d1a061
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
CEP/DP3/DPPP/include/DPPP/MsFile.h
+1
-0
1 addition, 0 deletions
CEP/DP3/DPPP/include/DPPP/MsFile.h
CEP/DP3/DPPP/src/MsFile.cc
+19
-9
19 additions, 9 deletions
CEP/DP3/DPPP/src/MsFile.cc
CEP/DP3/DPPP/src/PipelineProcessControl.cc
+14
-1
14 additions, 1 deletion
CEP/DP3/DPPP/src/PipelineProcessControl.cc
with
34 additions
and
10 deletions
CEP/DP3/DPPP/include/DPPP/MsFile.h
+
1
−
0
View file @
ed542022
...
@@ -69,6 +69,7 @@ namespace LOFAR
...
@@ -69,6 +69,7 @@ namespace LOFAR
casa
::
IPosition
ipos
,
casa
::
IPosition
ipos
,
std
::
string
name
,
std
::
string
name
,
casa
::
Table
&
table
);
casa
::
Table
&
table
);
casa
::
Vector
<
casa
::
Int
>
DetermineDATAshape
(
casa
::
MeasurementSet
&
MS
);
casa
::
Block
<
casa
::
String
>
SELECTblock
;
casa
::
Block
<
casa
::
String
>
SELECTblock
;
std
::
string
InName
;
std
::
string
InName
;
std
::
string
OutName
;
std
::
string
OutName
;
...
...
This diff is collapsed.
Click to expand it.
CEP/DP3/DPPP/src/MsFile.cc
+
19
−
9
View file @
ed542022
...
@@ -92,10 +92,24 @@ void MsFile::TableResize(TableDesc tdesc, IPosition ipos, string name, Table& ta
...
@@ -92,10 +92,24 @@ void MsFile::TableResize(TableDesc tdesc, IPosition ipos, string name, Table& ta
table
.
addColumn
(
desc
);
table
.
addColumn
(
desc
);
}
}
//===============>>> MsFile::Init <<<===============
Vector
<
Int
>
MsFile
::
DetermineDATAshape
(
MeasurementSet
&
MS
)
{
ROArrayColumn
<
Complex
>
temp_column
(
MS
,
"DATA"
);
Matrix
<
Complex
>
temp_cell
;
temp_column
.
get
(
0
,
temp_cell
);
IPosition
ipos
=
temp_cell
.
shape
();
Vector
<
Int
>
temp_pos
=
ipos
.
asVector
();
std
::
cout
<<
"Old shape: "
<<
temp_pos
(
0
)
<<
":"
<<
temp_pos
(
1
)
<<
std
::
endl
;
return
temp_pos
;
}
//===============>>> MsFile::Init <<<===============
//===============>>> MsFile::Init <<<===============
void
MsFile
::
Init
(
MsInfo
&
Info
,
RunDetails
&
Details
,
int
Squashing
)
void
MsFile
::
Init
(
MsInfo
&
Info
,
RunDetails
&
Details
,
int
Squashing
)
{
{
cout
<<
"Please wait, preparing output MS"
<<
endl
;
std
::
cout
<<
"Please wait, preparing output MS"
<<
std
::
endl
;
Block
<
String
>
tempblock
(
SELECTblock
);
Block
<
String
>
tempblock
(
SELECTblock
);
tempblock
.
resize
(
21
);
tempblock
.
resize
(
21
);
tempblock
[
20
]
=
"FLAG"
;
tempblock
[
20
]
=
"FLAG"
;
...
@@ -110,11 +124,8 @@ void MsFile::Init(MsInfo& Info, RunDetails& Details, int Squashing)
...
@@ -110,11 +124,8 @@ void MsFile::Init(MsInfo& Info, RunDetails& Details, int Squashing)
InMS
=
new
MeasurementSet
(
InName
);
InMS
=
new
MeasurementSet
(
InName
);
OutMS
=
new
MeasurementSet
(
OutName
,
Table
::
Update
);
OutMS
=
new
MeasurementSet
(
OutName
,
Table
::
Update
);
//some magic to create a new DATA column
//some magic to create a new DATA column
TableDesc
tdesc
=
InMS
->
tableDesc
();
Vector
<
Int
>
temp_pos
=
DetermineDATAshape
(
*
InMS
);
ColumnDesc
desc
=
tdesc
.
rwColumnDesc
(
"DATA"
);
IPosition
ipos
=
desc
.
shape
();
Vector
<
Int
>
temp_pos
=
ipos
.
asVector
();
std
::
cout
<<
"Old shape: "
<<
temp_pos
(
0
)
<<
":"
<<
temp_pos
(
1
)
<<
std
::
endl
;
int
old_nchan
=
temp_pos
(
1
);
int
old_nchan
=
temp_pos
(
1
);
int
new_nchan
;
int
new_nchan
;
if
(
Squashing
)
if
(
Squashing
)
...
@@ -124,12 +135,11 @@ void MsFile::Init(MsInfo& Info, RunDetails& Details, int Squashing)
...
@@ -124,12 +135,11 @@ void MsFile::Init(MsInfo& Info, RunDetails& Details, int Squashing)
else
else
{
new_nchan
=
old_nchan
;
{
new_nchan
=
old_nchan
;
Details
.
NChan
=
old_nchan
;
Details
.
NChan
=
old_nchan
;
Details
.
Step
=
1
;
Details
.
Start
=
0
;
}
}
std
::
cout
<<
"New shape: "
<<
temp_pos
(
0
)
<<
":"
<<
temp_pos
(
1
)
<<
std
::
endl
;
std
::
cout
<<
"New shape: "
<<
temp_pos
(
0
)
<<
":"
<<
temp_pos
(
1
)
<<
std
::
endl
;
IPosition
data_ipos
(
temp_pos
);
IPosition
data_ipos
(
temp_pos
);
TableDesc
tdesc
=
InMS
->
tableDesc
();
if
(
tdesc
.
isColumn
(
"WEIGHT_SPECTRUM"
))
if
(
tdesc
.
isColumn
(
"WEIGHT_SPECTRUM"
))
{
tdesc
.
removeColumn
(
"WEIGHT_SPECTRUM"
);
{
tdesc
.
removeColumn
(
"WEIGHT_SPECTRUM"
);
}
}
...
@@ -148,7 +158,7 @@ void MsFile::Init(MsInfo& Info, RunDetails& Details, int Squashing)
...
@@ -148,7 +158,7 @@ void MsFile::Init(MsInfo& Info, RunDetails& Details, int Squashing)
TableResize
(
tdesc
,
data_ipos
,
"CORRECTED_DATA"
,
*
OutMS
);
TableResize
(
tdesc
,
data_ipos
,
"CORRECTED_DATA"
,
*
OutMS
);
cout
<<
"MODEL_DATA detected for processing"
<<
endl
;
cout
<<
"MODEL_DATA detected for processing"
<<
endl
;
desc
=
tdesc
.
rwColumnDesc
(
"MODEL_DATA"
);
ColumnDesc
desc
=
tdesc
.
rwColumnDesc
(
"MODEL_DATA"
);
desc
.
setOptions
(
0
);
desc
.
setOptions
(
0
);
desc
.
setShape
(
data_ipos
);
desc
.
setShape
(
data_ipos
);
desc
.
setOptions
(
4
);
desc
.
setOptions
(
4
);
...
...
This diff is collapsed.
Click to expand it.
CEP/DP3/DPPP/src/PipelineProcessControl.cc
+
14
−
1
View file @
ed542022
...
@@ -92,10 +92,23 @@ namespace LOFAR
...
@@ -92,10 +92,23 @@ namespace LOFAR
itsBandpass
=
ParamSet
->
getUint32
(
"bandpass"
,
0
);
itsBandpass
=
ParamSet
->
getUint32
(
"bandpass"
,
0
);
itsFlagger
=
ParamSet
->
getUint32
(
"flagger"
,
0
);
itsFlagger
=
ParamSet
->
getUint32
(
"flagger"
,
0
);
itsSquasher
=
ParamSet
->
getUint32
(
"squasher"
,
0
);
itsSquasher
=
ParamSet
->
getUint32
(
"squasher"
,
0
);
myDetails
->
PrintInfo
();
if
(
myDetails
->
CheckValues
())
if
(
myDetails
->
CheckValues
())
{
return
false
;
{
return
false
;
}
}
if
(
itsFlagger
==
0
&&
(
myDetails
->
FreqWindow
!=
1
||
myDetails
->
TimeWindow
!=
1
))
{
myDetails
->
FreqWindow
=
1
;
myDetails
->
TimeWindow
=
1
;
std
::
cout
<<
"No flagger, time and frequency windows reset to 1x1"
<<
std
::
endl
;
}
if
(
itsSquasher
==
0
&&
(
myDetails
->
Step
!=
1
||
myDetails
->
Start
!=
0
||
myDetails
->
TimeStep
!=
1
))
{
myDetails
->
Step
=
1
;
myDetails
->
Start
=
0
;
myDetails
->
TimeStep
=
1
;
std
::
cout
<<
"No squasher, step, start and timestep sizes reset"
<<
std
::
endl
;
}
myDetails
->
PrintInfo
();
return
true
;
return
true
;
}
}
...
...
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