9 #include <isce3/core/Metadata.h>
10 #include <isce3/core/DateTime.h>
11 #include <isce3/core/LookSide.h>
12 #include <isce3/core/TimeDelta.h>
13 #include <isce3/except/Error.h>
27 char frequency =
'A');
66 inline void lookSide(
const std::string &);
89 inline double prf()
const {
return _prf; }
92 inline void prf(
const double & t){
_prf = t; }
176 if ((azlooks == 0) || (rglooks == 0))
178 std::string errstr =
"Number of looks must be positive. " +
179 std::to_string(azlooks) +
"Az x" +
180 std::to_string(rglooks) +
"Rg looks requested.";
187 prf() / (1.0 * azlooks),
230 : _lookSide(isce3::core::LookSide::Left), _sensingStart {0},
231 _wavelength {0}, _prf {0}, _startingRange {0},
232 _rangePixelSpacing {0}, _rlength {0}, _rwidth {0}, _refEpoch {1} {}
240 _lookSide(meta.lookSide),
241 _sensingStart((meta.sensingStart - refEpoch).getTotalSeconds()),
242 _wavelength(meta.radarWavelength),
244 _startingRange(meta.rangeFirstSample),
245 _rangePixelSpacing(meta.slantRangePixelSpacing),
246 _rlength(meta.length),
254 _lookSide(rgparams.lookSide()),
255 _sensingStart(rgparams.sensingStart()),
256 _wavelength(rgparams.wavelength()),
257 _prf(rgparams.prf()),
258 _startingRange(rgparams.startingRange()),
259 _rangePixelSpacing(rgparams.rangePixelSpacing()),
260 _rlength(rgparams.length()),
261 _rwidth(rgparams.width()),
262 _refEpoch(rgparams.refEpoch()) {
validate(); }
271 _prf = rgparams.
prf();
275 _rlength = rgparams.
length();
276 _rwidth = rgparams.
width();
287 double startingRange,
288 double rangePixelSpacing,
294 _sensingStart(sensingStart),
295 _wavelength(wavelength),
297 _startingRange(startingRange),
298 _rangePixelSpacing(rangePixelSpacing),
309 std::string errstr =
"";
311 if (wavelength() <= 0.)
313 errstr +=
"Radar wavelength must be positive. \n";
318 errstr +=
"Pulse Repetition Frequency must be positive. \n";
321 if (startingRange() <= 0.)
323 errstr +=
"Starting Range must be positive. \n";
326 if (rangePixelSpacing() <= 0. )
328 errstr +=
"Slant range pixel spacing must be positive. \n";
333 errstr +=
"Radar Grid should have length of at least 1. \n";
338 errstr +=
"Radar Grid should have width of at least 1. \n";
341 if (! errstr.empty())
double _startingRange
Slant range to center of first pixel.
Definition: RadarGridParameters.h:211
double _wavelength
Imaging wavelength.
Definition: RadarGridParameters.h:205
void lookSide(isce3::core::LookSide side)
Set look direction.
Definition: RadarGridParameters.h:63
double sensingStart() const
Get sensing start time in seconds since reference epoch.
Definition: RadarGridParameters.h:77
RadarGridParameters & operator=(const RadarGridParameters &rgparam)
Assignment operator.
Definition: RadarGridParameters.h:268
void width(const size_t &t)
Set radar grid width.
Definition: RadarGridParameters.h:119
double endingRange() const
Get ending slant range.
Definition: RadarGridParameters.h:143
Data structure to store date time to nano-sec precision.
Definition: DateTime.h:18
double sensingMid() const
Get sensing mid time in seconds.
Definition: RadarGridParameters.h:128
LookSide
Side that radar looks at, Left or Right.
Definition: LookSide.h:13
Definition: RadarGridParameters.h:15
void length(const size_t &t)
Set radar grid length.
Definition: RadarGridParameters.h:113
size_t width() const
Get radar grid width.
Definition: RadarGridParameters.h:116
size_t _rlength
Number of lines in the image.
Definition: RadarGridParameters.h:217
void sensingStart(const double &t)
Set sensing start time in seconds since reference epoch.
Definition: RadarGridParameters.h:80
void validate() const
Validate parameters of data structure.
Definition: RadarGridParameters.h:306
double prf() const
Get pulse repetition frequency in Hz - inverse of azimuth time interval.
Definition: RadarGridParameters.h:89
size_t length() const
Get radar grid length.
Definition: RadarGridParameters.h:110
isce3::core::LookSide lookSide() const
Get the look direction.
Definition: RadarGridParameters.h:60
isce3::core::DateTime sensingDateTime(double line) const
Get a sensing DateTime for a given line (zero-index row)
Definition: RadarGridParameters.h:138
RadarGridParameters offsetAndResize(double yoff, double xoff, size_t ysize, size_t xsize) const
Crop/ Expand while keeping the spacing the same with top left offset and size.
Definition: RadarGridParameters.h:158
double sensingStop() const
Get sensing stop time in seconds since reference epoch.
Definition: RadarGridParameters.h:125
double azimuthTimeInterval() const
Get azimuth time interval in seconds.
Definition: RadarGridParameters.h:95
const isce3::core::DateTime & refEpoch() const
Get reference epoch DateTime.
Definition: RadarGridParameters.h:69
double midRange() const
Get middle slant range.
Definition: RadarGridParameters.h:148
double rangePixelSpacing() const
Get slant range pixel spacing in meters.
Definition: RadarGridParameters.h:104
LookSide parseLookSide(const std::string &str)
Parse string (e.g., "left" or "right") to enum LookSide.
Definition: LookSide.cpp:13
RadarGridParameters multilook(size_t azlooks, size_t rglooks) const
Multilook.
Definition: RadarGridParameters.h:173
double startingRange() const
Get starting slant range in meters.
Definition: RadarGridParameters.h:98
double _rangePixelSpacing
Slant range pixel spacing.
Definition: RadarGridParameters.h:214
void startingRange(const double &r)
Set starting slant range in meters.
Definition: RadarGridParameters.h:101
void prf(const double &t)
Set pulse repetition frequency in Hz - inverse of azimuth time interval.
Definition: RadarGridParameters.h:92
isce3::core::LookSide _lookSide
Left or right looking geometry indicator.
Definition: RadarGridParameters.h:199
RadarGridParameters()
Default constructor.
Definition: RadarGridParameters.h:229
double _sensingStart
Sensing start time.
Definition: RadarGridParameters.h:202
double _prf
PRF.
Definition: RadarGridParameters.h:208
double sensingTime(double line) const
Get sensing time for a given line (zero-index row)
Definition: RadarGridParameters.h:133
size_t _rwidth
Number of samples in the image.
Definition: RadarGridParameters.h:220
double wavelength() const
Get radar wavelength in meters.
Definition: RadarGridParameters.h:83
void rangePixelSpacing(const double &t)
Set slant range pixel spacing in meters.
Definition: RadarGridParameters.h:107
isce3::core::DateTime _refEpoch
Reference epoch for time tags.
Definition: RadarGridParameters.h:223
void refEpoch(const isce3::core::DateTime &epoch)
Set reference epoch DateTime.
Definition: RadarGridParameters.h:74
size_t size() const
Get total number of radar grid elements.
Definition: RadarGridParameters.h:122
void wavelength(const double &t)
Set radar wavelength in meters.
Definition: RadarGridParameters.h:86
double slantRange(double sample) const
Get slant range for a given sample (zero-index column)
Definition: RadarGridParameters.h:153