LSSTApplications  18.0.0+106,18.0.0+50,19.0.0,19.0.0+1,19.0.0+10,19.0.0+11,19.0.0+13,19.0.0+17,19.0.0+2,19.0.0-1-g20d9b18+6,19.0.0-1-g425ff20,19.0.0-1-g5549ca4,19.0.0-1-g580fafe+6,19.0.0-1-g6fe20d0+1,19.0.0-1-g7011481+9,19.0.0-1-g8c57eb9+6,19.0.0-1-gb5175dc+11,19.0.0-1-gdc0e4a7+9,19.0.0-1-ge272bc4+6,19.0.0-1-ge3aa853,19.0.0-10-g448f008b,19.0.0-12-g6990b2c,19.0.0-2-g0d9f9cd+11,19.0.0-2-g3d9e4fb2+11,19.0.0-2-g5037de4,19.0.0-2-gb96a1c4+3,19.0.0-2-gd955cfd+15,19.0.0-3-g2d13df8,19.0.0-3-g6f3c7dc,19.0.0-4-g725f80e+11,19.0.0-4-ga671dab3b+1,19.0.0-4-gad373c5+3,19.0.0-5-ga2acb9c+2,19.0.0-5-gfe96e6c+2,w.2020.01
LSSTDataManagementBasePackage
Classes | Variables
lsst.pipe.tasks.insertFakes Namespace Reference

Classes

class  InsertFakesConnections
 

Variables

 radius
 

Variable Documentation

◆ radius

lsst.pipe.tasks.insertFakes.radius
raColName = pexConfig.Field(
    doc="RA column name used in the fake source catalog.",
    dtype=str,
    default="raJ2000",
)

decColName = pexConfig.Field(
    doc="Dec. column name used in the fake source catalog.",
    dtype=str,
    default="decJ2000",
)

doCleanCat = pexConfig.Field(
    doc="If true removes bad sources from the catalog.",
    dtype=bool,
    default=True,
)

diskHLR = pexConfig.Field(
    doc="Column name for the disk half light radius used in the fake source catalog.",
    dtype=str,
    default="DiskHalfLightRadius",
)

bulgeHLR = pexConfig.Field(
    doc="Column name for the bulge half light radius used in the fake source catalog.",
    dtype=str,
    default="BulgeHalfLightRadius",
)

magVar = pexConfig.Field(
    doc="The column name for the magnitude calculated taking variability into account. In the format "
        "``filter name``magVar, e.g. imagVar for the magnitude in the i band.",
    dtype=str,
    default="%smagVar",
)

nDisk = pexConfig.Field(
    doc="The column name for the sersic index of the disk component used in the fake source catalog.",
    dtype=str,
    default="disk_n",
)

nBulge = pexConfig.Field(
    doc="The column name for the sersic index of the bulge component used in the fake source catalog.",
    dtype=str,
    default="bulge_n",
)

aDisk = pexConfig.Field(
    doc="The column name for the semi major axis length of the disk component used in the fake source"
        "catalog.",
    dtype=str,
    default="a_d",
)

aBulge = pexConfig.Field(
    doc="The column name for the semi major axis length of the bulge component.",
    dtype=str,
    default="a_b",
)

bDisk = pexConfig.Field(
    doc="The column name for the semi minor axis length of the disk component.",
    dtype=str,
    default="b_d",
)

bBulge = pexConfig.Field(
    doc="The column name for the semi minor axis length of the bulge component used in the fake source "
        "catalog.",
    dtype=str,
    default="b_b",
)

paDisk = pexConfig.Field(
    doc="The column name for the PA of the disk component used in the fake source catalog.",
    dtype=str,
    default="pa_disk",
)

paBulge = pexConfig.Field(
    doc="The column name for the PA of the bulge component used in the fake source catalog.",
    dtype=str,
    default="pa_bulge",
)

fakeType = pexConfig.Field(
    doc="What type of fake catalog to use, snapshot (includes variability in the magnitudes calculated "
        "from the MJD of the image), static (no variability) or filename for a user defined fits"
        "catalog.",
    dtype=str,
    default="static",
)

calibFluxRadius = pexConfig.Field(
    doc="Radius for the calib flux (in pixels).",
    dtype=float,
    default=12.0,
)

coaddName = pexConfig.Field(
    doc="The name of the type of coadd used",
    dtype=str,
    default="deep",
)


class InsertFakesTask(PipelineTask, CmdLineTask):
_DefaultName = "insertFakes"
ConfigClass = InsertFakesConfig

def runDataRef(self, dataRef):
# To do: should it warn when asked to insert variable sources into the coadd

if self.config.fakeType == "static":
    fakeCat = dataRef.get("deepCoadd_fakeSourceCat").toDataFrame()
    # To do: DM-16254, the read and write of the fake catalogs will be changed once the new pipeline
    # task structure for ref cats is in place.
    self.fakeSourceCatType = "deepCoadd_fakeSourceCat"
else:
    fakeCat = Table.read(self.config.fakeType).to_pandas()

coadd = dataRef.get("deepCoadd")
wcs = coadd.getWcs()
photoCalib = coadd.getPhotoCalib()

imageWithFakes = self.run(fakeCat, coadd, wcs, photoCalib)

dataRef.put(imageWithFakes.imageWithFakes, "fakes_deepCoadd")

    def runQuantum(self, butlerQC, inputRefs, outputRefs):
inputs = butlerQC.get(inputRefs)
inputs["wcs"] = inputs["image"].getWcs()
inputs["photoCalib"] = inputs["image"].getPhotoCalib()

outputs = self.run(**inputs)
butlerQC.put(outputs, outputRefs)

    @classmethod
    def _makeArgumentParser(cls):
parser = pipeBase.ArgumentParser(name=cls._DefaultName)
parser.add_id_argument(name="--id", datasetType="deepCoadd",
                       help="data IDs for the deepCoadd, e.g. --id tract=12345 patch=1,2 filter=r",
                       ContainerClass=ExistingCoaddDataIdContainer)
return parser

    def run(self, fakeCat, image, wcs, photoCalib):

Definition at line 280 of file insertFakes.py.