Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
lscsoft
bilby
Commits
2ecb3655
Commit
2ecb3655
authored
May 18, 2018
by
Colm Talbot
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into change_sampled_parameters
parents
4df29f1d
04de105a
Pipeline
#19544
passed with stages
in 5 minutes and 48 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
tupak/sampler.py
tupak/sampler.py
+0
-1
tupak/utils.py
tupak/utils.py
+15
-14
No files found.
tupak/sampler.py
View file @
2ecb3655
...
...
@@ -138,7 +138,6 @@ class Sampler(object):
self
.
__search_parameter_keys
]
result
.
label
=
self
.
label
result
.
outdir
=
self
.
outdir
result
.
priors
=
self
.
priors
result
.
kwargs
=
self
.
kwargs
return
result
...
...
tupak/utils.py
View file @
2ecb3655
...
...
@@ -246,23 +246,24 @@ def get_polarization_tensor(ra, dec, time, psi, mode):
v
=
np
.
array
([
-
np
.
sin
(
phi
),
np
.
cos
(
phi
),
0
])
m
=
-
u
*
np
.
sin
(
psi
)
-
v
*
np
.
cos
(
psi
)
n
=
-
u
*
np
.
cos
(
psi
)
+
v
*
np
.
sin
(
psi
)
omega
=
np
.
cross
(
m
,
n
)
polarization_tensors
=
{
"plus"
:
np
.
einsum
(
'i,j->ij'
,
m
,
m
)
-
np
.
einsum
(
'i,j->ij'
,
n
,
n
),
"cross"
:
np
.
einsum
(
'i,j->ij'
,
m
,
n
)
+
np
.
einsum
(
'i,j->ij'
,
n
,
m
),
"breathing"
:
np
.
einsum
(
'i,j->ij'
,
m
,
m
)
+
np
.
einsum
(
'i,j->ij'
,
n
,
n
),
"longitudinal"
:
np
.
sqrt
(
2
)
*
np
.
einsum
(
'i,j->ij'
,
omega
,
omega
),
"x"
:
np
.
einsum
(
'i,j->ij'
,
m
,
omega
)
+
np
.
einsum
(
'i,j->ij'
,
omega
,
m
),
"y"
:
np
.
einsum
(
'i,j->ij'
,
n
,
omega
)
+
np
.
einsum
(
'i,j->ij'
,
omega
,
n
)
}
if
mode
in
polarization_tensors
.
keys
():
polarization_tensor
=
polarization_tensors
[
mode
]
if
mode
.
lower
()
==
'plus'
:
return
np
.
einsum
(
'i,j->ij'
,
m
,
m
)
-
np
.
einsum
(
'i,j->ij'
,
n
,
n
)
elif
mode
.
lower
()
==
'cross'
:
return
np
.
einsum
(
'i,j->ij'
,
m
,
n
)
+
np
.
einsum
(
'i,j->ij'
,
n
,
m
)
elif
mode
.
lower
()
==
'breathing'
:
return
np
.
einsum
(
'i,j->ij'
,
m
,
m
)
+
np
.
einsum
(
'i,j->ij'
,
n
,
n
)
omega
=
np
.
cross
(
m
,
n
)
if
mode
.
lower
()
==
'longitudinal'
:
return
np
.
sqrt
(
2
)
*
np
.
einsum
(
'i,j->ij'
,
omega
,
omega
)
elif
mode
.
lower
()
==
'x'
:
return
np
.
einsum
(
'i,j->ij'
,
m
,
omega
)
+
np
.
einsum
(
'i,j->ij'
,
omega
,
m
)
elif
mode
.
lower
()
==
'y'
:
return
np
.
einsum
(
'i,j->ij'
,
n
,
omega
)
+
np
.
einsum
(
'i,j->ij'
,
omega
,
n
)
else
:
logging
.
warning
(
"{} not a polarization mode!"
.
format
(
mode
))
polarization_tensor
=
None
return
polarization_tensor
return
None
def
get_vertex_position_geocentric
(
latitude
,
longitude
,
elevation
):
...
...
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