Skip to content

Commit f8b915d

Browse files
rad-eng-59GitHub Enterprise
authored andcommitted
EL Null-Range Product for Pointing (#966)
* Introduce an executable "gen_el_null_range_product.py" under "nisar/workflows" * Introduce module "el_null_range_from_raw_ant.py" under "nisar/workflows" * Add python unit tests and two multi-channel datasets for testing * Add a method to "Raw.py" to extract caltone coefs and update its test suite * Add new features for performing caltone and null quality * Update "__init__.py" in workflow * Add options for external orbit and attitude files * Add two L0B files (w/ and w/o calibration) with product shape "channel-by-rangeline-by-rangebins" * Add a 4-beam antenna file. * Add two XML files, one for orbit and one for attitude related to the same L0B products * Update "REE" section of tests/data/README file * Add "Quality Factor" to the last column of CSV null-range product. * Make "tx" arg optional in method "isDithered" of class "Raw" * Run autopep8 * Remove two large L0B files, one antenna file, and two XML files of REE sim 4-channel extended scene of the first pass due to their sizes. * Comment out two lines in the respective CMake file for two python test suites "el_null_range_from_raw_ant" and "gen_el_null_range_product".
1 parent c3043fe commit f8b915d

File tree

10 files changed

+990
-4
lines changed

10 files changed

+990
-4
lines changed

python/packages/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ endforeach()
2727
set (list_of_exe
2828
nisar/workflows/crossmul.py
2929
nisar/workflows/focus.py
30+
nisar/workflows/gen_el_null_range_product.py
3031
nisar/workflows/gen_doppler_range_product.py
3132
nisar/workflows/geo2rdr.py
3233
nisar/workflows/geocode_insar.py

python/packages/nisar/products/readers/Raw/Raw.py

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def getNominalPRF(self, frequency='A', tx='H'):
230230
_, az_time = self.getPulseTimes(frequency, tx)
231231
return (az_time.size - 1) / (az_time[-1] - az_time[0])
232232

233-
def isDithered(self, frequency='A', tx='H'):
233+
def isDithered(self, frequency='A', tx=None):
234234
"""Whether or not PRF is dithering.
235235
236236
That is more than one PRF value within entire azimuth duration.
@@ -240,16 +240,19 @@ def isDithered(self, frequency='A', tx='H'):
240240
frequency : {'A', 'B'}, optional
241241
Sub-band. Typically main science band is 'A'.
242242
243-
tx : {'H', 'V', 'L', 'R'}
243+
tx : {'H', 'V', 'L', 'R'}, optional
244244
Transmit polarization. Abbreviations correspond to horizontal
245245
(linear), vertical (linear), left circular, right circular
246+
Default is the first pol under `frequency`.
246247
247248
Returns
248249
-------
249250
bool
250251
True if multiple PRF values and False if PRF is fixed.
251252
252253
"""
254+
if tx is None:
255+
tx = self.polarizations[frequency][0][0]
253256
_, az_time = self.getPulseTimes(frequency, tx)
254257
tm_diff = np.diff(az_time)
255258
return not np.isclose(tm_diff.min(), tm_diff.max())
@@ -391,6 +394,33 @@ def getChirpCorrelator(self, frequency: str = 'A', tx: str = None):
391394
with h5py.File(self.filename, 'r', libver='latest', swmr=True) as f:
392395
return f[path]["chirpCorrelator"][()]
393396

397+
def getCaltone(self, frequency='A', polarization=None):
398+
"""Get complex caltone coefficients for all channels and range lines.
399+
400+
Caltone coefficients are complex values obtained from pulsed CW
401+
(continuous wave) signal of each RX channel.
402+
403+
Parameters
404+
----------
405+
frequency : {'A', 'B'}
406+
Sub-band. Typically main science band is 'A'.
407+
polarization : {'HH', 'HV', 'VH', 'VV', 'RH','RV', 'LH', 'LV'}, optional
408+
Transmit-Receive polarization. If not specified, the first
409+
polarization in the `frequency` band will be used.
410+
411+
Returns
412+
-------
413+
np.ndarray(np.ndarray(complex))
414+
2-D complex float of caltone (CW) coefficients,
415+
size = [rangelines x channels].
416+
417+
"""
418+
if polarization is None:
419+
polarization = self.polarizations[frequency][0]
420+
path_txrx = self._rawGroup(frequency, polarization)
421+
with h5py.File(self.filename, 'r', libver='latest', swmr=True) as fid:
422+
return fid[path_txrx]["caltone"][()]
423+
394424
# XXX C++ and Base.py assume SLC. Grid less well defined for Raw case
395425
# since PRF isn't necessarily constant. Return pulse times with grid?
396426
def getRadarGrid(self, frequency='A', tx='H', prf=None):
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
from .el_null_range_from_raw_ant import (el_null_range_from_raw_ant,
2+
form_overlap_antenna_pairs,
3+
AntElPair)
14
from .doppler_lut_from_raw import doppler_lut_from_raw

0 commit comments

Comments
 (0)