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
d9b5d9c6
Commit
d9b5d9c6
authored
5 years ago
by
Chad Hanna
Browse files
Options
Downloads
Patches
Plain Diff
gstlal_inspiral_metric_overlap: add new coordinate system
parent
458e2cb9
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-ugly/bin/gstlal_inspiral_metric_overlap
+13
-5
13 additions, 5 deletions
gstlal-ugly/bin/gstlal_inspiral_metric_overlap
with
13 additions
and
5 deletions
gstlal-ugly/bin/gstlal_inspiral_metric_overlap
+
13
−
5
View file @
d9b5d9c6
...
...
@@ -23,7 +23,7 @@ args = parser.parse_args()
g_ij
=
metric_module
.
Metric
(
args
.
psd_xml_file
,
coord_func
=
metric_module
.
m1_m2_s1z_s2z
_func
,
coord_func
=
metric_module
.
x_y_z_zn
_func
,
duration
=
1.0
,
# FIXME!!!!!
flow
=
10
,
fhigh
=
1024
,
...
...
@@ -33,16 +33,24 @@ g_ij = metric_module.Metric(
xmldoc
=
ligolw_utils
.
load_filename
(
args
.
bank_file
,
verbose
=
True
,
contenthandler
=
LIGOLWContentHandler
)
sngl_inspiral_table
=
lsctables
.
SnglInspiralTable
.
get_table
(
xmldoc
)
vec1s
=
numpy
.
array
([[
row
.
template_id
,
row
.
mass1
,
row
.
mass2
,
row
.
spin1z
,
row
.
spin2z
]
for
row
in
sngl_inspiral_table
[
args
.
start_row
:
args
.
start_row
+
args
.
num_rows
]])
vec2s
=
numpy
.
array
([[
row
.
template_id
,
row
.
mass1
,
row
.
mass2
,
row
.
spin1z
,
row
.
spin2z
]
for
row
in
sngl_inspiral_table
])
def
id_x_y_z_zn_from_row
(
row
):
return
[
row
.
template_id
,
metric_module
.
x_from_m1_m2_s1_s2
(
row
.
mass1
,
row
.
mass2
,
row
.
spin1z
,
row
.
spin2z
),
metric_module
.
y_from_m1_m2_s1_s2
(
row
.
mass1
,
row
.
mass2
,
row
.
spin1z
,
row
.
spin2z
),
metric_module
.
z_from_m1_m2_s1_s2
(
row
.
mass1
,
row
.
mass2
,
row
.
spin1z
,
row
.
spin2z
),
metric_module
.
zn_from_m1_m2_s1_s2
(
row
.
mass1
,
row
.
mass2
,
row
.
spin1z
,
row
.
spin2z
)
]
vec1s
=
numpy
.
array
([
id_x_y_z_zn_from_row
(
row
)
for
row
in
sngl_inspiral_table
[
args
.
start_row
:
args
.
start_row
+
args
.
num_rows
]])
vec2s
=
numpy
.
array
([
id_x_y_z_zn_from_row
(
row
)
for
row
in
sngl_inspiral_table
])
output
=
[]
for
n
,
vec1
in
enumerate
(
vec1s
):
for
n
,
vec1
,
in
enumerate
(
vec1s
):
g
,
det
=
g_ij
(
vec1
[
1
:])
def
match
(
vec2
,
vec1
=
vec1
,
g
=
g
):
return
(
vec1
[
0
],
vec2
[
0
],
g_ij
.
metric_match
(
g
,
vec1
[
1
:],
vec2
[
1
:]))
thisoutput
=
[
row
for
row
in
map
(
match
,
vec2s
)
if
row
[
2
]
>
0.
9
]
thisoutput
=
[
row
for
row
in
map
(
match
,
vec2s
)
if
row
[
2
]
>
0.
0
]
print
n
,
len
(
thisoutput
)
output
+=
thisoutput
...
...
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