LSST Applications  21.0.0-147-g0e635eb1+1acddb5be5,22.0.0+052faf71bd,22.0.0+1ea9a8b2b2,22.0.0+6312710a6c,22.0.0+729191ecac,22.0.0+7589c3a021,22.0.0+9f079a9461,22.0.1-1-g7d6de66+b8044ec9de,22.0.1-1-g87000a6+536b1ee016,22.0.1-1-g8e32f31+6312710a6c,22.0.1-10-gd060f87+016f7cdc03,22.0.1-12-g9c3108e+df145f6f68,22.0.1-16-g314fa6d+c825727ab8,22.0.1-19-g93a5c75+d23f2fb6d8,22.0.1-19-gb93eaa13+aab3ef7709,22.0.1-2-g8ef0a89+b8044ec9de,22.0.1-2-g92698f7+9f079a9461,22.0.1-2-ga9b0f51+052faf71bd,22.0.1-2-gac51dbf+052faf71bd,22.0.1-2-gb66926d+6312710a6c,22.0.1-2-gcb770ba+09e3807989,22.0.1-20-g32debb5+b8044ec9de,22.0.1-23-gc2439a9a+fb0756638e,22.0.1-3-g496fd5d+09117f784f,22.0.1-3-g59f966b+1e6ba2c031,22.0.1-3-g849a1b8+f8b568069f,22.0.1-3-gaaec9c0+c5c846a8b1,22.0.1-32-g5ddfab5d3+60ce4897b0,22.0.1-4-g037fbe1+64e601228d,22.0.1-4-g8623105+b8044ec9de,22.0.1-5-g096abc9+d18c45d440,22.0.1-5-g15c806e+57f5c03693,22.0.1-7-gba73697+57f5c03693,master-g6e05de7fdc+c1283a92b8,master-g72cdda8301+729191ecac,w.2021.39
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 356 of file VisitInfo.cc.

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

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

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.