lsst.afw  15.0-18-g5f205baaa
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | List of all members
lsst::afw::image::CoaddInputs Class Reference

A simple Persistable struct containing ExposureCatalogs that record the inputs to a coadd. More...

#include <CoaddInputs.h>

Inheritance diagram for lsst::afw::image::CoaddInputs:
lsst::afw::table::io::PersistableFacade< CoaddInputs > lsst::afw::table::io::Persistable

Public Member Functions

 CoaddInputs ()
 Default constructor. More...
 
 CoaddInputs (table::Schema const &visitSchema, table::Schema const &ccdSchema)
 Construct new catalogs from the given schemas. More...
 
 CoaddInputs (table::ExposureCatalog const &visits_, table::ExposureCatalog const &ccds_)
 Construct from shallow copies of the given catalogs. More...
 
 CoaddInputs (CoaddInputs const &)
 
 CoaddInputs (CoaddInputs &&)
 
CoaddInputs & operator= (CoaddInputs const &)
 
CoaddInputs & operator= (CoaddInputs &&)
 
virtual ~CoaddInputs ()
 
virtual bool isPersistable () const
 Whether the object is in fact persistable - in this case, always true. More...
 
void writeFits (std::string const &fileName, std::string const &mode="w") const
 Write the object to a regular FITS file. More...
 
void writeFits (fits::MemFileManager &manager, std::string const &mode="w") const
 Write the object to a FITS image in memory. More...
 
void writeFits (fits::Fits &fitsfile) const
 Write the object to an already-open FITS object. More...
 

Static Public Member Functions

static std::shared_ptr< CoaddInputs > readFits (fits::Fits &fitsfile)
 Read an object from an already open FITS object. More...
 
static std::shared_ptr< CoaddInputs > readFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU)
 Read an object from a regular FITS file. More...
 
static std::shared_ptr< CoaddInputs > readFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU)
 Read an object from a FITS file in memory. More...
 

Public Attributes

table::ExposureCatalog visits
 
table::ExposureCatalog ccds
 

Protected Types

typedef io::OutputArchiveHandle OutputArchiveHandle
 

Protected Member Functions

virtual std::string getPersistenceName () const
 Return the unique name used to persist this object and look up its factory. More...
 
virtual std::string getPythonModule () const
 Return the fully-qualified Python module that should be imported to guarantee that its factory is registered. More...
 
virtual void write (OutputArchiveHandle &handle) const
 Write the object to one or more catalogs. More...
 

Detailed Description

A simple Persistable struct containing ExposureCatalogs that record the inputs to a coadd.

The visits catalog corresponds to what task code refers to as coaddTempExps, while the ccds catalog corresponds to individual input CCD images (calexps), and has a "visitId" column that points back to the visits catalog.

The records in the visits catalog will all have the same Wcs as the coadd, as they represent images that have already been warped to the coadd frame. Regardless of whether or not the coadd is PSF-matched, the visit record Psf will generally be CoaddPsfs (albeit single-depth ones, so they simply pick out the single non-coadd-Psf that is valid for each point).

Definition at line 48 of file CoaddInputs.h.

Member Typedef Documentation

◆ OutputArchiveHandle

typedef io::OutputArchiveHandle lsst::afw::table::io::Persistable::OutputArchiveHandle
protectedinherited

Definition at line 108 of file Persistable.h.

Constructor & Destructor Documentation

◆ CoaddInputs() [1/5]

lsst::afw::image::CoaddInputs::CoaddInputs ( )

Default constructor.

This simply calls the Catalog default constructors, which means the catalogs have no associated Table and hence cannot be used for anything until a valid Catalog is assigned to them.

Definition at line 52 of file CoaddInputs.cc.

◆ CoaddInputs() [2/5]

lsst::afw::image::CoaddInputs::CoaddInputs ( table::Schema const &  visitSchema,
table::Schema const &  ccdSchema 
)

Construct new catalogs from the given schemas.

Definition at line 54 of file CoaddInputs.cc.

◆ CoaddInputs() [3/5]

lsst::afw::image::CoaddInputs::CoaddInputs ( table::ExposureCatalog const &  visits_,
table::ExposureCatalog const &  ccds_ 
)

Construct from shallow copies of the given catalogs.

Definition at line 57 of file CoaddInputs.cc.

◆ CoaddInputs() [4/5]

lsst::afw::image::CoaddInputs::CoaddInputs ( CoaddInputs const &  )
default

◆ CoaddInputs() [5/5]

lsst::afw::image::CoaddInputs::CoaddInputs ( CoaddInputs &&  )
default

◆ ~CoaddInputs()

lsst::afw::image::CoaddInputs::~CoaddInputs ( )
virtualdefault

Member Function Documentation

◆ getPersistenceName()

std::string lsst::afw::image::CoaddInputs::getPersistenceName ( ) const
protectedvirtual

Return the unique name used to persist this object and look up its factory.

Must be less than ArchiveIndexSchema::MAX_NAME_LENGTH characters.

Reimplemented from lsst::afw::table::io::Persistable.

Definition at line 68 of file CoaddInputs.cc.

◆ getPythonModule()

std::string lsst::afw::image::CoaddInputs::getPythonModule ( ) const
protectedvirtual

Return the fully-qualified Python module that should be imported to guarantee that its factory is registered.

Must be less than ArchiveIndexSchema::MAX_MODULE_LENGTH characters.

Will be ignored if empty.

Reimplemented from lsst::afw::table::io::Persistable.

Definition at line 70 of file CoaddInputs.cc.

◆ isPersistable()

bool lsst::afw::image::CoaddInputs::isPersistable ( ) const
virtual

Whether the object is in fact persistable - in this case, always true.

To avoid letting coadd provenance prevent coadd code from running, if a nested Wcs or Psf is not persistable, it will silently not be saved, instead of throwing an exception.

Reimplemented from lsst::afw::table::io::Persistable.

Definition at line 66 of file CoaddInputs.cc.

◆ operator=() [1/2]

CoaddInputs & lsst::afw::image::CoaddInputs::operator= ( CoaddInputs const &  )
default

◆ operator=() [2/2]

CoaddInputs & lsst::afw::image::CoaddInputs::operator= ( CoaddInputs &&  )
default

◆ readFits() [1/3]

static std::shared_ptr<CoaddInputs > lsst::afw::table::io::PersistableFacade< CoaddInputs >::readFits ( fits::Fits &  fitsfile)
inlinestaticinherited

Read an object from an already open FITS object.

Parameters
[in]fitsfileFITS object to read from, already positioned at the desired HDU.

Definition at line 183 of file Persistable.h.

◆ readFits() [2/3]

static std::shared_ptr<CoaddInputs > lsst::afw::table::io::PersistableFacade< CoaddInputs >::readFits ( std::string const &  fileName,
int  hdu = fits::DEFAULT_HDU 
)
inlinestaticinherited

Read an object from a regular FITS file.

Parameters
[in]fileNameName of the file to read.
[in]hduHDU to read, where 0 is the primary. The special value of afw::fits::DEFAULT_HDU skips the primary HDU if it is empty.

Definition at line 194 of file Persistable.h.

◆ readFits() [3/3]

static std::shared_ptr<CoaddInputs > lsst::afw::table::io::PersistableFacade< CoaddInputs >::readFits ( fits::MemFileManager &  manager,
int  hdu = fits::DEFAULT_HDU 
)
inlinestaticinherited

Read an object from a FITS file in memory.

Parameters
[in]managerManager for the memory to read from.
[in]hduHDU to read, where 0 is the primary. The special value of afw::fits::DEFAULT_HDU skips the primary HDU if it is empty.

Definition at line 205 of file Persistable.h.

◆ write()

void lsst::afw::image::CoaddInputs::write ( OutputArchiveHandle &  handle) const
protectedvirtual

Write the object to one or more catalogs.

The handle object passed to this function provides an interface for adding new catalogs and adding nested objects to the same archive (while checking for duplicates). See OutputArchiveHandle for more information.

Reimplemented from lsst::afw::table::io::Persistable.

Definition at line 72 of file CoaddInputs.cc.

◆ writeFits() [1/3]

void lsst::afw::table::io::Persistable::writeFits ( std::string const &  fileName,
std::string const &  mode = "w" 
) const
inherited

Write the object to a regular FITS file.

Parameters
[in]fileNameName of the file to write to.
[in]modeIf "w", any existing file with the given name will be overwritten. If "a", new HDUs will be appended to an existing file.

Definition at line 24 of file Persistable.cc.

◆ writeFits() [2/3]

void lsst::afw::table::io::Persistable::writeFits ( fits::MemFileManager &  manager,
std::string const &  mode = "w" 
) const
inherited

Write the object to a FITS image in memory.

Parameters
[in]managerName of the file to write to.
[in]modeIf "w", any existing file with the given name will be overwritten. If "a", new HDUs will be appended to an existing file.

Definition at line 29 of file Persistable.cc.

◆ writeFits() [3/3]

void lsst::afw::table::io::Persistable::writeFits ( fits::Fits &  fitsfile) const
inherited

Write the object to an already-open FITS object.

Parameters
[in]fitsfileOpen FITS object to write to.

Definition at line 18 of file Persistable.cc.

Member Data Documentation

◆ ccds

table::ExposureCatalog lsst::afw::image::CoaddInputs::ccds

Definition at line 51 of file CoaddInputs.h.

◆ visits

table::ExposureCatalog lsst::afw::image::CoaddInputs::visits

Definition at line 50 of file CoaddInputs.h.


The documentation for this class was generated from the following files: