@@ -269,7 +269,7 @@ def get_inspiral_esigma_modes(
269269
270270 if f_ref < f_lower :
271271 ref_idx = np .searchsorted (
272- (retval [1 ].data .data ** 1.5 ) / ((mass1 + mass2 ) * lal .MTSUN_SI * np .pi ),
272+ (retval [1 ].data .data ** 1.5 ) / ((mass1 + mass2 ) * lal .MTSUN_SI * np .pi ),
273273 f_lower ,
274274 )
275275 new_len = len (retval [0 ].data .data ) - ref_idx
@@ -535,10 +535,8 @@ def _get_transition_frequency_window(
535535 # frequency, towards the end of waveform
536536
537537 if verbose > 4 :
538- print (
539- f"""Transition frequency found at index { transition_idx }
540- in the orbital frequency array of length { len (orbital_freq )} """
541- )
538+ print (f"""Transition frequency found at index { transition_idx }
539+ in the orbital frequency array of length { len (orbital_freq )} """ )
542540
543541 if blend_using_avg_orbital_frequency :
544542 # We integrate `orbital_freq` to obtain `orbital_phase`
@@ -640,11 +638,9 @@ def _get_transition_frequency_window(
640638 )
641639
642640 if verbose > 4 :
643- print (
644- f"""The transition is to happen in a window from
641+ print (f"""The transition is to happen in a window from
645642 frequencies: [{ orbital_freq [window_start_idx ]} , { orbital_freq [transition_idx ]} ]Hz,
646- between indices: [{ window_start_idx } , { transition_idx } ]"""
647- )
643+ between indices: [{ window_start_idx } , { transition_idx } ]""" )
648644 else :
649645 raise RuntimeError (
650646 """We should never reach here. Did you set a non-bool value for the
@@ -772,22 +768,16 @@ def get_imr_esigma_modes(
772768 """
773769 check_available_mr_approximants (merger_ringdown_approximant )
774770 if (mean_anomaly is None ) and (coa_phase is None ):
775- raise IOError (
776- f"""Please specify one of the phase angles, either of
777- `mean_anomaly` or `coa_phase`."""
778- )
771+ raise IOError (f"""Please specify one of the phase angles, either of
772+ `mean_anomaly` or `coa_phase`.""" )
779773 if blend_aligning_merger_to_inspiral and (mean_anomaly is None ):
780- raise IOError (
781- f"""If you want to attach ESIGMA inspiral to merger, by
774+ raise IOError (f"""If you want to attach ESIGMA inspiral to merger, by
782775 phase shifting merger to inspiral, please specify the
783- phase angle `mean_anomaly`"""
784- )
776+ phase angle `mean_anomaly`""" )
785777 if (not blend_aligning_merger_to_inspiral ) and (coa_phase is None ):
786- raise IOError (
787- f"""If you want to attach ESIGMA inspiral to merger, by
778+ raise IOError (f"""If you want to attach ESIGMA inspiral to merger, by
788779 phase shifting inspiral to merger, please specify the
789- phase angle `coa_phase`"""
790- )
780+ phase angle `coa_phase`""" )
791781 if mean_anomaly is None :
792782 mean_anomaly = 0
793783 if coa_phase is None :
@@ -807,13 +797,11 @@ def get_imr_esigma_modes(
807797 set (available_inspiral_orbital_params )
808798 )
809799 if return_orbital_params_user != set (return_orbital_params ):
810- print (
811- f"""Warning: You requested the following list of orbital
800+ print (f"""Warning: You requested the following list of orbital
812801parameters to be returned: { return_orbital_params } , but we reduce it to
813802{ return_orbital_params_user } as we only have the evolution of the following
814803parameters available with us: { available_inspiral_orbital_params } .
815- """
816- )
804+ """ )
817805 elif not return_orbital_params :
818806 return_orbital_params = []
819807 return_orbital_params_user = False
@@ -871,26 +859,21 @@ def get_imr_esigma_modes(
871859 raise RuntimeError (
872860 f"""The inspiral modes do not contain the primary
873861desired { mode_to_align_by } multipole. It currently holds only the following:
874- { modes_inspiral_numpy .keys ()} """
875- )
862+ { modes_inspiral_numpy .keys ()} """ )
876863
877864 orbital_eccentricity = retval [- 2 ]["e" ]
878865 # Throw error if eccentricity at the end of inspiral is definitely unsafe
879866 if orbital_eccentricity [- 1 ] > ECCENTRICITY_LEVEL_ISCO_ERROR :
880- raise IOError (
881- f"""ERROR: You entered a very large initial eccentricity
867+ raise IOError (f"""ERROR: You entered a very large initial eccentricity
882868{ eccentricity } . The orbital eccentricity at the end of inspiral was
883869{ orbital_eccentricity [- 1 ]} . The merger-ringdown attachment with a
884- quasicircular will be questionable."""
885- )
870+ quasicircular will be questionable.""" )
886871 # Warn user if eccentricity at the end of inspiral is potentially unsafe
887872 if orbital_eccentricity [- 1 ] > ECCENTRICITY_LEVEL_ISCO_WARNING and verbose :
888- print (
889- f"""WARNING: You entered a very large initial eccentricity
873+ print (f"""WARNING: You entered a very large initial eccentricity
890874{ eccentricity } . The orbital eccentricity at the end of inspiral was
891875{ orbital_eccentricity [- 1 ]} . The merger-ringdown attachment with a quasicircular
892- model might be affected."""
893- )
876+ model might be affected.""" )
894877
895878 if (f_window_mr_transition is None ) or failsafe or (verbose > 1 ):
896879 if blend_using_avg_orbital_frequency :
@@ -914,14 +897,12 @@ def get_imr_esigma_modes(
914897 modes_inspiral_numpy [mode_to_align_by ]
915898 )
916899 mode_frequency = esigmapy .blend .compute_frequency (mode_phase , delta_t )
917- print (
918- f"""DEBUG: Orbital freq at end of inspiral is { orbital_frequency [- 1 ]} Hz,
900+ print (f"""DEBUG: Orbital freq at end of inspiral is { orbital_frequency [- 1 ]} Hz,
919901mode-{ mode_to_align_by } freq at the end of inspiral is { mode_frequency [- 1 ]} Hz, max and min
920902mode-{ mode_to_align_by } frequencies are { np .max (mode_frequency )} Hz and
921903{ np .min (mode_frequency )} Hz, and the transition frequency (of { mode_to_align_by } -mode)
922904requested is { f_mr_transition } Hz, which should be less than the maximum freq of
923- { mode_to_align_by } -mode: { mode_frequency .max ()} Hz."""
924- )
905+ { mode_to_align_by } -mode: { mode_frequency .max ()} Hz.""" )
925906 return (
926907 modes_inspiral_numpy ,
927908 mode_phase ,
@@ -940,12 +921,10 @@ def get_imr_esigma_modes(
940921 mode_frequency = esigmapy .blend .compute_frequency (mode_phase , delta_t )
941922 if mode_frequency .max () < f_mr_transition :
942923 if verbose :
943- print (
944- f"""FAILSAFE: Maximum orbital freq during inspiral is
924+ print (f"""FAILSAFE: Maximum orbital freq during inspiral is
945925{ orbital_frequency .max ()} Hz, and max frequency of { mode_to_align_by } -mode is
946926{ mode_frequency .max ()} Hz, so we are resetting transition frequency from
947- { f_mr_transition } Hz to { mode_frequency .max ()} Hz."""
948- )
927+ { f_mr_transition } Hz to { mode_frequency .max ()} Hz.""" )
949928 f_mr_transition = mode_frequency .max ()
950929
951930 # If the user does not provide the width of hybridization window (
@@ -1026,12 +1005,10 @@ def get_imr_esigma_modes(
10261005 verbose = verbose ,
10271006 )
10281007 except Exception as exc :
1029- print (
1030- f"""Inspiral + MergerRingdown attachment failed. Its very likely
1008+ print (f"""Inspiral + MergerRingdown attachment failed. Its very likely
10311009that you entered a very large initial eccentricity { eccentricity } . The orbital
10321010eccentricity at the end of inspiral was { orbital_eccentricity [- 1 ]}
1033- """
1034- )
1011+ """ )
10351012 raise exc
10361013 modes_imr_numpy = retval [0 ]
10371014
0 commit comments