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
130dbda4
Commit
130dbda4
authored
5 years ago
by
Leo Tsukada
Browse files
Options
Downloads
Patches
Plain Diff
gstlal_inspiral_compute_dtdphideff_cov_matrix : changed to pass snr
dictioary and psd file name to the output .h5 file.
parent
e00232fb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gstlal-inspiral/bin/gstlal_inspiral_compute_dtdphideff_cov_matrix
+7
-4
7 additions, 4 deletions
...nspiral/bin/gstlal_inspiral_compute_dtdphideff_cov_matrix
with
7 additions
and
4 deletions
gstlal-inspiral/bin/gstlal_inspiral_compute_dtdphideff_cov_matrix
+
7
−
4
View file @
130dbda4
...
...
@@ -21,7 +21,6 @@ import numpy, scipy.interpolate
from
lal
import
series
from
gstlal
import
templates
from
ligo.lw
import
utils
as
ligolw_utils
import
sys
import
h5py
parser
=
argparse
.
ArgumentParser
(
description
=
'
generate a dt dphi covariance matrix
'
)
...
...
@@ -46,11 +45,11 @@ refpsd = args.psd_xml
rho
=
{
"
L1
"
:
args
.
L_snr
,
"
H1
"
:
args
.
H_snr
,
"
V1
"
:
args
.
V_snr
,
"
K1
"
:
args
.
K_snr
}
instruments
=
(
"
H1
"
,
"
L1
"
,
"
V1
"
,
"
K1
"
)
psd
=
series
.
read_psd_xmldoc
(
ligolw_utils
.
load_filename
(
refpsd
,
verbose
=
True
,
contenthandler
=
series
.
PSDContentHandler
))
snr
=
series
.
read_psd_xmldoc
(
ligolw_utils
.
load_filename
(
refpsd
,
verbose
=
True
,
contenthandler
=
series
.
PSDContentHandler
))
psddict
=
{}
for
ifo
in
rho
:
f
=
numpy
.
arange
(
len
(
psd
[
ifo
].
data
.
data
))
*
psd
[
ifo
].
deltaF
psddict
[
ifo
]
=
scipy
.
interpolate
.
interp1d
(
f
,
psd
[
ifo
].
data
.
data
)
f
=
numpy
.
arange
(
len
(
snr
[
ifo
].
data
.
data
))
*
snr
[
ifo
].
deltaF
psddict
[
ifo
]
=
scipy
.
interpolate
.
interp1d
(
f
,
snr
[
ifo
].
data
.
data
)
def
moment
(
fmin
,
fmax
,
n
,
m1
,
m2
,
s1
,
s2
,
ifo
,
psddict
=
psddict
,
delta_f
=
0.25
):
farr
=
numpy
.
linspace
(
0
,
fmax
,
fmax
/
delta_f
+
delta_f
)
...
...
@@ -94,6 +93,10 @@ for pair in pairs:
transdd
[
frozenset
(
pair
)]
=
1.
/
numpy
.
sqrt
(
sigsqdd
[
a
]
+
sigsqdd
[
b
])
f
=
h5py
.
File
(
args
.
output
,
"
w
"
)
f
.
create_dataset
(
"
psd
"
,
data
=
args
.
psd_xml
)
h5_snr
=
f
.
create_group
(
"
SNR
"
)
for
ifo
,
snr
in
rho
.
items
():
h5_snr
.
create_dataset
(
ifo
,
data
=
snr
)
h5_transtt
=
f
.
create_group
(
"
transtt
"
)
h5_transtp
=
f
.
create_group
(
"
transtp
"
)
h5_transpt
=
f
.
create_group
(
"
transpt
"
)
...
...
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