lsst.afw  16.0-43-gaa65a4573
VisitInfo.cc
Go to the documentation of this file.
1 // -*- LSST-C++ -*- // fixed format comment for emacs
2 /*
3  * LSST Data Management System
4  * Copyright 2016 LSST Corporation.
5  *
6  * This product includes software developed by the
7  * LSST Project (http://www.lsst.org/).
8  *
9  * This program is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the LSST License Statement and
20  * the GNU General Public License along with this program. If not,
21  * see <http://www.lsstcorp.org/LegalNotices/>.
22  */
23 #include <cmath>
24 #include <cstdint>
25 #include <limits>
26 #include <sstream>
27 
28 #include "boost/algorithm/string/trim.hpp"
29 
30 #include "lsst/pex/exceptions.h"
31 #include "lsst/geom/Angle.h"
32 #include "lsst/geom/SpherePoint.h"
33 #include "lsst/afw/table/Key.h"
34 #include "lsst/afw/table/aggregates.h" // for CoordKey
35 #include "lsst/afw/table/Schema.h"
36 #include "lsst/afw/table/misc.h" // for RecordId
39 #include "lsst/afw/table/io/CatalogVector.h" // needed, but why?
42 
44 
45 namespace lsst {
46 namespace afw {
47 
50 
51 namespace image {
52 
53 // the following persistence-related code emulates that in Calib.cc
54 
55 namespace {
56 
58 
67 double getDouble(daf::base::PropertySet const& metadata, std::string const& key) {
68  return metadata.exists(key) ? metadata.getAsDouble(key) : nan;
69 }
70 
79 lsst::geom::Angle getAngle(daf::base::PropertySet const& metadata, std::string const& key) {
80  return getDouble(metadata, key) * lsst::geom::degrees;
81 }
82 
91 bool setDouble(daf::base::PropertySet& metadata, std::string const& key, double value,
92  std::string const& comment) {
93  if (std::isfinite(value)) {
94  metadata.set(key, value);
95  return true;
96  }
97  return false;
98 }
99 
108 bool setAngle(daf::base::PropertySet& metadata, std::string const& key, lsst::geom::Angle const& angle,
109  std::string const& comment) {
110  return setDouble(metadata, key, angle.asDegrees(), comment);
111 }
112 
118 std::string rotTypeStrFromEnum(RotType rotType) {
119  switch (rotType) {
120  case RotType::UNKNOWN:
121  return "UNKNOWN";
122  case RotType::SKY:
123  return "SKY";
124  case RotType::HORIZON:
125  return "HORIZON";
126  case RotType::MOUNT:
127  return "MOUNT";
128  }
130  os << "Unknown RotType enum: " << static_cast<int>(rotType);
132 }
133 
139 RotType rotTypeEnumFromStr(std::string const& rotTypeName) {
140  if (rotTypeName == "UNKNOWN") {
141  return RotType::UNKNOWN;
142  } else if (rotTypeName == "SKY") {
143  return RotType::SKY;
144  } else if (rotTypeName == "HORIZON") {
145  return RotType::HORIZON;
146  } else if (rotTypeName == "MOUNT") {
147  return RotType::MOUNT;
148  }
150  os << "Unknown RotType name: \"" << rotTypeName << "\"";
152 }
153 
154 class VisitInfoSchema {
155 public:
156  table::Schema schema;
157  table::Key<table::RecordId> exposureId;
158  table::Key<double> exposureTime;
159  table::Key<double> darkTime;
160  table::Key<std::int64_t> tai;
161  table::Key<double> ut1;
162  table::Key<lsst::geom::Angle> era;
163  table::CoordKey boresightRaDec;
164  table::Key<lsst::geom::Angle> boresightAzAlt_az;
165  table::Key<lsst::geom::Angle> boresightAzAlt_alt;
166  table::Key<double> boresightAirmass;
167  table::Key<lsst::geom::Angle> boresightRotAngle;
168  table::Key<int> rotType;
169  // observatory data
170  table::Key<lsst::geom::Angle> latitude;
171  table::Key<lsst::geom::Angle> longitude;
172  table::Key<double> elevation;
173  // weather data
174  table::Key<double> airTemperature;
175  table::Key<double> airPressure;
176  table::Key<double> humidity;
177 
178  static VisitInfoSchema const& get() {
179  static VisitInfoSchema instance;
180  return instance;
181  }
182 
183  // No copying
184  VisitInfoSchema(const VisitInfoSchema&) = delete;
185  VisitInfoSchema& operator=(const VisitInfoSchema&) = delete;
186 
187  // No moving
188  VisitInfoSchema(VisitInfoSchema&&) = delete;
189  VisitInfoSchema& operator=(VisitInfoSchema&&) = delete;
190 
191 private:
192  VisitInfoSchema()
193  : schema(),
194  exposureId(schema.addField<table::RecordId>("exposureid", "exposure ID", "")),
195  exposureTime(schema.addField<double>("exposuretime", "exposure duration", "s")),
196  darkTime(schema.addField<double>("darktime", "time from CCD flush to readout", "s")),
197  tai(schema.addField<std::int64_t>(
198  "tai", "TAI date and time at middle of exposure as nsec from unix epoch", "nsec")),
199  ut1(schema.addField<double>("ut1", "UT1 date and time at middle of exposure", "MJD")),
200  era(schema.addField<lsst::geom::Angle>("era", "earth rotation angle at middle of exposure",
201  "")),
202  boresightRaDec(table::CoordKey::addFields(schema, "boresightradec",
203  "sky position of boresight at middle of exposure")),
204  // CoordKey is intended for ICRS coordinates, so use a pair of lsst::geom::Angle fields
205  // to save boresightAzAlt
206  boresightAzAlt_az(schema.addField<lsst::geom::Angle>(
207  "boresightazalt_az",
208  "refracted apparent topocentric position of boresight at middle of exposure", "")),
209  boresightAzAlt_alt(schema.addField<lsst::geom::Angle>(
210  "boresightazalt_alt",
211  "refracted apparent topocentric position of boresight at middle of exposure", "")),
212  boresightAirmass(schema.addField<double>(
213  "boresightairmass", "airmass at boresight, relative to zenith at sea level", "")),
214  boresightRotAngle(schema.addField<lsst::geom::Angle>(
215  "boresightrotangle", "rotation angle at boresight at middle of exposure", "")),
216  rotType(schema.addField<int>("rottype", "rotation type; see VisitInfo.getRotType for details",
217  "MJD")),
218  // observatory data
219  latitude(schema.addField<lsst::geom::Angle>(
220  "latitude", "latitude of telescope (+ is east of Greenwich)", "")),
221  longitude(schema.addField<lsst::geom::Angle>("longitude", "longitude of telescope", "")),
222  elevation(schema.addField<double>("elevation", "elevation of telescope", "")),
223  // weather data
224  airTemperature(schema.addField<double>("airtemperature", "air temperature", "C")),
225  airPressure(schema.addField<double>("airpressure", "air pressure", "Pascal")),
226  humidity(schema.addField<double>("humidity", "humidity (%)", "")) {
227  schema.getCitizen().markPersistent();
228  }
229 };
230 
231 class VisitInfoFactory : public table::io::PersistableFactory {
232 public:
233  std::shared_ptr<table::io::Persistable> read(InputArchive const& archive,
234  CatalogVector const& catalogs) const override {
235  VisitInfoSchema const& keys = VisitInfoSchema::get();
236  LSST_ARCHIVE_ASSERT(catalogs.size() == 1u);
237  LSST_ARCHIVE_ASSERT(catalogs.front().size() == 1u);
238  LSST_ARCHIVE_ASSERT(catalogs.front().getSchema() == keys.schema);
239  table::BaseRecord const& record = catalogs.front().front();
241  new VisitInfo(record.get(keys.exposureId), record.get(keys.exposureTime),
242  record.get(keys.darkTime), ::DateTime(record.get(keys.tai), ::DateTime::TAI),
243  record.get(keys.ut1), record.get(keys.era), record.get(keys.boresightRaDec),
244  lsst::geom::SpherePoint(record.get(keys.boresightAzAlt_az),
245  record.get(keys.boresightAzAlt_alt)),
246  record.get(keys.boresightAirmass), record.get(keys.boresightRotAngle),
247  static_cast<RotType>(record.get(keys.rotType)),
248  coord::Observatory(record.get(keys.longitude), record.get(keys.latitude),
249  record.get(keys.elevation)),
250  coord::Weather(record.get(keys.airTemperature), record.get(keys.airPressure),
251  record.get(keys.humidity))));
252  return result;
253  }
254 
255  explicit VisitInfoFactory(std::string const& name) : table::io::PersistableFactory(name) {}
256 };
257 
258 std::string getVisitInfoPersistenceName() { return "VisitInfo"; }
259 
260 VisitInfoFactory registration(getVisitInfoPersistenceName());
261 
262 } // namespace
263 
264 namespace detail {
265 
267  int nstripped = 0;
268 
269  std::vector<std::string> keyList = {
270  "EXPID", "EXPTIME", "DARKTIME", "DATE-AVG", "TIMESYS", "TIME-MID", "MJD-AVG-UT1",
271  "AVG-ERA", "BORE-RA", "BORE-DEC", "BORE-AZ", "BORE-ALT", "BORE-AIRMASS", "BORE-ROTANG",
272  "ROTTYPE", "OBS-LONG", "OBS-LAT", "OBS-ELEV", "AIRTEMP", "AIRPRESS", "HUMIDITY"};
273  for (auto&& key : keyList) {
274  if (metadata.exists(key)) {
275  metadata.remove(key);
276  nstripped++;
277  }
278  }
279  return nstripped;
280 }
281 
283  if (visitInfo.getExposureId() != 0) {
284  metadata.set("EXPID", visitInfo.getExposureId());
285  }
286  setDouble(metadata, "EXPTIME", visitInfo.getExposureTime(), "Exposure time (sec)");
287  setDouble(metadata, "DARKTIME", visitInfo.getDarkTime(), "Time from CCD flush to readout (sec)");
288  if (visitInfo.getDate().isValid()) {
289  metadata.set("DATE-AVG", visitInfo.getDate().toString(::DateTime::TAI),
290  "TAI date at middle of observation");
291  metadata.set("TIMESYS", "TAI");
292  }
293  setDouble(metadata, "MJD-AVG-UT1", visitInfo.getUt1(), "UT1 MJD date at ctr of obs");
294  setAngle(metadata, "AVG-ERA", visitInfo.getEra(), "Earth rot ang at ctr of obs (deg)");
295  auto boresightRaDec = visitInfo.getBoresightRaDec();
296  setAngle(metadata, "BORE-RA", boresightRaDec[0], "ICRS RA (deg) at boresight");
297  setAngle(metadata, "BORE-DEC", boresightRaDec[1], "ICRS Dec (deg) at boresight");
298  auto boresightAzAlt = visitInfo.getBoresightAzAlt();
299  setAngle(metadata, "BORE-AZ", boresightAzAlt[0], "Refr app topo az (deg) at bore");
300  setAngle(metadata, "BORE-ALT", boresightAzAlt[1], "Refr app topo alt (deg) at bore");
301  setDouble(metadata, "BORE-AIRMASS", visitInfo.getBoresightAirmass(), "Airmass at boresight");
302  setAngle(metadata, "BORE-ROTANG", visitInfo.getBoresightRotAngle(), "Rotation angle (deg) at boresight");
303  metadata.set("ROTTYPE", rotTypeStrFromEnum(visitInfo.getRotType()), "Type of rotation angle");
304  auto observatory = visitInfo.getObservatory();
305  setAngle(metadata, "OBS-LONG", observatory.getLongitude(), "Telescope longitude (+E, deg)");
306  setAngle(metadata, "OBS-LAT", observatory.getLatitude(), "Telescope latitude (deg)");
307  setDouble(metadata, "OBS-ELEV", observatory.getElevation(), "Telescope elevation (m)");
308  auto weather = visitInfo.getWeather();
309  setDouble(metadata, "AIRTEMP", weather.getAirTemperature(), "Outside air temperature (C)");
310  setDouble(metadata, "AIRPRESS", weather.getAirPressure(), "Outdoor air pressure (P)");
311  setDouble(metadata, "HUMIDITY", weather.getHumidity(), "Relative humidity (%)");
312 }
313 
314 } // namespace detail
315 
316 VisitInfo::VisitInfo(daf::base::PropertySet const& metadata)
317  : _exposureId(0),
318  _exposureTime(nan), // don't use getDouble because str values are also accepted
319  _darkTime(getDouble(metadata, "DARKTIME")),
320  _date(),
321  _ut1(getDouble(metadata, "MJD-AVG-UT1")),
322  _era(getAngle(metadata, "AVG-ERA")),
323  _boresightRaDec(
324  lsst::geom::SpherePoint(getAngle(metadata, "BORE-RA"), getAngle(metadata, "BORE-DEC"))),
325  _boresightAzAlt(
326  lsst::geom::SpherePoint(getAngle(metadata, "BORE-AZ"), getAngle(metadata, "BORE-ALT"))),
327  _boresightAirmass(getDouble(metadata, "BORE-AIRMASS")),
328  _boresightRotAngle(getAngle(metadata, "BORE-ROTANG")),
329  _rotType(RotType::UNKNOWN),
330  _observatory(getAngle(metadata, "OBS-LONG"), getAngle(metadata, "OBS-LAT"),
331  getDouble(metadata, "OBS-ELEV")),
332  _weather(getDouble(metadata, "AIRTEMP"), getDouble(metadata, "AIRPRESS"),
333  getDouble(metadata, "HUMIDITY")) {
334  auto key = "EXPID";
335  if (metadata.exists(key)) {
336  _exposureId = metadata.getAsInt64(key);
337  }
338 
339  key = "EXPTIME";
340  if (metadata.exists(key)) {
341  try {
342  _exposureTime = metadata.getAsDouble(key);
343  } catch (lsst::pex::exceptions::TypeError& err) {
344  // some old exposures have EXPTIME stored as a string
345  std::string exptimeStr = metadata.getAsString(key);
346  _exposureTime = std::stod(exptimeStr);
347  }
348  }
349 
350  key = "DATE-AVG";
351  if (metadata.exists(key)) {
352  if (metadata.exists("TIMESYS")) {
353  auto timesysName = boost::algorithm::trim_right_copy(metadata.getAsString("TIMESYS"));
354  if (timesysName != "TAI") {
355  // rather than try to deal with all the possible choices, which requires
356  // appending or deleting a "Z", depending on the time system, just give up.
357  // VisitInfo should be used on FITS headers that have been sanitized!
359  os << "TIMESYS = \"" << timesysName
360  << "\"; VisitInfo requires TIMESYS to exist and to equal \"TAI\"";
362  }
363  } else {
365  "TIMESYS not found; VistitInfo requires TIMESYS to exist and to equal \"TAI\"");
366  }
367  _date = ::DateTime(boost::algorithm::trim_right_copy(metadata.getAsString(key)), ::DateTime::TAI);
368  } else {
369  // DATE-AVG not found. For backwards compatibility look for TIME-MID, an outdated LSST keyword
370  // whose time system was UTC, despite a FITS comment claiming it was TAI. Ignore TIMESYS.
371  key = "TIME-MID";
372  if (metadata.exists(key)) {
373  _date = ::DateTime(boost::algorithm::trim_right_copy(metadata.getAsString(key)), ::DateTime::UTC);
374  }
375  }
376 
377  key = "ROTTYPE";
378  if (metadata.exists(key)) {
379  _rotType = rotTypeEnumFromStr(metadata.getAsString(key));
380  }
381 }
382 
384  return _exposureId == other.getExposureId() && _exposureTime == other.getExposureTime() &&
385  _darkTime == other.getDarkTime() && _date == other.getDate() && _ut1 == other.getUt1() &&
386  _era == other.getEra() && _boresightRaDec == other.getBoresightRaDec() &&
387  _boresightAzAlt == other.getBoresightAzAlt() && _boresightAirmass == other.getBoresightAirmass() &&
388  _boresightRotAngle == other.getBoresightRotAngle() && _rotType == other.getRotType() &&
389  _observatory == other.getObservatory() && _weather == other.getWeather();
390 }
391 
392 std::string VisitInfo::getPersistenceName() const { return getVisitInfoPersistenceName(); }
393 
395  VisitInfoSchema const& keys = VisitInfoSchema::get();
396  table::BaseCatalog cat = handle.makeCatalog(keys.schema);
398  record->set(keys.exposureId, getExposureId());
399  record->set(keys.exposureTime, getExposureTime());
400  record->set(keys.darkTime, getDarkTime());
401  record->set(keys.tai, getDate().nsecs(::DateTime::TAI));
402  record->set(keys.ut1, getUt1());
403  record->set(keys.era, getEra());
404  record->set(keys.boresightRaDec, getBoresightRaDec());
405  auto boresightAzAlt = getBoresightAzAlt();
406  record->set(keys.boresightAzAlt_az, boresightAzAlt[0]);
407  record->set(keys.boresightAzAlt_alt, boresightAzAlt[1]);
408  record->set(keys.boresightAirmass, getBoresightAirmass());
409  record->set(keys.boresightRotAngle, getBoresightRotAngle());
410  record->set(keys.rotType, static_cast<int>(getRotType()));
411  auto observatory = getObservatory();
412  record->set(keys.latitude, observatory.getLatitude());
413  record->set(keys.longitude, observatory.getLongitude());
414  record->set(keys.elevation, observatory.getElevation());
415  auto weather = getWeather();
416  record->set(keys.airTemperature, weather.getAirTemperature());
417  record->set(keys.airPressure, weather.getAirPressure());
418  record->set(keys.humidity, weather.getHumidity());
419  handle.saveCatalog(cat);
420 }
421 
423 
425 
431  double _parallactic_y, _parallactic_x, result;
432  _parallactic_y = sin(getBoresightHourAngle().asRadians());
433  _parallactic_x =
434  cos((getBoresightRaDec()[1]).asRadians()) * tan(getObservatory().getLatitude().asRadians()) -
435  sin((getBoresightRaDec()[1]).asRadians()) * cos(getBoresightHourAngle().asRadians());
436  result = atan2(_parallactic_y, _parallactic_x);
437  return result * lsst::geom::radians;
438 }
439 
441  os << "VisitInfo(";
442  os << "exposureId=" << visitInfo.getExposureId() << ", ";
443  os << "exposureTime=" << visitInfo.getExposureTime() << ", ";
444  os << "darkTime=" << visitInfo.getDarkTime() << ", ";
445  os << "date=" << visitInfo.getDate().toString(daf::base::DateTime::TAI) << ", ";
446  os << "UT1=" << visitInfo.getUt1() << ", ";
447  os << "ERA=" << visitInfo.getEra() << ", ";
448  os << "boresightRaDec=" << visitInfo.getBoresightRaDec() << ", ";
449  os << "boresightAzAlt=" << visitInfo.getBoresightAzAlt() << ", ";
450  os << "boresightAirmass=" << visitInfo.getBoresightAirmass() << ", ";
451  os << "boresightRotAngle=" << visitInfo.getBoresightRotAngle() << ", ";
452  os << "rotType=" << static_cast<int>(visitInfo.getRotType()) << ", ";
453  os << "observatory=" << visitInfo.getObservatory() << ", ";
454  os << "weather=" << visitInfo.getWeather();
455  os << ")";
456  return os;
457 }
458 
459 } // namespace image
460 } // namespace afw
461 } // namespace lsst
std::int64_t RecordId
Type used for unique IDs for records.
Definition: misc.h:22
double getBoresightAirmass() const
get airmass at the boresight, relative to zenith at sea level (and at the middle of the exposure...
Definition: VisitInfo.h:148
double getAsDouble(std::string const &name) const
lsst::geom::SpherePoint getBoresightAzAlt() const
get refracted apparent topocentric Az/Alt position at the boresight (and at the middle of the exposur...
Definition: VisitInfo.h:144
table::Key< double > exposureTime
Definition: VisitInfo.cc:158
table::Key< table::RecordId > exposureId
Definition: VisitInfo.cc:157
double get(DateSystem system=MJD, Timescale scale=TAI) const
def keys(self)
table::Key< double > darkTime
Definition: VisitInfo.cc:159
constexpr double asDegrees() const noexcept
lsst::geom::Angle getLocalEra() const
Definition: VisitInfo.cc:422
An object passed to Persistable::write to allow it to persist itself.
table::CoordKey boresightRaDec
Definition: VisitInfo.cc:163
#define LSST_ARCHIVE_ASSERT(EXPR)
An assertion macro used to validate the structure of an InputArchive.
Definition: Persistable.h:48
table::Key< std::int64_t > tai
Definition: VisitInfo.cc:160
table::Schema schema
Definition: VisitInfo.cc:156
RotType
Type of rotation.
Definition: VisitInfo.h:44
T stod(T... args)
Information about a single exposure of an imaging camera.
Definition: VisitInfo.h:67
static std::shared_ptr< T > dynamicCast(std::shared_ptr< Persistable > const &ptr)
Dynamically cast a shared_ptr.
Definition: Persistable.cc:18
lsst::geom::SpherePoint getBoresightRaDec() const
get ICRS RA/Dec position at the boresight (and at the middle of the exposure, if it varies with time)...
Definition: VisitInfo.h:140
double getUt1() const
get UT1 (universal time) MJD date at middle of exposure
Definition: VisitInfo.h:133
void set(std::string const &name, T const &value)
std::string toString(Timescale scale) const
double getDarkTime() const
get time from CCD flush to exposure readout, including shutter open time (despite the name); (sec) ...
Definition: VisitInfo.h:127
virtual void remove(std::string const &name)
table::Key< lsst::geom::Angle > boresightAzAlt_alt
Definition: VisitInfo.cc:165
ItemVariant const * other
Definition: Schema.cc:55
table::Key< lsst::geom::Angle > longitude
Definition: VisitInfo.cc:171
bool operator==(VisitInfo const &other) const
Definition: VisitInfo.cc:383
AngleUnit constexpr radians
Rotation angle is unknown.
STL class.
table::Key< lsst::geom::Angle > latitude
Definition: VisitInfo.cc:170
lsst::geom::Angle getLongitude() const noexcept
get telescope longitude (positive values are E of Greenwich)
Definition: Observatory.cc:48
void setVisitInfoMetadata(daf::base::PropertyList &metadata, VisitInfo const &visitInfo)
Set FITS metadata from a VisitInfo.
Definition: VisitInfo.cc:282
std::ostream & operator<<(std::ostream &os, VisitInfo const &visitInfo)
Definition: VisitInfo.cc:440
AngleUnit constexpr degrees
A base class for image defects.
table::RecordId getExposureId() const
get exposure ID
Definition: VisitInfo.h:121
int64_t getAsInt64(std::string const &name) const
Key< U > key
Definition: Schema.cc:280
T str(T... args)
T isfinite(T... args)
bool exists(std::string const &name) const
table::Key< double > boresightAirmass
Definition: VisitInfo.cc:166
double getExposureTime() const
get exposure duration (shutter open time); (sec)
Definition: VisitInfo.h:124
table::Key< lsst::geom::Angle > era
Definition: VisitInfo.cc:162
std::unique_ptr< SchemaItem< U > > result
Definition: Schema.cc:194
BaseCatalog makeCatalog(Schema const &schema)
Return a new, empty catalog with the given schema.
RotType getRotType() const
get rotation type of boresightRotAngle
Definition: VisitInfo.h:159
lsst::geom::Angle getEra() const
get earth rotation angle at middle of exposure
Definition: VisitInfo.h:136
std::string getPersistenceName() const override
Return the unique name used to persist this object and look up its factory.
Definition: VisitInfo.cc:392
#define LSST_EXCEPT(type,...)
daf::base::DateTime getDate() const
get uniform date and time at middle of exposure
Definition: VisitInfo.h:130
table::Key< double > airPressure
Definition: VisitInfo.cc:175
table::Key< double > angle
static CoordKey addFields(afw::table::Schema &schema, std::string const &name, std::string const &doc)
Add a pair of _ra, _dec fields to a Schema, and return a CoordKey that points to them.
Definition: aggregates.cc:83
table::Key< int > rotType
Definition: VisitInfo.cc:168
T nan(T... args)
int stripVisitInfoKeywords(daf::base::PropertySet &metadata)
Remove VisitInfo-related keywords from the metadata.
Definition: VisitInfo.cc:266
lsst::geom::Angle getBoresightParAngle() const
Get parallactic angle at the boresight.
Definition: VisitInfo.cc:426
lsst::geom::SpherePoint SpherePoint
Definition: misc.h:35
lsst::geom::Angle getBoresightRotAngle() const
Get rotation angle at boresight at middle of exposure.
Definition: VisitInfo.h:156
std::string getAsString(std::string const &name) const
T quiet_NaN(T... args)
void saveCatalog(BaseCatalog const &catalog)
Save a catalog in the archive.
table::Key< double > airTemperature
Definition: VisitInfo.cc:174
table::Key< double > ut1
Definition: VisitInfo.cc:161
std::ostream * os
Definition: Schema.cc:737
void write(OutputArchiveHandle &handle) const override
Write the object to one or more catalogs.
Definition: VisitInfo.cc:394
STL class.
coord::Observatory getObservatory() const
get observatory longitude, latitude and elevation
Definition: VisitInfo.h:162
table::Key< double > elevation
Definition: VisitInfo.cc:172
table::Key< double > humidity
Definition: VisitInfo.cc:176
coord::Weather getWeather() const
get basic weather information
Definition: VisitInfo.h:165
lsst::geom::Angle getBoresightHourAngle() const
Definition: VisitInfo.cc:424
table::Key< lsst::geom::Angle > boresightAzAlt_az
Definition: VisitInfo.cc:164
table::Key< lsst::geom::Angle > boresightRotAngle
Definition: VisitInfo.cc:167
std::shared_ptr< RecordT > addNew()
Create a new record, add it to the end of the catalog, and return a pointer to it.
Definition: Catalog.h:472