ConsolidateInjectedCatalogsConfig#

class lsst.source.injection.ConsolidateInjectedCatalogsConfig(*args, **kw)#

Bases: PipelineTaskConfig

Base configuration for source injection tasks.

Attributes Summary

col_dec

Column name for declination (in degrees).

col_mag

Column name for magnitude.

col_ra

Column name for right ascension (in degrees).

col_source_type

Column name for the source type used in the input catalog.

columns_extra

Extra columns to be copied from the injection catalog (e.g. for shapes) (List, default []).

connections

Field which refers to a dynamically added configuration class which is based on a PipelineTaskConnections class.

get_catalogs_from_butler

Optional parameter to specify whether or not the input catalogs are loaded with a Butler.

groupIdKey

Key for the group id column to merge sources on, if any (str, default None)

injectionKey

True if the source was successfully injected.

injectionSizeKey

The size of the drawn injection box (str, default 'injection_draw_size')

isPatchInnerKey

True if source is in the inner region of a coadd patch.

isPrimaryKey

True if the source was successfully injected and is in both the inner region of a coadd patch and tract.

isTractInnerKey

True if source is in the inner region of a coadd tract.

pixel_match_radius

Radius for matching catalogs across different bands.

remove_patch_overlap_duplicates

Optional parameter to remove patch overlap duplicate sources.

saveLogOutput

Flag to enable/disable saving of log output for a task, enabled by default.

Methods Summary

consolidate_deepCoadd(catalog_dict, skymap, ...)

Consolidate all tables in catalog_dict into one table.

make_multiband_catalog(bands, catalog_dict, ...)

Combine multiple band-specific catalogs into one multiband catalog.

setPrimaryFlags(catalog, skyMap, tractInfo, ...)

Set isPrimary and related flags on sources.

Attributes Documentation

col_dec#

Column name for declination (in degrees). (str, default 'dec')

col_mag#

Column name for magnitude. (str, default 'mag')

col_ra#

Column name for right ascension (in degrees). (str, default 'ra')

col_source_type#

Column name for the source type used in the input catalog. Must match one of the surface brightness profiles defined by GalSim. For more information see the Galsim docs at https://galsim-developers.github.io/GalSim/_build/html/sb.html (str, default 'source_type')

columns_extra#

Extra columns to be copied from the injection catalog (e.g. for shapes) (List, default [])

connections: pexConfig.ConfigField#

Field which refers to a dynamically added configuration class which is based on a PipelineTaskConnections class.

get_catalogs_from_butler#

Optional parameter to specify whether or not the input catalogs are loaded with a Butler. (bool, default True)

groupIdKey#

Key for the group id column to merge sources on, if any (str, default None)

injectionKey#

True if the source was successfully injected. (str, default 'injection_flag')

injectionSizeKey#

The size of the drawn injection box (str, default 'injection_draw_size')

isPatchInnerKey#

True if source is in the inner region of a coadd patch. (str, default 'injected_isPatchInner')

isPrimaryKey#

True if the source was successfully injected and is in both the inner region of a coadd patch and tract. (str, default 'injected_isPrimary')

isTractInnerKey#

True if source is in the inner region of a coadd tract. (str, default 'injected_isTractInner')

pixel_match_radius#

Radius for matching catalogs across different bands. (float, default 0.1)

remove_patch_overlap_duplicates#

Optional parameter to remove patch overlap duplicate sources. (bool, default False)

saveLogOutput#

Flag to enable/disable saving of log output for a task, enabled by default. (bool, default True)

Methods Documentation

consolidate_deepCoadd(catalog_dict: dict[str, Table], skymap: BaseSkyMap, tract: int, copy_catalogs: bool = False) Table#

Consolidate all tables in catalog_dict into one table.

Parameters#

catalog_dict: dict

A dictionary with photometric bands for keys and astropy tables for items.

skymap: lsst.skymap.BaseSkyMap

A base skymap.

tract: int

The tract where sources have been injected.

copy_catalogs: bool

Whether to copy the input catalogs; if False, they will be modified in-place.

Returns#

multiband_catalog: astropy.table.Table

A single table containing all information of the separate tables in catalog_dict

make_multiband_catalog(bands: list, catalog_dict: dict[str, Table], match_radius: float, copy_catalogs: bool = False) Table#

Combine multiple band-specific catalogs into one multiband catalog.

Parameters#

bands: list

A list of string photometry bands.

catalog_dict: dict

A dictionary with photometric bands for keys and astropy tables for items.

match_radius: float

The radius for matching catalogs across bands in arcsec.

copy_catalogs: bool

Whether to copy the input catalogs; if False, they will be modified in-place.

Returns#

multiband_catalog: astropy.table.Table

A catalog with sources that have magnitude information across all bands.

setPrimaryFlags(catalog, skyMap, tractInfo, patches: list)#

Set isPrimary and related flags on sources.

For co-added imaging, the isPrimary flag returns True when an object has no children, is in the inner region of a coadd patch, is in the inner region of a coadd tract, and is not detected in a pseudo-filter (e.g., a sky_object). For single frame imaging, the isPrimary flag returns True when a source has no children and is not a sky source.

Parameters#

catalog: astropy.table.Table

A catalog of sources. Writes is-patch-inner, is-tract-inner, and is-primary flags.

skyMaplsst.skymap.BaseSkyMap

Sky tessellation object

tractInfolsst.skymap.TractInfo

Tract object

patcheslist

List of coadd patches