LSST Applications g0b6bd0c080+a72a5dd7e6,g1182afd7b4+2a019aa3bb,g17e5ecfddb+2b8207f7de,g1d67935e3f+06cf436103,g38293774b4+ac198e9f13,g396055baef+6a2097e274,g3b44f30a73+6611e0205b,g480783c3b1+98f8679e14,g48ccf36440+89c08d0516,g4b93dc025c+98f8679e14,g5c4744a4d9+a302e8c7f0,g613e996a0d+e1c447f2e0,g6c8d09e9e7+25247a063c,g7271f0639c+98f8679e14,g7a9cd813b8+124095ede6,g9d27549199+a302e8c7f0,ga1cf026fa3+ac198e9f13,ga32aa97882+7403ac30ac,ga786bb30fb+7a139211af,gaa63f70f4e+9994eb9896,gabf319e997+ade567573c,gba47b54d5d+94dc90c3ea,gbec6a3398f+06cf436103,gc6308e37c7+07dd123edb,gc655b1545f+ade567573c,gcc9029db3c+ab229f5caf,gd01420fc67+06cf436103,gd877ba84e5+06cf436103,gdb4cecd868+6f279b5b48,ge2d134c3d5+cc4dbb2e3f,ge448b5faa6+86d1ceac1d,gecc7e12556+98f8679e14,gf3ee170dca+25247a063c,gf4ac96e456+ade567573c,gf9f5ea5b4d+ac198e9f13,gff490e6085+8c2580be5c,w.2022.27
LSST Data Management Base Package
|
Namespaces | |
namespace | ds9 |
namespace | ds9Regions |
namespace | interface |
namespace | rgb |
namespace | utils |
namespace | virtualDevice |
Functions | |
PYBIND11_MODULE (_simpleFits, mod) | |
PYBIND11_MODULE (_rgb, mod) | |
template<typename ImageT > | |
void | replaceSaturatedPixels (ImageT &rim, ImageT &gim, ImageT &bim, int borderWidth, float saturatedPixelValue) |
template void | replaceSaturatedPixels (image::MaskedImage< float > &rim, image::MaskedImage< float > &gim, image::MaskedImage< float > &bim, int borderWidth, float saturatedPixelValue) |
template<class T > | |
std::pair< double, double > | getZScale (image::Image< T > const &image, int const nSamples=1000, double const contrast=0.25) |
Calculate an IRAF/ds9-style zscaling. More... | |
template std::pair< double, double > | getZScale (image::Image< std::uint16_t > const &image, int const nSamples, double const contrast) |
template std::pair< double, double > | getZScale (image::Image< float > const &image, int const nSamples, double const contrast) |
template<typename ImageT > | |
void | writeBasicFits (int fd, ImageT const &data, geom::SkyWcs const *Wcs, char const *title) |
template<typename ImageT > | |
void | writeBasicFits (std::string const &filename, ImageT const &data, geom::SkyWcs const *Wcs, char const *title) |
template<typename ImageT > | |
void | writeBasicFits (int fd, ImageT const &data, lsst::afw::geom::SkyWcs const *Wcs=nullptr, char const *title=nullptr) |
template<typename ImageT > | |
void | writeBasicFits (std::string const &filename, ImageT const &data, lsst::afw::geom::SkyWcs const *Wcs=nullptr, const char *title=nullptr) |
template std::pair< double, double > lsst::afw::display::getZScale | ( | image::Image< float > const & | image, |
int const | nSamples, | ||
double const | contrast | ||
) |
template std::pair< double, double > lsst::afw::display::getZScale | ( | image::Image< std::uint16_t > const & | image, |
int const | nSamples, | ||
double const | contrast | ||
) |
std::pair< double, double > lsst::afw::display::getZScale | ( | image::Image< T > const & | image, |
int const | nSamples = 1000 , |
||
double const | contrast = 0.25 |
||
) |
Calculate an IRAF/ds9-style zscaling.
To quote Frank Valdes (http://iraf.net/forum/viewtopic.php?showtopic=134139)
ZSCALE ALGORITHM
The zscale algorithm is designed to display the image values near the median image value without the time consuming process of computing a full image histogram. This is particularly useful for astronomical images which generally have a very peaked histogram corresponding to the background sky in direct imaging or the continuum in a two dimensional spectrum. The sample of pixels, specified by values greater than zero in the sample mask zmask or by an image section, is selected up to a maximum of nsample pixels. If a bad pixel mask is specified by the bpmask parameter then any pixels with mask values which are greater than zero are not counted in the sample. Only the first pixels up to the limit are selected where the order is by line beginning from the first line. If no mask is specified then a grid of pixels with even spacing along lines and columns that make up a number less than or equal to the maximum sample size is used. If a contrast of zero is specified (or the zrange flag is used and the image does not have a valid minimum/maximum value) then the minimum and maximum of the sample is used for the intensity mapping range. If the contrast is not zero the sample pixels are ranked in brightness to form the function I(i) where i is the rank of the pixel and I is its value. Generally the midpoint of this function (the median) is very near the peak of the image histogram and there is a well defined slope about the midpoint which is related to the width of the histogram. At the ends of the I(i) function there are a few very bright and dark pixels due to objects and defects in the field. To determine the slope a linear function is fit with iterative rejection; <code> I(i) = intercept + slope * (i - midpoint) </code> If more than half of the points are rejected then there is no well defined slope and the full range of the sample defines z1 and z2. Otherwise the endpoints of the linear function are used (provided they are within the original range of the sample): <code> z1 = I(midpoint) + (slope / contrast) * (1 - midpoint) z2 = I(midpoint) + (slope / contrast) * (npoints - midpoint) </code> As can be seen, the parameter contrast may be used to adjust the contrast produced by this algorithm.
image | The image we wish to stretch |
nSamples | Number of samples to use |
contrast | Stretch parameter; see description |
Definition at line 167 of file _scaling.cc.
lsst::afw::display::PYBIND11_MODULE | ( | _rgb | , |
mod | |||
) |
Definition at line 38 of file _rgb.cc.
lsst::afw::display::PYBIND11_MODULE | ( | _simpleFits | , |
mod | |||
) |
Definition at line 58 of file _simpleFits.cc.
template void lsst::afw::display::replaceSaturatedPixels | ( | image::MaskedImage< float > & | rim, |
image::MaskedImage< float > & | gim, | ||
image::MaskedImage< float > & | bim, | ||
int | borderWidth, | ||
float | saturatedPixelValue | ||
) |
void lsst::afw::display::replaceSaturatedPixels | ( | ImageT & | rim, |
ImageT & | gim, | ||
ImageT & | bim, | ||
int | borderWidth, | ||
float | saturatedPixelValue | ||
) |
Definition at line 32 of file _saturated.cc.
void lsst::afw::display::writeBasicFits | ( | int | fd, |
ImageT const & | data, | ||
geom::SkyWcs const * | Wcs, | ||
char const * | title | ||
) |
Definition at line 356 of file simpleFits.cc.
void lsst::afw::display::writeBasicFits | ( | int | fd, |
ImageT const & | data, | ||
lsst::afw::geom::SkyWcs const * | Wcs = nullptr , |
||
char const * | title = nullptr |
||
) |
void lsst::afw::display::writeBasicFits | ( | std::string const & | filename, |
ImageT const & | data, | ||
geom::SkyWcs const * | Wcs, | ||
char const * | title | ||
) |
Definition at line 442 of file simpleFits.cc.
void lsst::afw::display::writeBasicFits | ( | std::string const & | filename, |
ImageT const & | data, | ||
lsst::afw::geom::SkyWcs const * | Wcs = nullptr , |
||
const char * | title = nullptr |
||
) |