Skip to content

API for the jaxqualin.selection module

ModeSearchAllFreeVaryingN

A class that performs a mode search for a given waveform, varying the number of free modes used in the fit.

Attributes:

Name Type Description
h waveform

The waveform to be fit.

l int

The harmonic number l of the waveform.

m int

The harmonic number m of the waveform.

M float

The mass of the black hole.

a float

The dimensionless spin of the black hole.

relevant_lm_list List[Tuple[int, int]]

A list of tuples of the form (l, m) that specifies which recoil modes are relevant for the waveform.

t0_arr ndarray

array of starting times for fitting.

N_list List[int]

A list of integers that specifies the number of free modes to be used in each mode searcher in mode_searchers.

kwargs Dict[str, Any]

A dictionary of keyword arguments.

flatness_checker_kwargs Dict[str, Any]

A dictionary of keyword arguments for the IterativeFlatnessChecker class.

mode_searcher_kwargs Dict[str, Any]

A dictionary of keyword arguments for the ModeSearchAllFreeLM class.

mode_searchers List[ModeSearchAllFreeLM]

A list of ModeSearchAllFreeLM objects for mode searching with different number of free modes.

found_modes_final List[mode]

A list of mode objects that contains the final list of modes found by the best mode searcher.

run_string_prefix str

A string that is used as a prefix for the run name for dumping the pickle file.

load_pickle bool

A boolean that specifies whether to load the pickle file.

CCE bool

A boolean that specifies whether the waveform is a CCE waveform. This is not implemented yet.

fixed_fitters List[QNMFitVaryingStartingTime]

A list of QNMFitVaryingStartingTime objects that contains the final list of fitters used for the flatness checkers in each mode searcher.

flatness_checkers List[IterativeFlatnessChecker]

A list of IterativeFlatnessChecker objects that contains the list of flatness checkers used for the mode searchers.

best_run_indx int

An integer that specifies the index of the mode searcher that found the most number of modes.

Methods:

Name Description
init_searchers

Initializes the mode searchers.

do_mode_searches

Performs the mode searches.

__init__(h, M, a, relevant_lm_list=[], t0_arr=np.linspace(0, 50, num=501), flatness_checker_kwargs={}, mode_searcher_kwargs={}, **kwargs_in)

Initialize the ModeSearchAllFreeVaryingN class.

Parameters:

Name Type Description Default
h waveform

The waveform to be fit.

required
M float

The mass of the black hole.

required
a float

The dimensionless spin of the black hole.

required
relevant_lm_list List[Tuple[int, int]]

A list of tuples of the form (l, m) that specifies which recoil modes are relevant for the waveform.

[]
t0_arr ndarray

array of starting times for fitting.

linspace(0, 50, num=501)
flatness_checker_kwargs Dict[str, Any]

A dictionary of keyword arguments for the IterativeFlatnessChecker class.

{}
mode_searcher_kwargs Dict[str, Any]

A dictionary of keyword arguments for the ModeSearchAllFreeLM class.

{}
**kwargs_in Any

keyword arguments.

{}
do_mode_searches()

Performs the mode searches.

init_searchers()

Initializes the mode searchers.

ModeSearchAllFreeVaryingNSXS

A class that performs a mode search for a given SXS waveform, varying the number of free modes used in the fit.

Attributes:

Name Type Description
SXSnum str

The SXS number of the waveform.

l int

The harmonic number l of the

waveform. m

The harmonic number m of the waveform.

t0_arr ndarray

array of starting times for fitting.

N_list List[int]

A list of integers that specifies the number of free modes to be used in each mode searcher in mode_searchers.

postfix_string str

A string that is appended to the run name for dumping the pickle file.

CCE bool

A boolean that specifies whether the waveform is a CCE waveform. This is not implemented yet.

kwargs Dict[str, Any]

A dictionary of keyword arguments.

retro_def_orbit bool

Whether to define retrograde modes with respect to the orbital frame (True) or remnant black hole frame (False). See the methods paper for details. Defaults to True.

relevant_lm_list_override bool

A boolean that specifies whether to override the relevant_lm_list attribute of the ModeSearchAllFreeVaryingN class.

relevant_lm_list List[Tuple[int, int]]

A list of tuples of the form (l, m) that specifies which recoil modes are relevant for the waveform. Used if relevant_lm_list_override is True.

h waveform

The waveform to be fit.

M float

The mass of the black hole.

a float

The dimensionless spin of the black hole.

Lev int

The resolution level of the SXS simulation.

N_list_string str

A string that is used as a suffix for the run name for dumping the pickle file.

run_string_fitter str

A string that is used as a prefix for the run name for dumping the pickle file for the fitters.

run_string str

A string that is used as a prefix for the run name for dumping the pickle file for the mode searcher.

run_string_full str

A string that is used as a prefix for the run name for dumping the pickle file for the mode searcher, including the postfix_string.

file_path str

The path to the pickle file.

load_pickle bool

A boolean that specifies whether to load the pickle file for the fitters.

mode_searcher_load_pickle bool

A boolean that specifies whether to load the pickle file for the mode searcher.

set_seed int

An integer that specifies the seed for the random number generator.

save_mode_searcher bool

A boolean that specifies whether to save the mode searcher to a pickle file.

mode_searcher_vary_N ModeSearchAllFreeVaryingN

A ModeSearchAllFreeVaryingN object that performs the mode search.

found_modes_final List[mode]

A list of mode objects that contains the final list of modes found by the best mode searcher.

download Optional[bool]

A boolean that specifies whether to download the waveform, for sxs.load.

Methods:

Name Description
mode_search_varying_N_sxs

Performs the mode searches.

do_mode_search_varying_N

Performs the mode searches and dumps the class instance to a pickle file.

get_waveform

Loads the waveform from the SXS catalog.

pickle_save

Dumps the class instance to a pickle file.

pickle_load

Check whether a pickle file exists and can be loaded.

__init__(SXSnum, l, m, t0_arr=np.linspace(0, 50, num=501), **kwargs_in)

Initialize the ModeSearchAllFreeVaryingNSXS class.

Parameters:

Name Type Description Default
SXSnum str

The SXS number of the waveform.

required
l int

The harmonic number l of the waveform.

required
m int

The harmonic number m of the waveform.

required
t0_arr ndarray

array of starting times for fitting.

linspace(0, 50, num=501)
**kwargs_in Any

keyword arguments.

{}
do_mode_search_varying_N()

Performs the mode searches and dumps the class instance to a pickle file.

get_waveform()

Loads the waveform from the SXS catalog.

mode_search_varying_N_sxs()

Performs the mode searches.

pickle_exists()

Check whether a pickle file exists and can be loaded.

pickle_save()

Dump the class instance to a pickle file.