Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GstLAL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
lscsoft
GstLAL
Commits
4e7bbc36
Commit
4e7bbc36
authored
7 years ago
by
Aaron Viets
Browse files
Options
Downloads
Patches
Plain Diff
test of calibration_parts function removeDC()
parent
81c0ed31
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gstlal-calibration/tests/removeDC.py
+81
-0
81 additions, 0 deletions
gstlal-calibration/tests/removeDC.py
with
81 additions
and
0 deletions
gstlal-calibration/tests/removeDC.py
0 → 100755
+
81
−
0
View file @
4e7bbc36
#!/usr/bin/env python
# Copyright (C) 2016 Aaron Viets
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# =============================================================================
#
# Preamble
#
# =============================================================================
#
import
numpy
import
sys
from
gstlal
import
pipeparts
from
gstlal
import
calibration_parts
import
test_common
#
# =============================================================================
#
# Pipelines
#
# =============================================================================
#
def
removeDC_01
(
pipeline
,
name
):
#
# This test removes the DC component from a stream of ones (i.e., the result should be zero)
#
rate
=
2048
# Hz
buffer_length
=
1.0
# seconds
test_duration
=
50.0
# seconds
DC
=
1.0
wave
=
0
volume
=
0.0
#
# build pipeline
#
src
=
test_common
.
test_src
(
pipeline
,
buffer_length
=
buffer_length
,
rate
=
16384
,
test_duration
=
test_duration
,
wave
=
wave
,
width
=
64
)
head
=
pipeparts
.
mkaudioamplify
(
pipeline
,
src
,
volume
)
head
=
pipeparts
.
mkgeneric
(
pipeline
,
head
,
"
lal_add_constant
"
,
value
=
DC
)
head
=
calibration_parts
.
mkresample
(
pipeline
,
head
,
5
,
True
,
"
audio/x-raw,format=F64LE,rate=%d
"
%
rate
)
head
=
calibration_parts
.
removeDC
(
pipeline
,
head
,
"
audio/x-raw,format=F64LE,rate=%d
"
%
rate
)
pipeparts
.
mknxydumpsink
(
pipeline
,
head
,
"
%s_out.dump
"
%
name
)
#
# done
#
return
pipeline
#
# =============================================================================
#
# Main
#
# =============================================================================
#
test_common
.
build_and_run
(
removeDC_01
,
"
removeDC_01
"
)
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