Skip to content

Commit

Permalink
v.1.3.53
Browse files Browse the repository at this point in the history
  • Loading branch information
Darder committed Jul 11, 2023
1 parent 38f7500 commit 9d2fe4d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ SarPy follows a continuous release process, so there are fairly frequent release
Since essentially every (squash merge) commit corresponds to a release, specific
release points are not being annotated in GitHub.

## [1.3.53] - 2023-07-11
### Added
- Added 3db contours to transmit and receive beam footprints for CPHD kmzs.

## [1.3.52] - 2023-07-10
### Added
- Added additional tests for sicd_elements ImageCreation.py.
Expand Down
2 changes: 1 addition & 1 deletion sarpy/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
'__license__', '__copyright__']

from sarpy.__details__ import __classification__, _post_identifier
_version_number = '1.3.52'
_version_number = '1.3.53'

__version__ = _version_number + _post_identifier

Expand Down
24 changes: 13 additions & 11 deletions sarpy/visualization/cphd_kmz_product_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,26 +578,28 @@ def _beam_footprint(antpat_id, apc_pos, time, uacx, uacy, eb_dcx, eb_dcy):
array_gain_poly = patterns[antpat_id].Array.GainPoly
element_gain_poly = patterns[antpat_id].Element.GainPoly

approx_gain_coefs = np.zeros((3,3))
approx_gain_coefs = np.zeros((3, 3))
approx_gain_coefs += np.pad(array_gain_poly.Coefs, [(0, 3), (0, 3)])[:3, :3]
approx_gain_coefs += np.pad(element_gain_poly.Coefs, [(0, 3), (0, 3)])[:3, :3]

Ns = 201
db_down = 10 # dB down from peak
deltaDC_Xmax = np.abs((-approx_gain_coefs[1,0] +
np.sqrt(approx_gain_coefs[1,0]**2-4*approx_gain_coefs[2,0]*db_down))/(2*approx_gain_coefs[2,0]))
deltaDC_Ymax = np.abs((-approx_gain_coefs[0,1] +
np.sqrt(approx_gain_coefs[0,1]**2-4*approx_gain_coefs[0,2]*db_down))/(2*approx_gain_coefs[0,2]))
X = np.linspace(-deltaDC_Xmax,deltaDC_Xmax,Ns)
Y = np.linspace(-deltaDC_Ymax,deltaDC_Ymax,Ns)
XXc, YYc = np.meshgrid(X,Y, indexing='ij')
db_down = 10 # dB down from peak
deltaDC_Xmax = np.abs((-approx_gain_coefs[1, 0] +
np.sqrt(approx_gain_coefs[1, 0]**2-4*approx_gain_coefs[2, 0]*db_down)) /
(2*approx_gain_coefs[2, 0]))
deltaDC_Ymax = np.abs((-approx_gain_coefs[0, 1] +
np.sqrt(approx_gain_coefs[0, 1]**2-4*approx_gain_coefs[0, 2]*db_down)) /
(2*approx_gain_coefs[0, 2]))
X = np.linspace(-deltaDC_Xmax, deltaDC_Xmax, Ns)
Y = np.linspace(-deltaDC_Ymax, deltaDC_Ymax, Ns)
XXc, YYc = np.meshgrid(X, Y, indexing='ij')

array_gain_pattern = array_gain_poly(XXc, YYc)
element_gain_pattern = element_gain_poly(XXc + eb_dcx, YYc + eb_dcy)
gain_pattern = array_gain_pattern + element_gain_pattern

contour_levels = [-3] # dB
contour_sets = plt.contour(XXc, YYc, gain_pattern, levels=contour_levels)
contour_levels = [-3] # dB
contour_sets = plt.contour(XXc, YYc, gain_pattern, levels=contour_levels)
plt.close() # close the figure created by contour
contour_vertices = contour_sets.collections[0].get_paths()[0].vertices
delta_dcx = contour_vertices[:, 0]
Expand Down

0 comments on commit 9d2fe4d

Please sign in to comment.