Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bayeswave
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
Argyro Sasli
bayeswave
Commits
3bae858f
Commit
3bae858f
authored
1 year ago
by
Argyro Sasli
Browse files
Options
Downloads
Patches
Plain Diff
debugged scale + ID-sample variable added
parent
ba67a7ab
Branches
master
No related tags found
No related merge requests found
Pipeline
#505888
passed
1 year ago
Stage: docker
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
BayesWaveUtils/wavelet_params/get_wavelet_params.py
+11
-11
11 additions, 11 deletions
BayesWaveUtils/wavelet_params/get_wavelet_params.py
with
11 additions
and
11 deletions
BayesWaveUtils/wavelet_params/get_wavelet_params.py
+
11
−
11
View file @
3bae858f
...
...
@@ -68,7 +68,7 @@ def get_wavelet_params(filename, model, chirpflag=False, O1version=False, **keyw
return
data
def
wt
(
wave_params
,
psdfile
):
def
wt
(
wave_params
,
psdfile
,
ID
):
"""
Makes a waveform from a set of wavelets
...
...
@@ -79,6 +79,8 @@ def wt(wave_params,psdfile):
psdfile (str): data file of the PSD
ID (int): the number of the sample for the suggested reconstruction
outputs
-------
array of the waveform
...
...
@@ -98,19 +100,18 @@ def wt(wave_params,psdfile):
fmin
=
int
(
psd
[
0
,
0
]
*
Tobs
)
wavenumber
=
wave_params
[
'
D
'
][
0
]
wavenumber
=
wave_params
[
'
D
'
][
ID
]
# the starting index in order to export the right set of parameters
start
=
sum
(
wave_params
[
'
D
'
][:
ID
])
for
j
in
range
(
0
,
wavenumber
):
t0
=
wave_params
[
'
t
'
][
j
]
f0
=
wave_params
[
'
f
'
][
j
]
Q
=
wave_params
[
'
Q
'
][
j
]
A
=
wave_params
[
'
A
'
][
j
]
phi0
=
wave_params
[
'
phi
'
][
j
]
t0
=
wave_params
[
'
t
'
][
j
+
start
]
f0
=
wave_params
[
'
f
'
][
j
+
start
]
Q
=
wave_params
[
'
Q
'
][
j
+
start
]
A
=
wave_params
[
'
A
'
][
j
+
start
]
phi0
=
wave_params
[
'
phi
'
][
j
+
start
]
i
=
int
(
f0
*
Tobs
)
fac
=
1.0
/
math
.
sqrt
(
psd
[
i
-
fmin
,
1
])
tau
=
Q
/
(
2
*
np
.
pi
*
f0
)
...
...
@@ -125,7 +126,6 @@ def wt(wave_params,psdfile):
for
i
in
range
(
imin
,
imax
):
t
=
float
(
i
)
/
Nsamp
*
Tobs
sf
=
A
*
np
.
exp
(
-
((
t
-
t0
)
**
2
)
/
(
tau
**
2
))
sf
*=
fac
hs
[
i
]
+=
sf
*
np
.
cos
(
2
*
np
.
pi
*
f0
*
(
t
-
t0
)
+
phi0
)
return
hs
...
...
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