create_single_perturb_auf

macauff.create_single_perturb_auf(r, dr, j0s, num_trials, psf_fwhm, density_mag, a_photo, a_snr, localn, d_mag, mag_cut, dd_params, l_cut, run_fw, run_psf, al_av, avs, fit_gal_flag, sky_area=None, saturation_magnitude=None, cmau_array=None, wav=None, z_max=None, nz=None, alpha0=None, alpha1=None, alpha_weight=None, ab_offset=None, filter_name=None, tri_file_path=None, filt_header=None, dens_hist_tri=None, model_mags=None, model_mags_interval=None)[source]

Creates the associated parameters for describing a single perturbation AUF component, for a single sky position.

Parameters:
rnumpy.ndarray

Array of real-space positions.

drnumpy.ndarray

Array of the bin sizes of each r position.

j0snumpy.ndarray

The Bessel Function of First Kind of Zeroth Order, evaluated at all r-rho combinations.

num_trialsinteger

The number of realisations of blended contaminant sources to draw when simulating perturbations of source positions.

psf_fwhmfloat

The full-width at half maxima of the filt filter.

density_magfloat

The limiting magnitude above which to consider local normalising densities, corresponding to the filt bandpass.

a_photonumpy.ndarray

The photometry of each source for which simulated perturbations should be made.

a_snrnumpy.ndarray

The signal-to-noise ratios of each source in a_photo.

localnnumpy.ndarray

The local normalising densities for each source.

d_magfloat

The interval at which to bin the magnitudes of a given set of objects, for the creation of the appropriate brightness/density combinations to simulate.

mag_cutnumpy.ndarray or list of floats

The magnitude offsets – or relative fluxes – above which to keep track of the fraction of objects suffering from a contaminating source.

dd_paramsnumpy.ndarray

Polynomial fits for the various parameters controlling the background limited PSF-fit algorithm for centroid perturbations.

l_cutnumpy.ndarray or list

Relative flux cutoffs for which algorithm to use in the background limited PSF-fit algorithm case.

run_fwbool

Flag indicating whether to run the “flux-weighted” version of the perturbation algorithm.

run_psfbool

Flag indicating whether to run the “background-dominated PSF” version of the perturbation algorithm.

al_avfloat

Reddening vector for the filter, \(\frac{A_\lambda}{A_V}\).

avslist or numpy.ndarray of floats

Sampling of V-band extinctions from within the region for which we wish to define the AUF perturbation components.

fit_gal_flagbool

Flag to indicate whether to simulate galaxy counts for the purposes of simulating the perturbation component of the AUF.

sky_areafloat, optional

Area of the region in question, in square degrees. Required if fit_gal_flag is True.

saturation_magnitudefloat, optional

Magnitude at which the given filter experiences source dropout due to saturation effects. Required if fit_gal_flag is True.

cmau_arraynumpy.ndarray, optional

Array holding the c/m/a/u values that describe the parameterisation of the Schechter functions with wavelength, following Wilson (2022, RNAAS, 6, 60) [1]. Shape should be (5, 2, 4), with 5 parameters for both blue and red galaxies.

wavfloat, optional

Wavelength, in microns, of the filter of the current observations.

z_maxfloat, optional

Maximum redshift to simulate differential galaxy counts out to.

nzint, optional

Number of redshifts to simulate, to dictate resolution of Schechter functions used to generate differential galaxy counts.

alpha0list of numpy.ndarray or numpy.ndarray, optional

Zero-redshift indices used to calculate Dirichlet SED coefficients, used within the differential galaxy count simulations. Should either be a two-element list or shape (2, 5) array. See [2] and [3] for more details.

alpha1list of numpy.ndarray or numpy.ndarray, optional

Dirichlet SED coefficients at z=1.

alpha_weightlist of numpy.ndarray or numpy.ndarray, optional

Weights used to derive the kcorrect coefficients within the galaxy count framework.

ab_offsetfloat, optional

The zero point difference between the chosen filter and the AB system, for conversion of simulated galaxy counts from AB magnitudes. Should be of the convention m = m_AB - ab_offset

filter_namestring, optional

The speclite style group_name-band_name name for the filter, for use in the creation of simulated galaxy counts.

tri_file_pathstring or None, optional

Location on disk where the TRILEGAL datafile is stored, and where the individual filter-specific perturbation AUF simulations should be saved. Must be provided if not providing pre-computed TRILEGAL magnitude counts.

filt_headerfloat or None, optional

The filter name, as given by the TRILEGAL datafile, for this simulation. Must be provided along with tri_folder, or must be None if tri_folder is None.

dens_hist_trilist or numpy.ndarray or None, optional

A pre-computed list of densities (per square degree per magnitude) of simulated star counts, such as from TRILEGAL, and the output from make_tri_counts. Must be provided if tri_folder is None and be None is tri_folder is specified.

model_magslist or numpy.ndarray or None, optional

Left-hand bin edges of magnitudes of star differential source counts. Must be given if dens_hist_tri is given, otherwise be None.

model_mags_intervallist or numpy.ndarray or None, optional

Widths of magnitude bins of star differential source counts. Must be given if dens_hist_tri is given, otherwise be None.

Returns:
count_arraynumpy.ndarray

The simulated local normalising densities that were used to simulate potential perturbation distributions.

References

[1]

Wilson T. J. (2022), RNAAS, 6, 60

[2]

Herbel J., Kacprzak T., Amara A., et al. (2017), JCAP, 8, 35

[3]

Blanton M. R., Roweis S. (2007), AJ, 133, 734