CosmicFish  Reference documentation for version 1.0
Looking into future Cosmology
Functions/Subroutines
fisher_calculator_sn Module Reference

This module contains the code that computes the Fisher matrix for Supernovae measurements. More...

Functions/Subroutines

subroutine, public observed_sn_magnitude (P, FP, sn_magnitude, redshift, color, stretch, num, err)
 This subroutine returns the observed magnitude of a set of supernovae based on the input cosmological parameters. More...
 
subroutine, public generate_sn_mock_data (P, FP, sn_mock)
 This subroutine generates a mock SN data set compilation based on the input specifications contained in the CosmicFish parameters. More...
 
subroutine, public generate_sn_mock_covariance (P, FP, sn_mock, sn_mock_covariance)
 This subroutine generates a mock SN covariance based on the input specifications contained in the CosmicFish parameters and the SN mock. More...
 
subroutine, public save_sn_mock_to_file (mock_size, sn_mock_data, sn_mock_covariance, filename, magnitude)
 This subroutine outputs to file a SN covariance. More...
 
subroutine, public observed_sn_magnitude_derivative (P, FP, param_num, mag_initial, mag_derivative, mag_der_error, sn_mock, initial_step, num_param, error_code)
 This subroutine computes the derivative of the observed magnitude of a set of supernovae. The calculation is carried out with a fixed stepsize finite difference formula or by the Richardson’s deferred approach to the limit. More...
 
subroutine, public fisher_sn (P, FP, num_param, Fisher_Matrix, outroot)
 This subroutine computes the SN Fisher matrix. More...
 

Detailed Description

This module contains the code that computes the Fisher matrix for Supernovae measurements.

Author
Marco Raveri

Function/Subroutine Documentation

subroutine, public fisher_calculator_sn::fisher_sn ( type(cambparams), intent(in)  P,
type(cosmicfish_params), intent(in)  FP,
integer, intent(in)  num_param,
real(dl), dimension(num_param,num_param), intent(out)  Fisher_Matrix,
character(len=*), intent(in), optional  outroot 
)

This subroutine computes the SN Fisher matrix.

Parameters
[in]pInput CAMBparams
[in]fpInput Cosmicfish params
[in]num_paramInput dimension of the Fisher matrix
[out]fisher_matrixOutput Fisher matrix
[in]outrootOptional input: filename that will be used to dump to file optional output if feedback is greater than 1.

Definition at line 487 of file 009_Fisher_calculator_SN.f90.

subroutine, public fisher_calculator_sn::generate_sn_mock_covariance ( type(cambparams), intent(in)  P,
type(cosmicfish_params), intent(in)  FP,
real(dl), dimension(:,:), intent(in)  sn_mock,
real(dl), dimension(:), intent(out)  sn_mock_covariance 
)

This subroutine generates a mock SN covariance based on the input specifications contained in the CosmicFish parameters and the SN mock.

Parameters
[in]pInput CAMBparams
[in]fpInput Cosmicfish params
[in]sn_mockInput supernovae mock This array has to be allocated with dimension 3 x (FPfisher_SNtotal_SN_number)
[out]sn_mock_covarianceSN mock covariance array (assumed diagonal) of size FPfisher_SNtotal_SN_number

Definition at line 142 of file 009_Fisher_calculator_SN.f90.

subroutine, public fisher_calculator_sn::generate_sn_mock_data ( type(cambparams), intent(in)  P,
type(cosmicfish_params), intent(in)  FP,
real(dl), dimension(:,:), intent(out)  sn_mock 
)

This subroutine generates a mock SN data set compilation based on the input specifications contained in the CosmicFish parameters.

Parameters
[in]pInput CAMBparams
[in]fpInput Cosmicfish params
[out]sn_mockOutput supernovae mock This array has to be allocated with dimension 3 x (FPfisher_SNtotal_SN_number)

Definition at line 107 of file 009_Fisher_calculator_SN.f90.

subroutine, public fisher_calculator_sn::observed_sn_magnitude ( type(cambparams), intent(in)  P,
type(cosmicfish_params), intent(in)  FP,
real(dl), dimension(:), intent(out)  sn_magnitude,
real(dl), dimension(:), intent(in)  redshift,
real(dl), dimension(:), intent(in)  color,
real(dl), dimension(:), intent(in)  stretch,
integer, intent(in)  num,
integer, intent(out)  err 
)

This subroutine returns the observed magnitude of a set of supernovae based on the input cosmological parameters.

Parameters
[in]pInput CAMBparams
[in]fpInput Cosmicfish params
[out]sn_magnitudeOutput array with the supernovae magnitude
[in]redshiftInput array with the values of redshift
[in]colorInput array with the values of color
[in]stretchInput array with the values of stretch
[in]numnumber of supernovae. Length of the sn_magnitude, redshift, color, stretch vectors
[out]errOutput error code: 0 = all fine 1 = error in input 2 = error in computation 3 = error in quality 4 = routine specific

Definition at line 50 of file 009_Fisher_calculator_SN.f90.

subroutine, public fisher_calculator_sn::observed_sn_magnitude_derivative ( type(cambparams), intent(in)  P,
type(cosmicfish_params), intent(in)  FP,
integer, intent(in)  param_num,
real(dl), dimension(:), intent(in)  mag_initial,
real(dl), dimension(:), intent(out)  mag_derivative,
real(dl), dimension(:), intent(out)  mag_der_error,
real(dl), dimension(:,:), intent(in)  sn_mock,
real(dl), intent(in)  initial_step,
integer, intent(in)  num_param,
integer, intent(out)  error_code 
)

This subroutine computes the derivative of the observed magnitude of a set of supernovae. The calculation is carried out with a fixed stepsize finite difference formula or by the Richardson’s deferred approach to the limit.

Parameters
[in]pInput CAMBparams
[in]fpInput Cosmicfish params
[in]param_numInput number of the parameter wrt the derivative is computed
[in]num_paramInput number of parameters involved in the calculation
[in]mag_initialSN magnitude computed for h=0
[out]mag_derivativeOutput returns the derivative of the SN magnitude vector
[out]mag_der_errorOutput returns the error on the megnitude derivative
[in]sn_mockInput supernovae mock. Three columns with SN redshift, color and stretch
[in]initial_stepInput initial value of h. Does not need to be small for the adaptive algorithm.
[out]error_codeOutput error code. When run the code will not stop on error but report it 0 = everything was fine computation exited correctly 1 = error on input parameters 2 = error on computation 3 = error on quality of the results

Definition at line 227 of file 009_Fisher_calculator_SN.f90.

subroutine, public fisher_calculator_sn::save_sn_mock_to_file ( integer, intent(in)  mock_size,
real(dl), dimension(:,:), intent(in)  sn_mock_data,
real(dl), dimension(:), intent(in)  sn_mock_covariance,
character(len=*), intent(in)  filename,
real(dl), dimension(:), intent(in), optional  magnitude 
)

This subroutine outputs to file a SN covariance.

Parameters
[in]mock_sizeTotal length of the SN mock data set
[in]sn_mock_dataSN mock data, of dimension 3 x mock_size
[in]sn_mock_covarianceSN mock covariance, diagonal, of dimension mock_size
[in]filenameName of the file where the SN mock will be saved
[in]magnitudeOptionally the array with the magnitude of the SN catalog can be written to file

Definition at line 180 of file 009_Fisher_calculator_SN.f90.