isce3 0.25.0
Loading...
Searching...
No Matches
ElNullRangeEst.h
1#pragma once
2
3#include <cmath>
4#include <complex>
5#include <optional>
6#include <string>
7#include <tuple>
8#include <vector>
9
10#include <Eigen/Dense>
11
12#include <isce3/core/Attitude.h>
13#include <isce3/core/DateTime.h>
14#include <isce3/core/EMatrix.h>
15#include <isce3/core/Ellipsoid.h>
16#include <isce3/core/Linspace.h>
17#include <isce3/core/Orbit.h>
18#include <isce3/core/Poly1d.h>
19#include <isce3/geometry/DEMInterpolator.h>
20
21#include "Frame.h"
22
23namespace isce3 { namespace antenna {
24
30 double el_angle;
32 double doppler;
34 double magnitude;
35};
36
49
55 Eigen::ArrayXd ant;
58 Eigen::ArrayXd echo;
60 Eigen::ArrayXd el;
61};
62
75 // aliases
76public:
77 using RowMatrixXcf = isce3::core::EMatrix2D<std::complex<float>>;
78
79protected:
80 using Linspace_t = isce3::core::Linspace<double>;
81 using tuple_null = std::tuple<isce3::core::DateTime, NullProduct,
83
84public:
85 // constructors
115 ElNullRangeEst(double wavelength, double sr_spacing, double chirp_rate,
116 double chirp_dur, const isce3::core::Orbit& orbit,
117 const isce3::core::Attitude& attitude,
118 const isce3::geometry::DEMInterpolator& dem_interp = {},
119 const Frame& ant_frame = {},
120 const isce3::core::Ellipsoid& ellips = {},
121 double el_res = 8.726646259971648e-06, double abs_tol_dem = 1.0,
122 int max_iter_dem = 20, int polyfit_deg = 6);
123
124 // methods
171 genNullRangeDoppler(const Eigen::Ref<const RowMatrixXcf>& echo_left,
172 const Eigen::Ref<const RowMatrixXcf>& echo_right,
173 const Eigen::Ref<const Eigen::ArrayXcd>& el_cut_left,
174 const Eigen::Ref<const Eigen::ArrayXcd>& el_cut_right,
175 double sr_start, double el_ang_start, double el_ang_step,
176 double az_ang, std::optional<double> az_time = {}) const;
177
181 double waveLength() const { return _wavelength; }
182
186 double slantRangeSpacing() const { return _sr_spacing; }
187
191 std::string gridTypeName() const { return toStr(_ant_frame.gridType()); }
192
197 Eigen::ArrayXcf chirpSampleRef() const
198 {
199 return Eigen::Map<const Eigen::ArrayXcf>(
200 _chirp_ref.data(), _chirp_ref.size());
201 }
202
206 std::string refEpoch() const { return _ref_epoch.isoformat(); }
207
211 double demRefHeight() const { return _dem_interp.refHeight(); }
212
216 double midTimeOrbit() const { return _az_time_mid; }
217
221 double maxElSpacing() const { return _el_res_max; }
222
227 double atolDEM() const { return _abs_tol_dem; }
228
233 int maxIterDEM() const { return _max_iter_dem; }
234
239 double atolNull() const { return _ftol_newton; }
240
245 int maxIterNull() const { return _max_iter_newton; }
246
250 int polyfitDeg() const { return _polyfit_deg; }
251
252protected:
253 double _wavelength;
254 double _sr_spacing;
255 isce3::core::Orbit _orbit;
256 isce3::core::Attitude _attitude;
258 Frame _ant_frame;
260 double _el_res_max; // (rad)
261 double _abs_tol_dem;
262 int _max_iter_dem;
263 int _polyfit_deg;
264
265 // weighted complex chirp reference
266 std::vector<std::complex<float>> _chirp_ref;
267 // orbit mid azimuth time and reference epoch
268 double _az_time_mid;
269 isce3::core::DateTime _ref_epoch;
270
271 // func tolerance and max iteration for Newton solver
272 const double _ftol_newton {1e-5};
273 const int _max_iter_newton {25};
274};
275
276}} // namespace isce3::antenna
double midTimeOrbit() const
Definition ElNullRangeEst.h:216
double waveLength() const
Definition ElNullRangeEst.h:181
int maxIterNull() const
Definition ElNullRangeEst.h:245
double demRefHeight() const
Definition ElNullRangeEst.h:211
double maxElSpacing() const
Definition ElNullRangeEst.h:221
double atolDEM() const
Definition ElNullRangeEst.h:227
std::string refEpoch() const
Definition ElNullRangeEst.h:206
int maxIterDEM() const
Definition ElNullRangeEst.h:233
std::tuple< isce3::core::DateTime, NullProduct, NullProduct, NullConvergenceFlags, NullPowPatterns > genNullRangeDoppler(const Eigen::Ref< const RowMatrixXcf > &echo_left, const Eigen::Ref< const RowMatrixXcf > &echo_right, const Eigen::Ref< const Eigen::ArrayXcd > &el_cut_left, const Eigen::Ref< const Eigen::ArrayXcd > &el_cut_right, double sr_start, double el_ang_start, double el_ang_step, double az_ang, std::optional< double > az_time={}) const
Generate null products from echo (measured) and antenna (nominal/expected).
Definition ElNullRangeEst.cpp:46
std::string gridTypeName() const
Definition ElNullRangeEst.h:191
Eigen::ArrayXcf chirpSampleRef() const
Definition ElNullRangeEst.h:197
double atolNull() const
Definition ElNullRangeEst.h:239
ElNullRangeEst(double wavelength, double sr_spacing, double chirp_rate, double chirp_dur, const isce3::core::Orbit &orbit, const isce3::core::Attitude &attitude, const isce3::geometry::DEMInterpolator &dem_interp={}, const Frame &ant_frame={}, const isce3::core::Ellipsoid &ellips={}, double el_res=8.726646259971648e-06, double abs_tol_dem=1.0, int max_iter_dem=20, int polyfit_deg=6)
A constructor.
Definition ElNullRangeEst.cpp:15
double slantRangeSpacing() const
Definition ElNullRangeEst.h:186
int polyfitDeg() const
Definition ElNullRangeEst.h:250
A class for antenna frame and spherical-cartesian coordinate transformation.
Definition Frame.h:21
Store and interpolate attitude measurements.
Definition Attitude.h:17
Data structure to store date time to nano-sec precision.
Definition DateTime.h:18
Data structure to store Ellipsoid information.
Definition Ellipsoid.h:20
A uniformly-spaced sequence of values over some interval.
Definition Linspace.h:9
Sequence of platform ephemeris samples (state vectors) with uniform temporal spacing,...
Definition Orbit.h:44
Definition DEMInterpolator.h:25
base interpolator is an abstract base class
Definition BinarySearchFunc.cpp:5
A set of flags indicating convergence of iterative operations used in EL null product formation.
Definition ElNullRangeEst.h:41
bool geometry_antenna
Indicates geometry-related convergence for antenna null estimation.
Definition ElNullRangeEst.h:47
bool geometry_echo
Indicates geometry-related convergence for echo null estimation.
Definition ElNullRangeEst.h:45
bool newton_solver
Indicates convergence of the 1-D Newton root solver.
Definition ElNullRangeEst.h:43
EL Null Power Patterns for both echo and antenna as a function of EL angles.
Definition ElNullRangeEst.h:52
Eigen::ArrayXd echo
1-D echo null power pattern (linear) in EL formed from a pair of adjacent channels
Definition ElNullRangeEst.h:58
Eigen::ArrayXd el
Elevation (EL) angles (radians)
Definition ElNullRangeEst.h:60
Eigen::ArrayXd ant
1-D antenna null power pattern (linear) in EL formed from a pair of adjacent beams
Definition ElNullRangeEst.h:55
EL null product.
Definition ElNullRangeEst.h:26
double slant_range
Slant range of the null location in (m)
Definition ElNullRangeEst.h:28
double el_angle
Elevation angle of the null location in (rad)
Definition ElNullRangeEst.h:30
double doppler
Doppler at the null location in (Hz)
Definition ElNullRangeEst.h:32
double magnitude
Relative magnitude of the null w.r.t left/right peaks in (linear)
Definition ElNullRangeEst.h:34

Generated for ISCE3.0 by doxygen 1.13.2.