Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
PORTER Edward
GWHMC
Commits
d8ec30a8
Commit
d8ec30a8
authored
Jul 15, 2021
by
Marc Arene
Browse files
dummy
parent
2f6b970a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
27 deletions
+80
-27
Technical_notes/timing_dlogL/notes.md
Technical_notes/timing_dlogL/notes.md
+79
-27
examples/config_files/config_GW170817_IMRPhenomD_NRTidal.ini
examples/config_files/config_GW170817_IMRPhenomD_NRTidal.ini
+1
-0
No files found.
Technical_notes/timing_dlogL/notes.md
View file @
d8ec30a8
...
...
@@ -375,6 +375,11 @@ phase1_timing = traj_timing * 1500 / 3600
-
12 parameters: aligned spins, tides but phase marginalization
-
flow = 30 Hz => duration = 64 sec
```
py
# 64 sec
len
(
frequency_domain_strain
)
=
120833
ifo
.
frequency_mask
.
sum
()
=
119063
# 128 sec
len
(
frequency_domain_strain
)
=
120833
ifo
.
frequency_mask
.
sum
()
=
119063
```
...
...
@@ -382,13 +387,23 @@ ifo.frequency_mask.sum() = 119063
### Timing at the end of phase1
### Timing of functions directly
-
64 sec
```
py
%
timeit
likelihood_gradient
.
calculate_dlogL_s_minus_h_dh
():
900
ms
±
14.5
ms
??
1.05
s
±
53.1
ms
843
ms
±
15.8
ms
# (with inner_product_mask_fixed)
945
ms
±
16.3
ms
# (with inner_product_mask_fixed)
1.05
s
±
74
ms
# (with inner_product_mask_fixed)
%
timeit
waveform_generator
.
frequency_domain_strain
(
self
.
likelihood
.
parameters
):
31.3
ms
±
283
µs
%
timeit
ifo
.
get_detector_response_geocent
(
waveform_polarizations
,
parameters
):
1.08
ms
±
5.15
µs
1.4
ms
±
40.9
µs
%
timeit
ifo
.
get_fd_time_translation
(
self
.
likelihood
.
parameters
):
4.05
ms
±
29.1
µs
%
timeit
signal_ifo
[
self
.
strain_data
.
frequency_mask
]
*
exp_two_pi_f_dt
:
650
µs
±
10.7
µs
%
timeit
ifo
.
get_detector_response
(
waveform_polarizations
,
self
.
likelihood
.
parameters
,
exp_two_pi_f_dt
=
ifo
.
exp_two_pi_f_dt_at_point
):
2.19
ms
±
34.1
µs
%
timeit
ifo
.
inner_product
(
template_plus
):
...
...
@@ -396,6 +411,23 @@ ifo.frequency_mask.sum() = 119063
%
timeit
nwip
(
ifo
.
fd_strain
,
template_plus
,
ifo
.
psd_array
,
ifo
.
strain_data
.
duration
):
1.15
ms
±
93.9
µs
```
-
128 sec
```
py
%
timeit
likelihood_gradient
.
calculate_dlogL_s_minus_h_dh
():
1.88
s
±
18.9
ms
# (with inner_product_mask_fixed)
%
timeit
waveform_generator
.
frequency_domain_strain
(
self
.
likelihood
.
parameters
):
71.8
ms
±
298
µs
%
timeit
ifo
.
get_detector_response_geocent
(
waveform_polarizations
,
parameters
):
2.83
ms
±
39
µs
%
timeit
ifo
.
get_fd_time_translation
(
self
.
likelihood
.
parameters
):
9.66
ms
±
402
µs
%
timeit
signal_ifo
[
self
.
strain_data
.
frequency_mask
]
*
exp_two_pi_f_dt
:
1.31
ms
±
6.4
µs
%
timeit
ifo
.
get_detector_response
(
waveform_polarizations
,
self
.
likelihood
.
parameters
,
exp_two_pi_f_dt
=
ifo
.
exp_two_pi_f_dt_at_point
):
4.83
ms
±
140
µs
%
timeit
ifo
.
inner_product_mask_fixed
(
ifo
.
template_at_point
):
3.47
ms
±
36.9
µs
```
### Why `ifo.inner_product()` takes longer than `nwip()`
...
...
@@ -425,47 +457,58 @@ ifo.strain_data._frequency_domain_strain * ifo.strain_data.frequency_mask
I could create a new nwip function for my Interferometer Class which would be like:
```
py
def
inner_product_mask_fixed
(
self
,
signal_masked
):
return
gwutils
.
noise_weighted_inner_product
(
aa
=
signal_mask
ed
,
bb
=
ifo
.
strain_data
.
frequency_domain_strain_masked
,
power_spectral_density
=
ifo
.
power_spectral_density_array_
windowed_mask
ed
,
duration
=
ifo
.
strain_data
.
duration
)
return
gwutils
nwip
(
aa
=
signal
[
self
.
strain_data
.
frequency
_mask
]
,
bb
=
self
.
frequency_domain_strain_masked
,
power_spectral_density
=
self
.
power_spectral_density_array_
masked_window
ed
,
duration
=
self
.
strain_data
.
duration
)
```
### Timing analysis
-
Parameters contributions to
`dlogL`
| | Diff method | h_source | exp(i
* 2pi *
f
* dt) | s = s *
exp(i
* 2pi *
f
*
dt) |
<
h1
\|
h2
>
|
|:----|:----|:----:|:----:|:----:|:----:|
| At point | - | 1 | 3 | 3 | 6 |
| cos(iota) | Forward | 1 | 0 | 3 | 6 |
| psi | Forward | 0 | 0 | 3 | 6 |
| ln(D) | Forward | 1 | 0 | 3 | 6 |
| ln(Mc) | Central | 2 | 0 | 6 | 9 |
| ln(mu) | Central | 2 | 0 | 6 | 9 |
| sin(dec) | Forward | 0 | 3 | 3 | 6 |
| ra | Forward | 0 | 3 | 3 | 6 |
| ln(tc) | Central | 0 | 6 | 6 | 9 |
| chi_1 | Central | 2 | 0 | 6 | 9 |
| chi_2 | Central | 2 | 0 | 6 | 9 |
| lambda_1 | Forward | 1 | 0 | 3 | 6 |
| lambda_2 | Forward | 1 | 0 | 3 | 6 |
|
**TOTAL**
| - | 15 | 15 | 54 | 93 |
|
**IMRPhenomD_NRTidal, 30Hz**
|
**909ms**
| 15x31.3ms | 15x4.05ms | 54x2.2ms | 93x2.8ms |
| | Diff method | h_source | F+h+ + Fxhx | exp(i
* 2pi *
f
* dt) | s = s *
exp(i
* 2pi *
f
*
dt) |
<
h1
\|
h2
>
|
|:----|:----|:----:|:----:|:----:|:----:|:----:|
| At point | - | 1 | 3 | 3 | 3 | 6 |
| cos(iota) | Forward | 1 | 3 | 0 | 3 | 6 |
| psi | Forward | 0 | 3 | 0 | 3 | 6 |
| ln(D) | Forward | 0 | 3 | 0 | 3 | 6 |
| ln(Mc) | Central | 2 | 6 | 0 | 6 | 9 |
| ln(mu) | Central | 2 | 6 | 0 | 6 | 9 |
| sin(dec) | Forward | 0 | 3 | 3 | 3 | 6 |
| ra | Forward | 0 | 3 | 3 | 3 | 6 |
| ln(tc) | Central | 0 | 6 | 6 | 6 | 9 |
| chi_1 | Central | 2 | 6 | 0 | 6 | 9 |
| chi_2 | Central | 2 | 6 | 0 | 6 | 9 |
| lambda_1 | Forward | 1 | 3 | 0 | 3 | 6 |
| lambda_2 | Forward | 1 | 3 | 0 | 3 | 6 |
|
**TOTAL**
| - | 12 | 54 | 15 | 54 | 93 |
|
**IMRPhenomD_NRTidal, 30Hz 64sec**
|
**642ms**
| 12x31.3ms | 54x1.24ms | 15x4.05ms | 54x0.65ms | 93x1.2ms |
|
**IMRPhenomD_NRTidal, 23Hz 128sec**
|
**1.5sec**
| 12x71.8ms | 54x2.8ms | 15x9.7ms | 54x1.3ms | 93x3.5ms |
```
py
# 64 sec
swg
=
31.3
fphpfchc
=
1.1
exp2pifdt
=
4.05
stimesexp
=
2.2
nwip
=
2.4
stimesexp
=
0.65
nwip
rd
=
1.2
n_swg
=
15
# 128 sec
# swg =71.8
# fphpfchc =2.8
# exp2pifdt = 9.7
# stimesexp = 1.3
# nwiprd = 3.5
n_swg
=
12
n_fphpfchc
=
54
n_exp2pifdt
=
15
n_stimesexp
=
54
n_nwip
=
93
n_nwip
rd
=
93
timing
=
n_swg
*
swg
+
n_exp2pifdt
*
exp2pifdt
+
n_stimesexp
*
stimesexp
+
n_nwip
*
nwip
timing
=
n_swg
*
swg
+
n_fphpfchc
*
fphpfchc
+
n_exp2pifdt
*
exp2pifdt
+
n_stimesexp
*
stimesexp
+
n_nwip
rd
*
nwip
rd
```
...
...
@@ -473,6 +516,15 @@ timing = n_swg*swg + n_exp2pifdt*exp2pifdt + n_stimesexp*stimesexp + n_nwip*nwip
## Analysis forecasts IMRPhenomPv2_NRTidal with 16 parameters
| | Diff method | h_source | exp(i
* 2pi *
f
* dt) | s = s *
exp(i
* 2pi *
f
*
dt) |
<
h1
\|
h2
>
|
...
...
examples/config_files/config_GW170817_IMRPhenomD_NRTidal.ini
View file @
d8ec30a8
...
...
@@ -2,6 +2,7 @@
# Interferometers to run the analysis on.
ifos
=
H1,L1,V1
approximant
=
IMRPhenomD_NRTidal
; minimum_frequency_ifos = {H1: 23.0, L1: 23.0, V1: 23.0}
minimum_frequency_ifos
=
{H1: 30.0, L1: 30.0, V1: 30.0}
; minimum_frequency = 30
maximum_frequency
=
2048.0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment