fisher_derived#
- class cosmicjellyfish.analysis.fisher_derived.fisher_derived(derived_matrix=None, param_names=None, derived_param_names=None, param_names_latex=None, derived_param_names_latex=None, fiducial=None, fiducial_derived=None, file_name=None)[source]#
Bases:
objectThis class contains the relevant code to define a matrix that contains the relevant information to reparametrize a Fisher matrix. Generally this is a rectangular matrix containing the Jacobian of the transformation from the original Fisher to the derived one. :ivar derived_matrix: Numpy array containing the Jacobian of the transformation between the Fisher matrix and the derived Fisher matrix. Passed to the constructor of by file. :ivar path: Absolute path of the input Jacobian matrix. Computed at initialization if passing a file. :ivar name: Name of the input Jacobian matrix. Computed at initialization if passing a file. :ivar indir: Absolute path of the directory containing the input Jacobian matrix. Computed at initialization if passing a file. :ivar num_params: Number of base parameters of the Jacobian matrix. :ivar num_derived: Number of derived parameters. :ivar param_names: Names of the base parameters. Used as the identifier of the parameters. Initialized, if possible, through a .paramnames file. :ivar param_names_latex: LaTeX names of the base parameters. :ivar param_fiducial: Numpy array with the values of the fiducial of the base parameters. Passed to the constructor or by file. :ivar derived_param_names: Names of the derived parameters. Used as the identifier of the parameters. Initialized, if possible, through a .paramnames file. :ivar derived_param_names_latex: LaTeX names of the derived parameters. :ivar derived_param_fiducial: Numpy array with the values of the fiducial of the derived parameters. Passed to the constructor or by file.
- get_derived_param_names_latex()[source]#
- Returns:
the LaTeX version of the derived parameters names.
- load_paramnames_from_file(file_name=None)[source]#
Loads the paramnames array, of a derived Fisher matrix, from a file
- Parameters:
file_name (
string) – (optional) file name and path of the parameter names file. If file_name is None this reads the file self.name+.paramnames.
- add_derived(fisher_matrix, preserve_input=False)[source]#
This function computes the derived fisher_matrix given an input Fisher matrix based on the Jacobian contained in derived_matrix.
- Parameters:
fisher_matrix (
cosmicfish_pylib.fisher_matrix.fisher_matrix) – input Fisher matrix that will be used as a base for the derived Fisher matrix.preserve_input (
bool) – wether to preserve input parameters in the output Fisher. Default to false because it might lead to strage results if not used properly.
- Returns:
output Fisher matrix with derived parameters.
- Return type:
cosmicfish_pylib.fisher_matrix.fisher_matrix