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
7a5f430d
Commit
7a5f430d
authored
7 years ago
by
Chad Hanna
Browse files
Options
Downloads
Patches
Plain Diff
inspiral_extrinsics: add compression to the hdf5 output and remove scipys tukey window
parent
b8d9c65f
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/python/stats/inspiral_extrinsics.py
+11
-9
11 additions, 9 deletions
gstlal-inspiral/python/stats/inspiral_extrinsics.py
with
11 additions
and
9 deletions
gstlal-inspiral/python/stats/inspiral_extrinsics.py
+
11
−
9
View file @
7a5f430d
...
...
@@ -40,7 +40,6 @@ import numpy
import
os
import
random
from
scipy
import
stats
import
scipy
,
scipy
.
signal
import
sys
import
h5py
...
...
@@ -1307,19 +1306,19 @@ class DynamicBins(object):
dgrp
=
f
.
create_group
(
"
dynbins
"
)
begroup
=
dgrp
.
create_group
(
"
bin_edges
"
)
for
i
,
bin_edge
in
enumerate
(
self
.
bin_edges
):
begroup
.
create_dataset
(
"
%d
"
%
i
,
data
=
bin_edge
)
begroup
.
create_dataset
(
"
%d
"
%
i
,
data
=
bin_edge
,
compression
=
"
gzip
"
)
dgrp
.
attrs
[
"
num_points
"
]
=
self
.
num_points
dgrp
.
attrs
[
"
total_prob
"
]
=
self
.
total_prob
dgrp
.
attrs
[
"
num_cells
"
]
=
self
.
num_cells
bgrp
=
f
.
create_group
(
"
bins
"
)
lower
,
upper
,
parent
,
right
,
left
,
prob
=
self
.
__serialize
()
bgrp
.
create_dataset
(
"
lower
"
,
data
=
lower
)
bgrp
.
create_dataset
(
"
upper
"
,
data
=
upper
)
bgrp
.
create_dataset
(
"
parent
"
,
data
=
parent
)
bgrp
.
create_dataset
(
"
right
"
,
data
=
right
)
bgrp
.
create_dataset
(
"
left
"
,
data
=
left
)
bgrp
.
create_dataset
(
"
prob
"
,
data
=
prob
)
bgrp
.
create_dataset
(
"
lower
"
,
data
=
lower
,
compression
=
"
gzip
"
)
bgrp
.
create_dataset
(
"
upper
"
,
data
=
upper
,
compression
=
"
gzip
"
)
bgrp
.
create_dataset
(
"
parent
"
,
data
=
parent
,
compression
=
"
gzip
"
)
bgrp
.
create_dataset
(
"
right
"
,
data
=
right
,
compression
=
"
gzip
"
)
bgrp
.
create_dataset
(
"
left
"
,
data
=
left
,
compression
=
"
gzip
"
)
bgrp
.
create_dataset
(
"
prob
"
,
data
=
prob
,
compression
=
"
gzip
"
)
#
...
...
@@ -1366,6 +1365,9 @@ class IFFT(object):
return
numpy
.
array
(
self
.
tvec
[
length
].
data
,
dtype
=
float
)
def
tukeywindow
(
data
,
alpha
=
0.25
):
return
lal
.
CreateTukeyREAL8Window
(
len
(
data
),
alpha
).
data
.
data
class
RandomSource
(
object
):
def
__init__
(
self
,
horizons
,
snr_thresh
=
4
):
...
...
@@ -1480,7 +1482,7 @@ class RandomSource(object):
ASD
=
(
10
**
self
.
psd_poly
(
F
(
mchirp
,
t
)))
**
.
5
return
(
PI
*
M
*
F
(
mchirp
,
t
)
/
ASD
)
**
(
2.
/
3.
)
w
=
scipy
.
signal
.
tukey
(
len
(
self
.
t
)
,
alpha
=
0.25
)
*
A
(
mchirp
,
self
.
t
)
*
numpy
.
cos
(
PHI
(
mchirp
,
self
.
t
,
phi
))
w
=
tukeywindow
(
self
.
t
,
alpha
=
0.25
)
*
A
(
mchirp
,
self
.
t
)
*
numpy
.
cos
(
PHI
(
mchirp
,
self
.
t
,
phi
))
return
w
/
self
.
match
(
w
,
w
)
**
.
5
def
noise
(
self
):
...
...
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