Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
watpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
CoRe
watpy
Commits
48bc4c36
Commit
48bc4c36
authored
2 years ago
by
Alejandra Gonzalez
Browse files
Options
Downloads
Patches
Plain Diff
Minor
parent
f89156c1
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
watpy/wave/gwutils.py
+6
-4
6 additions, 4 deletions
watpy/wave/gwutils.py
with
6 additions
and
4 deletions
watpy/wave/gwutils.py
+
6
−
4
View file @
48bc4c36
...
...
@@ -445,18 +445,20 @@ def waveform2energetics(h, h_dot, t, modes, mmodes):
* modes : (l,m) indexes
* mmodes : m indexes
"""
print
(
'
got in
'
)
dtime
=
t
[
1
]
-
t
[
0
]
print
(
'
step 1
'
)
E_GW_dot_ff
=
{}
E_GW_ff
=
{}
J_GW_dot_ff
=
{}
J_GW_ff
=
{}
for
l
,
m
in
modes
:
print
(
'
step 2
'
)
E_GW_dot_ff
[(
l
,
m
)]
=
1.0
/
(
16.
*
np
.
pi
)
*
np
.
abs
(
h_dot
[
l
,
m
])
**
2
E_GW_ff
[(
l
,
m
)]
=
num
.
integrate
(
E_GW_dot_ff
[
l
,
m
])
*
dtime
J_GW_dot_ff
[(
l
,
m
)]
=
1.0
/
(
16.
*
np
.
pi
)
*
m
*
np
.
imag
(
h
[
l
,
m
]
*
np
.
conj
(
h_dot
[
l
,
m
]))
J_GW_ff
[(
l
,
m
)]
=
num
.
integrate
(
J_GW_dot_ff
[
l
,
m
])
*
dtime
print
(
'
step 3
'
)
E_GW_dot
=
{}
E_GW
=
{}
J_GW_dot
=
{}
...
...
@@ -466,13 +468,13 @@ def waveform2energetics(h, h_dot, t, modes, mmodes):
E_GW
[
m
]
=
np
.
zeros_like
(
t
)
J_GW_dot
[
m
]
=
np
.
zeros_like
(
t
)
J_GW
[
m
]
=
np
.
zeros_like
(
t
)
print
(
'
step 4
'
)
for
l
,
m
in
modes
:
E_GW_dot
[
m
]
+=
mnfactor
(
m
)
*
E_GW_dot_ff
[
l
,
m
]
E_GW
[
m
]
+=
mnfactor
(
m
)
*
E_GW_ff
[
l
,
m
]
J_GW_dot
[
m
]
+=
mnfactor
(
m
)
*
J_GW_dot_ff
[
l
,
m
]
J_GW
[
m
]
+=
mnfactor
(
m
)
*
J_GW_ff
[
l
,
m
]
print
(
'
step 5
'
)
E_GW_dot_all
=
np
.
zeros_like
(
t
)
E_GW_all
=
np
.
zeros_like
(
t
)
J_GW_dot_all
=
np
.
zeros_like
(
t
)
...
...
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