Skip to content

Commit e1cd209

Browse files
bhawkinsGitHub Enterprise
authored andcommitted
Fix mixup between acquired PRF and processed PRF (#702)
* Add grid spacing to swath object. * Fix acquired/processed PRF mixup in RadarGridParameters ctor. * Fix acquired/processed PRF mixup in ResampSlc. * pybind11 Swath time spacing property.
1 parent afdf0b0 commit e1cd209

File tree

5 files changed

+15
-3
lines changed

5 files changed

+15
-3
lines changed

cxx/isce3/image/ResampSlc.icc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ inline void ResampSlc::_setDataFromSwath(const isce3::product::Swath& swath)
100100
_startingRange = swath.slantRange()[0];
101101
_rangePixelSpacing = swath.rangePixelSpacing();
102102
_sensingStart = swath.zeroDopplerTime()[0];
103-
_prf = swath.nominalAcquisitionPRF();
103+
_prf = 1.0 / swath.zeroDopplerTimeSpacing();
104104
_wavelength = swath.processedWavelength();
105105
}
106106

cxx/isce3/product/RadarGridParameters.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RadarGridParameters(const Swath & swath, isce3::core::LookSide lookSide) :
1414
_lookSide(lookSide),
1515
_sensingStart(swath.zeroDopplerTime()[0]),
1616
_wavelength(swath.processedWavelength()),
17-
_prf(swath.nominalAcquisitionPRF()),
17+
_prf(1.0 / swath.zeroDopplerTimeSpacing()),
1818
_startingRange(swath.slantRange()[0]),
1919
_rangePixelSpacing(swath.rangePixelSpacing()),
2020
_rlength(swath.lines()),

cxx/isce3/product/Serialization.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ namespace isce3 {
113113
isce3::io::loadFromH5(fgroup, "nominalAcquisitionPRF", value);
114114
swath.nominalAcquisitionPRF(value);
115115

116+
isce3::io::loadFromH5(group, "zeroDopplerTimeSpacing", value);
117+
swath.zeroDopplerTimeSpacing(value);
118+
116119
isce3::io::loadFromH5(fgroup, "sceneCenterGroundRangeSpacing", value);
117120
swath.sceneCenterGroundRangeSpacing(value);
118121

cxx/isce3/product/Swath.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ class isce3::product::Swath {
7777
/** Set nominal acquisition PRF */
7878
inline void nominalAcquisitionPRF(double f) { _nominalAcquisitionPRF = f; }
7979

80+
/** Get time spacing of raster grid */
81+
inline double zeroDopplerTimeSpacing() const { return _zeroDopplerTimeSpacing; }
82+
/** Set time spacing of raster grid */
83+
inline void zeroDopplerTimeSpacing(double dt) { _zeroDopplerTimeSpacing = dt; }
84+
8085
/** Get scene center along track spacing */
8186
inline double sceneCenterAlongTrackSpacing() const {
8287
return _sceneCenterAlongTrackSpacing;
@@ -123,7 +128,8 @@ class isce3::product::Swath {
123128
double _processedCenterFrequency;
124129
double _acquiredRangeBandwidth;
125130
double _processedRangeBandwidth;
126-
double _nominalAcquisitionPRF;
131+
double _nominalAcquisitionPRF; // acquired
132+
double _zeroDopplerTimeSpacing; // processed
127133
double _sceneCenterAlongTrackSpacing;
128134
double _sceneCenterGroundRangeSpacing;
129135
double _processedAzimuthBandwidth;

python/extensions/pybind_isce3/product/Swath.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ void addbinding(pybind11::class_<Swath> & pySwath)
5454
.def_property("nominal_acquisition_prf",
5555
py::overload_cast<>(&Swath::nominalAcquisitionPRF, py::const_),
5656
py::overload_cast<double>(&Swath::nominalAcquisitionPRF))
57+
.def_property("zero_doppler_time_spacing",
58+
py::overload_cast<>(&Swath::zeroDopplerTimeSpacing, py::const_),
59+
py::overload_cast<double>(&Swath::zeroDopplerTimeSpacing))
5760
.def_property("scene_center_along_track_spacing",
5861
py::overload_cast<>(&Swath::sceneCenterAlongTrackSpacing, py::const_),
5962
py::overload_cast<double>(&Swath::sceneCenterAlongTrackSpacing))

0 commit comments

Comments
 (0)