lsst.afw  13.0-39-g3deb52d
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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/afw/table/Key.h"
32 #include "lsst/afw/table/aggregates.h" // for CoordKey
33 #include "lsst/afw/table/Schema.h"
34 #include "lsst/afw/table/misc.h" // for RecordId
37 #include "lsst/afw/table/io/CatalogVector.h" // needed, but why?
38 #include "lsst/afw/coord/Coord.h"
39 #include "lsst/afw/geom/Angle.h"
41 
42 using lsst::daf::base::DateTime;
43 
44 namespace lsst {
45 namespace afw {
46 namespace image {
47 
48 // the following persistence-related code emulates that in Calib.cc
49 
50 namespace {
51 
52 auto const nan = std::numeric_limits<double>::quiet_NaN();
53 auto const nanAngle = nan * geom::radians;
54 
63 double getDouble(daf::base::PropertySet const& metadata, std::string const& key) {
64  return metadata.exists(key) ? metadata.getAsDouble(key) : nan;
65 }
66 
75 geom::Angle getAngle(daf::base::PropertySet const& metadata, std::string const& key) {
76  return getDouble(metadata, key) * geom::degrees;
77 }
78 
87 bool setDouble(daf::base::PropertySet& metadata, std::string const& key, double value,
88  std::string const& comment) {
89  if (std::isfinite(value)) {
90  metadata.set(key, value);
91  return true;
92  }
93  return false;
94 }
95 
104 bool setAngle(daf::base::PropertySet& metadata, std::string const& key, geom::Angle const& angle,
105  std::string const& comment) {
106  return setDouble(metadata, key, angle.asDegrees(), comment);
107 }
108 
114 std::string rotTypeStrFromEnum(RotType rotType) {
115  switch (rotType) {
116  case RotType::UNKNOWN:
117  return "UNKNOWN";
118  case RotType::SKY:
119  return "SKY";
120  case RotType::HORIZON:
121  return "HORIZON";
122  case RotType::MOUNT:
123  return "MOUNT";
124  }
125  std::ostringstream os;
126  os << "Unknown RotType enum: " << static_cast<int>(rotType);
127  throw LSST_EXCEPT(lsst::pex::exceptions::RuntimeError, os.str());
128 }
129 
135 RotType rotTypeEnumFromStr(std::string const& rotTypeName) {
136  if (rotTypeName == "UNKNOWN") {
137  return RotType::UNKNOWN;
138  } else if (rotTypeName == "SKY") {
139  return RotType::SKY;
140  } else if (rotTypeName == "HORIZON") {
141  return RotType::HORIZON;
142  } else if (rotTypeName == "MOUNT") {
143  return RotType::MOUNT;
144  }
145  std::ostringstream os;
146  os << "Unknown RotType name: \"" << rotTypeName << "\"";
147  throw LSST_EXCEPT(lsst::pex::exceptions::RuntimeError, os.str());
148 }
149 
150 class VisitInfoSchema {
151 public:
152  table::Schema schema;
153  table::Key<table::RecordId> exposureId;
154  table::Key<double> exposureTime;
155  table::Key<double> darkTime;
156  table::Key<std::int64_t> tai;
157  table::Key<double> ut1;
158  table::Key<geom::Angle> era;
159  table::CoordKey boresightRaDec;
160  table::Key<geom::Angle> boresightAzAlt_az;
161  table::Key<geom::Angle> boresightAzAlt_alt;
162  table::Key<double> boresightAirmass;
163  table::Key<geom::Angle> boresightRotAngle;
164  table::Key<int> rotType;
165  // observatory data
166  table::Key<geom::Angle> latitude;
167  table::Key<geom::Angle> longitude;
168  table::Key<double> elevation;
169  // weather data
170  table::Key<double> airTemperature;
171  table::Key<double> airPressure;
172  table::Key<double> humidity;
173 
174  static VisitInfoSchema const& get() {
175  static VisitInfoSchema instance;
176  return instance;
177  }
178 
179  // No copying
180  VisitInfoSchema(const VisitInfoSchema&) = delete;
181  VisitInfoSchema& operator=(const VisitInfoSchema&) = delete;
182 
183  // No moving
184  VisitInfoSchema(VisitInfoSchema&&) = delete;
185  VisitInfoSchema& operator=(VisitInfoSchema&&) = delete;
186 
187 private:
188  VisitInfoSchema()
189  : schema(),
190  exposureId(schema.addField<table::RecordId>("exposureid", "exposure ID", "")),
191  exposureTime(schema.addField<double>("exposuretime", "exposure duration", "s")),
192  darkTime(schema.addField<double>("darktime", "time from CCD flush to readout", "s")),
193  tai(schema.addField<std::int64_t>(
194  "tai", "TAI date and time at middle of exposure as nsec from unix epoch", "nsec")),
195  ut1(schema.addField<double>("ut1", "UT1 date and time at middle of exposure", "MJD")),
196  era(schema.addField<geom::Angle>("era", "earth rotation angle at middle of exposure", "")),
197  boresightRaDec(table::CoordKey::addFields(schema, "boresightradec",
198  "sky position of boresight at middle of exposure")),
199  // CoordKey is only for IcrsCoord; we have no equivalent for other kinds of coordinates
200  // so use a pair of Angle fields to save boresightAzAlt
201  boresightAzAlt_az(schema.addField<geom::Angle>(
202  "boresightazalt_az",
203  "refracted apparent topocentric position of boresight at middle of exposure", "")),
204  boresightAzAlt_alt(schema.addField<geom::Angle>(
205  "boresightazalt_alt",
206  "refracted apparent topocentric position of boresight at middle of exposure", "")),
207  boresightAirmass(schema.addField<double>(
208  "boresightairmass", "airmass at boresight, relative to zenith at sea level", "")),
209  boresightRotAngle(schema.addField<geom::Angle>(
210  "boresightrotangle", "rotation angle at boresight at middle of exposure", "")),
211  rotType(schema.addField<int>("rottype", "rotation type; see VisitInfo.getRotType for details",
212  "MJD")),
213  // observatory data
214  latitude(schema.addField<geom::Angle>("latitude",
215  "latitude of telescope (+ is east of Greenwich)", "")),
216  longitude(schema.addField<geom::Angle>("longitude", "longitude of telescope", "")),
217  elevation(schema.addField<double>("elevation", "elevation of telescope", "")),
218  // weather data
219  airTemperature(schema.addField<double>("airtemperature", "air temperature", "C")),
220  airPressure(schema.addField<double>("airpressure", "air pressure", "Pascal")),
221  humidity(schema.addField<double>("humidity", "humidity (%)", "")) {
222  schema.getCitizen().markPersistent();
223  }
224 };
225 
226 class VisitInfoFactory : public table::io::PersistableFactory {
227 public:
228  virtual std::shared_ptr<table::io::Persistable> read(InputArchive const& archive,
229  CatalogVector const& catalogs) const {
230  VisitInfoSchema const& keys = VisitInfoSchema::get();
231  LSST_ARCHIVE_ASSERT(catalogs.size() == 1u);
232  LSST_ARCHIVE_ASSERT(catalogs.front().size() == 1u);
233  LSST_ARCHIVE_ASSERT(catalogs.front().getSchema() == keys.schema);
234  table::BaseRecord const& record = catalogs.front().front();
235  std::shared_ptr<VisitInfo> result(new VisitInfo(
236  record.get(keys.exposureId), record.get(keys.exposureTime), record.get(keys.darkTime),
237  ::DateTime(record.get(keys.tai), ::DateTime::TAI), record.get(keys.ut1), record.get(keys.era),
238  record.get(keys.boresightRaDec),
239  coord::Coord(record.get(keys.boresightAzAlt_az), record.get(keys.boresightAzAlt_alt)),
240  record.get(keys.boresightAirmass), record.get(keys.boresightRotAngle),
241  static_cast<RotType>(record.get(keys.rotType)),
242  coord::Observatory(record.get(keys.longitude), record.get(keys.latitude),
243  record.get(keys.elevation)),
244  coord::Weather(record.get(keys.airTemperature), record.get(keys.airPressure),
245  record.get(keys.humidity))));
246  return result;
247  }
248 
249  explicit VisitInfoFactory(std::string const& name) : table::io::PersistableFactory(name) {}
250 };
251 
252 std::string getVisitInfoPersistenceName() { return "VisitInfo"; }
253 
254 VisitInfoFactory registration(getVisitInfoPersistenceName());
255 
256 } // anonymous
257 
258 namespace detail {
259 
261  int nstripped = 0;
262 
263  std::vector<std::string> keyList = {
264  "EXPID", "EXPTIME", "DARKTIME", "DATE-AVG", "TIMESYS", "TIME-MID", "MJD-AVG-UT1",
265  "AVG-ERA", "BORE-RA", "BORE-DEC", "BORE-AZ", "BORE-ALT", "BORE-AIRMASS", "BORE-ROTANG",
266  "ROTTYPE", "OBS-LONG", "OBS-LAT", "OBS-ELEV", "AIRTEMP", "AIRPRESS", "HUMIDITY"};
267  for (auto&& key : keyList) {
268  if (metadata.exists(key)) {
269  metadata.remove(key);
270  nstripped++;
271  }
272  }
273  return nstripped;
274 }
275 
276 void setVisitInfoMetadata(daf::base::PropertyList& metadata, VisitInfo const& visitInfo) {
277  if (visitInfo.getExposureId() != 0) {
278  metadata.set("EXPID", visitInfo.getExposureId());
279  }
280  setDouble(metadata, "EXPTIME", visitInfo.getExposureTime(), "Exposure time (sec)");
281  setDouble(metadata, "DARKTIME", visitInfo.getDarkTime(), "Time from CCD flush to readout (sec)");
282  if (visitInfo.getDate().isValid()) {
283  metadata.set("DATE-AVG", visitInfo.getDate().toString(::DateTime::TAI),
284  "TAI date at middle of observation");
285  metadata.set("TIMESYS", "TAI");
286  }
287  setDouble(metadata, "MJD-AVG-UT1", visitInfo.getUt1(), "UT1 MJD date at ctr of obs");
288  setAngle(metadata, "AVG-ERA", visitInfo.getEra(), "Earth rot ang at ctr of obs (deg)");
289  auto boresightRaDec = visitInfo.getBoresightRaDec();
290  setAngle(metadata, "BORE-RA", boresightRaDec[0], "ICRS RA (deg) at boresight");
291  setAngle(metadata, "BORE-DEC", boresightRaDec[1], "ICRS Dec (deg) at boresight");
292  auto boresightAzAlt = visitInfo.getBoresightAzAlt();
293  setAngle(metadata, "BORE-AZ", boresightAzAlt[0], "Refr app topo az (deg) at bore");
294  setAngle(metadata, "BORE-ALT", boresightAzAlt[1], "Refr app topo alt (deg) at bore");
295  setDouble(metadata, "BORE-AIRMASS", visitInfo.getBoresightAirmass(), "Airmass at boresight");
296  setAngle(metadata, "BORE-ROTANG", visitInfo.getBoresightRotAngle(), "Rotation angle (deg) at boresight");
297  metadata.set("ROTTYPE", rotTypeStrFromEnum(visitInfo.getRotType()), "Type of rotation angle");
298  auto observatory = visitInfo.getObservatory();
299  setAngle(metadata, "OBS-LONG", observatory.getLongitude(), "Telescope longitude (+E, deg)");
300  setAngle(metadata, "OBS-LAT", observatory.getLatitude(), "Telescope latitude (deg)");
301  setDouble(metadata, "OBS-ELEV", observatory.getElevation(), "Telescope elevation (m)");
302  auto weather = visitInfo.getWeather();
303  setDouble(metadata, "AIRTEMP", weather.getAirTemperature(), "Outside air temperature (C)");
304  setDouble(metadata, "AIRPRESS", weather.getAirPressure(), "Outdoor air pressure (P)");
305  setDouble(metadata, "HUMIDITY", weather.getHumidity(), "Relative humidity (%)");
306 }
307 
308 } // lsst::afw::image::detail
309 
311  : _exposureId(0),
312  _exposureTime(nan), // don't use getDouble because str values are also accepted
313  _darkTime(getDouble(metadata, "DARKTIME")),
314  _date(),
315  _ut1(getDouble(metadata, "MJD-AVG-UT1")),
316  _era(getAngle(metadata, "AVG-ERA")),
317  _boresightRaDec(coord::IcrsCoord(getAngle(metadata, "BORE-RA"), getAngle(metadata, "BORE-DEC"))),
318  _boresightAzAlt(coord::Coord(getAngle(metadata, "BORE-AZ"), getAngle(metadata, "BORE-ALT"))),
319  _boresightAirmass(getDouble(metadata, "BORE-AIRMASS")),
320  _boresightRotAngle(getAngle(metadata, "BORE-ROTANG")),
321  _rotType(RotType::UNKNOWN),
322  _observatory(getAngle(metadata, "OBS-LONG"), getAngle(metadata, "OBS-LAT"),
323  getDouble(metadata, "OBS-ELEV")),
324  _weather(getDouble(metadata, "AIRTEMP"), getDouble(metadata, "AIRPRESS"),
325  getDouble(metadata, "HUMIDITY")) {
326  auto key = "EXPID";
327  if (metadata.exists(key)) {
328  _exposureId = metadata.getAsInt64(key);
329  }
330 
331  key = "EXPTIME";
332  if (metadata.exists(key)) {
333  try {
334  _exposureTime = metadata.getAsDouble(key);
335  } catch (lsst::pex::exceptions::TypeError& err) {
336  // some old exposures have EXPTIME stored as a string
337  std::string exptimeStr = metadata.getAsString(key);
338  _exposureTime = std::stod(exptimeStr);
339  }
340  }
341 
342  key = "DATE-AVG";
343  if (metadata.exists(key)) {
344  if (metadata.exists("TIMESYS")) {
345  auto timesysName = boost::algorithm::trim_right_copy(metadata.getAsString("TIMESYS"));
346  if (timesysName != "TAI") {
347  // rather than try to deal with all the possible choices, which requires
348  // appending or deleting a "Z", depending on the time system, just give up.
349  // VisitInfo should be used on FITS headers that have been sanitized!
350  std::ostringstream os;
351  os << "TIMESYS = \"" << timesysName
352  << "\"; VisitInfo requires TIMESYS to exist and to equal \"TAI\"";
353  throw LSST_EXCEPT(lsst::pex::exceptions::RuntimeError, os.str());
354  }
355  } else {
356  throw LSST_EXCEPT(lsst::pex::exceptions::RuntimeError,
357  "TIMESYS not found; VistitInfo requires TIMESYS to exist and to equal \"TAI\"");
358  }
359  _date = ::DateTime(boost::algorithm::trim_right_copy(metadata.getAsString(key)), ::DateTime::TAI);
360  } else {
361  // DATE-AVG not found. For backwards compatibility look for TIME-MID, an outdated LSST keyword
362  // whose time system was UTC, despite a FITS comment claiming it was TAI. Ignore TIMESYS.
363  key = "TIME-MID";
364  if (metadata.exists(key)) {
365  _date = ::DateTime(boost::algorithm::trim_right_copy(metadata.getAsString(key)), ::DateTime::UTC);
366  }
367  }
368 
369  key = "ROTTYPE";
370  if (metadata.exists(key)) {
371  _rotType = rotTypeEnumFromStr(metadata.getAsString(key));
372  }
373 }
374 
375 bool VisitInfo::operator==(VisitInfo const& other) const {
376  return _exposureId == other.getExposureId() && _exposureTime == other.getExposureTime() &&
377  _darkTime == other.getDarkTime() && _date == other.getDate() && _ut1 == other.getUt1() &&
378  _era == other.getEra() && _boresightRaDec == other.getBoresightRaDec() &&
379  _boresightAzAlt == other.getBoresightAzAlt() && _boresightAirmass == other.getBoresightAirmass() &&
380  _boresightRotAngle == other.getBoresightRotAngle() && _rotType == other.getRotType() &&
381  _observatory == other.getObservatory() && _weather == other.getWeather();
382 }
383 
384 std::string VisitInfo::getPersistenceName() const { return getVisitInfoPersistenceName(); }
385 
387  VisitInfoSchema const& keys = VisitInfoSchema::get();
388  table::BaseCatalog cat = handle.makeCatalog(keys.schema);
389  std::shared_ptr<table::BaseRecord> record = cat.addNew();
390  record->set(keys.exposureId, getExposureId());
391  record->set(keys.exposureTime, getExposureTime());
392  record->set(keys.darkTime, getDarkTime());
393  record->set(keys.tai, getDate().nsecs(::DateTime::TAI));
394  record->set(keys.ut1, getUt1());
395  record->set(keys.era, getEra());
396  record->set(keys.boresightRaDec, getBoresightRaDec());
397  auto boresightAzAlt = getBoresightAzAlt();
398  record->set(keys.boresightAzAlt_az, boresightAzAlt[0]);
399  record->set(keys.boresightAzAlt_alt, boresightAzAlt[1]);
400  record->set(keys.boresightAirmass, getBoresightAirmass());
401  record->set(keys.boresightRotAngle, getBoresightRotAngle());
402  record->set(keys.rotType, static_cast<int>(getRotType()));
403  auto observatory = getObservatory();
404  record->set(keys.latitude, observatory.getLatitude());
405  record->set(keys.longitude, observatory.getLongitude());
406  record->set(keys.elevation, observatory.getElevation());
407  auto weather = getWeather();
408  record->set(keys.airTemperature, weather.getAirTemperature());
409  record->set(keys.airPressure, weather.getAirPressure());
410  record->set(keys.humidity, weather.getHumidity());
411  handle.saveCatalog(cat);
412 }
413 
415 
417 }
418 }
419 } // namespace
std::int64_t RecordId
Type used for unique IDs for records.
Definition: misc.h:22
geom::Angle getBoresightHourAngle() const
Definition: VisitInfo.cc:416
virtual void write(OutputArchiveHandle &handle) const
Write the object to one or more catalogs.
Definition: VisitInfo.cc:386
geom::Angle getBoresightRotAngle() const
Get rotation angle at boresight at middle of exposure.
Definition: VisitInfo.h:158
bool operator==(VisitInfo const &other) const
Definition: VisitInfo.cc:375
lsst::afw::geom::Angle Angle
Definition: misc.h:36
lsst::afw::coord::Coord Coord
Definition: misc.h:33
table::Key< geom::Angle > longitude
Definition: VisitInfo.cc:167
table::RecordId getExposureId() const
get exposure ID
Definition: VisitInfo.h:123
An object passed to Persistable::write to allow it to persist itself.
table::Key< double > ut1
Definition: VisitInfo.cc:157
table::Key< double > airTemperature
Definition: VisitInfo.cc:170
A custom container class for records, based on std::vector.
Definition: Catalog.h:96
coord::Coord getBoresightAzAlt() const
get refracted apparent topocentric Az/Alt position at the boresight (and at the middle of the exposur...
Definition: VisitInfo.h:146
#define LSST_ARCHIVE_ASSERT(EXPR)
An assertion macro used to validate the structure of an InputArchive.
Definition: Persistable.h:47
AngleUnit constexpr radians
constant with units of radians
Definition: Angle.h:88
table::CoordKey boresightRaDec
Definition: VisitInfo.cc:159
RotType
Type of rotation.
Definition: VisitInfo.h:44
Information about a single exposure of an imaging camera.
Definition: VisitInfo.h:67
AngleUnit constexpr degrees
constant with units of degrees
Definition: Angle.h:89
table::Key< double > boresightAirmass
Definition: VisitInfo.cc:162
geom::Angle getEra() const
get earth rotation angle at middle of exposure
Definition: VisitInfo.h:138
table::Key< int > rotType
Definition: VisitInfo.cc:164
Rotation angle is unknown.
void setVisitInfoMetadata(daf::base::PropertyList &metadata, VisitInfo const &visitInfo)
Set FITS metadata from a VisitInfo.
Definition: VisitInfo.cc:276
A class representing an angle.
Definition: Angle.h:103
table::Key< double > exposureTime
Definition: VisitInfo.cc:154
double getBoresightAirmass() const
get airmass at the boresight, relative to zenith at sea level (and at the middle of the exposure...
Definition: VisitInfo.h:150
lsst::afw::geom::Angle getLongitude() const
get telescope longitude (positive values are E of Greenwich)
Definition: Observatory.cc:47
lsst::afw::coord::IcrsCoord IcrsCoord
Definition: misc.h:35
table::Key< geom::Angle > latitude
Definition: VisitInfo.cc:166
table::Key< double > humidity
Definition: VisitInfo.cc:172
daf::base::DateTime getDate() const
get uniform date and time at middle of exposure
Definition: VisitInfo.h:132
coord::Weather getWeather() const
get basic weather information
Definition: VisitInfo.h:167
table::Key< table::RecordId > exposureId
Definition: VisitInfo.cc:153
table::Key< std::string > name
Definition: ApCorrMap.cc:71
table::Key< double > elevation
Definition: VisitInfo.cc:168
table::Key< geom::Angle > boresightRotAngle
Definition: VisitInfo.cc:163
table::Key< geom::Angle > era
Definition: VisitInfo.cc:158
BaseCatalog makeCatalog(Schema const &schema)
Return a new, empty catalog with the given schema.
double getUt1() const
get UT1 (universal time) MJD date at middle of exposure
Definition: VisitInfo.h:135
virtual std::string getPersistenceName() const
Return the unique name used to persist this object and look up its factory.
Definition: VisitInfo.cc:384
table::Key< double > airPressure
Definition: VisitInfo.cc:171
Position angle of focal plane +Y, measured from N through E.
lsst::daf::base::PropertySet PropertySet
Definition: Wcs.cc:55
geom::Angle getLocalEra() const
Definition: VisitInfo.cc:414
afw::table::Key< afw::table::Array< ImagePixelT > > image
VisitInfo(table::RecordId exposureId, double exposureTime, double darkTime, daf::base::DateTime const &date, double ut1, geom::Angle const &era, coord::IcrsCoord const &boresightRaDec, coord::Coord const &boresightAzAlt, double boresightAirmass, geom::Angle const &boresightRotAngle, RotType const &rotType, coord::Observatory const &observatory, coord::Weather const &weather)
Construct a VisitInfo.
Definition: VisitInfo.h:91
table::Key< geom::Angle > boresightAzAlt_az
Definition: VisitInfo.cc:160
int stripVisitInfoKeywords(daf::base::PropertySet &metadata)
Remove VisitInfo-related keywords from the metadata.
Definition: VisitInfo.cc:260
Position angle of focal plane +Y, measured from +Alt through +Az.
table::Key< geom::Angle > boresightAzAlt_alt
Definition: VisitInfo.cc:161
table::Key< std::int64_t > tai
Definition: VisitInfo.cc:156
void saveCatalog(BaseCatalog const &catalog)
Save a catalog in the archive.
py::object result
Definition: schema.cc:290
coord::Observatory getObservatory() const
get observatory longitude, latitude and elevation
Definition: VisitInfo.h:164
table::Key< double > darkTime
Definition: VisitInfo.cc:155
double getExposureTime() const
get exposure duration (shutter open time); (sec)
Definition: VisitInfo.h:126
RotType getRotType() const
get rotation type of boresightRotAngle
Definition: VisitInfo.h:161
The position sent to the instrument rotator; the details depend on the rotator.
afw::table::Schema schema
Definition: GaussianPsf.cc:43
double getDarkTime() const
get time from CCD flush to exposure readout, including shutter open time (despite the name); (sec) ...
Definition: VisitInfo.h:129
lsst::daf::base::PropertyList PropertyList
Definition: Wcs.cc:56
coord::IcrsCoord 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:142
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:461