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 |
kwargs |
Dict[str, Any]
|
A dictionary of keyword arguments. |
flatness_checker_kwargs |
Dict[str, Any]
|
A dictionary of keyword arguments for the
|
mode_searcher_kwargs |
Dict[str, Any]
|
A dictionary of keyword arguments for the
|
mode_searchers |
List[ModeSearchAllFreeLM]
|
A list of |
found_modes_final |
List[mode]
|
A list of |
run_string_prefix |
str
|
A string that is used as a prefix for the run
name for dumping the |
load_pickle |
bool
|
A boolean that specifies whether to load the |
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 |
flatness_checkers |
List[IterativeFlatnessChecker]
|
A list of |
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 |
{}
|
mode_searcher_kwargs
|
Dict[str, Any]
|
A dictionary of keyword arguments for the
|
{}
|
**kwargs_in
|
Any
|
keyword arguments. |
{}
|
do_mode_searches()
Performs the mode searches.
init_searchers()
Initializes the mode searchers.
summarize_final_modes(**kwargs)
Return per-mode final results for the selected best run.
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 |
|---|---|---|
SXS_num |
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 |
postfix_string |
str
|
A string that is appended to the run name for
dumping the |
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 ( |
relevant_lm_list_override |
bool
|
A boolean that specifies whether to
override the |
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
|
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 |
run_string_fitter |
str
|
A string that is used as a prefix for the run
name for dumping the |
run_string |
str
|
A string that is used as a prefix for the run name for
dumping the |
run_string_full |
str
|
A string that is used as a prefix for the run name
for dumping the |
file_path |
str
|
The path to the |
load_pickle |
bool
|
A boolean that specifies whether to load the |
mode_searcher_load_pickle |
bool
|
A boolean that specifies whether to load
the |
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 |
mode_searcher_vary_N |
ModeSearchAllFreeVaryingN
|
A |
found_modes_final |
List[mode]
|
A list of |
download |
Optional[bool]
|
A boolean that specifies whether to download the waveform,
for |
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 |
get_waveform |
Loads the waveform from the SXS catalog. |
pickle_save |
Dumps the class instance to a |
pickle_load |
Check whether a |
__init__(SXS_num, l, m, t0_arr=np.linspace(0, 50, num=501), **kwargs_in)
Initialize the ModeSearchAllFreeVaryingNSXS class.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
SXS_num
|
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.
summarize_final_modes(**kwargs)
Return per-mode final results for the selected best run.
fixed_mode_flatness_to_plot_overlays(flatness_summary)
Convert summarize_fixed_mode_flatness output to plot overlay dicts.
summarize_fixed_mode_flatness(result_full, delta_t=None, flatness_length=None, quantile_range=DEFAULT_P_STABLE, med_min=DEFAULT_A_TOL, weight_1=DEFAULT_BETA_A, weight_2=DEFAULT_BETA_PHI, fluc_tol=DEFAULT_EPSILON_STABLE, wrap_phase=True)
Compute per-mode flatness summary for a fixed-frequency fit result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result_full
|
|
required | |
delta_t
|
Flatness window width in time units. Ignored if
|
None
|
|
flatness_length
|
Optional explicit window length in index units. |
None
|
|
quantile_range
|
Quantile range used for fluctuation estimate. |
DEFAULT_P_STABLE
|
|
med_min
|
Floor for amplitude/phase normalization medians. |
DEFAULT_A_TOL
|
|
weight_1
|
Amplitude fluctuation weight. |
DEFAULT_BETA_A
|
|
weight_2
|
Phase fluctuation weight. |
DEFAULT_BETA_PHI
|
|
fluc_tol
|
Threshold for earliest acceptable flatness window. |
DEFAULT_EPSILON_STABLE
|
|
wrap_phase
|
If True, compute phase quantiles using circular wrapping. |
True
|
Returns:
| Type | Description |
|---|---|
|
Dict keyed by mode string. Each value includes: - flattest window start/end index and times - flattest fluctuation - median amplitude/phase within flattest window - earliest acceptable flat-window start index/time |
summarize_mode_searcher_final_modes(mode_searcher_vary_N, quantile_low=0.05, quantile_high=0.95, wrap_phase=True)
Summarize final-mode flatness outputs from a mode-search result.
Uses the selected best run in ModeSearchAllFreeVaryingN and returns a
per-mode dictionary containing mode presence, flattest window times, median
amplitude/phase, asymmetric uncertainty ranges (upper/lower quantiles), and
earliest flatness start time.