Created on Aug 5, 2016 @author: Tomasz Kacprzak
Created on Aug 5, 2016 @author: Tomasz Kacprzak adapted by Silvan Fischbacher, 2024
Created on Nov 4, 2014 @author: Claudio Bruderer
Bases: BasePlugin
Shear and magnification are applied to the input galaxy catalog and combined into an effective ellipticity, magnitude, and size
numgalaxies – number of galaxies
shear_type – whether a constant or variable shear is added
int_e1 – Intrinsic ellipticity 1-component
int_e2 – Intrinsic ellipticity 2-component
int_mag – Intrinsic magnitude
int_r50 – Intrinsic r50-radius
Shear 1-component at every galaxy location
Shear 2-component at every galaxy location
Effective ellipticity 1-component at every galaxy location
Effective ellipticity 1-component at every galaxy location
Kappa at every galaxy location
Effective magnitude of every galaxy
Effective size of every galaxy
Function that adds shear and the intrinsic ellipticity in the weak shear regime (small values of gamma1 and gamma2) for the ellipticity definition (a**2 - b**2) / (a**2 + b**2)
int_e1 – Intrinsic ellipticity 1-component
int_e2 – Intrinsic ellipticity 2-component
gamma1 – Shear 1-component
gamma2 – Shear 1-component
Effective ellipticity 1-component
Effective ellipticity 2-component
Load the map containing a realization on the whole sphere of a given input angular power spectrum for the shear
shear_maps – File name of the shear maps
g1_prefactor – Prefactor to account for a potential flipping of the shear g1-map
maps_remote_dir – Root directory where maps are stored
Realization of a shear-cl, 1-component
Realization of a shear-cl, 2-component
Generates a constant shear field at the location of each galaxy
numgalaxies – number of galaxies, i.e. number of samples
par – ctx.parameters; part of ctx containing parameters
Shear 1-component
Shear 2-component
Given an input gamma1 and gamma2 map, sample it at positions (x, y) to get input shear
gamma1_map – Map containing gamma1 information
gamma2_map – Map containing gamma2 information
w – wcs-object containing all the relevant wcs-transformation information
x – pixel x-coordinate
y – pixel y-coordinate
Array containing the sampled gamma1 values
Array containing the sampled gamma2 values
Created on Mar 20, 2015 @author: Claudio Bruderer adapted by Silvan Fischbacher, 2024
Bases: BasePlugin
The PSF is applied to the input galaxy and star catalogs by evaluating the PSF size and ellipticity fields at every objects position
psf_type – whether a constant or variable psf is added
psf_beta – beta parameter for Moffat PSF profile
seeing – seeing (arcsec)
psf_e1 – e1 for the PSF
psf_e2 – e2 for the PSF
psf_maps – File name of the psf maps (0: r50-map, 1: e1-map, 2: e2-map)
maps_remote_dir – Remote directory used in case the file name of the psf maps is not absolute
pixscale – pixel scale (arcsec/pixel)
size_x – size of image in x-direction (pixel)
size_y – size of image in y-direction (pixel)
ra0 – right ascension at the center of the image in degree
dec0 – declination at the center of the image in degree
PSF r50 (flux radius 50%) evaluated at every object’s position
PSF beta parameter evaluated at every object’s position
PSF ellipticity 1-component evaluated at every object’s position
PSF ellipticity 2-component evaluated at every object’s position
Set the PSF for objects (stars or galaxies) using maps of the PSF across the sky.
obj_name – Name of the objects the PSF is evaluated for
ctx – Ivy-context containing the catalog of the object properties
PSF r50 (flux radius 50%) evaluated at the positions of the input objects
PSF beta parameter evaluated at the positions of the input objects
PSF ellipticity 1-component evaluated at the positions of the input objects
PSF ellipticity 2-component evaluated at the positions of the input objects
Load maps of the PSF across the sky.
psf_maps – File name of the psf maps (0: r50-map, 1: e1-map, 2: e2-map)
par – ctx.parameters containing potential fudge factors for PSF maps
r50-map containing flux radius (50%)-variations across the survey area
Ellipticity 1-component-map containing variations across the survey area
Ellipticity 2-component-map containing variations across the survey area
Computes the fwhm (in the units alpha is in) for a given alpha and beta parameter for a Moffat distribution
psf_alpha – alpha of the PSF in units of pixels
psf_beta – beta parameter for a Moffat distribution
alpha of the Moffat profile in units of pixels
Computes the r50 (in units of alpha) for a given alpha and beta parameter for a Moffat distribution
psf_alpha – alpha of the PSF in units of pixels
psf_beta – beta parameter for a Moffat distribution
alpha of the Moffat profile in units of pixels
Computes the alpha parameter for a given FWHM and beta parameter for a Moffat distribution
psf_fwhm – FWHM of the PSF in units of pixels
psf_beta – beta parameter for a Moffat distribution
alpha of the Moffat profile in units of pixels
Computes the r50 for a given FWHM and beta parameter for the PSF assuming a Moffat distribution
psf_fwhm – FWHM of the PSF in units of pixels
psf_beta – beta parameter for a Moffat distribution
r50 of the PSF (assuming a Moffat distribution) in units of pixels
Evaluates the integrated “1 - Moffat profile” within a radius r (in units of Moffat alpha), which potentially can consist of multiple components, and returns the flux in units of the total flux.
x – Radius in units of Moffat alpha
psf_beta – Moffat beta parameter(s)
psf_flux_ratio – Fraction of flux in the first component
Flux within a radius r in units of the total flux
Computes the alpha parameter for a given r50 and beta parameter for a Moffat distribution
psf_r50 – r50 of the PSF in units of pixels
psf_beta – beta parameter for a Moffat distribution
alpha of the Moffat profile in units of pixels
Computes the FWHM for a given r50 and beta parameter for the PSF assuming a Moffat distribution
psf_r50 – r50 of the PSF in units of pixels
psf_beta – beta parameter for a Moffat distribution
FWHM of the PSF (assuming a Moffat distribution) in units of pixels
Solve the nonlinear equation to recover an effective fwhm of a PSF profile consisting of potentially multiple Moffat profiles. This function is similar to ufig.plugins.add_psf.multiple_moffat_r50().
psf_fwhm – FWHM of the Moffat profile in pixels
psf_beta – Moffat beta parameter(s)
psf_flux_ratio – Fraction of flux in the first component
r50 of the total PSF profile
Solve the nonlinear equation to recover an effective r50 of a PSF profile consisting of potentially multiple Moffat profiles.
psf_fwhm – FWHM of the Moffat profile in pixels
psf_beta – Moffat beta parameter(s)
psf_flux_ratio – Fraction of flux in the first component
r50 of the total PSF profile
Finds the index of the closest point in Y for each point in X
Evaluate PSF maps at input positions.
r50_map – r50-map containing flux radius (50%)-variations across the survey area
e1_map – Ellipticity 1-component-map containing variations across the survey area
e2_map – Ellipticity 2-component-map containing variations across the survey area
psf_beta – PSF beta parameter evaluated at every object’s position
w – wcs-object containing all the relevant wcs-transformation information
x – pixel x-coordinate
y – pixel y-coordinate
psf_flux_ratio – Flux ratio of the different PSF Moffat component(s) relative to the total flux
PSF r50 (flux radius 50%) evaluated at the input positions
PSF beta parameter evaluated at the input positions
PSF ellipticity 1-component evaluated at the input positions
PSF ellipticity 2-component evaluated at the input positions
Evaluate a constant, Moffat-PSF field at the positions of different objects (stars or galaxies).
obj – Name of the objects the PSF is evaluated for
ctx – Ivy-context containing the catalog of the object properties
PSF r50 (flux radius 50%) evaluated at the positions of the input objects
PSF beta parameter evaluated at the positions of the input objects
PSF ellipticity 1-component evaluated at the positions of the input objects
PSF ellipticity 2-component evaluated at the positions of the input objects
Created on Oct 7, 2013 @author: Lukas Gamper
Bases: BasePlugin
Generating random Gaussian background noise for each pixel and adding the noise onto the image.
background_sigma – rms spread of (zero mean) Gaussian background noise
background_seed_offset – seed of the rng used to generate the background noies (optional)
Image with noise added
Adds noise to the image using a rms map. The map is memmapped and only read out in quadratic chunks to reduce the memory footprint.
ctx.image – Simulated image
ctx.params.maps_remote_dir – Path to fits-image containing the RMS of the noise in every pixel of the image
ctx.params.bkg_rms_file_name – Path to fits-image containing the RMS of the noise in every pixel of the image
ctx.params.bkg_noise_scale – Scale factor applied to the map
ctx.params.bkg_noise_amp – Amplitude factor applied to the map
Adds noise to the image assuming a Gaussian background model. The noise in every pixel is randomly drawn from a Gaussian
ctx.image – Simulated image
ctx.parameters.bkg_noise_amp – Center of the Gaussian distribution
ctx.parameters.background_sigma – RMS of the Gaussian distribution
Adds noise to the image using a rms map
ctx.image – Simulated image
ctx.params.maps_remote_dir – Path to fits-image containing the RMS of the noise in every pixel of the image
ctx.params.bkg_rms_file_name – Path to fits-image containing the RMS of the noise in every pixel of the image :param ctx.params.bkg_noise_scale: Scale factor applied to the map
ctx.params.bkg_noise_amp – Amplitude factor applied to the map
Created on Jan 5, 2016 @author: Tomasz Kacprzak
Perform sigma-clipping on the provided data.
This performs the sigma clipping algorithm - i.e. the data will be iterated over, each time rejecting points that are more than a specified number of standard deviations discrepant.
Note
scipy.stats.sigmaclip provides a subset of the functionality in this function.
data – array-like The data to be sigma-clipped (any shape).
sig – float The number of standard deviations (not variances) to use as the clipping limit.
iters – int or NoneThe number of iterations to perform clipping for, or None to clip until convergence is achieved (i.e. continue until the last iteration clips nothing).
cenfunc – callable The technique to compute the center for the clipping. Must be a callable that takes in a 1D data array and outputs the central value. Defaults to the median.
varfunc – callable The technique to compute the variance about the center. Must be a callable that takes in a 1D data array and outputs the width estimator that will be interpreted as a variance. Defaults to the variance.
maout – bool or ‘copy’ If True, a masked array will be returned. If the special string ‘inplace’, the masked array will contain the same array as data, otherwise the array data will be copied.
filtereddata : numpy.ndarray or numpy.masked.MaskedArray If maout is True, this is a masked array with a shape matching the input that is masked where the algorithm has rejected those values. Otherwise, a 1D array of values including only those that are not clipped.
mask : boolean array Only present if maout is False. A boolean array with a shape matching the input data that is False for rejected values and True for all others.
Examples
This will generate random variates from a Gaussian distribution and return only the points that are within 2 sample standard deviation from the median:
>>> from astropy.stats import sigma_clip
>>> from numpy.random import randn
>>> randvar = randn(10000)
>>> data,mask = sigma_clip(randvar, 2, 1)
This will clipping on a similar distribution, but for 3 sigma relative to the sample mean, will clip until converged, and produces a numpy.masked.MaskedArray:
>>> from astropy.stats import sigma_clip
>>> from numpy.random import randn
>>> from numpy import mean
>>> randvar = randn(10000)
>>> maskedarr = sigma_clip(randvar, 3, None, mean, maout=True)
Created on 04/2016 @author: Tomasz Kacprzak
Created on Aug 19, 2014 @author: Chihway Chang
Bases: BasePlugin
Convert integer photon counts into float ADU’s by multiplying the quantum efficiency and dividing gain.
gain – gain of CCD detector (e/ADU)
image that is rescaled to some specified zero point
Created on Jul 20, 2016 author: Tomasz Kacprzak
Bases: BasePlugin
Draw stars for the r-band from a catalog created using the Besancon model of the Milky Way.
besancon_cat_name – Path to the catalog of stars drawn from the model stored as fits-file. The catalog must contain a column called ‘r’ giving the magnitude of the stars in the r-band. Furthermore, the header of the HDU in which the catalog is stored must contain a field labeled ‘AREA’ which states the area (in sq. deg) the catalog covers.
seed – General seed.
star_num_seed_offset – Seed offset before number of stars is drawn.
stars_mag_min – Minimum magnitude of stars in the r-band.
stars_mag_max – Maximum magnitude of stars in the r-band.
star_dist_seed_offset – Seed offset before positions of stars are drawn.
star_nphot_seed_offset – Seed offset before numbers of photons are calculated for stars.
n_exp – Number of single exposures in coadded image.
magzero – Magnitude zeropoint.
gain – Gain in electrons per ADU.
exp_time_file_name – File name of an exposure time map.
size_x – Size of the image in x-direction.
size_y – Size of the image in y-direction.
maps_remote_dir – Remote directory where maps are stored.
ra_new
dec_new
dict_besancon_info
Simply load the pickle with maps, from par.besancon_map_path :return pickle with the Besancon simulation map model, with fields:
‘healpix_list’: list_df, ‘healpix_mask’: hp_map}
simulation_area - area in sq. deg corresponding to the simulation catalog covers
nside - resolution of simulation sampling
to a pixel on HEALPix grid with nside=nside
hp_map - HEALPix map showing the coverage of simulations, ring=False
Simply load the pickle with maps, from par.besancon_map_path :return pickle with the Besancon simulation map model, with fields:
‘healpix_list’: list_df, ‘healpix_mask’: hp_map}
simulation_area - area in sq. deg corresponding to the simulation catalog covers
nside - resolution of simulation sampling
HEALPix grid with nside=nside
hp_map - HEALPix map showing the coverage of simulations, ring=False
Created on Nov 24, 2013 @author: Claudio Bruderer
Bases: BasePlugin
Loads, or in case explicitly set or non-existent computes on-the-fly, the table with pre-computed values of the inverse gamma function in the range [0,1[ for different Sersic indexes in [0,10[ used in the render_galaxies.py-module to sample the radial cdf.
Optionally a new intrinsic_table can furthermore be saved. Desirably not overwriting the ones in res/intrinsictables/ unless specifically stated.
sersicprecision – 2**sersicpresicion points to interpolate the Sersic range [0,10]
gammaprecision – 2*(2**gammaprecision) to interpolate the range [0,1[ where the inverse cdf is evaluated
gammaprecisionhigh – Change of point density at 1-2**(-gammaprecisionhigh) (increased precision close to 1)
compute_gamma_table_onthefly – whether or not the interpolation table is computed on the fly
Table containing values of the inv gamma function for different Sersic values in [0,10] and values in [0,1[
Compute the table containing values of the inverse gamma function.
sersicprecision – 2**sersicpresicion points to interpolate the Sersic range [0,10]
gammaprecision – 2*(2**gammaprecision) to interpolate the range [0,1[ where the inverse cdf is evaluated
gammaprecisionhigh – Change of point density at 1-2**(-gammaprecisionhigh) (increased precision close to 1)
Table containing values
Load the table containing values of the inverse gamma function.
sersicprecision – 2**sersicpresicion points to interpolate the Sersic range [0,10]
gammaprecision – 2*(2**gammaprecision) to interpolate the range [0,1[ where the inverse cdf is evaluated
gammaprecisionhigh – Change of point density at 1-2**(-gammaprecisionhigh) (increased precision close to 1)
copy_to_cwd – Copy the table to the current working directory
Table containing values
Created on Apr 12, 2015 @author: Claudio Bruderer
Bases: BasePlugin
Matches a Source Extractor catalog to the input catalogs and adds all the input columns to the Source Extractor catalog.
Match UFig input positions and magnitudes to SExtractor output positions and magnitudes.
x_in – Input x-coordinates (in SExtractor convention)
y_in – Input y-coordinates (in SExtractor convention)
mag_in – Input magnitudes
x_out – Output x-coordinates
y_out – Output y-coordinates
mag_out – Output magnitudes
par.max_radius – Maximum distance between an input and a detected objects to classify as a match.
par.mag_diff – Maximum magnitude difference between an input and a detected object to classify as a match.
Indices linking detected to input objects.
Created on Dec 21, 2023 @author: Beatrice Moser
Bases: BasePlugin
Matches a Source Extractor catalog to the input catalogs and adds all the input columns to the Source Extractor catalog.
Match UFig input positions and magnitudes to SExtractor output positions and magnitudes.
x_in – Input x-coordinates (in SExtractor convention)
y_in – Input y-coordinates (in SExtractor convention)
mag_in – Input magnitudes
mag_out – Output magnitudes
par.mag_diff – Maximum magnitude difference between an input and a detected object to classify as a match.
Indices linking detected to input objects.
Created on May 3, 2016 author: Joerg Herbel
Bases: BasePlugin
Prepare for the rendering of multiple images. This plugin essentially allows to change the names of files used in the rendering of images in different bands by providing a format for the corresponding file names. This format specifies the way file names are obtained from the name of the tile in the sky and/or the filter band names. It contains ‘{}’ where the tile name and/or the filter band name have to be inserted to obtain the correct file name(s).
filters – List of names of filter bands used to render images, optional.
tile_name – Name of the tile in the sky corresponding to the images rendered in this run, optional.
image_name_dict – Dictionary of image names for each filter band used to render an image, optional.
image_name_format – Format of images names, used to obtain the image names from the name of the tile and the name(s) of the filter band(s), optional.
galaxy_catalog_name_dict – Dictionary of galaxy catalog names for each filter band used to render an image, optional.
galaxy_catalog_name_format – Format of galaxy catalog names, used to obtain the catalog names from the name of the tile and the name(s) of the filter band(s), optional.
star_catalog_name_dict – Dictionary of star catalog names for each filter band used to render an image.
star_catalog_name_format – Format of star catalog names, used to obtain the catalog names from the name of the tile and the name(s) of the filter band(s), optional.
besancon_cat_name – Name of a catalog of stars drawn from the Besancon model of the galaxy, optional.
besancon_cat_name_format – Format of the name of a catalog of stars drawn from the Besancon model, used to obtain the catalog name from the name of the tile, optional.
exp_time_file_name_dict – Dictionary of file names of maps of exposure times for each filter band used to render an image, optional.
exp_time_file_name_format – Format of file names of maps of exposure times, used to obtain the file names from the name of the tile and the name(s) of the filter band(s), optional.
bkg_rms_file_name_dict – Dictionary of file names of maps of the standard deviation of the background for each filter band used to render an image, optional.
bkg_rms_file_name_format – Format of file names of maps of the standard deviation of the background, used to obtain the file names from the name of the tile and the name(s) of the filter band(s), optional.
psf_maps_dict – Dictionary of file names of PSF maps for each filter band used to render an image, optional.
psf_maps_file_name_format – Format of file names of PSF maps, used to obtain the file names from the name of the tile and the name(s) of the filter band(s), optional.
sextractor_catalog_name_dict – Dictionary of SExtractor catalog names for each filter band used to render an image, optional.
sextractor_catalog_name_format – Format of SExtractor catalog names, used to obtain the catalog names from the name of the tile and the name(s) of the filter band(s), optional.
weight_image_dict – Dictionary of weight image names used by SExtractor for each filter band used to render an image, optional.
weight_image_format – Format of weight image names used by SExtractor, used to obtain the names from the name of the tile and the name(s) of the filter band(s), optional.
ctx.parameters with multi-band dictionaries modified accordingly.
Created on May 30, 2015 @author: Claudio Bruderer, adapted by Silvan Fischbacher
Bases: BasePlugin
Write star and galaxy catalogs to fits tables. These catalogs are the ufig input catalog, ie. the parameters directly associated with the image.
overwrite – whether to overwrite existing image
galaxy_catalog_name – name of output galaxy catalog
star_catalog_name – name of output star catalog
star and galaxy catalog
Created on Oct 7, 2013 @author: Lukas Gamper
Created on Jul 31, 2017 @author: Joerg Herbel
Bases: BasePlugin
Render stellar profiles photon-by-photon onto a pixelated grid.
Created on Oct 7, 2013 @author: Lukas Gamper
Bases: BasePlugin
Convolve the image with a Lanczos kernel to model the effect of correlated noise. The main effect of correlated noise modeled by this kernel is that coming from the coadding process.
lanczos_n – the order of lanczos function used to model the resampling
image after the lanczos convolution
Created on Jun 3, 2014 @author: Lukas Gamper
Bases: BasePlugin
Executes sextractor by spawning a subprocess.
:param image_name of image :param sextractor_binary: path to sextractor binary :param sextractor_config: c :param saturation_level: SATUR_LEVEL :param magzero_point: MAG_ZEROPOINT :param gain: GAIN :param sextractor_nnw: STARNNW_NAME :param sextractor_filter: FILTER_NAME :param sextractor_params: PARAMETERS_NAME :param sextractor_catalog_name: CATALOG_NAME :param sextractor_checkimages: CHECKIMAGE_TYPE :param sextractor_checkimages_suffixes: Suffixes to construct CHECKIMAGE_NAME from
sextractor_catalog_name
Created on Jul 12, 2016 @author: Joerg Herbel
Bases: BasePlugin
Run SExtractor in forced-photometry mode.
Construct a list of strings which make up a valid command line argument to call SExtractor.
binary_name – Path of SExtractor executable
image_name – Path(s) of image(s) on which SExtractor will run
config_name – Path of SExtractor configuration file
kwargs – Keyword arguments that can be converted to SExtractor command line arguments
Command to call SExtractor as a list of strings
Build an absolute path using the path of the SExtractor directory in UFig. In case the input is already a path (and not only a filename), it is left unchanged.
path – Input path
Absolute path
Construct a SExtractor command line argument from a keyword argument. The key of the keyword argument must be a valid SExtractor parameter (modulo upper cases). The value must convertible to a string. It can also be an iterable containing only objects that can be converted to a string.
key – Key
value – Value
SExtractor command line argument as a list in the form [-<PARAM_NAME>, VALUE]
Run SExtractor by spawning a subprocess.
binary_name – Path of SExtractor executable
image_name – Path(s) of image(s) on which SExtractor will run
config_name – Path of SExtractor configuration file
kwargs – Keyword arguments that can be converted to SExtractor command line arguments
Created on Oct 7, 2013 @author: Lukas Gamper
Bases: BasePlugin
For pixels that exceed the saturation flux, leak the photons in the column direction until all pixels are under the saturation level.
gain – gain of CCD detector (e/ADU)
size_x – size of image in x-direction (pixel)
size_y – size of image in y-direction (pixel)
saturation_level – saturation level in electrons
Created on Oct 7, 2013 @author: Lukas Gamper
Bases: BasePlugin
For pixels that exceed the saturation flux, leak the photons in the column direction until all pixels are under the saturation level.
gain – gain of CCD detector (e/ADU)
size_x – size of image in x-direction (pixel)
size_y – size of image in y-direction (pixel)
saturation_level – saturation level in electrons
Created on Feb 09, 2016 author: Joerg Herbel
Bases: BasePlugin
Set parameters to render an image according to the current filter band and multi-band dictionaries. The number of photons is also calculated here.
Bases: ValueError
Raised when more photons (for galaxies) than allowed by the input parameters are sampled
Convert the magnitude into a number of photons to be sampled later on
mag – magnitude of the objects
par – Container of ctx.parameters parameters (magzero & gain)
x – x-coordinate of objects (in pixels) (not used here)
y – y-coordinate of objects (in pixels) (not used here)
texp_img – Image contining the exposure times at each position (not used here)
n_exp – number of exposures
Number of photons
Convert the magnitude into a number of photons to be sampled later on
mag – magnitude of the objects
par – Container of ctx.parameters parameters (magzero & gain)
x – x-coordinate of objects (in pixels) (not used here)
y – y-coordinate of objects (in pixels) (not used here)
texp_img – Image contining the exposure times at each position (not used here)
n_exp – number of exposures
Number of photons
Convert the magnitude into a number of photons to be sampled later on
mag – magnitude of the objects
par – self.ctx.parameters; must contain: magzero: magnitude zero point of target image gain: gain of the target image exp_time_file_name: file name of the exposure time image maps_remote_dir: Remote directory images and maps are stored in if not at ‘res/maps/’
x – x-coordinate of objects (in pixels)
y – y-coordinate of objects (in pixels)
texp_img – Image contining the exposure times at each position
n_exp – number of exposures (not used here)
Number of photons
Convert the magnitude into a number of photons to be sampled later on
mag – magnitude of the objects
par – self.ctx.parameters; must contain: magzero: magnitude zero point of target image gain: gain of the target image exp_time_file_name: file name of the exposure time image maps_remote_dir: Remote directory images and maps are stored in if not at ‘res/maps/’
x – x-coordinate of objects (in pixels)
y – y-coordinate of objects (in pixels)
texp_img – Image contining the exposure times at each position
n_exp – number of exposures (not used here)
Number of photons
Created on Aug 2021 author: Tomasz Kacprzak
Created on Aug 2021 author: Silvan Fischbacher, Tomasz Kacprzak
Computes the average galaxy density weighted by magnitude and sizes to estimate the blending risk. The image is divided into bins and the value is computed for each bin.
cat – catalog
par – context parameters
catalog with additional column
“density_mag_weighted” and “density_size_weighted”
Add blending information to catalog estimating the flux at all positions.
cat – catalog
par – context parameters
catalog with blending information
Computes the average galaxy density weighted by magnitude and sizes to estimate the blending risk. The value is the same for all objects in the image.
cat – catalog
par – context parameters
catalog with additional column
“density_mag_weighted” and “density_size_weighted”
Computes the number of galaxies for different magnitude cuts. This can later be used to estimate the blending risk.
cat – catalog
par – context parameters
catalog with additional column “ngal_{}”.format(mag_cuts)
Add blending information to catalog estimating only the flux at the position of the objects.
cat – catalog
par – context parameters
catalog with blending information
Add no blending information to the catalog.
cat – catalog
par – context parameters
catalog with no blending information
Enrich the catalog with computed columns: absolute ellipticity, noise levels
cat – catalog
par – ctx parameters
catalog_precision – precision of the catalog
catalog with additional columns
Add additional columns to the star catalog such that it can be used the same way as the galaxy catalog
cat – catalog of stars
par – ctx parameters
catalog_precision – precision of the catalog
catalog of stars with additional columns and a list of the new column names
Estimates the flux of the image from catalog (with magnitude cut)
cat – catalog
imshape – shape of the image
max_mag – maximum magnitude that is considered for blending
n_half_light_radius – number of half light radii to consider for each galaxy
estimated flux of the image
Estimates the flux of the points of the image where the galaxies are located.
cat – catalog
estimated flux at the points of the galaxies
Get the indices of the pixels within an elliptical region and their distances from the center. The distance is normalized to true pixel distance in the elliptical coordinate system. If the radius is too small to include any pixel, the center pixel is returned.
x – x coordinate of the center of the ellipse
y – y coordinate of the center of the ellipse
r50 – (half light) radius of the ellipse
e1 – ellipticity component 1
e2 – ellipticity component 2
imshape – shape of the image
n_half_light_radius – number of half light radii to consider
pre_selected_indices – pre-selected indices of the image where the distance
should be calculated, tuple of (x, y) indices :return: indices of the pixels within the elliptical region and their distances from the center
Created on Oct 7, 2013 @author: Lukas Gamper
Bases: BasePlugin
Write a general ufig image into a FITS file with minimum basic header information.
Returns the seeing value of the simulated image.
ctx – Context
Seeing in pixels