sarkit-convert 0.2.0__py3-none-any.whl → 0.3.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sarkit_convert/_utils.py +15 -18
- sarkit_convert/_version.py +1 -1
- sarkit_convert/cosmo.py +172 -178
- sarkit_convert/create_arp_poly.py +1 -1
- sarkit_convert/iceye.py +196 -291
- sarkit_convert/sentinel.py +284 -326
- sarkit_convert/terrasar.py +179 -179
- {sarkit_convert-0.2.0.dist-info → sarkit_convert-0.3.1.dist-info}/METADATA +23 -13
- sarkit_convert-0.3.1.dist-info/RECORD +14 -0
- {sarkit_convert-0.2.0.dist-info → sarkit_convert-0.3.1.dist-info}/WHEEL +1 -1
- sarkit_convert-0.2.0.dist-info/RECORD +0 -14
- {sarkit_convert-0.2.0.dist-info → sarkit_convert-0.3.1.dist-info}/entry_points.txt +0 -0
- {sarkit_convert-0.2.0.dist-info → sarkit_convert-0.3.1.dist-info}/licenses/LICENSE +0 -0
sarkit_convert/_utils.py
CHANGED
|
@@ -186,38 +186,35 @@ def broadening_from_amp(amp_vals, threshold_db=None):
|
|
|
186
186
|
return width / fft_size * amp_vals.size
|
|
187
187
|
|
|
188
188
|
|
|
189
|
-
def _get_sigma0_noise(
|
|
189
|
+
def _get_sigma0_noise(sicd_ew):
|
|
190
190
|
"""Calculate the absolute noise estimate, in sigma0 power units."""
|
|
191
191
|
|
|
192
|
-
if
|
|
192
|
+
if "SigmaZeroSFPoly" not in sicd_ew["Radiometric"]:
|
|
193
193
|
raise ValueError(
|
|
194
194
|
"Radiometric.SigmaZeroSFPoly is not populated, so no sigma0 noise estimate can be derived."
|
|
195
195
|
)
|
|
196
|
-
if
|
|
197
|
-
xml_helper.load("./{*}Radiometric/{*}NoiseLevel/{*}NoiseLevelType")
|
|
198
|
-
!= "ABSOLUTE"
|
|
199
|
-
):
|
|
196
|
+
if sicd_ew["Radiometric"]["NoiseLevel"]["NoiseLevelType"] != "ABSOLUTE":
|
|
200
197
|
raise ValueError(
|
|
201
198
|
"Radiometric.NoiseLevel.NoiseLevelType is not `ABSOLUTE` so no noise estimate can be derived."
|
|
202
199
|
)
|
|
203
200
|
|
|
204
|
-
noisepoly =
|
|
201
|
+
noisepoly = sicd_ew["Radiometric"]["NoiseLevel"]["NoisePoly"]
|
|
205
202
|
scp_noise_db = noisepoly[0, 0]
|
|
206
203
|
scp_noise = 10 ** (scp_noise_db / 10)
|
|
207
204
|
|
|
208
205
|
# convert to SigmaZero value
|
|
209
|
-
sigma_zero_sf =
|
|
206
|
+
sigma_zero_sf = sicd_ew["Radiometric"]["SigmaZeroSFPoly"]
|
|
210
207
|
scp_noise *= sigma_zero_sf[0, 0]
|
|
211
208
|
|
|
212
209
|
return scp_noise
|
|
213
210
|
|
|
214
211
|
|
|
215
|
-
def _get_default_signal_estimate(
|
|
212
|
+
def _get_default_signal_estimate(sicd_ew):
|
|
216
213
|
"""Gets default signal for use in the RNIIRS calculation.
|
|
217
214
|
|
|
218
215
|
This will be 1.0 for copolar (or unknown) collections, and 0.25 for cross-pole collections."""
|
|
219
216
|
|
|
220
|
-
pol =
|
|
217
|
+
pol = sicd_ew["ImageFormation"].get("TxRcvPolarizationProc", None)
|
|
221
218
|
if pol is None or ":" not in pol:
|
|
222
219
|
return 1.0
|
|
223
220
|
|
|
@@ -259,23 +256,23 @@ def _estimate_rniirs(information_density):
|
|
|
259
256
|
return out
|
|
260
257
|
|
|
261
258
|
|
|
262
|
-
def get_rniirs_estimate(
|
|
259
|
+
def get_rniirs_estimate(sicd_ew):
|
|
263
260
|
"""This calculates the value(s) for RNIIRS and information density for SICD, according to the RGIQE."""
|
|
264
|
-
scp_noise = _get_sigma0_noise(
|
|
265
|
-
signal = _get_default_signal_estimate(
|
|
261
|
+
scp_noise = _get_sigma0_noise(sicd_ew)
|
|
262
|
+
signal = _get_default_signal_estimate(sicd_ew)
|
|
266
263
|
|
|
267
|
-
u_row =
|
|
268
|
-
u_col =
|
|
264
|
+
u_row = sicd_ew["Grid"]["Row"]["UVectECF"]
|
|
265
|
+
u_col = sicd_ew["Grid"]["Col"]["UVectECF"]
|
|
269
266
|
ipn = np.cross(u_row, u_col)
|
|
270
267
|
u_ipn = ipn / np.linalg.norm(ipn)
|
|
271
268
|
|
|
272
|
-
scp_llh =
|
|
269
|
+
scp_llh = sicd_ew["GeoData"]["SCP"]["LLH"]
|
|
273
270
|
u_gpn = sarkit.wgs84.up(scp_llh)
|
|
274
271
|
|
|
275
272
|
bw_sf = np.dot(u_gpn, u_ipn)
|
|
276
273
|
bw_area = abs(
|
|
277
|
-
|
|
278
|
-
*
|
|
274
|
+
sicd_ew["Grid"]["Row"]["ImpRespBW"]
|
|
275
|
+
* sicd_ew["Grid"]["Col"]["ImpRespBW"]
|
|
279
276
|
* bw_sf
|
|
280
277
|
)
|
|
281
278
|
|
sarkit_convert/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '0.
|
|
1
|
+
__version__ = '0.3.1'
|
sarkit_convert/cosmo.py
CHANGED
|
@@ -25,7 +25,7 @@ import astropy.units as apu
|
|
|
25
25
|
import astropy.utils
|
|
26
26
|
import dateutil.parser
|
|
27
27
|
import h5py
|
|
28
|
-
import lxml.
|
|
28
|
+
import lxml.etree
|
|
29
29
|
import numpy as np
|
|
30
30
|
import numpy.linalg as npl
|
|
31
31
|
import numpy.polynomial.polynomial as npp
|
|
@@ -562,53 +562,45 @@ def hdf5_to_sicd(
|
|
|
562
562
|
antenna_array_gain[0, 0] = 0.0
|
|
563
563
|
|
|
564
564
|
# Build XML
|
|
565
|
-
|
|
566
|
-
|
|
565
|
+
sicd_xml_obj = lxml.etree.Element(
|
|
566
|
+
f"{{{NSMAP['sicd']}}}SICD", nsmap={None: NSMAP["sicd"]}
|
|
567
567
|
)
|
|
568
|
-
sicd_xml_obj = sicd.SICD()
|
|
569
568
|
sicd_ew = sksicd.ElementWrapper(sicd_xml_obj)
|
|
570
569
|
|
|
571
|
-
sicd_ew["CollectionInfo"] =
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
sicd.ImageCorners(
|
|
606
|
-
sicd.ICP({"index": "1:FRFC"}, *make_ll([0, 0])),
|
|
607
|
-
sicd.ICP({"index": "2:FRLC"}, *make_ll([0, 0])),
|
|
608
|
-
sicd.ICP({"index": "3:LRLC"}, *make_ll([0, 0])),
|
|
609
|
-
sicd.ICP({"index": "4:LRFC"}, *make_ll([0, 0])),
|
|
610
|
-
),
|
|
611
|
-
)
|
|
570
|
+
sicd_ew["CollectionInfo"] = {
|
|
571
|
+
"CollectorName": collector_name,
|
|
572
|
+
"CoreName": core_name,
|
|
573
|
+
"CollectType": "MONOSTATIC",
|
|
574
|
+
"RadarMode": {
|
|
575
|
+
"ModeType": radar_mode_type,
|
|
576
|
+
"ModeID": radar_mode_id,
|
|
577
|
+
},
|
|
578
|
+
"Classification": classification,
|
|
579
|
+
}
|
|
580
|
+
sicd_ew["ImageCreation"] = {
|
|
581
|
+
"Application": creation_application,
|
|
582
|
+
"DateTime": creation_time,
|
|
583
|
+
}
|
|
584
|
+
sicd_ew["ImageData"] = {
|
|
585
|
+
"PixelType": pixel_type,
|
|
586
|
+
"NumRows": num_rows,
|
|
587
|
+
"NumCols": num_cols,
|
|
588
|
+
"FirstRow": first_row,
|
|
589
|
+
"FirstCol": first_col,
|
|
590
|
+
"FullImage": {
|
|
591
|
+
"NumRows": num_rows,
|
|
592
|
+
"NumCols": num_cols,
|
|
593
|
+
},
|
|
594
|
+
"SCPPixel": scp_pixel,
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
sicd_ew["GeoData"] = {
|
|
598
|
+
"EarthModel": "WGS_84",
|
|
599
|
+
"SCP": {
|
|
600
|
+
"ECF": scp_ecf,
|
|
601
|
+
"LLH": scp_llh,
|
|
602
|
+
},
|
|
603
|
+
}
|
|
612
604
|
|
|
613
605
|
dc_sgn = np.sign(-doppler_rate_poly[0, 0])
|
|
614
606
|
col_deltakcoa_poly = (
|
|
@@ -633,44 +625,41 @@ def hdf5_to_sicd(
|
|
|
633
625
|
col_window_name = h5_attrs["Azimuth Focusing Weighting Function"]
|
|
634
626
|
col_window_coeff = h5_attrs["Azimuth Focusing Weighting Coefficient"]
|
|
635
627
|
|
|
636
|
-
sicd_ew["Grid"] =
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
sicd_ew["Grid"]["TimeCOAPoly"] = time_coa_poly
|
|
672
|
-
sicd_ew["Grid"]["Row"]["DeltaKCOAPoly"] = [[0]]
|
|
673
|
-
sicd_ew["Grid"]["Col"]["DeltaKCOAPoly"] = col_deltakcoa_poly
|
|
628
|
+
sicd_ew["Grid"] = {
|
|
629
|
+
"ImagePlane": "SLANT",
|
|
630
|
+
"Type": "RGZERO",
|
|
631
|
+
"TimeCOAPoly": time_coa_poly,
|
|
632
|
+
"Row": {
|
|
633
|
+
"UVectECF": u_row,
|
|
634
|
+
"SS": spacings[0],
|
|
635
|
+
"ImpRespWid": row_wid,
|
|
636
|
+
"Sgn": -1,
|
|
637
|
+
"ImpRespBW": row_bw,
|
|
638
|
+
"KCtr": center_frequency / (scipy.constants.speed_of_light / 2),
|
|
639
|
+
"DeltaK1": -row_bw / 2,
|
|
640
|
+
"DeltaK2": row_bw / 2,
|
|
641
|
+
"DeltaKCOAPoly": [[0.0]],
|
|
642
|
+
"WgtType": {
|
|
643
|
+
"WindowName": row_window_name,
|
|
644
|
+
"Parameter": [("COEFFICIENT", str(row_window_coeff))],
|
|
645
|
+
},
|
|
646
|
+
},
|
|
647
|
+
"Col": {
|
|
648
|
+
"UVectECF": u_col,
|
|
649
|
+
"SS": spacings[1],
|
|
650
|
+
"ImpRespWid": col_wid,
|
|
651
|
+
"Sgn": -1,
|
|
652
|
+
"ImpRespBW": col_bw,
|
|
653
|
+
"KCtr": 0.0,
|
|
654
|
+
"DeltaK1": dk1,
|
|
655
|
+
"DeltaK2": dk2,
|
|
656
|
+
"DeltaKCOAPoly": col_deltakcoa_poly,
|
|
657
|
+
"WgtType": {
|
|
658
|
+
"WindowName": col_window_name,
|
|
659
|
+
"Parameter": [("COEFFICIENT", str(col_window_coeff))],
|
|
660
|
+
},
|
|
661
|
+
},
|
|
662
|
+
}
|
|
674
663
|
rcs_row_sf = None
|
|
675
664
|
rcs_col_sf = None
|
|
676
665
|
if row_window_name == "HAMMING":
|
|
@@ -688,84 +677,104 @@ def hdf5_to_sicd(
|
|
|
688
677
|
sicd_ew["Grid"]["Col"]["ImpRespWid"] = col_wid
|
|
689
678
|
rcs_col_sf = 1 + np.var(wgts) / np.mean(wgts) ** 2
|
|
690
679
|
|
|
691
|
-
sicd_ew["Timeline"] =
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
{
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
680
|
+
sicd_ew["Timeline"] = {
|
|
681
|
+
"CollectStart": collection_start_time,
|
|
682
|
+
"CollectDuration": collection_duration,
|
|
683
|
+
"IPP": {
|
|
684
|
+
"@size": 1,
|
|
685
|
+
"Set": [
|
|
686
|
+
{
|
|
687
|
+
"@index": 1,
|
|
688
|
+
"TStart": 0,
|
|
689
|
+
"TEnd": num_pulses / prf,
|
|
690
|
+
"IPPStart": 0,
|
|
691
|
+
"IPPEnd": num_pulses - 1,
|
|
692
|
+
"IPPPoly": [0, prf],
|
|
693
|
+
}
|
|
694
|
+
],
|
|
695
|
+
},
|
|
696
|
+
}
|
|
707
697
|
|
|
708
698
|
sicd_ew["Position"]["ARPPoly"] = apc_poly
|
|
709
699
|
|
|
710
|
-
|
|
711
|
-
{"size": str(len(tx_rcv_pols))},
|
|
712
|
-
)
|
|
700
|
+
chan_parameters = []
|
|
713
701
|
for ndx, tx_rcv_pol in enumerate(tx_rcv_pols):
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
702
|
+
chan_parameters.append(
|
|
703
|
+
{
|
|
704
|
+
"@index": ndx + 1,
|
|
705
|
+
"TxRcvPolarization": tx_rcv_pol,
|
|
706
|
+
}
|
|
718
707
|
)
|
|
719
708
|
|
|
720
|
-
sicd_ew["RadarCollection"] =
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
709
|
+
sicd_ew["RadarCollection"] = {
|
|
710
|
+
"TxFrequency": {
|
|
711
|
+
"Min": tx_freq_min,
|
|
712
|
+
"Max": tx_freq_max,
|
|
713
|
+
},
|
|
714
|
+
"Waveform": {
|
|
715
|
+
"@size": 1,
|
|
716
|
+
"WFParameters": [
|
|
717
|
+
{
|
|
718
|
+
"@index": 1,
|
|
719
|
+
"TxPulseLength": tx_pulse_length,
|
|
720
|
+
"TxRFBandwidth": tx_rf_bw,
|
|
721
|
+
"TxFreqStart": tx_freq_start,
|
|
722
|
+
"TxFMRate": tx_fm_rate,
|
|
723
|
+
"RcvWindowLength": rcv_window_length,
|
|
724
|
+
"ADCSampleRate": adc_sample_rate,
|
|
725
|
+
}
|
|
726
|
+
],
|
|
727
|
+
},
|
|
728
|
+
"TxPolarization": tx_polarization,
|
|
729
|
+
"RcvChannels": {
|
|
730
|
+
"@size": len(tx_rcv_pols),
|
|
731
|
+
"ChanParameters": chan_parameters,
|
|
732
|
+
},
|
|
733
|
+
}
|
|
737
734
|
if len(tx_polarizations) > 1:
|
|
738
735
|
sicd_ew["RadarCollection"]["TxPolarization"] = "SEQUENCE"
|
|
739
|
-
|
|
736
|
+
tx_steps = []
|
|
740
737
|
for ndx, tx_pol in enumerate(tx_polarizations):
|
|
741
|
-
|
|
742
|
-
|
|
738
|
+
tx_steps.append(
|
|
739
|
+
{
|
|
740
|
+
"@index": ndx + 1,
|
|
741
|
+
"TxPolarization": tx_pol,
|
|
742
|
+
}
|
|
743
743
|
)
|
|
744
|
-
|
|
744
|
+
sicd_ew["RadarCollection"]["TxSequence"] = {
|
|
745
|
+
"@size": len(tx_polarizations),
|
|
746
|
+
"TxStep": tx_steps,
|
|
747
|
+
}
|
|
745
748
|
|
|
746
749
|
now = (
|
|
747
750
|
datetime.datetime.now(datetime.timezone.utc)
|
|
748
751
|
.isoformat(timespec="microseconds")
|
|
749
752
|
.replace("+00:00", "Z")
|
|
750
753
|
)
|
|
751
|
-
sicd_ew["ImageFormation"] =
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
754
|
+
sicd_ew["ImageFormation"] = {
|
|
755
|
+
"RcvChanProc": {
|
|
756
|
+
"NumChanProc": 1,
|
|
757
|
+
"ChanIndex": [chan_index],
|
|
758
|
+
},
|
|
759
|
+
"TxRcvPolarizationProc": tx_rcv_polarization,
|
|
760
|
+
"TStartProc": 0,
|
|
761
|
+
"TEndProc": collection_duration,
|
|
762
|
+
"TxFrequencyProc": {
|
|
763
|
+
"MinProc": tx_freq_min,
|
|
764
|
+
"MaxProc": tx_freq_max,
|
|
765
|
+
},
|
|
766
|
+
"ImageFormAlgo": "RMA",
|
|
767
|
+
"STBeamComp": "NO",
|
|
768
|
+
"ImageBeamComp": "SV",
|
|
769
|
+
"AzAutofocus": "NO",
|
|
770
|
+
"RgAutofocus": "NO",
|
|
771
|
+
"Processing": [
|
|
772
|
+
{
|
|
773
|
+
"Type": f"sarkit-convert {__version__} @ {now}",
|
|
774
|
+
"Applied": True,
|
|
775
|
+
},
|
|
776
|
+
],
|
|
777
|
+
}
|
|
769
778
|
|
|
770
779
|
sicd_ew["Antenna"]["TwoWay"]["XAxisPoly"] = ant_x_dir_poly
|
|
771
780
|
sicd_ew["Antenna"]["TwoWay"]["YAxisPoly"] = ant_y_dir_poly
|
|
@@ -777,20 +786,17 @@ def hdf5_to_sicd(
|
|
|
777
786
|
dtype=float, shape=(1, 1)
|
|
778
787
|
)
|
|
779
788
|
|
|
780
|
-
sicd_ew["RMA"] =
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
sicd_ew["RMA"]["INCA"]["TimeCAPoly"] = time_ca_poly
|
|
792
|
-
sicd_ew["RMA"]["INCA"]["DRateSFPoly"] = drsf_poly
|
|
793
|
-
sicd_ew["RMA"]["INCA"]["DopCentroidPoly"] = doppler_centroid_poly
|
|
789
|
+
sicd_ew["RMA"] = {
|
|
790
|
+
"RMAlgoType": "OMEGA_K",
|
|
791
|
+
"ImageType": "INCA",
|
|
792
|
+
"INCA": {
|
|
793
|
+
"TimeCAPoly": time_ca_poly,
|
|
794
|
+
"R_CA_SCP": scp_rca,
|
|
795
|
+
"FreqZero": center_frequency,
|
|
796
|
+
"DRateSFPoly": drsf_poly,
|
|
797
|
+
"DopCentroidPoly": doppler_centroid_poly,
|
|
798
|
+
},
|
|
799
|
+
}
|
|
794
800
|
|
|
795
801
|
sicd_ew["SCPCOA"] = sksicd.compute_scp_coa(sicd_xml_obj.getroottree())
|
|
796
802
|
|
|
@@ -811,27 +817,16 @@ def hdf5_to_sicd(
|
|
|
811
817
|
sigmazero_poly = betazero_poly * np.cos(graze) * np.cos(twist)
|
|
812
818
|
gammazero_poly = betazero_poly / np.tan(graze) * np.cos(twist)
|
|
813
819
|
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
)
|
|
820
|
-
sksicd.Poly2dType().set_elem(
|
|
821
|
-
radiometric.find("./{*}BetaZeroSFPoly"), betazero_poly
|
|
822
|
-
)
|
|
823
|
-
sksicd.Poly2dType().set_elem(
|
|
824
|
-
radiometric.find("./{*}GammaZeroSFPoly"), gammazero_poly
|
|
825
|
-
)
|
|
820
|
+
sicd_ew["Radiometric"] = {
|
|
821
|
+
"SigmaZeroSFPoly": sigmazero_poly,
|
|
822
|
+
"BetaZeroSFPoly": betazero_poly,
|
|
823
|
+
"GammaZeroSFPoly": gammazero_poly,
|
|
824
|
+
}
|
|
826
825
|
if rcs_row_sf and rcs_col_sf:
|
|
827
826
|
rcssf_poly = betazero_poly * (
|
|
828
827
|
rcs_row_sf * rcs_col_sf / (row_bw * col_bw)
|
|
829
828
|
)
|
|
830
|
-
|
|
831
|
-
sksicd.Poly2dType().set_elem(
|
|
832
|
-
radiometric.find("./{*}RCSSFPoly"), rcssf_poly
|
|
833
|
-
)
|
|
834
|
-
sicd_xml_obj.find("./{*}Antenna").addprevious(radiometric)
|
|
829
|
+
sicd_ew["Radiometric"]["RCSSFPoly"] = rcssf_poly
|
|
835
830
|
|
|
836
831
|
# Add Geodata Corners
|
|
837
832
|
sicd_xmltree = sicd_xml_obj.getroottree()
|
|
@@ -848,8 +843,7 @@ def hdf5_to_sicd(
|
|
|
848
843
|
sarkit.wgs84.up(sarkit.wgs84.cartesian_to_geodetic(scp_ecf)),
|
|
849
844
|
)
|
|
850
845
|
icp_llh = sarkit.wgs84.cartesian_to_geodetic(icp_ecef)
|
|
851
|
-
|
|
852
|
-
xml_helper.set("./{*}GeoData/{*}ImageCorners", icp_llh[:, :2])
|
|
846
|
+
sicd_ew["GeoData"]["ImageCorners"] = icp_llh[:, :2]
|
|
853
847
|
|
|
854
848
|
# Validate XML
|
|
855
849
|
sicd_con = sarkit.verification.SicdConsistency(sicd_xmltree)
|
|
@@ -163,4 +163,4 @@ def create_arp_poly(
|
|
|
163
163
|
arp_acc = arp_acc_dir * arp_acc_mag - np.cross(
|
|
164
164
|
[0, 0, omega_3], 2 * arp_vel + np.cross([0, 0, omega_3], arp_pos)
|
|
165
165
|
)
|
|
166
|
-
return np.stack([arp_pos, arp_vel, arp_acc], axis=-1)
|
|
166
|
+
return np.stack([arp_pos, arp_vel, arp_acc / 2], axis=-1)
|