LSST Applications g02d81e74bb+86cf3d8bc9,g180d380827+7a4e862ed4,g2079a07aa2+86d27d4dc4,g2305ad1205+e1ca1c66fa,g29320951ab+012e1474a1,g295015adf3+341ea1ce94,g2bbee38e9b+0e5473021a,g337abbeb29+0e5473021a,g33d1c0ed96+0e5473021a,g3a166c0a6a+0e5473021a,g3ddfee87b4+c429d67c83,g48712c4677+f88676dd22,g487adcacf7+27e1e21933,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+b41db86c35,g5a732f18d5+53520f316c,g64a986408d+86cf3d8bc9,g858d7b2824+86cf3d8bc9,g8a8a8dda67+585e252eca,g99cad8db69+84912a7fdc,g9ddcbc5298+9a081db1e4,ga1e77700b3+15fc3df1f7,ga8c6da7877+a2b54eae19,gb0e22166c9+60f28cb32d,gba4ed39666+c2a2e4ac27,gbb8dafda3b+6681f309db,gc120e1dc64+f0fcc2f6d8,gc28159a63d+0e5473021a,gcf0d15dbbd+c429d67c83,gdaeeff99f8+f9a426f77a,ge6526c86ff+0433e6603d,ge79ae78c31+0e5473021a,gee10cc3b42+585e252eca,gff1a9f87cc+86cf3d8bc9,w.2024.17
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.