Plugin
apply_psf_parameter_scalings()
ensure_valid_psf_beta()
ensure_valid_psf_ellip()
ensure_valid_psf_flux_ratio()
ensure_valid_psf_fwhm()
get_moffat_coadd_psf_cnn()
get_moffat_coadd_psf_cnn_from_file()
get_moffat_maps_psf()
load_psf_skymaps()
moffat_alpha2fwhm()
moffat_alpha2r50()
moffat_fwhm2alpha()
moffat_fwhm2r50()
moffat_profile_integrated()
moffat_r502alpha()
moffat_r502fwhm()
multiple_moffat_fwhm()
multiple_moffat_r50()
numba_min_dist()
psf_from_sky_maps()
sample_psf_moffat_constant()
update_psf_for_current_filter()
Plugin
add_blending_binned_integrated()
add_blending_full_image()
add_blending_integrated()
add_blending_ngal()
add_blending_points()
add_no_blending()
enrich_catalog()
enrich_star_catalog()
ensure_valid_cats()
estimate_flux_full_image()
estimate_flux_of_points()
get_elliptical_indices()
sersic_b()
sersic_brightness()
Created on Dec 5, 2016
author: tomaszk
Created on Nov 3, 2015
author: jakeret
Resolves the absolute path for a file or a directory.
In case the input is treated as a file (is_file=True), the function tries the following steps: 1) if file_name is already an absolute path, then just return it 2) if root_path is an absolute path the path is simply concatenated 3) checking in the ufig package structure 4) using DarkSkySync
In case the input should be treated as a directory (is_file=False), the function tries the following steps: 1) if file_name is already an absolute path, then just return it 2) if root_path is an absolute path the path is simply concatenated 3) checking in the ufig package structure
local absolute path to the file or directory if possible
Load data stored in a HDF5-file. :param file_name: Name of the file. :param hdf5_keys: Keys of arrays to be loaded. :param hdf5_path: Path within HDF5-file appended to all keys. :param root_path: Relative or absolute root path. :return: Loaded arrays.
Loads a healpix map and returns it in the ring-scheme
file_name – name of the file
root_path – relative root path
ext – Extension of Healpix-maps (by default = 1)
Loads an image from stored in a fits file :param file_name: name of the file :param size_x: max x size :param size_y: max y size :param root_path: relative root path :param ext: fits extention
Created on Feb 5, 2019 author: Joerg Herbel
Transform a one-dimensional array of decimal integers into its binary representation. Returns an array with the shape (len(arr_decimal), n_bits). To reconstruct arr_decimal[i], one would perform the operation
arr_decimal[i] = np.sum(2**np.arange(n_bits) * arr_binary[i])
This means that this binary representation is reversed with respect to what is normally used. For example, normally,
1100 = 1 * 2**3 + 1 * 2**2 + 0 * 2**1 + 0 * 2**0.
However, here we have
1100 = 1 * 2**0 + 1 * 2**1 + 0 * 2**2 + 0 * 2**3.
ATTENTION: THIS FUNCTION MODIFIES ARR_DECIMAL IN PLACE!
Set pixels which are masked according to input bits. This function modifies pixel_mask in-place. :param pixel_mask: mask :param maskbits_keep: mask bits to keep :param n_bits: … :return: mask with only bits to keep switched on (same shape as input mask)
Created on Jul 31, 2017 @author: Joerg Herbel
Add one photon to image. :param image: image :param x: centroid x-position :param y: centroid y-position :param dx: x-coordinate sampled from light profile :param dy: y-coordinate sampled from light profile :return:
size can either be the PSF fwhm or the intrinsic galaxy r50
Created on Sep 30, 2016 @author: Joerg Herbel
Created on Nov 16, 2016 author: Tomasz Kacprzak
This creates a CHI-MEAN detection image, as is done by the DES pipeline, see https://iopscience.iop.org/article/10.3847/1538-4365/aab4f5/pdf (DOI: 10.3847/1538-4365/aab4f5), appendix B.
Copy of chi_mean_combination made to run with low memory
images_and_weights – iterable yielding images with weights to be combined
chi-mean detection image
Constructs the detection image for SExtractor. In case of a single-band detection image, simply writes the weight map of the detection band to a fits file. For multi-band detection, the function computes the CHI-MEAN combination of the detection band images and their weights. :param par: ctx.parameters :return: path to detection image (fits), path to detection weights (fits or ‘NONE’),
weight type of detection image for SExtractor, either according to input parameters (single-band) or ‘NONE’ (multi-band detection image)
Get the filename and dataset for the background noise map :param par: ctx().parameters structure :param band: which band to use (if None, use the single-band parameter values) :return: filepath, dataset: path and dataset index in hdf file
Get the filename and dataset for the exposure time map :param par: ctx().parameters structure :param band: which band to use (if None, use the single-band parameter values) :return: filepath, dataset: path and dataset index in hdf file
Get the filename and dataset for the background noise map :param par: ctx().parameters structure :param band: which band to use (if None, use the single-band parameter values) :return: filepath, dataset: path and dataset index in hdf file
Get the filename and dataset for the inverse variance map :param par: ctx().parameters structure :param band: which band to use (if None, use the single-band parameter values) :return: filepath, dataset: path and dataset index in hdf file
Constructs the path to the temporary fits-file with the weights for SExtractor :param par: ctx.parameters :param band: filter band :return: path
Reads out the weight map (inverse variance) from hdf5 and writes it to fits, s.t. it can be used by SExtractor :param par: ctx.parameters :param path_out: path where weight map will be stored :param band: filter band
Write fits weight maps for SExtractor in the temp folder.
par – ctx().parameters structure
dirpath_temp – temp dir where to write files
overwrite_photo – if to overwrite photometry weight if exists
overwrite_det – if to overwrite detection weight if exists
filepath_fits_photometry, filepath_fits_detection: paths to decompressed weights
Created on Jun 15, 2016 author: Joerg Herbel