Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lalsuite-archive
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
lscsoft
lalsuite-archive
Commits
1f57432d
Commit
1f57432d
authored
23 years ago
by
Patrick Brady
Browse files
Options
Downloads
Patches
Plain Diff
Added ability to use units counts/attostrain
parent
26c55673
No related branches found
Branches containing commit
Tags
E7-020108
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lalapps/doc/ZPG2transfer.tex
+5
-1
5 additions, 1 deletion
lalapps/doc/ZPG2transfer.tex
lalapps/src/ZPG2Transfer.c
+17
-3
17 additions, 3 deletions
lalapps/src/ZPG2Transfer.c
with
22 additions
and
4 deletions
lalapps/doc/ZPG2transfer.tex
+
5
−
1
View file @
1f57432d
...
...
@@ -10,7 +10,7 @@ zero-pole-gain representation.
\item
[Synopsis]
\verb
$
lal_ZPG2Transfer
$
[
\verb
$
-z nz z_1 ... z_nz
$
] [
\verb
$
-p np p_1 .... p_np
$
]
[
\verb
$
-g gain
$
] [
\verb
$
-f npoints fmin fmax
$
]
[
\verb
$
-g gain
$
] [
\verb
$
-f npoints fmin fmax
$
]
[
\verb
$
-t
$
]
[
\verb
$
-o outfile
$
] [
\verb
$
-i ilwdfile
$
]
\item
[Description]
...
...
@@ -31,6 +31,10 @@ The number of zeros \verb$np$ followed
by a space and a white space list of
\emph
{
real
}
poles specified in units of Hz.
\item
[\texttt{-g gain}]
The gain of the filter.
\item
[\texttt{-t}]
If this flag is used, then the ilwd will indicate units of
counts/attostrain. The user must correctly choose the zeros, poles,
and gains, it is not handled automatically.
\item
[\texttt{-f npoints fmin fmax}]
Information about the frequency series.
\verb
$
npoints
$
is the number
of points in the series,
\verb
$
fmin
$
is the lowest frequency to be
...
...
This diff is collapsed.
Click to expand it.
lalapps/src/ZPG2Transfer.c
+
17
−
3
View file @
1f57432d
...
...
@@ -28,7 +28,7 @@ NRCSID( RESPONSEC, "$Id$" );
/* Usage format string. */
#define USAGE "Usage: %s [-z nz z_1 ... z_nz] [-p np p_1 .... p_np]
[
-
g
gain
]
[
-
f
npoints
fmin
fmax
]
[
-
o
outfile
]
[
-
i
ilwdfile
]
\
n
"
[
-
i
ilwdfile
]
[
-
t
]
\
n
"
/* Macros for printing errors and testing subroutines. */
#define ERROR( code, msg, statement ) \
...
...
@@ -63,6 +63,7 @@ int main(int argc, char **argv)
FILE *fp = NULL; /* generic file pointer */
REAL4 fmax=1024.0; /* max freq */
REAL4 fmin;
INT4 response=1; /* compute response if 1, transfer if 0 */
/* Create memory for the transfer function */
calrec.transfer = (COMPLEX8FrequencySeries *)LALMalloc(
...
...
@@ -99,6 +100,10 @@ int main(int argc, char **argv)
return RESPONSEC_EARG;
}
}
else if ( !strcmp( argv[arg], "
-
t
" ) ) {
arg++;
response = 0;
}
/* Parse zeros option. */
else if ( !strcmp( argv[arg], "
-
z
" ) ) {
arg++;
...
...
@@ -196,12 +201,21 @@ int main(int argc, char **argv)
return RESPONSEC_EFILE;
}
fprintf( fp, ilwdTop );
fprintf( fp, "
<
real_8
name
=
'
start_freq
'
units
=
'
hz
'
>%
16
.
16
e
</
real_8
>
\
n
",0.0);
fprintf( fp, "
<
real_8
name
=
'
start_freq
'
units
=
'
hz
'
>%
16
.
16
e
</
real_8
>
\
n
",
0.0);
fprintf( fp, "
<
real_8
name
=
'
stop_freq
'
units
=
'
hz
'
>%
16
.
16
e
</
real_8
>
\
n
",
fmax);
fprintf( fp, "
<
real_8
name
=
'
freq
:
step_size
'
units
=
'
hz
'
>%
16
.
16
e
</
real_8
>
\
n
",
calrec.transfer->deltaF);
fprintf( fp, "
<
complex_8
dims
=
'
%
i
'
name
=
'
data
'
units
=
'
strain
/
volt
'
>
",npoints);
if ( response ){
fprintf( fp, "
<
complex_8
dims
=
'
%
i
'
name
=
'
data
'
units
=
'
strain
/
count
'
>
",
npoints);
}
else {
fprintf( fp, "
<
complex_8
dims
=
'
%
i
'
name
=
'
data
'
units
=
'
counts
/
attostrain
'
>
",
npoints);
}
for(i=0;i<npoints;i++){
REAL4 re, im;
re = calrec.transfer->data->data[i].re;
...
...
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