29 use constants
, only: const_pi
55 if ( fp%fisher_cls%window_type == 1 )
then
56 window_function_calc => default_window
57 else if ( fp%fisher_cls%window_type == 2 )
then
59 else if ( fp%fisher_cls%window_type == 3 )
then
61 else if ( fp%fisher_cls%window_type == 4 )
then
64 window_function_calc => null()
78 real(dl),
intent(in) :: z
81 real(dl) :: gaussian_window
85 gaussian_window = 0._dl
88 winamp = exp(-0.5_dl*(dz/win%sigma)**2)
89 gaussian_window = winamp/win%sigma/sqrt(2._dl*const_pi)
101 real(dl),
intent(in) :: z
104 real(dl) :: bin_window
106 real(dl) :: alpha, beta, z0, sigma, total_number_z
108 alpha = window_fp%fisher_cls%window_alpha
109 beta = window_fp%fisher_cls%window_beta
110 z0 = window_fp%fisher_cls%redshift_zero
111 sigma = window_fp%fisher_cls%photoz_error*(1._dl+z)
113 total_number_z = beta*z**alpha*exp(-(z/z0)**beta)/(z0**(alpha+1._dl))/gamma((alpha+1._dl)/beta)
115 winamp = 0.5_dl*total_number_z*( &
116 & +erf( (win%Redshift + win%sigma - z)/(sqrt(2._dl))/sigma ) &
117 & -erf( (win%Redshift - z)/(sqrt(2._dl))/sigma ) )
119 if ( winamp<1.d-10 ) winamp = 0._dl
133 real(dl),
intent(in) :: z
136 real(dl) :: flat_window
138 real(dl) :: alpha, beta, z0, sigma, total_number_z
142 if ( win%Redshift<z .and. z<win%Redshift + win%sigma )
then
158 real(dl),
intent(in) :: z
161 real(dl) :: flat_smooth_window
163 real(dl) :: alpha, beta, z0, sigma, total_number_z
167 if ( win%Redshift<z .and. z<win%Redshift + win%sigma )
then
171 sigma = window_fp%fisher_cls%photoz_error*(1._dl+z)
173 winamp = 0.5_dl*winamp*( &
174 & +erf( (win%Redshift + win%sigma - z)/(sqrt(2._dl))/sigma ) &
175 & -erf( (win%Redshift - z)/(sqrt(2._dl))/sigma ) )
177 if ( winamp<1.d-10 ) winamp = 0._dl
179 flat_smooth_window = winamp
real(dl) function, public gaussian_window(Win, z, winamp)
This function computes a gaussian window function. Note this is the total count distribution observed...
real(dl) function, public flat_smooth_window(Win, z, winamp)
This function computes a flat binned window function smoothed by photo z errors. For more details ref...
This module contains the definitions of derived data types used to store the informations about the f...
This module contains the definition of the window functions that are used by CAMB sources...
real(dl) function, public bin_window(Win, z, winamp)
This function computes a Gaussian smoothed binned window. For more details refer to the documentation...
subroutine, public init_camb_sources_windows(FP)
This function initialises the camb sources number counts and lensing window function. The default is the gaussian window that is included in camb sources. If another window is chosen it will be initialised by the CosmicFish value.
real(dl) function, public flat_window(Win, z, winamp)
This function computes a flat binned window. For more details refer to the documentation.
This derived data type contains all the informations that the cosmicfish code needs to run...