LSST Applications g044012fb7c+304891ab8a,g04a91732dc+4e1b87f259,g07dc498a13+f701f15b83,g114c6a66ad+c7887c1284,g1409bbee79+f701f15b83,g1a7e361dbc+f701f15b83,g1fd858c14a+6ebd102b59,g35bb328faa+0eb18584fe,g3bd4b5ce2c+e83bf4edc8,g4e0f332c67+976ceb6bc8,g53246c7159+0eb18584fe,g5477a8d5ce+51234355ef,g60b5630c4e+c7887c1284,g623d845a50+c7887c1284,g6f0c2978f1+98123c34b6,g71fabbc107+c7887c1284,g75b6c65c88+ce466f4385,g78460c75b0+85633614c8,g786e29fd12+02b9b86fc9,g8852436030+cfe5cf5b7b,g89139ef638+f701f15b83,g9125e01d80+0eb18584fe,g95236ca021+d4f98599f0,g974caa22f6+0eb18584fe,g989de1cb63+f701f15b83,g9f33ca652e+b4908f5dcd,gaaedd4e678+f701f15b83,gabe3b4be73+543c3c03c9,gace736f484+07e57cea59,gb1101e3267+487fd1b06d,gb58c049af0+492386d360,gc99c83e5f0+a513197d39,gcf25f946ba+cfe5cf5b7b,gd0fa69b896+babbe6e5fe,gd6cbbdb0b4+3fef02d88a,gde0f65d7ad+e8379653a2,ge278dab8ac+ae64226a64,gfba249425e+0eb18584fe,w.2025.07
LSST Data Management Base Package
Loading...
Searching...
No Matches
lsst::afw::fits::detail Namespace Reference

Classes

struct  Bitpix
 FITS BITPIX header value by C++ type. More...
 
struct  Bitpix< double >
 
struct  Bitpix< float >
 
struct  Bitpix< std::int16_t >
 
struct  Bitpix< std::int32_t >
 
struct  Bitpix< std::int64_t >
 
struct  Bitpix< std::uint16_t >
 
struct  Bitpix< std::uint32_t >
 
struct  Bitpix< std::uint64_t >
 
struct  Bitpix< std::uint8_t >
 
class  PixelArray
 Typed array of pixel values. More...
 
class  PixelArrayBase
 Abstract base class for an array of pixel values. More...
 

Functions

template<typename T >
std::shared_ptr< PixelArrayBasemakePixelArray (int bitpix, ndarray::Array< T, 1, 1 > const &array)
 Create a PixelArray suitable for an image with the nominated BITPIX.
 
template<typename T , typename... Args>
dafPlistPtr _readMetadata (T &&fitsparm, bool strip, Args... args)
 

Function Documentation

◆ _readMetadata()

template<typename T , typename... Args>
dafPlistPtr lsst::afw::fits::detail::_readMetadata ( T && fitsparm,
bool strip,
Args... args )

Definition at line 1688 of file fits.cc.

1688 {
1689 fits::Fits fp(fitsparm, "r", fits::Fits::AUTO_CLOSE | fits::Fits::AUTO_CHECK);
1690 fp.setHdu(args...);
1691 return readMetadata(fp, strip);
1692}
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
Definition fits.h:308
bool strip
Definition fits.cc:930

◆ makePixelArray()

template<typename T >
std::shared_ptr< PixelArrayBase > lsst::afw::fits::detail::makePixelArray ( int bitpix,
ndarray::Array< T, 1, 1 > const & array )

Create a PixelArray suitable for an image with the nominated BITPIX.

Parameters
[in]bitpixBits per pixel (0,8,16,32,64,-32,-64) for output.
[in]arrayArray with pixel values to convert.
Returns
A new PixelArray.

Definition at line 134 of file fitsCompression.h.

134 {
135 switch (bitpix) {
136 case 0:
137 return std::make_shared<PixelArray<T>>(array);
138 case 8:
140 case 16:
142 case 32:
144 case 64:
146 case -32:
148 case -64:
150 default:
152 os << "Unrecognized bitpix: " << bitpix;
154 }
155}
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition Exception.h:48
std::ostream * os
Definition Schema.cc:557
Reports invalid arguments.
Definition Runtime.h:66
T make_shared(T... args)