LSST Applications g063fba187b+cac8b7c890,g0f08755f38+6aee506743,g1653933729+a8ce1bb630,g168dd56ebc+a8ce1bb630,g1a2382251a+b4475c5878,g1dcb35cd9c+8f9bc1652e,g20f6ffc8e0+6aee506743,g217e2c1bcf+73dee94bd0,g28da252d5a+1f19c529b9,g2bbee38e9b+3f2625acfc,g2bc492864f+3f2625acfc,g3156d2b45e+6e55a43351,g32e5bea42b+1bb94961c2,g347aa1857d+3f2625acfc,g35bb328faa+a8ce1bb630,g3a166c0a6a+3f2625acfc,g3e281a1b8c+c5dd892a6c,g3e8969e208+a8ce1bb630,g414038480c+5927e1bc1e,g41af890bb2+8a9e676b2a,g7af13505b9+809c143d88,g80478fca09+6ef8b1810f,g82479be7b0+f568feb641,g858d7b2824+6aee506743,g89c8672015+f4add4ffd5,g9125e01d80+a8ce1bb630,ga5288a1d22+2903d499ea,gb58c049af0+d64f4d3760,gc28159a63d+3f2625acfc,gcab2d0539d+b12535109e,gcf0d15dbbd+46a3f46ba9,gda6a2b7d83+46a3f46ba9,gdaeeff99f8+1711a396fd,ge79ae78c31+3f2625acfc,gef2f8181fd+0a71e47438,gf0baf85859+c1f95f4921,gfa517265be+6aee506743,gfa999e8aa5+17cd334064,w.2024.51
LSST Data Management Base Package
Loading...
Searching...
No Matches
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

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

Functions

void setVisitInfoMetadata (daf::base::PropertyList &metadata, VisitInfo const &visitInfo)
 Set FITS metadata from a VisitInfo.
 
int stripVisitInfoKeywords (daf::base::PropertySet &metadata)
 Remove VisitInfo-related keywords from the metadata.
 

Variables

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

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

408 {
409 setDouble(metadata, "EXPTIME", visitInfo.getExposureTime(), "Exposure time (sec)");
410 setDouble(metadata, "DARKTIME", visitInfo.getDarkTime(), "Time from CCD flush to readout (sec)");
411 if (visitInfo.getDate().isValid()) {
412 metadata.set("DATE-AVG", visitInfo.getDate().toString(::DateTime::TAI),
413 "TAI date at middle of observation");
414 metadata.set("TIMESYS", "TAI");
415 }
416 setDouble(metadata, "MJD-AVG-UT1", visitInfo.getUt1(), "UT1 MJD date at ctr of obs");
417 setAngle(metadata, "AVG-ERA", visitInfo.getEra(), "Earth rot ang at ctr of obs (deg)");
418 auto boresightRaDec = visitInfo.getBoresightRaDec();
419 setAngle(metadata, "BORE-RA", boresightRaDec[0], "ICRS RA (deg) at boresight");
420 setAngle(metadata, "BORE-DEC", boresightRaDec[1], "ICRS Dec (deg) at boresight");
421 auto boresightAzAlt = visitInfo.getBoresightAzAlt();
422 setAngle(metadata, "BORE-AZ", boresightAzAlt[0], "Refr app topo az (deg) at bore");
423 setAngle(metadata, "BORE-ALT", boresightAzAlt[1], "Refr app topo alt (deg) at bore");
424 setDouble(metadata, "BORE-AIRMASS", visitInfo.getBoresightAirmass(), "Airmass at boresight");
425 setAngle(metadata, "BORE-ROTANG", visitInfo.getBoresightRotAngle(), "Rotation angle (deg) at boresight");
426 metadata.set("ROTTYPE", rotTypeStrFromEnum(visitInfo.getRotType()), "Type of rotation angle");
427 auto observatory = visitInfo.getObservatory();
428 setAngle(metadata, "OBS-LONG", observatory.getLongitude(), "Telescope longitude (+E, deg)");
429 setAngle(metadata, "OBS-LAT", observatory.getLatitude(), "Telescope latitude (deg)");
430 setDouble(metadata, "OBS-ELEV", observatory.getElevation(), "Telescope elevation (m)");
431 auto weather = visitInfo.getWeather();
432 setDouble(metadata, "AIRTEMP", weather.getAirTemperature(), "Outside air temperature (C)");
433 setDouble(metadata, "AIRPRESS", weather.getAirPressure(), "Outdoor air pressure (P)");
434 setDouble(metadata, "HUMIDITY", weather.getHumidity(), "Relative humidity (%)");
435 setString(metadata, "INSTRUMENT", visitInfo.getInstrumentLabel(),
436 "Short name of the instrument that took this data");
437 if (visitInfo.getId() != 0) {
438 metadata.set("IDNUM", visitInfo.getId(), "identifier of this full focal plane exposure");
439 }
440 setDouble(metadata, "FOCUSZ", visitInfo.getFocusZ(), "Defocal distance (mm)");
441 setString(metadata, "OBSTYPE", visitInfo.getObservationType(), "Type of this observation");
442 setString(metadata, "PROGRAM", visitInfo.getScienceProgram(),
443 "observing program (survey or proposal) identifier");
444 setString(metadata, "REASON", visitInfo.getObservationReason(),
445 "reason this observation was taken, or its purpose");
446 setString(metadata, "OBJECT", visitInfo.getObject(), "object of interest or field name");
447 metadata.set("HAS-SIMULATED-CONTENT", visitInfo.getHasSimulatedContent(),
448 "Was any part of this observation simulated?");
449}
table::CoordKey boresightRaDec
Definition VisitInfo.cc:207
bool isValid() const noexcept
Return true if the key was initialized to valid offset.
Definition Key.h:97
void set(std::string const &name, T const &value)
Replace all values for a property name (possibly hierarchical) with a new scalar value.
Key< int > visitInfo
Definition Exposure.cc:70

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

389 {
390 int nstripped = 0;
391
392 std::vector<std::string> keyList = {"EXPTIME", "DARKTIME", "DATE-AVG", "TIMESYS",
393 "TIME-MID", "MJD-AVG-UT1", "AVG-ERA", "BORE-RA",
394 "BORE-DEC", "BORE-AZ", "BORE-ALT", "BORE-AIRMASS",
395 "BORE-ROTANG", "ROTTYPE", "OBS-LONG", "OBS-LAT",
396 "OBS-ELEV", "AIRTEMP", "AIRPRESS", "HUMIDITY",
397 "INSTRUMENT", "IDNUM", "FOCUSZ", "OBSTYPE",
398 "PROGRAM", "REASON", "OBJECT", "HAS-SIMULATED-CONTENT"};
399 for (auto&& key : keyList) {
400 if (metadata.exists(key)) {
401 metadata.remove(key);
402 nstripped++;
403 }
404 }
405 return nstripped;
406}
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.

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 58 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 56 of file MaskedImage.h.

◆ wcsNameForXY0

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

Definition at line 70 of file ImageBase.h.