Skip to content
GitLab
Explore
Sign in
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
Commits
1cea657f
Commit
1cea657f
authored
1 year ago
by
Maik Nijhuis
Browse files
Options
Downloads
Patches
Plain Diff
AST-1540
Add tFilter.py with filter-after-stationadd test
parent
0e8620a6
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1259
AST-1540 Add tFilter.py with filter-after-stationadd test
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
steps/test/integration/CMakeLists.txt
+1
-0
1 addition, 0 deletions
steps/test/integration/CMakeLists.txt
steps/test/integration/tFilter.py
+54
-0
54 additions, 0 deletions
steps/test/integration/tFilter.py
with
55 additions
and
0 deletions
steps/test/integration/CMakeLists.txt
+
1
−
0
View file @
1cea657f
...
@@ -9,6 +9,7 @@ add_python_tests(
...
@@ -9,6 +9,7 @@ add_python_tests(
tClipper
tClipper
tColumnReader
tColumnReader
tDemix
tDemix
tFilter
tGainCal
tGainCal
tGainCalH5Parm
tGainCalH5Parm
tIDGImager
tIDGImager
...
...
This diff is collapsed.
Click to expand it.
steps/test/integration/tFilter.py
0 → 100644
+
54
−
0
View file @
1cea657f
# Copyright (C) 2024 ASTRON (Netherlands Institute for Radio Astronomy)
# SPDX-License-Identifier: GPL-3.0-or-later
import
pytest
from
subprocess
import
check_call
# Append current directory to system path in order to import testconfig
import
sys
sys
.
path
.
append
(
"
.
"
)
import
testconfig
as
tcf
from
utils
import
assert_taql
,
run_in_tmp_path
,
untar
"""
Integration tests for the Filter step.
Script can be invoked in two ways:
- as standalone from the build/steps/test/integration directory,
using `pytest source/Filter.py` (extended with pytest options of your choice)
- using ctest, see DP3/steps/test/integration/CMakeLists.txt
"""
MSIN
=
"
tNDPPP-generic.MS
"
@pytest.fixture
(
autouse
=
True
)
def
source_env
(
run_in_tmp_path
):
untar
(
f
"
{
tcf
.
RESOURCEDIR
}
/
{
MSIN
}
.tgz
"
)
def
test_filter_added_station
():
"""
Adds two stations and filters out the first added station.
"""
MSOUT
=
"
out.ms
"
check_call
(
[
tcf
.
DP3EXE
,
"
checkparset=1
"
,
f
"
msin=
{
MSIN
}
"
,
f
"
msout=
{
MSOUT
}
"
,
"
steps=[stationadder,filter]
"
,
"
stationadder.stations={CSNEW:[CS001HBA0,CS002HBA0],RSNEW:[RS106HBA,RS208HBA]}
"
,
"
filter.baseline=!CSNEW
"
,
"
filter.remove=true
"
,
]
)
taql_command
=
f
"
select from
{
MSOUT
}
/ANTENNA where NAME=
'
CSNEW
'"
assert_taql
(
taql_command
,
0
)
taql_command
=
f
"
select from
{
MSOUT
}
/ANTENNA where NAME=
'
RSNEW
'"
assert_taql
(
taql_command
,
1
)
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