LSSTApplications  17.0+10,17.0+51,17.0+88,18.0.0+10,18.0.0+15,18.0.0+34,18.0.0+4,18.0.0+6,18.0.0-2-ge43143a+6,18.1.0-1-g0001055+2,18.1.0-1-g0896a44+10,18.1.0-1-g1349e88+9,18.1.0-1-g2505f39+7,18.1.0-1-g380d4d4+9,18.1.0-1-g5e4b7ea+2,18.1.0-1-g7e8fceb,18.1.0-1-g85f8cd4+7,18.1.0-1-g9a6769a+3,18.1.0-1-ga1a4c1a+6,18.1.0-1-gc037db8+2,18.1.0-1-gd55f500+3,18.1.0-1-ge10677a+7,18.1.0-10-g73b8679e+12,18.1.0-12-gf30922b,18.1.0-13-g451e75588,18.1.0-13-gbfe7f7f,18.1.0-2-g31c43f9+7,18.1.0-2-g9c63283+9,18.1.0-2-gdf0b915+9,18.1.0-2-gf03bb23+2,18.1.0-3-g52aa583+3,18.1.0-3-g8f4a2b1+1,18.1.0-3-g9cb968e+8,18.1.0-4-g7bbbad0,18.1.0-5-g510c42a+8,18.1.0-5-ga46117f,18.1.0-5-gaeab27e+9,18.1.0-6-gdda7f3e+11,18.1.0-8-g4084bf03+1,w.2019.34
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...
 

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.