LSST Applications  21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
Classes | Typedefs | Functions | Variables
lsst::afw::image::detail Namespace Reference

Classes

class  MaskDict
 
class  StorableMap
 A map of Storable supporting strongly-typed access. More...
 
struct  basic_tag
 Base image tag. More...
 
struct  Image_tag
 tag for an Image More...
 
struct  image_traits
 traits class for image categories More...
 
struct  Mask_tag
 tag for a Mask More...
 
struct  MaskedImage_tag
 A traits class for MaskedImage. More...
 
struct  MaskedImagePixel_tag
 A class used to identify classes that represent MaskedImage pixels. More...
 

Typedefs

using MaskPlaneDict = std::map< std::string, int >
 

Functions

int stripFilterKeywords (std::shared_ptr< lsst::daf::base::PropertySet > metadata)
 Remove Filter-related keywords from the metadata. More...
 
void setVisitInfoMetadata (daf::base::PropertyList &metadata, VisitInfo const &visitInfo)
 Set FITS metadata from a VisitInfo. More...
 
int stripVisitInfoKeywords (daf::base::PropertySet &metadata)
 Remove VisitInfo-related keywords from the metadata. More...
 

Variables

std::string const wcsNameForXY0 = "A"
 
std::string const fitsFile_RE = "\\.fits(\\.[fg]z)?$"
 regexp to identify when MaskedImages should be written as MEFs More...
 
std::string const compressedFileNoMEF_RE = "(\\.gz)$"
 regexp to identify compressed files that we can't write MEFs to More...
 

Typedef Documentation

◆ MaskPlaneDict

Definition at line 58 of file Mask.h.

Function Documentation

◆ setVisitInfoMetadata()

void lsst::afw::image::detail::setVisitInfoMetadata ( daf::base::PropertyList metadata,
VisitInfo const &  visitInfo 
)

Set FITS metadata from a VisitInfo.

Parameters
[in,out]metadataFITS keyword metadata to set
[in]visitInfoinstance of VisitInfo from which to set metadata

Definition at line 363 of file VisitInfo.cc.

363  {
364  if (visitInfo.getExposureId() != 0) {
365  metadata.set("EXPID", visitInfo.getExposureId());
366  }
367  setDouble(metadata, "EXPTIME", visitInfo.getExposureTime(), "Exposure time (sec)");
368  setDouble(metadata, "DARKTIME", visitInfo.getDarkTime(), "Time from CCD flush to readout (sec)");
369  if (visitInfo.getDate().isValid()) {
370  metadata.set("DATE-AVG", visitInfo.getDate().toString(::DateTime::TAI),
371  "TAI date at middle of observation");
372  metadata.set("TIMESYS", "TAI");
373  }
374  setDouble(metadata, "MJD-AVG-UT1", visitInfo.getUt1(), "UT1 MJD date at ctr of obs");
375  setAngle(metadata, "AVG-ERA", visitInfo.getEra(), "Earth rot ang at ctr of obs (deg)");
376  auto boresightRaDec = visitInfo.getBoresightRaDec();
377  setAngle(metadata, "BORE-RA", boresightRaDec[0], "ICRS RA (deg) at boresight");
378  setAngle(metadata, "BORE-DEC", boresightRaDec[1], "ICRS Dec (deg) at boresight");
379  auto boresightAzAlt = visitInfo.getBoresightAzAlt();
380  setAngle(metadata, "BORE-AZ", boresightAzAlt[0], "Refr app topo az (deg) at bore");
381  setAngle(metadata, "BORE-ALT", boresightAzAlt[1], "Refr app topo alt (deg) at bore");
382  setDouble(metadata, "BORE-AIRMASS", visitInfo.getBoresightAirmass(), "Airmass at boresight");
383  setAngle(metadata, "BORE-ROTANG", visitInfo.getBoresightRotAngle(), "Rotation angle (deg) at boresight");
384  metadata.set("ROTTYPE", rotTypeStrFromEnum(visitInfo.getRotType()), "Type of rotation angle");
385  auto observatory = visitInfo.getObservatory();
386  setAngle(metadata, "OBS-LONG", observatory.getLongitude(), "Telescope longitude (+E, deg)");
387  setAngle(metadata, "OBS-LAT", observatory.getLatitude(), "Telescope latitude (deg)");
388  setDouble(metadata, "OBS-ELEV", observatory.getElevation(), "Telescope elevation (m)");
389  auto weather = visitInfo.getWeather();
390  setDouble(metadata, "AIRTEMP", weather.getAirTemperature(), "Outside air temperature (C)");
391  setDouble(metadata, "AIRPRESS", weather.getAirPressure(), "Outdoor air pressure (P)");
392  setDouble(metadata, "HUMIDITY", weather.getHumidity(), "Relative humidity (%)");
393  setString(metadata, "INSTRUMENT", visitInfo.getInstrumentLabel(),
394  "Short name of the instrument that took this data");
395  if (visitInfo.getId() != 0) {
396  metadata.set("IDNUM", visitInfo.getId(), "identifier of this full focal plane exposure");
397  }
398 }
table::CoordKey boresightRaDec
Definition: VisitInfo.cc:205
bool isValid() const noexcept
Return true if the key was initialized to valid offset.
Definition: Key.h:97
Key< int > visitInfo
Definition: Exposure.cc:70

◆ stripFilterKeywords()

int lsst::afw::image::detail::stripFilterKeywords ( std::shared_ptr< lsst::daf::base::PropertySet metadata)

Remove Filter-related keywords from the metadata.

Parameters
[in,out]metadataMetadata to be stripped
Returns
Number of keywords stripped

Definition at line 130 of file Filter.cc.

130  {
131  int nstripped = 0;
132 
133  std::string key = "FILTER";
134  if (metadata->exists(key)) {
135  metadata->remove(key);
136  nstripped++;
137  }
138 
139  return nstripped;
140 }
virtual void remove(std::string const &name)
Remove all values for a property name (possibly hierarchical).
bool exists(std::string const &name) const
Determine if a name (possibly hierarchical) exists.

◆ stripVisitInfoKeywords()

int lsst::afw::image::detail::stripVisitInfoKeywords ( daf::base::PropertySet metadata)

Remove VisitInfo-related keywords from the metadata.

Parameters
[in,out]metadataFITS keyword metadata
Returns
Number of keywords stripped

Definition at line 346 of file VisitInfo.cc.

346  {
347  int nstripped = 0;
348 
349  std::vector<std::string> keyList = {"EXPID", "EXPTIME", "DARKTIME", "DATE-AVG", "TIMESYS",
350  "TIME-MID", "MJD-AVG-UT1", "AVG-ERA", "BORE-RA", "BORE-DEC",
351  "BORE-AZ", "BORE-ALT", "BORE-AIRMASS", "BORE-ROTANG", "ROTTYPE",
352  "OBS-LONG", "OBS-LAT", "OBS-ELEV", "AIRTEMP", "AIRPRESS",
353  "HUMIDITY", "INSTRUMENT", "IDNUM"};
354  for (auto&& key : keyList) {
355  if (metadata.exists(key)) {
356  metadata.remove(key);
357  nstripped++;
358  }
359  }
360  return nstripped;
361 }

Variable Documentation

◆ compressedFileNoMEF_RE

std::string const lsst::afw::image::detail::compressedFileNoMEF_RE = "(\\.gz)$"

regexp to identify compressed files that we can't write MEFs to

Definition at line 57 of file MaskedImage.h.

◆ fitsFile_RE

std::string const lsst::afw::image::detail::fitsFile_RE = "\\.fits(\\.[fg]z)?$"

regexp to identify when MaskedImages should be written as MEFs

Definition at line 55 of file MaskedImage.h.

◆ wcsNameForXY0

std::string const lsst::afw::image::detail::wcsNameForXY0 = "A"

Definition at line 70 of file ImageBase.h.