LSSTApplications  17.0+124,17.0+14,17.0+73,18.0.0+37,18.0.0+80,18.0.0-4-g68ffd23+4,18.1.0-1-g0001055+12,18.1.0-1-g03d53ef+5,18.1.0-1-g1349e88+55,18.1.0-1-g2505f39+44,18.1.0-1-g5315e5e+4,18.1.0-1-g5e4b7ea+14,18.1.0-1-g7e8fceb+4,18.1.0-1-g85f8cd4+48,18.1.0-1-g8ff0b9f+4,18.1.0-1-ga2c679d+1,18.1.0-1-gd55f500+35,18.1.0-10-gb58edde+2,18.1.0-11-g0997b02+4,18.1.0-13-gfe4edf0b+12,18.1.0-14-g259bd21+21,18.1.0-19-gdb69f3f+2,18.1.0-2-g5f9922c+24,18.1.0-2-gd3b74e5+11,18.1.0-2-gfbf3545+32,18.1.0-26-g728bddb4+5,18.1.0-27-g6ff7ca9+2,18.1.0-3-g52aa583+25,18.1.0-3-g8ea57af+9,18.1.0-3-gb69f684+42,18.1.0-3-gfcaddf3+6,18.1.0-32-gd8786685a,18.1.0-4-gf3f9b77+6,18.1.0-5-g1dd662b+2,18.1.0-5-g6dbcb01+41,18.1.0-6-gae77429+3,18.1.0-7-g9d75d83+9,18.1.0-7-gae09a6d+30,18.1.0-9-gc381ef5+4,w.2019.45
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 279 of file insertFakes.py.