Perturbation AUF Fortran Subroutines¶
Description
This module provides the Fortran code for the handling of the creation of perturbation component of the Astrometric Uncertainty Function.
Quick access
- Routines:
fit_skew(),fourier_transform(),get_density(),histogram1d_dp(),ipos_dp(),perturb_aufs(),psf_perturb(),scatter_perturbers(),xval_dp()
Variables
- perturbation_auf_fortran/dp [integer,parameter=kind(0.0d0)]¶
- perturbation_auf_fortran/pi [real,parameter=4.0_dp*atan(1.0_dp)]¶
Subroutines and functions
- subroutine perturbation_auf_fortran/get_density(a_ax1, a_ax2, b_ax1, b_ax2, maxdist, counts)¶
Calculate the number of sources in a given catalogue within a specified radius of each source.
- Parameters:
a_ax1 (*) [real,in]
a_ax2 (*) [real,in]
b_ax1 (*) [real,in]
b_ax2 (*) [real,in]
maxdist [real,in]
counts (size(a_ax1) [integer,out]
- Call to:
- subroutine perturbation_auf_fortran/perturb_aufs(narray, magarray, r, dr, rbins, j0s, mag_d, dmag_d, ds, n_norm, num_int, dmcut, psfr, psfsig, lentrials, seed, dd_params, l_cut, algorithm_type, fracgrid, fluxav, fouriergrid, rgrid, intrgrid)¶
Fortran wrapper for the perturbation AUF component calculation for a set of density-magnitude combinations, creating the various parameters needed to use the distribution of perturbations.
- Parameters:
narray (*) [real,in]
magarray (*) [real,in]
r (*) [real,in]
dr (*) [real,in]
rbins (*) [real,in]
j0s (,) [real,in]
mag_d (*) [real,in]
dmag_d (*) [real,in]
ds (*) [real,in]
n_norm [real,in]
num_int (*) [integer,in]
dmcut (*) [real,in]
psfr [real,in]
psfsig [real,in]
lentrials [integer,in]
seed (,) [integer,in]
dd_params (,,*) [real,in]
l_cut (*) [real,in]
algorithm_type [character,in]
fracgrid (size(dmcut,size(narray) [real,out]
fluxav (size(narray) [real,out]
fouriergrid (size(j0s, 2,size(narray) [real,out]
rgrid (size(r,size(narray) [real,out]
intrgrid (size(r,size(narray) [real,out]
- Call to:
- subroutine perturbation_auf_fortran/scatter_perturbers(dns, dms, psfr, maxk, dmcut, psfsig, offsets, fraccontam, fluxcontam, dd_params, l_cut, ddms, algorithm_type, lentrials, seed)¶
Given a set of average numbers of sources per PSF circle for a series of relative fluxes, populate a bright, central source’s PSF with randomly placed sources, and calculate the flux brightening and expected PSF centroid shift.
- Parameters:
dns (*) [real,in]
dms (*) [real,in]
psfr [real,in]
maxk [integer,in]
dmcut (*) [real,in]
psfsig [real,in]
offsets (lentrials) [real,out]
fraccontam (size(dmcut) [real,out]
fluxcontam (lentrials) [real,out]
dd_params (,,*) [real,in]
l_cut (*) [real,in]
ddms (*) [real,in]
algorithm_type [character,in]
lentrials [integer,in]
seed (*) [integer,in]
- Called from:
- Call to:
- subroutine perturbation_auf_fortran/psf_perturb(x, y, r, fs, dd_params, flux, psfsig, l_cut, xav, yav)¶
For a set of cartesian coordinates and relative fluxes for perturbers, depending on the flux of the objects, calculate different perturbation offsets based on Gaussian PSF model fits with constant background noise.
- Parameters:
x (*) [real,in]
y (*) [real,in]
r (*) [real,in]
fs (*) [real,in]
dd_params (,,*) [real,in]
flux [real,in]
psfsig [real,in]
l_cut (*) [real,in]
xav [real,out]
yav [real,out]
- Called from:
- Call to:
- subroutine perturbation_auf_fortran/fit_skew(params, x, l, y)¶
Calculate the skew-normal perturber effect, evaluated at some perturber separation x.
- Parameters:
params (*) [real,in]
x [real,in]
l [real,in]
y [real,out]
- Called from:
- subroutine perturbation_auf_fortran/xval_dp(xmin, xmax, i, nbin, xval)¶
Find central value of a bin for a regular histogram
- Parameters:
xmin [real,in]
xmax [real,in]
i [integer,in]
nbin [integer,in]
xval [real,out]
- Called from:
- subroutine perturbation_auf_fortran/ipos_dp(xmin, xmax, x, nbin, ipos)¶
Find bin a value falls in for a regular histogram
- Parameters:
xmin [real,in]
xmax [real,in]
x [real,in]
nbin [integer,in]
ipos [integer,out]
- Called from:
- subroutine perturbation_auf_fortran/histogram1d_dp(array, xmin, xmax, nbin, hist_x, hist_y[, mask[, weights]])¶
Bin 1D array of values into 1D regular histogram
- Parameters:
array (*) [real,in]
xmin [real,in]
xmax [real,in]
nbin [integer,in]
hist_x (nbin) [real,out]
hist_y (nbin) [real,out]
mask (*) [logical,in,]
weights (*) [real,in,]
- Called from:
- Call to:
- subroutine perturbation_auf_fortran/fourier_transform(pr, r, dr, j0s, g)¶
Calculates the Fourier-Bessel transform, or Hankel transform of zeroth order, of a function. This is equivalent to a two-dimensional Fourier transform in the limiting case of circular symmetry.
- Parameters:
pr (*) [real,in]
r (*) [real,in]
dr (*) [real,in]
j0s (,) [real,in]
g (size(j0s, 2) [real,out]
- Called from: