191 py::class_<MemFileManager> clsMemFileManager(mod,
"MemFileManager");
193 py::module::import(
"lsst.pex.exceptions");
195 lsst::pex::exceptions::python::declareException<FitsError, lsst::pex::exceptions::IoError>(
196 mod,
"FitsError",
"IoError");
200 clsMemFileManager.def(py::init<>());
201 clsMemFileManager.def(py::init<size_t>());
206 clsMemFileManager.def(
"getLength", &MemFileManager::getLength);
213 clsMemFileManager.def(
"readMetadata",
228 mod.def(
"readMetadata",
231 },
"fileName"_a,
"hdu"_a=
DEFAULT_HDU,
"strip"_a=
false);
std::shared_ptr< daf::base::PropertyList > combineMetadata(std::shared_ptr< const daf::base::PropertyList > first, std::shared_ptr< const daf::base::PropertyList > second)
Combine two sets of metadata in a FITS-appropriate fashion.
void declareImageWriteOptions(py::module &mod)
void declareImageScale(py::module &mod)
void declareImageScalingOptions(py::module &mod)
Lifetime-management for memory that goes into FITS memory files.
void * getData() const
Return the buffer.
ImageCompressionOptions::CompressionAlgorithm compressionAlgorithmFromString(std::string const &name)
Interpret compression algorithm expressed in string.
std::string scalingAlgorithmToString(ImageScalingOptions::ScalingAlgorithm algorithm)
Provide string version of compression algorithm.
std::string compressionAlgorithmToString(ImageCompressionOptions::CompressionAlgorithm algorithm)
Provide string version of compression algorithm.
void declareImageCompression(py::module &mod)
std::size_t getLength() const
Return the buffer length.
void setAllowImageCompression(bool allow)
bool getAllowImageCompression()
ImageScalingOptions::ScalingAlgorithm scalingAlgorithmFromString(std::string const &name)
Interpret scaling algorithm expressed in string.
std::string makeLimitedFitsHeader(lsst::daf::base::PropertySet const &metadata, std::set< std::string > const &excludeNames={})
Format a PropertySet into an FITS header string in a simplistic fashion.
void declareFits(py::module &mod)
const int DEFAULT_HDU
Specify that the default HDU should be read.
std::shared_ptr< daf::base::PropertyList > readMetadata(std::string const &fileName, int hdu=DEFAULT_HDU, bool strip=false)
Read FITS header.