# numbercounts Module file:szcounts

## Subroutines Expand Arguments

• deltaN_yz(thetas, skyfracs, ylims, qa_ytot, erf_list, Ny, Nz, switch, DN, DN2D)

subroutine computing counts in y and z

• REAL(dl) INTENT(IN) :: thetas(:)
• REAL(dl) INTENT(IN) :: skyfracs(:)
• REAL(dl) INTENT(IN) :: ylims(:,:)
• REAL(dl) INTENT(IN) :: qa_ytot(:,:)
• REAL(dl) INTENT(IN) :: erf_list(:,:)
• INTEGER INTENT(IN) :: Ny
• INTEGER INTENT(IN) :: Nz
• INTEGER INTENT(IN) :: switch
• REAL(dl)  :: DN(:)
• REAL(dl)  :: DN2D(:,:)
• get_grid(z, lnm, grid, nz, nm)

tabulate counts from theory

• REAL(dl)  :: z(:)
• REAL(dl)  :: lnm(:)
• REAL(dl)  :: grid(:,:)
• INTEGER  :: nz
• INTEGER  :: nm
• grid_C(steps_z, steps_m, thetas, ylims, skyfracs, qa_ytot, erf_list, npatches, completeness)

tabulate completeness for 1D likelihood

• REAl(dl) intent(in) :: steps_z(:)
• REAl(dl) intent(in) :: steps_m(:)
• REAl(dl) intent(in) :: thetas(:)
• REAl(dl) intent(in) :: ylims(:,:)
• REAl(dl) intent(in) :: skyfracs(:)
• REAl(dl) intent(in) :: qa_ytot(:,:)
• REAl(dl) intent(in) :: erf_list(:,:)
• INTEGER  :: npatches
• real(sp)  :: completeness(:,:)
• grid_C_2d(steps_z, steps_m, thetas, ylims, skyfracs, logy, qa_ytot, erf_list, npatches, iy, completeness)

tabulate completeness for 2D likelihood

• REAl(dl) intent(in) :: steps_z(:)
• REAl(dl) intent(in) :: steps_m(:)
• REAl(dl) intent(in) :: thetas(:)
• REAl(dl) intent(in) :: ylims(:,:)
• REAl(dl) intent(in) :: skyfracs(:)
• REAl(dl) intent(in) :: logy(:)
• REAl(dl) intent(in) :: qa_ytot(:,:)
• REAl(dl) intent(in) :: erf_list(:,:)
• INTEGER  :: npatches
• INTEGER  :: iy
• real(sp)  :: completeness(:,:,:) different completeness for different bin in q
• integrate_m_z(grid, skyfracs, compl, steps_z, steps_m, z1, z2, binz, dlnm, sum, nsteps_z, nsteps_m)

integration for 1D likelihood

• REAl(dl) intent(in) :: grid(:,:)
• REAl(dl) intent(in) :: skyfracs(:)
• REAL (sp) intent(in) :: compl(:,:)
• REAl(dl) intent(in) :: steps_z(:)
• REAl(dl) intent(in) :: steps_m(:)
• REAl(dl) intent(in) :: z1
• REAl(dl) intent(in) :: z2
• REAl(dl) intent(in) :: binz
• REAl(dl) intent(in) :: dlnm
• REAl(dl)  :: sum
• INTEGER  :: nsteps_z
• INTEGER  :: nsteps_m
• integrate_m_zq(grid, skyfracs, compl, steps_z, steps_m, z1, z2, binz, dlnm, sum, nsteps_z, nsteps_m, biny)

integration for 2D likelihood

• REAl(dl) intent(in) :: grid(:,:)
• REAl(dl) intent(in) :: skyfracs(:)
• REAL (sp) intent(in) :: compl(:,:,:)
• REAl(dl) intent(in) :: steps_z(:)
• REAl(dl) intent(in) :: steps_m(:)
• REAl(dl) intent(in) :: z1
• REAl(dl) intent(in) :: z2
• REAl(dl) intent(in) :: binz
• REAl(dl) intent(in) :: dlnm
• REAl(dl)  :: sum
• INTEGER  :: nsteps_z
• INTEGER  :: nsteps_m
• INTEGER  :: biny

## Functions  Expand Arguments

• real(dl) next_z(zi, binz)
• real(dl)  :: zi
• real(dl)  :: binz