LSSTApplications  18.0.0+56,19.0.0+1,19.0.0+18,19.0.0+19,19.0.0+21,19.0.0+26,19.0.0+5,19.0.0-1-g20d9b18+12,19.0.0-1-g425ff20,19.0.0-1-g5549ca4,19.0.0-1-g580fafe+12,19.0.0-1-g6fe20d0+4,19.0.0-1-g8c57eb9+12,19.0.0-1-ga72da6b,19.0.0-1-gbfe0924+3,19.0.0-1-gdc0e4a7+17,19.0.0-1-ge272bc4+12,19.0.0-1-ge3aa853+3,19.0.0-16-g3a790c8c,19.0.0-18-g955d782+1,19.0.0-2-g0d9f9cd+19,19.0.0-2-g260436e+3,19.0.0-2-g9b11441+6,19.0.0-2-gd955cfd+25,19.0.0-3-g6513920+3,19.0.0-3-gc4f6e04+2,19.0.0-4-g41ffa1d+5,19.0.0-4-g725f80e+21,19.0.0-5-g0745e3f+3,19.0.0-6-g5a632bb5+1,19.0.0-6-gb6b8b0a+3,19.0.0-7-g686a884,19.0.0-7-gea0a0fe+8,19.0.0-9-gd2f60f3c3,w.2020.03
LSSTDataManagementBasePackage
Classes | Typedefs | Functions | Variables
lsst::afw::image::detail Namespace Reference

Classes

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...
 
class  MaskDict
 
struct  MaskedImage_tag
 A traits class for MaskedImage. More...
 
struct  MaskedImagePixel_tag
 A class used to identify classes that represent MaskedImage pixels. More...
 
class  StorableMap
 A map of Storable supporting strongly-typed access. More...
 

Typedefs

typedef std::map< std::string, int > MaskPlaneDict
 

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 281 of file VisitInfo.cc.

281  {
282  if (visitInfo.getExposureId() != 0) {
283  metadata.set("EXPID", visitInfo.getExposureId());
284  }
285  setDouble(metadata, "EXPTIME", visitInfo.getExposureTime(), "Exposure time (sec)");
286  setDouble(metadata, "DARKTIME", visitInfo.getDarkTime(), "Time from CCD flush to readout (sec)");
287  if (visitInfo.getDate().isValid()) {
288  metadata.set("DATE-AVG", visitInfo.getDate().toString(::DateTime::TAI),
289  "TAI date at middle of observation");
290  metadata.set("TIMESYS", "TAI");
291  }
292  setDouble(metadata, "MJD-AVG-UT1", visitInfo.getUt1(), "UT1 MJD date at ctr of obs");
293  setAngle(metadata, "AVG-ERA", visitInfo.getEra(), "Earth rot ang at ctr of obs (deg)");
294  auto boresightRaDec = visitInfo.getBoresightRaDec();
295  setAngle(metadata, "BORE-RA", boresightRaDec[0], "ICRS RA (deg) at boresight");
296  setAngle(metadata, "BORE-DEC", boresightRaDec[1], "ICRS Dec (deg) at boresight");
297  auto boresightAzAlt = visitInfo.getBoresightAzAlt();
298  setAngle(metadata, "BORE-AZ", boresightAzAlt[0], "Refr app topo az (deg) at bore");
299  setAngle(metadata, "BORE-ALT", boresightAzAlt[1], "Refr app topo alt (deg) at bore");
300  setDouble(metadata, "BORE-AIRMASS", visitInfo.getBoresightAirmass(), "Airmass at boresight");
301  setAngle(metadata, "BORE-ROTANG", visitInfo.getBoresightRotAngle(), "Rotation angle (deg) at boresight");
302  metadata.set("ROTTYPE", rotTypeStrFromEnum(visitInfo.getRotType()), "Type of rotation angle");
303  auto observatory = visitInfo.getObservatory();
304  setAngle(metadata, "OBS-LONG", observatory.getLongitude(), "Telescope longitude (+E, deg)");
305  setAngle(metadata, "OBS-LAT", observatory.getLatitude(), "Telescope latitude (deg)");
306  setDouble(metadata, "OBS-ELEV", observatory.getElevation(), "Telescope elevation (m)");
307  auto weather = visitInfo.getWeather();
308  setDouble(metadata, "AIRTEMP", weather.getAirTemperature(), "Outside air temperature (C)");
309  setDouble(metadata, "AIRPRESS", weather.getAirPressure(), "Outdoor air pressure (P)");
310  setDouble(metadata, "HUMIDITY", weather.getHumidity(), "Relative humidity (%)");
311 }
table::CoordKey boresightRaDec
Definition: VisitInfo.cc:164

◆ 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 132 of file Filter.cc.

132  {
133  int nstripped = 0;
134 
135  std::string key = "FILTER";
136  if (metadata->exists(key)) {
137  metadata->remove(key);
138  nstripped++;
139  }
140 
141  return nstripped;
142 }
STL class.
Key< U > key
Definition: Schema.cc:281

◆ 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 265 of file VisitInfo.cc.

265  {
266  int nstripped = 0;
267 
268  std::vector<std::string> keyList = {
269  "EXPID", "EXPTIME", "DARKTIME", "DATE-AVG", "TIMESYS", "TIME-MID", "MJD-AVG-UT1",
270  "AVG-ERA", "BORE-RA", "BORE-DEC", "BORE-AZ", "BORE-ALT", "BORE-AIRMASS", "BORE-ROTANG",
271  "ROTTYPE", "OBS-LONG", "OBS-LAT", "OBS-ELEV", "AIRTEMP", "AIRPRESS", "HUMIDITY"};
272  for (auto&& key : keyList) {
273  if (metadata.exists(key)) {
274  metadata.remove(key);
275  nstripped++;
276  }
277  }
278  return nstripped;
279 }
Key< U > key
Definition: Schema.cc:281

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.