LSST Applications g0265f82a02+c6dfa2ddaf,g1162b98a3f+ffe7eabc7e,g2079a07aa2+1b2e822518,g2bbee38e9b+c6dfa2ddaf,g337abbeb29+c6dfa2ddaf,g36da64cc00+ea84795170,g3ddfee87b4+955a963fd8,g50ff169b8f+2eb0e556e8,g52b1c1532d+90ebb246c7,g555ede804d+955a963fd8,g591dd9f2cf+bac198a2cb,g5ec818987f+420292cfeb,g858d7b2824+d6c9a0a3b8,g876c692160+aabc49a3c3,g8a8a8dda67+90ebb246c7,g8cdfe0ae6a+4fd9e222a8,g99cad8db69+e6cd765486,g9ddcbc5298+a1346535a5,ga1e77700b3+df8f93165b,ga8c6da7877+acd47f83f4,gae46bcf261+c6dfa2ddaf,gb0e22166c9+8634eb87fb,gb3f2274832+12c8382528,gba4ed39666+1ac82b564f,gbb8dafda3b+0574160a1f,gbeb006f7da+dea2fbb49f,gc28159a63d+c6dfa2ddaf,gc86a011abf+d6c9a0a3b8,gcf0d15dbbd+955a963fd8,gdaeeff99f8+1cafcb7cd4,gdc0c513512+d6c9a0a3b8,ge79ae78c31+c6dfa2ddaf,geb67518f79+ba1859f325,gee10cc3b42+90ebb246c7,gf1cff7945b+d6c9a0a3b8,w.2024.13
LSST Data Management Base Package
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
lsst::afw::cameraGeom::Amplifier Class Referenceabstract

Geometry and electronic information about raw amplifier images. More...

#include <Amplifier.h>

Inheritance diagram for lsst::afw::cameraGeom::Amplifier:
lsst::afw::cameraGeom::Amplifier::Builder

Classes

class  Builder
 A mutable Amplifier subclass class that can be used to incrementally construct or modify Amplifiers. More...
 
struct  Fields
 

Public Member Functions

virtual ~Amplifier () noexcept=default
 
void toRecord (table::BaseRecord &record) const
 Copy the Amplifier's fields into the given record.
 
Builder rebuild () const
 Return a Builder object initialized with the fields of this.
 
std::string getName () const
 Name of the amplifier.
 
lsst::geom::Box2I getBBox () const
 Bounding box of amplifier pixels in the trimmed, assembled image.
 
double getGain () const
 Amplifier gain in e-/ADU.
 
double getReadNoise () const
 Amplifier read noise, in e-.
 
double getSaturation () const
 Level in ADU above which pixels are considered saturated; use nan if no such level applies.
 
double getSuspectLevel () const
 Level in ADU above which pixels are considered suspicious, meaning they may be affected by unknown systematics; for example if non-linearity corrections above a certain level are unstable then that would be a useful value for suspectLevel.
 
ReadoutCorner getReadoutCorner () const
 Readout corner in the trimmed, assembled image.
 
ndarray::Array< double const, 1, 1 > getLinearityCoeffs () const
 Vector of linearity coefficients.
 
std::string getLinearityType () const
 Name of linearity parameterization.
 
double getLinearityThreshold () const
 Level in ADU above which linearity should be applied.
 
double getLinearityMaximum () const
 Level in ADU above which the linearity relation is poorly defined.
 
std::string getLinearityUnits () const
 Units for the input to the linearity relation (DN).
 
lsst::geom::Box2I getRawBBox () const
 Bounding box of the untrimmed amplifier in the image to which it is attached, which is assumed to be untrimmed.
 
lsst::geom::Box2I getRawDataBBox () const
 Bounding box of amplifier data pixels in the image to which it is attached, which is assumed to be untrimmed.
 
bool getRawFlipX () const
 Is this amplifier (and the image to which it is attached) flipped in the X direction, relative to the physical orientation used for assembled (but still untrimmed) raws?
 
bool getRawFlipY () const
 Is this amplifier (and the image to which it is attached) flipped in the Y direction, relative to the physical orientation used for assembled (but still untrimmed) raws?
 
lsst::geom::Extent2I getRawXYOffset () const
 Offset in transformation from this amplifier (and the image to which it is attached) to trimmed, assembled post-ISR image: final xy0 - current xy0.
 
lsst::geom::Box2I getRawHorizontalOverscanBBox () const
 The bounding box of horizontal overscan pixels in the image to which it is attached, which is assumed to be untrimmed.
 
lsst::geom::Box2I getRawVerticalOverscanBBox () const
 The bounding box of vertical overscan pixels in the image to which it is attached, which is assumed to be untrimmed.
 
lsst::geom::Box2I getRawPrescanBBox () const
 The bounding box of (horizontal) prescan pixels in the image to which it is attached, which is assumed to be untrimmed.
 
lsst::geom::Box2I getRawSerialOverscanBBox () const
 The bounding box of serial overscan pixels (equivalent to horizontal overscan pixels) in the image to which it is attached, which is assumed to be untrimmed.
 
lsst::geom::Box2I getRawParallelOverscanBBox () const
 The bounding box of parallel overscan pixels (equivalent to vertical overscan pixels) in the image to which it is attached, which is assumed to be untrimmed.
 
lsst::geom::Box2I getRawSerialPrescanBBox () const
 The bounding box of horizontal/serial prescan pixels in the image to which it is attached, which is assumed to be untrimmed.
 
lsst::geom::Box2I getRawHorizontalPrescanBBox () const
 The bounding box of horizontal/serial prescan pixels in the image to which it is attached, which is assumed to be untrimmed.
 

Static Public Member Functions

static table::Schema getRecordSchema ()
 Return the schema used in the afw.table representation of amplifiers.
 

Protected Member Functions

 Amplifier ()=default
 
 Amplifier (Amplifier const &)=default
 
 Amplifier (Amplifier &&)=default
 
Amplifieroperator= (Amplifier const &)=default
 
Amplifieroperator= (Amplifier &&)=default
 
virtual Fields const & getFields () const =0
 

Detailed Description

Geometry and electronic information about raw amplifier images.

The Amplifier class itself is an abstract base class that provides no mutation or copy interfaces. Typically Amplifiers are constructed via the Builder subclass, which can produce a shared_ptr to an immutable Amplifier instance.

Here is a pictorial example showing the meaning of flipX and flipY:

    CCD with 4 amps        Desired assembled output      Use these parameters

    --x         x--            y
   |  amp1    amp2 |           |                               flipX       flipY
   y               y           |                       amp1    False       True
                               | CCD image             amp2    True        True
   y               y           |                       amp3    False       False
   |  amp3    amp4 |           |                       amp4    True        False
    --x         x--             ----------- x
Note
  • All bounding boxes are parent boxes with respect to the raw image.
  • The overscan and prescan bounding boxes represent the full regions; unusable regions are set via ISR configuration parameters.
  • xyOffset is not used for instrument signature removal (ISR); it is intended for use by display utilities. It supports construction of a raw CCD image in the case that raw data is provided as individual amplifier images (which is uncommon):
    • Use 0,0 for cameras that supply raw data as a raw CCD image (most cameras)
    • Use nonzero for cameras that supply raw data as separate amplifier images with xy0=0,0 (LSST)
  • This design assumes assembled X is always +/- raw X, which we require for CCDs (so that bleed trails are always along the Y axis).

Definition at line 86 of file Amplifier.h.

Constructor & Destructor Documentation

◆ ~Amplifier()

virtual lsst::afw::cameraGeom::Amplifier::~Amplifier ( )
virtualdefaultnoexcept

◆ Amplifier() [1/3]

lsst::afw::cameraGeom::Amplifier::Amplifier ( )
protecteddefault

◆ Amplifier() [2/3]

lsst::afw::cameraGeom::Amplifier::Amplifier ( Amplifier const & )
protecteddefault

◆ Amplifier() [3/3]

lsst::afw::cameraGeom::Amplifier::Amplifier ( Amplifier && )
protecteddefault

Member Function Documentation

◆ getBBox()

lsst::geom::Box2I lsst::afw::cameraGeom::Amplifier::getBBox ( ) const
inline

Bounding box of amplifier pixels in the trimmed, assembled image.

Definition at line 115 of file Amplifier.h.

115{ return getFields().bbox; }
virtual Fields const & getFields() const =0

◆ getFields()

virtual Fields const & lsst::afw::cameraGeom::Amplifier::getFields ( ) const
protectedpure virtual

◆ getGain()

double lsst::afw::cameraGeom::Amplifier::getGain ( ) const
inline

Amplifier gain in e-/ADU.

Definition at line 118 of file Amplifier.h.

◆ getLinearityCoeffs()

ndarray::Array< double const, 1, 1 > lsst::afw::cameraGeom::Amplifier::getLinearityCoeffs ( ) const
inline

Vector of linearity coefficients.

Definition at line 142 of file Amplifier.h.

142{ return getFields().linearityCoeffs; }
ndarray::Array< double const, 1, 1 > linearityCoeffs
Definition Amplifier.h:272

◆ getLinearityMaximum()

double lsst::afw::cameraGeom::Amplifier::getLinearityMaximum ( ) const
inline

Level in ADU above which the linearity relation is poorly defined.

Should be set to the saturation level if no other value is known.

Definition at line 156 of file Amplifier.h.

◆ getLinearityThreshold()

double lsst::afw::cameraGeom::Amplifier::getLinearityThreshold ( ) const
inline

Level in ADU above which linearity should be applied.

This should be set to 0.0 if no other value is known.

Definition at line 150 of file Amplifier.h.

◆ getLinearityType()

std::string lsst::afw::cameraGeom::Amplifier::getLinearityType ( ) const
inline

Name of linearity parameterization.

Definition at line 145 of file Amplifier.h.

◆ getLinearityUnits()

std::string lsst::afw::cameraGeom::Amplifier::getLinearityUnits ( ) const
inline

Units for the input to the linearity relation (DN).

Definition at line 159 of file Amplifier.h.

◆ getName()

std::string lsst::afw::cameraGeom::Amplifier::getName ( ) const
inline

Name of the amplifier.

Definition at line 112 of file Amplifier.h.

◆ getRawBBox()

lsst::geom::Box2I lsst::afw::cameraGeom::Amplifier::getRawBBox ( ) const
inline

Bounding box of the untrimmed amplifier in the image to which it is attached, which is assumed to be untrimmed.

This attribute should never be accessed on an amplifier attached to a trimmed image.

Definition at line 168 of file Amplifier.h.

168{ return getFields().rawBBox; }

◆ getRawDataBBox()

lsst::geom::Box2I lsst::afw::cameraGeom::Amplifier::getRawDataBBox ( ) const
inline

Bounding box of amplifier data pixels in the image to which it is attached, which is assumed to be untrimmed.

This attribute should never be accessed on an amplifier attached to a trimmed image.

Definition at line 177 of file Amplifier.h.

177{ return getFields().rawDataBBox; }

◆ getRawFlipX()

bool lsst::afw::cameraGeom::Amplifier::getRawFlipX ( ) const
inline

Is this amplifier (and the image to which it is attached) flipped in the X direction, relative to the physical orientation used for assembled (but still untrimmed) raws?

Definition at line 184 of file Amplifier.h.

◆ getRawFlipY()

bool lsst::afw::cameraGeom::Amplifier::getRawFlipY ( ) const
inline

Is this amplifier (and the image to which it is attached) flipped in the Y direction, relative to the physical orientation used for assembled (but still untrimmed) raws?

Definition at line 191 of file Amplifier.h.

◆ getRawHorizontalOverscanBBox()

lsst::geom::Box2I lsst::afw::cameraGeom::Amplifier::getRawHorizontalOverscanBBox ( ) const
inline

The bounding box of horizontal overscan pixels in the image to which it is attached, which is assumed to be untrimmed.

This attribute should never be accessed on an amplifier attached to a trimmed image.

Definition at line 207 of file Amplifier.h.

◆ getRawHorizontalPrescanBBox()

lsst::geom::Box2I lsst::afw::cameraGeom::Amplifier::getRawHorizontalPrescanBBox ( ) const
inline

The bounding box of horizontal/serial prescan pixels in the image to which it is attached, which is assumed to be untrimmed.

This attribute should never be accessed on an amplifier attached to a trimmed image. This duplicates the getRawPrescanBBox method for legacy reasons.

Definition at line 260 of file Amplifier.h.

260{ return getFields().rawPrescanBBox; }

◆ getRawParallelOverscanBBox()

lsst::geom::Box2I lsst::afw::cameraGeom::Amplifier::getRawParallelOverscanBBox ( ) const
inline

The bounding box of parallel overscan pixels (equivalent to vertical overscan pixels) in the image to which it is attached, which is assumed to be untrimmed.

This attribute should never be accessed on an amplifier attached to a trimmed image. This duplicates the getRawVerticalOverscanBBox method for legacy reasons.

Definition at line 247 of file Amplifier.h.

◆ getRawPrescanBBox()

lsst::geom::Box2I lsst::afw::cameraGeom::Amplifier::getRawPrescanBBox ( ) const
inline

The bounding box of (horizontal) prescan pixels in the image to which it is attached, which is assumed to be untrimmed.

This attribute should never be accessed on an amplifier attached to a trimmed image.

Definition at line 225 of file Amplifier.h.

225{ return getFields().rawPrescanBBox; }

◆ getRawSerialOverscanBBox()

lsst::geom::Box2I lsst::afw::cameraGeom::Amplifier::getRawSerialOverscanBBox ( ) const
inline

The bounding box of serial overscan pixels (equivalent to horizontal overscan pixels) in the image to which it is attached, which is assumed to be untrimmed.

This attribute should never be accessed on an amplifier attached to a trimmed image. This duplicates the getRawHorizontalOverscanBBox method for legacy reasons.

Definition at line 236 of file Amplifier.h.

◆ getRawSerialPrescanBBox()

lsst::geom::Box2I lsst::afw::cameraGeom::Amplifier::getRawSerialPrescanBBox ( ) const
inline

The bounding box of horizontal/serial prescan pixels in the image to which it is attached, which is assumed to be untrimmed.

This attribute should never be accessed on an amplifier attached to a trimmed image. This duplicates the getRawPrescanBBox method for legacy reasons.

Definition at line 257 of file Amplifier.h.

257{ return getFields().rawPrescanBBox; }

◆ getRawVerticalOverscanBBox()

lsst::geom::Box2I lsst::afw::cameraGeom::Amplifier::getRawVerticalOverscanBBox ( ) const
inline

The bounding box of vertical overscan pixels in the image to which it is attached, which is assumed to be untrimmed.

This attribute should never be accessed on an amplifier attached to a trimmed image.

Definition at line 216 of file Amplifier.h.

◆ getRawXYOffset()

lsst::geom::Extent2I lsst::afw::cameraGeom::Amplifier::getRawXYOffset ( ) const
inline

Offset in transformation from this amplifier (and the image to which it is attached) to trimmed, assembled post-ISR image: final xy0 - current xy0.

Definition at line 198 of file Amplifier.h.

198{ return getFields().rawXYOffset; }

◆ getReadNoise()

double lsst::afw::cameraGeom::Amplifier::getReadNoise ( ) const
inline

Amplifier read noise, in e-.

Definition at line 121 of file Amplifier.h.

◆ getReadoutCorner()

ReadoutCorner lsst::afw::cameraGeom::Amplifier::getReadoutCorner ( ) const
inline

Readout corner in the trimmed, assembled image.

Definition at line 139 of file Amplifier.h.

◆ getRecordSchema()

table::Schema lsst::afw::cameraGeom::Amplifier::getRecordSchema ( )
static

Return the schema used in the afw.table representation of amplifiers.

Definition at line 267 of file Amplifier.cc.

267 {
268 return RecordSchemaHelper::getMinimal().schema;
269}

◆ getSaturation()

double lsst::afw::cameraGeom::Amplifier::getSaturation ( ) const
inline

Level in ADU above which pixels are considered saturated; use nan if no such level applies.

Definition at line 127 of file Amplifier.h.

◆ getSuspectLevel()

double lsst::afw::cameraGeom::Amplifier::getSuspectLevel ( ) const
inline

Level in ADU above which pixels are considered suspicious, meaning they may be affected by unknown systematics; for example if non-linearity corrections above a certain level are unstable then that would be a useful value for suspectLevel.

Use nan if no such level applies.

Definition at line 136 of file Amplifier.h.

◆ operator=() [1/2]

Amplifier & lsst::afw::cameraGeom::Amplifier::operator= ( Amplifier && )
protecteddefault

◆ operator=() [2/2]

Amplifier & lsst::afw::cameraGeom::Amplifier::operator= ( Amplifier const & )
protecteddefault

◆ rebuild()

Amplifier::Builder lsst::afw::cameraGeom::Amplifier::rebuild ( ) const

Return a Builder object initialized with the fields of this.

This is simply a shortcut for Amplifier::Builder(*this).

Definition at line 271 of file Amplifier.cc.

271{ return Builder(*this); }

◆ toRecord()

void lsst::afw::cameraGeom::Amplifier::toRecord ( table::BaseRecord & record) const

Copy the Amplifier's fields into the given record.

Parameters
[out]recordRecord to modify. record.getSchema().contains(this->getRecordSchema()) must be true.

Definition at line 322 of file Amplifier.cc.

322 {
323 auto const helper = RecordSchemaHelper(record.getSchema());
324 auto const & fields = getFields();
325 record.set(helper.name, fields.name);
326 record.set(helper.bbox, fields.bbox);
327 record.set(helper.gain, fields.gain);
328 record.set(helper.readNoise, fields.readNoise);
329 record.set(helper.saturation, fields.saturation);
330 record.set(helper.suspectLevel, fields.suspectLevel);
331 record.set(helper.readoutCorner, static_cast<int>(fields.readoutCorner));
332 ndarray::Array<double, 1, 1> coeffs = ndarray::copy(fields.linearityCoeffs);
333 record.set(helper.linearityCoeffs, coeffs);
334 record.set(helper.linearityType, fields.linearityType);
335 record.set(helper.rawBBox, fields.rawBBox);
336 record.set(helper.rawDataBBox, fields.rawDataBBox);
337 record.set(helper.rawFlipX, fields.rawFlipX);
338 record.set(helper.rawFlipY, fields.rawFlipY);
339 record.set(helper.rawXYOffset, lsst::geom::Point2I(fields.rawXYOffset));
340 record.set(helper.rawHorizontalOverscanBBox, fields.rawHorizontalOverscanBBox);
341 record.set(helper.rawVerticalOverscanBBox, fields.rawVerticalOverscanBBox);
342 record.set(helper.rawPrescanBBox, fields.rawPrescanBBox);
343 // Set not-always-present fields only when present.
344 auto setIfValid = [&record](auto value, auto & key) {
345 if (key.isValid()) {
346 record.set(key, value);
347 }
348 };
349 setIfValid(fields.linearityThreshold, helper.linearityThreshold);
350 setIfValid(fields.linearityMaximum, helper.linearityMaximum);
351 setIfValid(fields.linearityUnits, helper.linearityUnits);
352}

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