Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gstlal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Duncan Macleod
gstlal
Commits
e29a1a93
Commit
e29a1a93
authored
6 years ago
by
Aaron Viets
Browse files
Options
Downloads
Patches
Plain Diff
lal_transferfunction: Added a frequency column to the output
parent
cc396edd
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/gst/lal/gstlal_transferfunction.c
+6
-4
6 additions, 4 deletions
gstlal-calibration/gst/lal/gstlal_transferfunction.c
with
6 additions
and
4 deletions
gstlal-calibration/gst/lal/gstlal_transferfunction.c
+
6
−
4
View file @
e29a1a93
...
...
@@ -179,17 +179,18 @@ DEFINE_MAXIMUM(32);
DEFINE_MAXIMUM
(
64
);
static
void
write_transfer_functions
(
complex
double
*
tfs
,
char
*
element_name
,
gint64
rows
,
int
columns
,
gboolean
write_to_screen
,
char
*
filename
,
gboolean
free_name
)
{
static
void
write_transfer_functions
(
complex
double
*
tfs
,
char
*
element_name
,
double
df
,
gint64
rows
,
int
columns
,
gboolean
write_to_screen
,
char
*
filename
,
gboolean
free_name
)
{
gint64
i
;
int
j
,
j_stop
;
if
(
write_to_screen
)
{
g_print
(
"
\n\n
==================== Transfer functions computed by %s ====================
\n\t
"
,
element_name
);
g_print
(
"
\n\n
==================== Transfer functions computed by %s ====================
\n
frequency
\t
\t
"
,
element_name
);
for
(
j
=
1
;
j
<
columns
;
j
++
)
g_print
(
"ch%d -> ch0
\t\t\t\t
"
,
j
);
g_print
(
"ch%d -> ch0
\n\n
"
,
columns
);
j_stop
=
columns
-
1
;
for
(
i
=
0
;
i
<
rows
;
i
++
)
{
g_print
(
"%10f
\t
"
,
i
*
df
);
for
(
j
=
0
;
j
<
j_stop
;
j
++
)
{
if
(
cimag
(
tfs
[
i
+
j
*
rows
])
<
0
.
0
)
g_print
(
"%10e - %10ei
\t\t
"
,
creal
(
tfs
[
i
+
j
*
rows
]),
-
cimag
(
tfs
[
i
+
j
*
rows
]));
...
...
@@ -207,13 +208,14 @@ static void write_transfer_functions(complex double *tfs, char *element_name, gi
if
(
filename
)
{
FILE
*
fp
;
fp
=
fopen
(
filename
,
"a"
);
g_fprintf
(
fp
,
"==================== Transfer functions computed by %s ====================
\n\t
"
,
element_name
);
g_fprintf
(
fp
,
"==================== Transfer functions computed by %s ====================
\n
frequency
\t
\t
"
,
element_name
);
for
(
j
=
1
;
j
<
columns
;
j
++
)
g_fprintf
(
fp
,
"ch%d -> ch0
\t\t\t\t
"
,
j
);
g_fprintf
(
fp
,
"ch%d -> ch0
\n\n
"
,
columns
);
j_stop
=
columns
-
1
;
for
(
i
=
0
;
i
<
rows
;
i
++
)
{
g_fprintf
(
fp
,
"%10f
\t
"
,
i
*
df
);
for
(
j
=
0
;
j
<
j_stop
;
j
++
)
{
if
(
cimag
(
tfs
[
i
+
j
*
rows
])
<
0
.
0
)
g_fprintf
(
fp
,
"%10e - %10ei
\t\t
"
,
creal
(
tfs
[
i
+
j
*
rows
]),
-
cimag
(
tfs
[
i
+
j
*
rows
]));
...
...
@@ -584,7 +586,7 @@ static gboolean find_transfer_functions_ ## DTYPE(GSTLALTransferFunction *elemen
g_object_notify_by_pspec(G_OBJECT(element), properties[ARG_TRANSFER_FUNCTIONS]); \
/* Write transfer functions to the screen or a file if we want */
\
if(element->write_to_screen || element->filename) \
write_transfer_functions(element->transfer_functions, gst_element_get_name(element), fd_fft_length, num_tfs, element->write_to_screen, element->filename, TRUE); \
write_transfer_functions(element->transfer_functions, gst_element_get_name(element),
element->rate / 2.0 / (fd_fft_length - 1.0),
fd_fft_length, num_tfs, element->write_to_screen, element->filename, TRUE); \
} \
element->sample_count -= element->update_samples + element->num_ffts * stride + element->fft_overlap; \
element->workspace.w ## S_OR_D ## pf.num_ffts_in_avg = 0; \
...
...
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