Skip to content

Commit

Permalink
pycbc_optimize_snr: Implement mass dependent bounds on spin parameters (
Browse files Browse the repository at this point in the history
#4176)

* Applying spin bounds based upon object mass~

* Updated reference to correct paper

* Adding spin bounds based on upper bounds of masses

* removing unnecessary additions

* Changing max mass2 to the right quantities

* Creating maxeta + reusing maxm1

* minor cleanup

* fixed min / max eta values

* fixed min / max eta

* Correcting maxm2 equation

* more readable/less redundant comment

---------

Co-authored-by: Thomas Dent <[email protected]>
  • Loading branch information
ArthurTolley and tdent authored Jun 27, 2023
1 parent ff9a5be commit b889bb3
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions bin/pycbc_optimize_snr
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ MIN_CPT_MASS = 0.99
# Set a large maximum total mass
MAX_MTOTAL = 500.

# Set a notional maximum and minimum possible eta
MAX_ETA = 0.24999999999
MIN_ETA = 0.01

Nfeval = 0
start_time = time.time()

Expand Down Expand Up @@ -351,14 +355,24 @@ assert maxchirp < 250.
# Establish minimum eta: find the most asymmetric mass point
# nb function name is 'mass2' but it doesn't enforce m2 < m1!
maxm1 = cv._mass2_from_mchirp_mass1(maxchirp, MIN_CPT_MASS)
mineta = max(cv.eta_from_mass1_mass2(maxm1, MIN_CPT_MASS), 0.01)
mineta = max(cv.eta_from_mass1_mass2(maxm1, MIN_CPT_MASS), MIN_ETA)

# Use max chirp and max eta to find the upper bound on mass2
maxm2 = cv.mass2_from_mchirp_eta(maxchirp, MAX_ETA)

# Astrophysical spin bounds dependent on system masses - https://inspirehep.net/literature/1124003
# If masses can be > 3 then allow them BH spin range
minspin1z = -0.4 if maxm1 < 3 else -0.9
maxspin1z = 0.4 if maxm1 < 3 else 0.9
minspin2z = -0.4 if maxm2 < 3 else -0.9
maxspin2z = 0.4 if maxm2 < 3 else 0.9

# Boundaries of the optimization space: dict of (min, max) tuples
# Boundary of the optimization space
bounds = {
'mchirp': (minchirp, maxchirp),
'eta': (mineta, 0.24999999999),
'spin1z': (-0.9, 0.9),
'spin2z': (-0.9, 0.9)
'eta': (mineta, MAX_ETA),
'spin1z': (minspin1z, maxspin1z),
'spin2z': (minspin2z, maxspin2z)
}

with scheme_context:
Expand Down

0 comments on commit b889bb3

Please sign in to comment.