template_bank_generator_HM.TemplateBank.is_physical =================================================== Back to :doc:`Class page <../classes/template_bank_generator_HM.TemplateBank>` Summary ------- Checks if the given calphas are physical, i.e. that they are in the trimmed grid that remove_nonphysical_templates outputs Signature --------- .. code-block:: python def is_physical(self, calpha, delta_calpha, fudge, force_zero, override_physical_grid = None) .. list-table:: Input variables :header-rows: 1 * - Name - Type - Default - Description * - ``calpha`` - - - - - An array of template bank components, with shape either (n_components) or (n_trial_points, n_components). * - ``delta_calpha`` - - - - - Resolution of calphas * - ``fudge`` - - - - - A safety factor to inflate the range of used values of each parameter * - ``force_zero`` - - - - - Flag indicating whether to force 0 to be a gridpoint * - ``override_physical_grid`` - - - None - Pass a precomputed physical grid if available, speeds up background collection on multiple files Output variables ---------------- .. list-table:: :header-rows: 1 * - Return annotation - Docstring type - Description * - ``None`` - - - Bool if a single set of calphas is passed, or array of bools of len(n_trial_points) if many are passed. Docstring --------- .. code-block:: text Checks if the given calphas are physical, i.e. that they are in the trimmed grid that remove_nonphysical_templates outputs Note that in order to return True the calphas must lie exactly on the grid generated by (delta_calpha, fudge, force_zero), to within a small tolerance ~ 1e-5 << delta_calpha. :param calpha: An array of template bank components, with shape either (n_components) or (n_trial_points, n_components). :param delta_calpha: Resolution of calphas :param fudge: A safety factor to inflate the range of used values of each parameter :param force_zero: Flag indicating whether to force 0 to be a gridpoint :param override_physical_grid: Pass a precomputed physical grid if available, speeds up background collection on multiple files :returns: Bool if a single set of calphas is passed, or array of bools of len(n_trial_points) if many are passed.