Photometric Likelihood Fortran Subroutines

Description

This module provides the Fortran code for the handling of the creation of photometric likelihood and priors based on a bandpass-bandpass pairing between catalogues.

Quick access

Variables:

dp, pi

Routines:

brightest_mag(), find_mag_bin_inds(), get_field_dists()

Variables

  • photometric_likelihood_fortran/dp [integer,parameter=kind(0.0d0)]
  • photometric_likelihood_fortran/pi [real,parameter=4.0_dp*atan(1.0_dp)]

Subroutines and functions

subroutine  photometric_likelihood_fortran/find_mag_bin_inds(mags, flags, bins, cuts)

Find the indices of the bins to place all magnitudes in for a given magnitude bin array.

Parameters:
  • mags (*) [real,in]

  • flags (*) [logical,in]

  • bins (*) [real,in]

  • cuts (-1 + size(bins,size(mags) [integer,out]

subroutine  photometric_likelihood_fortran/get_field_dists(auf_cdf_a, a_indices, a_overlap, f_fracs, a_flags, a_mag, b_flags, b_mag, a_low_mag, a_upp_mag, b_low_mag, b_upp_mag, a_mask_ind)

Derive the distribution of “field” sources, those with no counterpart in the opposing catalogue, by removing any source within the “field” integral fraction radius of any object.

Parameters:
  • auf_cdf_a (,) [real,in]

  • a_indices (,) [integer,in]

  • a_overlap (*) [integer,in]

  • f_fracs (*) [real,in]

  • a_flags (*) [logical,in]

  • a_mag (*) [real,in]

  • b_flags (*) [logical,in]

  • b_mag (*) [real,in]

  • a_low_mag [real,in]

  • a_upp_mag [real,in]

  • b_low_mag [real,in]

  • b_upp_mag [real,in]

  • a_mask_ind (size(a_overlap,size(f_fracs) [integer,out]

subroutine  photometric_likelihood_fortran/brightest_mag(auf_cdf_a, a_mag, b_mag, a_indices, a_overlap, bright_frac, a_err_circ, a_flags, b_flags, a_bin, mag_mask, av_area)

Derive the distribution of brightest sources of one catalogue inside “error circles” of another catalogue.

Parameters:
  • auf_cdf_a (,) [real,in]

  • a_mag (*) [real,in]

  • b_mag (*) [real,in]

  • a_indices (,) [integer,in]

  • a_overlap (*) [integer,in]

  • bright_frac [real,in]

  • a_err_circ (*) [real,in]

  • a_flags (*) [logical,in]

  • b_flags (*) [logical,in]

  • a_bin (*) [real,in]

  • mag_mask (size(b_mag,-1 + size(a_bin) [integer,out]

  • av_area (-1 + size(a_bin) [real,out]