class MontePythonLike::Likelihood_sn
[No description available]
Inherits from MontePythonLike.Likelihood, MontePythonLike.Likelihood, object
Public Functions
Name | |
---|---|
def | init(self self, path path, data data, command_line command_line) |
def | read_configuration_file(self self) |
def | read_matrix(self self, path path) |
def | read_light_curve_parameters(self self) |
def | init(self self, path path, data data, command_line command_line) |
def | read_configuration_file(self self) |
def | read_matrix(self self, path path) |
def | read_light_curve_parameters(self self) |
Additional inherited members
Public Functions inherited from MontePythonLike.Likelihood
Name | |
---|---|
def | loglkl(self self, cosmo cosmo, data data) |
def | raise_fiducial_model_err(self self) |
def | read_from_file(self self, path path, data data, command_line command_line) |
def | get_cl(self self, cosmo cosmo, l_max l_max =-1) |
def | get_unlensed_cl(self self, cosmo cosmo, l_max l_max =-1) |
def | need_cosmo_arguments(self self, data data, dictionary dictionary) |
def | read_contamination_spectra(self self, data data) |
def | add_contamination_spectra(self self, cl cl, data data) |
def | add_nuisance_prior(self self, lkl lkl, data data) |
def | computeLikelihood(self self, ctx ctx) |
def | loglkl(self self, cosmo cosmo, data data) |
def | raise_fiducial_model_err(self self) |
def | read_from_file(self self, path path, data data, command_line command_line) |
def | get_cl(self self, cosmo cosmo, l_max l_max =-1) |
def | get_unlensed_cl(self self, cosmo cosmo, l_max l_max =-1) |
def | need_cosmo_arguments(self self, data data, dictionary dictionary) |
def | read_contamination_spectra(self self, data data) |
def | add_contamination_spectra(self self, cl cl, data data) |
def | add_nuisance_prior(self self, lkl lkl, data data) |
def | computeLikelihood(self self, ctx ctx) |
Public Attributes inherited from MontePythonLike.Likelihood
Name | |
---|---|
name | |
folder | |
data_directory | |
default_values | |
need_update | |
use_nuisance | |
nuisance | |
path | |
dictionary |
Public Functions inherited from MontePythonLike.Likelihood
Name | |
---|---|
def | loglkl(self self, cosmo cosmo, data data) |
def | raise_fiducial_model_err(self self) |
def | read_from_file(self self, path path, data data, command_line command_line) |
def | get_cl(self self, cosmo cosmo, l_max l_max =-1) |
def | get_unlensed_cl(self self, cosmo cosmo, l_max l_max =-1) |
def | need_cosmo_arguments(self self, data data, dictionary dictionary) |
def | read_contamination_spectra(self self, data data) |
def | add_contamination_spectra(self self, cl cl, data data) |
def | add_nuisance_prior(self self, lkl lkl, data data) |
def | computeLikelihood(self self, ctx ctx) |
def | loglkl(self self, cosmo cosmo, data data) |
def | raise_fiducial_model_err(self self) |
def | read_from_file(self self, path path, data data, command_line command_line) |
def | get_cl(self self, cosmo cosmo, l_max l_max =-1) |
def | get_unlensed_cl(self self, cosmo cosmo, l_max l_max =-1) |
def | need_cosmo_arguments(self self, data data, dictionary dictionary) |
def | read_contamination_spectra(self self, data data) |
def | add_contamination_spectra(self self, cl cl, data data) |
def | add_nuisance_prior(self self, lkl lkl, data data) |
def | computeLikelihood(self self, ctx ctx) |
Public Attributes inherited from MontePythonLike.Likelihood
Name | |
---|---|
name | |
folder | |
data_directory | |
default_values | |
need_update | |
use_nuisance | |
nuisance | |
path | |
dictionary |
Public Functions Documentation
function init
def __init__(
self self,
path path,
data data,
command_line command_line
)
Reimplements: MontePythonLike::Likelihood::init
It copies the content of self.path from the initialization routine of
the :class:`Data <data.Data>` class, and defines a handful of useful
methods, that every likelihood might need.
If the nuisance parameters required to compute this likelihood are not
defined (either fixed or varying), the code will stop.
Parameters
----------
data : class
Initialized instance of :class:`Data <data.Data>`
command_line : NameSpace
NameSpace containing the command line arguments```
### function read_configuration_file
def read_configuration_file( self self )
Extract Python variables from the configuration file
This routine performs the equivalent to the program “inih” used in the original c++ library.
### function read_matrix
def read_matrix( self self, path path )
extract the matrix from the path
This routine uses the blazing fast pandas library (0.10 seconds to load a 740x740 matrix). If not installed, it uses a custom routine that is twice as slow (but still 4 times faster than the straightforward numpy.loadtxt method)
.. note::
the length of the matrix is stored on the first line... then it has
to be unwrapped. The pandas routine read_csv understands this
immediatly, though.```
function read_light_curve_parameters
def read_light_curve_parameters(
self self
)
Read the file jla_lcparams.txt containing the SN data
.. note::
the length of the resulting array should be equal to the length of
the covariance matrices stored in C00, etc...```
### function __init__
def init( self self, path path, data data, command_line command_line )
**Reimplements**: [MontePythonLike::Likelihood::__init__](/documentation/code/darkbit/classes/classmontepythonlike_1_1likelihood/#function---init--)
It copies the content of self.path from the initialization routine of
the :class:Data <data.Data>
class, and defines a handful of useful
methods, that every likelihood might need.
If the nuisance parameters required to compute this likelihood are not defined (either fixed or varying), the code will stop.
Parameters
data : class
Initialized instance of :class:Data <data.Data>
command_line : NameSpace
NameSpace containing the command line arguments```
function read_configuration_file
def read_configuration_file(
self self
)
Extract Python variables from the configuration file
This routine performs the equivalent to the program "inih" used in the
original c++ library.
function read_matrix
def read_matrix(
self self,
path path
)
extract the matrix from the path
This routine uses the blazing fast pandas library (0.10 seconds to load
a 740x740 matrix). If not installed, it uses a custom routine that is
twice as slow (but still 4 times faster than the straightforward
numpy.loadtxt method)
.. note::
the length of the matrix is stored on the first line... then it has
to be unwrapped. The pandas routine read_csv understands this
immediatly, though.```
### function read_light_curve_parameters
def read_light_curve_parameters( self self )
Read the file jla_lcparams.txt containing the SN data
.. note::
the length of the resulting array should be equal to the length of
the covariance matrices stored in C00, etc...```
Updated on 2022-08-03 at 12:58:02 +0000