isce3 0.25.0
Loading...
Searching...
No Matches
Swath.h
1//-*- C++ -*-
2//-*- coding: utf-8 -*-
3
4#pragma once
5
6#include <string>
7#include <valarray>
8#include <isce3/core/DateTime.h>
9#include <isce3/core/LUT2d.h>
10#include <isce3/core/Constants.h>
11#include <isce3/product/SubSwaths.h>
12#include <isce3/io/Raster.h>
13#include <isce3/except/Error.h>
14
15// Declaration
16namespace isce3 {
17 namespace product {
18 class Swath;
19 }
20}
21
22// isce3::product::Swath definition
24
25 public:
26 // Constructors
27 inline Swath() {};
28
30 inline const std::valarray<double> & slantRange() const { return _slantRange; }
32 inline void slantRange(const std::valarray<double> & rng) {
33 _slantRange = rng;
34 _subSwaths.width(_slantRange.size());
35 }
36
38 inline double rangePixelSpacing() const { return _slantRange[1] - _slantRange[0]; }
39
41 inline const std::valarray<double> & zeroDopplerTime() const { return _zeroDopplerTime; }
43 inline void zeroDopplerTime(const std::valarray<double> & t) {
44 _zeroDopplerTime = t;
45 _subSwaths.length(_zeroDopplerTime.size());
46 }
47
49 inline size_t samples() const { return _slantRange.size(); }
50
52 inline size_t lines() const { return _zeroDopplerTime.size(); }
53
55 inline double acquiredCenterFrequency() const { return _acquiredCenterFrequency; }
57 inline void acquiredCenterFrequency(double f) { _acquiredCenterFrequency = f; }
58
60 inline double processedCenterFrequency() const { return _processedCenterFrequency; }
62 inline void processedCenterFrequency(double f) { _processedCenterFrequency = f; }
63
65 inline double processedWavelength() const {
66 return isce3::core::speed_of_light / _processedCenterFrequency;
67 }
68
70 inline double acquiredRangeBandwidth() const { return _acquiredRangeBandwidth; }
72 inline void acquiredRangeBandwidth(double b) { _acquiredRangeBandwidth = b; }
73
75 inline double processedRangeBandwidth() const { return _processedRangeBandwidth; }
77 inline void processedRangeBandwidth(double b) { _processedRangeBandwidth = b; }
78
80 inline double nominalAcquisitionPRF() const { return _nominalAcquisitionPRF; }
82 inline void nominalAcquisitionPRF(double f) { _nominalAcquisitionPRF = f; }
83
85 inline double zeroDopplerTimeSpacing() const { return _zeroDopplerTimeSpacing; }
87 inline void zeroDopplerTimeSpacing(double dt) { _zeroDopplerTimeSpacing = dt; }
88
90 inline double sceneCenterAlongTrackSpacing() const {
91 return _sceneCenterAlongTrackSpacing;
92 }
93
94 inline void sceneCenterAlongTrackSpacing(double s) {
95 _sceneCenterAlongTrackSpacing = s;
96 }
97
99 inline double sceneCenterGroundRangeSpacing() const {
100 return _sceneCenterGroundRangeSpacing;
101 }
102
103 inline void sceneCenterGroundRangeSpacing(double s) {
104 _sceneCenterGroundRangeSpacing = s;
105 }
106
108 inline double processedAzimuthBandwidth() const { return _processedAzimuthBandwidth; }
110 inline void processedAzimuthBandwidth(double b) { _processedAzimuthBandwidth = b; }
111
113 inline const isce3::core::DateTime & refEpoch() const { return _refEpoch; }
115 inline void refEpoch(const isce3::core::DateTime & epoch) { _refEpoch = epoch; }
116
119 return _subSwaths;
120 }
121
122 inline const isce3::product::SubSwaths& subSwaths() const {
123 return _subSwaths;
124 }
125
127 inline void subSwaths(const isce3::product::SubSwaths &v) {
128 _subSwaths = v;
129 if (_subSwaths.width() != _slantRange.size()) {
130 std::string error_msg = "WARNING the number of range samples";
131 error_msg += " of SubSwaths (";
132 error_msg += std::to_string(_subSwaths.width());
133 error_msg += ") and Swath (" + std::to_string(_slantRange.size());
134 error_msg += ") objects differ.";
135 throw isce3::except::InvalidArgument(ISCE_SRCINFO(), error_msg);
136 }
137 if (_subSwaths.length() != _zeroDopplerTime.size()) {
138 std::string error_msg = "WARNING the number of azimuth lines";
139 error_msg += " of SubSwaths (";
140 error_msg += std::to_string(_subSwaths.length());
141 error_msg += ") and Swath (" + std::to_string(_zeroDopplerTime.size());
142 error_msg += ") objects differ.";
143 throw isce3::except::InvalidArgument(ISCE_SRCINFO(), error_msg);
144 }
145 }
146
147
148 private:
149 // Coordinates
150 std::valarray<double> _slantRange;
151 std::valarray<double> _zeroDopplerTime;
152
153 // Valid samples sub-swath
154 isce3::product::SubSwaths _subSwaths;
155
156 // Other metadata
157 double _acquiredCenterFrequency;
158 double _processedCenterFrequency;
159 double _acquiredRangeBandwidth;
160 double _processedRangeBandwidth;
161 double _nominalAcquisitionPRF; // acquired
162 double _zeroDopplerTimeSpacing; // processed
163 double _sceneCenterAlongTrackSpacing;
164 double _sceneCenterGroundRangeSpacing;
165 double _processedAzimuthBandwidth;
166 size_t _validStart;
167 size_t _validEnd;
168
169 // Reference epoch
170 isce3::core::DateTime _refEpoch;
171};
Data structure to store date time to nano-sec precision.
Definition DateTime.h:18
Sub-swaths metadata of a SAR dataset.
Definition SubSwaths.h:23
Definition Swath.h:23
size_t samples() const
Get the number of samples.
Definition Swath.h:49
void zeroDopplerTime(const std::valarray< double > &t)
Set zero Doppler time array.
Definition Swath.h:43
double rangePixelSpacing() const
Get the range pixel spacing.
Definition Swath.h:38
void processedAzimuthBandwidth(double b)
Set processed azimuth bandwidth.
Definition Swath.h:110
void refEpoch(const isce3::core::DateTime &epoch)
Set reference epoch.
Definition Swath.h:115
const isce3::core::DateTime & refEpoch() const
Get reference epoch.
Definition Swath.h:113
double sceneCenterAlongTrackSpacing() const
Get scene center along track spacing.
Definition Swath.h:90
void sceneCenterGroundRangeSpacing(double s)
Set scene center ground range spacing.
Definition Swath.h:103
double processedAzimuthBandwidth() const
Get processed azimuth bandwidth.
Definition Swath.h:108
void acquiredCenterFrequency(double f)
Set acquired center frequency.
Definition Swath.h:57
void processedRangeBandwidth(double b)
Set acquired range bandwidth.
Definition Swath.h:77
void nominalAcquisitionPRF(double f)
Set nominal acquisition PRF.
Definition Swath.h:82
double acquiredCenterFrequency() const
Get acquired center frequency.
Definition Swath.h:55
void zeroDopplerTimeSpacing(double dt)
Set time spacing of raster grid.
Definition Swath.h:87
void slantRange(const std::valarray< double > &rng)
Set slant range array.
Definition Swath.h:32
double processedCenterFrequency() const
Get processed center frequency.
Definition Swath.h:60
void subSwaths(const isce3::product::SubSwaths &v)
Set SubSwaths object.
Definition Swath.h:127
const std::valarray< double > & zeroDopplerTime() const
Get zero Doppler time array.
Definition Swath.h:41
void sceneCenterAlongTrackSpacing(double s)
Set scene center along track spacing.
Definition Swath.h:94
size_t lines() const
Get the number of lines.
Definition Swath.h:52
isce3::product::SubSwaths & subSwaths()
Get SubSwaths object.
Definition Swath.h:118
double sceneCenterGroundRangeSpacing() const
Get scene center ground range spacing.
Definition Swath.h:99
double processedWavelength() const
Get processed wavelength.
Definition Swath.h:65
void processedCenterFrequency(double f)
Set processed center frequency.
Definition Swath.h:62
double processedRangeBandwidth() const
Get processed range bandwidth.
Definition Swath.h:75
double acquiredRangeBandwidth() const
Get acquired range bandwidth.
Definition Swath.h:70
double zeroDopplerTimeSpacing() const
Get time spacing of raster grid.
Definition Swath.h:85
double nominalAcquisitionPRF() const
Get nominal acquisition PRF.
Definition Swath.h:80
const std::valarray< double > & slantRange() const
Get slant range array.
Definition Swath.h:30
void acquiredRangeBandwidth(double b)
Set acquired range bandwidth.
Definition Swath.h:72
The isce3::product namespace.
Definition forward.h:3
base interpolator is an abstract base class
Definition BinarySearchFunc.cpp:5

Generated for ISCE3.0 by doxygen 1.13.2.