Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
DP3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
ResearchAndDevelopment
DP3
Merge requests
!747
AST-1059
Test MSReader::getProvidedFields
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
AST-1059
Test MSReader::getProvidedFields
ast-1059-test-msreader-fields
into
ast-1059-use-GetFieldsToWrite
Overview
0
Commits
2
Pipelines
7
Changes
2
Merged
Maik Nijhuis
requested to merge
ast-1059-test-msreader-fields
into
ast-1059-use-GetFieldsToWrite
2 years ago
Overview
0
Commits
2
Pipelines
7
Changes
2
Expand
0
0
Merge request reports
Compare
ast-1059-use-GetFieldsToWrite
version 3
0259a910
2 years ago
version 2
2f24bd0a
2 years ago
version 1
2dc63fef
2 years ago
ast-1059-use-GetFieldsToWrite (base)
and
latest version
latest version
258b3787
2 commits,
2 years ago
version 3
0259a910
2 commits,
2 years ago
version 2
2f24bd0a
1 commit,
2 years ago
version 1
2dc63fef
27 commits,
2 years ago
2 files
+
29
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
steps/test/unit/tMSReader.cc
+
28
−
0
Options
@@ -30,6 +30,34 @@ namespace {
BOOST_AUTO_TEST_SUITE
(
msreader
)
BOOST_AUTO_TEST_CASE
(
provided_fields
)
{
const
dp3
::
common
::
Fields
kFieldsToRead
(
dp3
::
common
::
Fields
::
Single
::
kFullResFlags
);
const
dp3
::
common
::
Fields
kWeightsField
(
dp3
::
common
::
Fields
::
Single
::
kWeights
);
// TODO(AST-1061): Use an MS that can be autoweighted, and re-add
// 'autoweight' to kAutoweightSettings.
const
casacore
::
MeasurementSet
ms
(
"tNDPPP_tmp.MS"
);
const
dp3
::
common
::
ParameterSet
parset
;
const
std
::
vector
<
std
::
string
>
kAutoweightSettings
=
{
/*"autoweight",*/
"forceautoweight"
};
MSReader
msreader
(
ms
,
parset
,
""
);
BOOST_TEST
(
msreader
.
getProvidedFields
()
==
dp3
::
common
::
Fields
());
msreader
.
setFieldsToRead
(
kFieldsToRead
);
BOOST_TEST
(
msreader
.
getProvidedFields
()
==
kFieldsToRead
);
for
(
const
std
::
string
&
setting
:
kAutoweightSettings
)
{
dp3
::
common
::
ParameterSet
parset_autoweight
;
parset_autoweight
.
add
(
setting
,
"true"
);
MSReader
autoweight
(
ms
,
parset_autoweight
,
""
);
BOOST_TEST
(
autoweight
.
getProvidedFields
()
==
kWeightsField
);
autoweight
.
setFieldsToRead
(
kFieldsToRead
);
BOOST_TEST
(
autoweight
.
getProvidedFields
()
==
(
kFieldsToRead
|
kWeightsField
));
}
}
// Test reading a LOFAR measurement set
BOOST_AUTO_TEST_CASE
(
read_lofar
)
{
const
casacore
::
MeasurementSet
ms
(
"tNDPPP-generic.MS"
);
Loading