From 97ce6ba69b59d5c1653c36f677070b74c20d3b58 Mon Sep 17 00:00:00 2001 From: Sean Harkins Date: Thu, 31 Aug 2023 00:39:03 -0600 Subject: [PATCH] Fix/use fsspec (#6) * Use fsspec for io. * Fix hardcoded usage of local file paths for href determination. * delete test data, switch to using remote read with fsspec in tests and example, change arg name to make it clear were using remote hrefs --------- Co-authored-by: emileten --- README.md | 4 +- scripts/create_examples.py | 3 +- src/stactools/nisar_sim/constants.py | 5 + src/stactools/nisar_sim/metadata.py | 25 +- src/stactools/nisar_sim/stac.py | 6 +- tests/conftest.py | 8 + ...31604_12061_004_120717_L090_CX_129A_07.ann | 333 ------------------ ...31604_12061_004_120717_L090_CX_129B_07.ann | 333 ------------------ ...p_31604_12061_004_120717_L090_CX_129_07.h5 | Bin 19776 -> 0 bytes tests/test_commands.py | 5 +- tests/test_metadata.py | 13 + tests/test_stac.py | 4 +- 12 files changed, 48 insertions(+), 691 deletions(-) create mode 100644 tests/conftest.py delete mode 100644 tests/data-files/winnip_31604_12061_004_120717_L090_CX_07/winnip_31604_12061_004_120717_L090_CX_129A_07.ann delete mode 100644 tests/data-files/winnip_31604_12061_004_120717_L090_CX_07/winnip_31604_12061_004_120717_L090_CX_129B_07.ann delete mode 100644 tests/data-files/winnip_31604_12061_004_120717_L090_CX_07/winnip_31604_12061_004_120717_L090_CX_129_07.h5 create mode 100644 tests/test_metadata.py diff --git a/README.md b/README.md index 6ea20f2..adac981 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,8 @@ Command line functions ```shell stac nisarsim create-collection + +stac nisarsim create-collection example-collection.json ``` **Dither**: Indicates whether the data has been dithered or not: @@ -53,7 +55,7 @@ stac nisarsim create-item --dither --nmode str: def _href_modifier( self, href: str, - extension: Optional[str] = None, - nmode: Optional[str] = None, + extension: str, + nmode: str, ) -> str: _id = self._replace_dither(self.id, self.dither) - path = Path(href) / _id - - if extension: - path = path.with_suffix(extension) - if nmode is not None: - path_parts = str(path).split("_") - path_parts.insert(-1, nmode) - path = Path("_".join(path_parts)) + path = href.strip("/") + "/" + _id + "." + extension.lstrip(".") + path_parts = str(path).split("_") + path_parts.insert(-1, nmode) + path = "_".join(path_parts) return str(path) @@ -65,7 +61,8 @@ def __init__(self, h5_href: str) -> None: self.metadata = self.from_file(self.href) def from_file(self, href: str) -> Any: - return h5py.File(href, "r") + fs = fsspec.open(href) + return h5py.File(fs.open(), "r") class AnnotatedMetadata: @@ -87,7 +84,7 @@ def parse_ann(self, ann_href: str) -> Dict[str, Any]: DEM Datum (&) = WGS-84 becomes {"DEM_Datum": "WGS-84"} """ - with open(ann_href, "r") as f: + with fsspec.open(ann_href, "r") as f: lines = f.readlines() data = {} for line in lines: diff --git a/src/stactools/nisar_sim/stac.py b/src/stactools/nisar_sim/stac.py index 9fd7b27..fb896f3 100644 --- a/src/stactools/nisar_sim/stac.py +++ b/src/stactools/nisar_sim/stac.py @@ -59,7 +59,7 @@ def create_collection() -> Collection: return collection -def create_item(product_path: str, dither: str, nmode: str) -> Item: +def create_item(product_href: str, dither: str, nmode: str) -> Item: """Create a STAC Item Args: @@ -74,10 +74,10 @@ def create_item(product_path: str, dither: str, nmode: str) -> Item: Returns: Item: STAC Item object """ - metalinks = MetadataLinks(product_path, dither, nmode) + metalinks = MetadataLinks(product_href, dither, nmode) h5_data = HDF5Metadata(metalinks.h5_href) ann_data = AnnotatedMetadata(metalinks.ann_a_href, metalinks.ann_b_href) - metadata = Metadata(product_path, metalinks.id, h5_data, ann_data) + metadata = Metadata(product_href, metalinks.id, h5_data, ann_data) item = Item( id=metalinks.id, diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..1ce921f --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,8 @@ +import pytest + +from stactools.nisar_sim.constants import NISAR_SIM_EXAMPLE_HREF + + +@pytest.fixture +def example_href() -> str: + return NISAR_SIM_EXAMPLE_HREF diff --git a/tests/data-files/winnip_31604_12061_004_120717_L090_CX_07/winnip_31604_12061_004_120717_L090_CX_129A_07.ann b/tests/data-files/winnip_31604_12061_004_120717_L090_CX_07/winnip_31604_12061_004_120717_L090_CX_129A_07.ann deleted file mode 100644 index 72b22be..0000000 --- a/tests/data-files/winnip_31604_12061_004_120717_L090_CX_07/winnip_31604_12061_004_120717_L090_CX_129A_07.ann +++ /dev/null @@ -1,333 +0,0 @@ -; Parameter file for winnip_31604_12061_004_120717_L090_CX_129A_07 -; -; Search for parameters/value rather than placement in file -; -; slc = single look complex slant range image -; mlc = multi look cross product slant range image -; grd = ground range projected (equiangular) and multi-looked data -; hgt = digital elevation model (DEM) used during processing and ground projection -; inc = ground range local incidence angle, the angle between the surface normal and the radar line of sight -; slope = ground range terrain slope containing the derivatives of the DEM in the East and North direction, used to compute the local incidence angle -; rtc = radiometric terrain correction factor that can be applied to grd files -; h5 = HDF5 file in NISAR format -; slc_mag and slc_phase are derived from the same 8 bytes per pixel of the slc input file -; mlc_mag and mlc_phase are derived from the same 8 bytes per pixel of the complex mlc input files -; grd_mag and grd_phase are ground range projected (equiangular) complex cross-product images -; -; Peg position is the nadir position of aircraft at the middle of the datatake -; Projection of image is relative to the flightline (S - along track position, C - cross track position) -; S0, C0 is offset to upper left coordinate of SLC in meters -; -; To display MLC amplitude and phase in mdx: -; mdx -h winnip_31604_12061_004_120717_L090_CX_129A_07.ann -mix + -PER -percent 95 -exp .5 winnip_31604_12061_004_120717_L090HHHH_CX_129A_07.mlc -set mlc_pwr -cmap red winnip_31604_12061_004_120717_L090HVHV_CX_129A_07.mlc -set mlc_pwr -cmap green -exp .5 winnip_31604_12061_004_120717_L090VVVV_CX_129A_07.mlc -set mlc_pwr -cmap blue -; To display GRD amplitude and phase in mdx: -; mdx -h winnip_31604_12061_004_120717_L090_CX_129A_07.ann -mix + -PER -percent 95 -exp .5 winnip_31604_12061_004_120717_L090HHHH_CX_129A_07.grd -set grd_pwr -cmap red winnip_31604_12061_004_120717_L090HVHV_CX_129A_07.grd -set grd_pwr -cmap green -exp .5 winnip_31604_12061_004_120717_L090VVVV_CX_129A_07.grd -set grd_pwr -cmap blue - - -; Annotation file version (when an annotation file contains no annotation version field, assume the version number is 1.0) - -UAVSAR PolSAR Annotation File Version Number (-) = 2.4 - -; general location of data (non-unique) - -Site Description = Winnipeg, Canada - -; URL of JPL website for precision data - -URL = http://uavsar.jpl.nasa.gov/cgi-bin/product.pl?jobName=winnip_31604_12061_004_120717_L090_CX_07 - -; list of precision data files - -slcHH = winnip_31604_12061_004_120717_L090HH_CX_129A_07.slc ; File Size 276270720 bytes -slcHV = winnip_31604_12061_004_120717_L090HV_CX_129A_07.slc ; File Size 276270720 bytes -slcVH = winnip_31604_12061_004_120717_L090VH_CX_129A_07.slc ; File Size 276270720 bytes -slcVV = winnip_31604_12061_004_120717_L090VV_CX_129A_07.slc ; File Size 276270720 bytes -mlcHHHH = winnip_31604_12061_004_120717_L090HHHH_CX_129A_07.mlc ; File Size 69062400 bytes -mlcHVHV = winnip_31604_12061_004_120717_L090HVHV_CX_129A_07.mlc ; File Size 69062400 bytes -mlcVVVV = winnip_31604_12061_004_120717_L090VVVV_CX_129A_07.mlc ; File Size 69062400 bytes -mlcHHHV = winnip_31604_12061_004_120717_L090HHHV_CX_129A_07.mlc ; File Size 138124800 bytes -mlcHHVV = winnip_31604_12061_004_120717_L090HHVV_CX_129A_07.mlc ; File Size 138124800 bytes -mlcHVVV = winnip_31604_12061_004_120717_L090HVVV_CX_129A_07.mlc ; File Size 138124800 bytes -grdHHHH = winnip_31604_12061_004_120717_L090HHHH_CX_129A_07.grd ; File Size 258149112 bytes -grdHVHV = winnip_31604_12061_004_120717_L090HVHV_CX_129A_07.grd ; File Size 258149112 bytes -grdVVVV = winnip_31604_12061_004_120717_L090VVVV_CX_129A_07.grd ; File Size 258149112 bytes -grdHHHV = winnip_31604_12061_004_120717_L090HHHV_CX_129A_07.grd ; File Size 516298224 bytes -grdHHVV = winnip_31604_12061_004_120717_L090HHVV_CX_129A_07.grd ; File Size 516298224 bytes -grdHVVV = winnip_31604_12061_004_120717_L090HVVV_CX_129A_07.grd ; File Size 516298224 bytes -hgt = winnip_31604_12061_004_120717_L090_CX_129A_07.hgt ; File Size 258149112 bytes -inc = winnip_31604_12061_004_120717_L090_CX_129A_07.inc ; File Size 258149112 bytes -flat.inc = winnip_31604_12061_004_120717_L090_CX_129A_07.flat.inc ; File Size 258149112 bytes -slope = winnip_31604_12061_004_120717_L090_CX_129A_07.slope ; File Size 516298224 bytes -rtc = winnip_31604_12061_004_120717_L090_CX_129A_07.rtc ; File Size 258149112 bytes -kmz = winnip_31604_12061_004_120717_L090_CX_129A_07.kmz ; File Size 61044392 bytes -h5 = winnip_31604_12061_004_120717_L090_CX_129_07.h5 ; File Size 1490157832 bytes - -; data format information, see comments after semicolon for descriptions -; also used as mdx display parameters (mdx header) - - -set_name (&) = ; Layers Described -slc_mag.set_rows (pixels) = 13081 ; SLC Lines -slc_mag.set_cols (pixels) = 2640 ; SLC Samples -slc_phase.set_rows (pixels) = 13081 ; SLC Lines -slc_phase.set_cols (pixels) = 2640 ; SLC Samples -mlc_pwr.set_rows (pixels) = 6540 ; MLC Lines -mlc_pwr.set_cols (pixels) = 2640 ; MLC Samples -mlc_mag.set_rows (pixels) = 6540 ; MLC Lines -mlc_mag.set_cols (pixels) = 2640 ; MLC Samples -mlc_phase.set_rows (pixels) = 6540 ; MLC Lines -mlc_phase.set_cols (pixels) = 2640 ; MLC Samples -grd_pwr.set_rows (pixels) = 6558 ; GRD Lines -grd_pwr.set_cols (pixels) = 9841 ; GRD Samples -grd_mag.set_rows (pixels) = 6558 ; GRD Lines -grd_mag.set_cols (pixels) = 9841 ; GRD Samples -grd_phase.set_rows (pixels) = 6558 ; GRD Lines -grd_phase.set_cols (pixels) = 9841 ; GRD Samples -hgt.set_rows (pixels) = 6558 ; HGT Lines -hgt.set_cols (pixels) = 9841 ; HGT Samples -inc.set_rows (pixels) = 6558 ; INC Lines -inc.set_cols (pixels) = 9841 ; INC Samples -slope.set_rows (pixels) = 6558 ; SLOPE Lines -slope.set_cols (pixels) = 9841 ; SLOPE Samples -rtc.set_rows (pixels) = 6558 ; RTC Lines -rtc.set_cols (pixels) = 9841 ; RTC Samples -set_hddr (bytes) = 0 ; Header Bytes in Raw Data -set_tail (bytes) = 0 ; Tail Bytes in Raw Data -slc_mag.set_proj (&) = SCX ; SLC Data Projection: Slant Range -slc_phase.set_proj (&) = SCX ; SLC Data Projection: Slant Range -mlc_pwr.set_proj (&) = SCX ; MLC Data Projection: Slant Range -mlc_mag.set_proj (&) = SCX ; MLC Data Projection: Slant Range -mlc_phase.set_proj (&) = SCX ; MLC Data Projection: Slant Range -grd_pwr.set_proj (&) = EQA ; GRD Data Projection: Equiangular Ground Range -grd_mag.set_proj (&) = EQA ; GRD Data Projection: Equiangular Ground Range -grd_phase.set_proj (&) = EQA ; GRD Data Projection: Equiangular Ground Range -hgt.set_proj (&) = EQA ; HGT Data Projection: Equiangular Ground Range -inc.set_proj (&) = EQA ; INC Data Projection: Equiangular Ground Range -slope.set_proj (&) = EQA ; SLOPE Data Projection: Equiangular Ground Range -set_plat (deg) = 49.764166983 ; Peg Latitude -set_plon (deg) = -98.02004689 ; Peg Longitude -set_phdg (deg) = -44.275286985 ; Peg Heading -slc_mag.row_addr (m) = -39186.6 ; S (azimuth) Offset(S0) from Peg -slc_mag.col_addr (m) = 13150.0574 ; R (range) Offset(R0) from Peg -slc_phase.row_addr (m) = -39186.6 ; S (azimuth) Offset(S0) from Peg -slc_phase.col_addr (m) = 13150.0574 ; R (range) Offset(R0) from Peg -mlc_pwr.row_addr (m) = -39183.6 ; S (azimuth) Offset(S0) from Peg -mlc_pwr.col_addr (m) = 13150.0574 ; R (range) Offset(R0) from Peg -mlc_mag.row_addr (m) = -39183.6 ; S (azimuth) Offset(S0) from Peg -mlc_mag.col_addr (m) = 13150.0574 ; R (range) Offset(R0) from Peg -mlc_phase.row_addr (m) = -39183.6 ; S (azimuth) Offset(S0) from Peg -mlc_phase.col_addr (m) = 13150.0574 ; R (range) Offset(R0) from Peg -grd_pwr.row_addr (deg) = 49.9924 ; Center Latitude of Upper Left Pixel of GRD Image -grd_pwr.col_addr (deg) = -98.67119999999998 ; Center Longitude of Upper Left Pixel of GRD Image -grd_mag.row_addr (deg) = 49.9924 ; Center Latitude of Upper Left Pixel of GRD Image -grd_mag.col_addr (deg) = -98.67119999999998 ; Center Longitude of Upper Left Pixel of GRD Image -grd_phase.row_addr (deg) = 49.9924 ; Center Latitude of Upper Left Pixel of GRDImage -grd_phase.col_addr (deg) = -98.67119999999998 ; Center Longitude of Upper Left Pixel of GRD Image -hgt.row_addr (deg) = 49.9924 ; Center Latitude of Upper Left Pixel of HGT Image -hgt.col_addr (deg) = -98.67119999999998 ; Center Longitude of Upper Left Pixel of HGT Image -inc.row_addr (deg) = 49.9924 ; Center Latitude of Upper Left Pixel of INC Image -inc.col_addr (deg) = -98.67119999999998 ; Center Longitude of Upper Left Pixel of INC Image -slope.row_addr (deg) = 49.9924 ; Center Latitude of Upper Left Pixel of SLOPE Image -slope.col_addr (deg) = -98.67119999999998 ; Center Longitude of Upper Left Pixel of SLOPE Image -rtc.row_addr (deg) = 49.9924 ; Center Latitude of Upper Left Pixel of RTC Image -rtc.col_addr (deg) = -98.67119999999998 ; Center Longitude of Upper Left Pixel of RTC Image -slc_mag.row_mult (m/pixel) = 6.0 ; SLC S (azimuth) Slant Post Spacing -slc_mag.col_mult (m/pixel) = 6.245676208 ; SLC R (range) Slant Post Spacing -slc_phase.row_mult (m/pixel) = 6.0 ; SLC S (azimuth) Slant Post Spacing -slc_phase.col_mult (m/pixel) = 6.245676208 ; SLC R (range) Slant Post Spacing -mlc_pwr.row_mult (m/pixel) = 12.0 ; MLC S (azimuth) Slant Post Spacing -mlc_pwr.col_mult (m/pixel) = 6.245676208 ; MLC R (range) Slant Post Spacing -mlc_mag.row_mult (m/pixel) = 12.0 ; MLC S (azimuth) Slant Post Spacing -mlc_mag.col_mult (m/pixel) = 6.245676208 ; MLC R (range) Slant Post Spacing -mlc_phase.row_mult (m/pixel) = 12.0 ; MLC S (azimuth) Slant Post Spacing -mlc_phase.col_mult (m/pixel) = 6.245676208 ; MLC R (range) Slant Post Spacing -grd_pwr.row_mult (deg/pixel) = -0.0001 ; GRD Latitude Pixel Spacing -grd_pwr.col_mult (deg/pixel) = 0.0001 ; GRD Longitude Pixel Spacing -grd_mag.row_mult (deg/pixel) = -0.0001 ; GRD Latitude Pixel Spacing -grd_mag.col_mult (deg/pixel) = 0.0001 ; GRD Longitude Pixel Spacing -grd_phase.row_mult (deg/pixel) = -0.0001 ; GRD Latitude Pixel Spacing -grd_phase.col_mult (deg/pixel) = 0.0001 ; GRD Longitude Pixel Spacing -hgt.row_mult (deg/pixel) = -0.0001 ; HGT Latitude Pixel Spacing -hgt.col_mult (deg/pixel) = 0.0001 ; HGT Longitude Pixel Spacing -inc.row_mult (deg/pixel) = -0.0001 ; INC Latitude Pixel Spacing -inc.col_mult (deg/pixel) = 0.0001 ; INC Longitude Pixel Spacing -slope.row_mult (deg/pixel) = -0.0001 ; SLOPE Latitude Pixel Spacing -slope.col_mult (deg/pixel) = 0.0001 ; SLOPE Longitude Pixel Spacing -rtc.row_mult (deg/pixel) = -0.0001 ; RTC Latitude Pixel Spacing -rtc.col_mult (deg/pixel) = 0.0001 ; RTC Longitude Pixel Spacing -slc_mag.val_size (bytes) = 8 ; SLC Bytes per pixel in file -slc_phase.val_size (bytes) = 8 ; SLC Bytes per pixel in file -mlc_pwr.val_size (bytes) = 4 ; MLC Bytes per pixel in file -mlc_mag.val_size (bytes) = 8 ; MLC Bytes per pixel in file -mlc_phase.val_size (bytes) = 8 ; MLC Bytes per pixel in file -grd_pwr.val_size (bytes) = 4 ; GRD Bytes per pixel in file -grd_mag.val_size (bytes) = 8 ; GRD Bytes per pixel in file -grd_phase.val_size (bytes) = 8 ; GRD Bytes per pixel in file -hgt.val_size (bytes) = 4 ; HGT Bytes per pixel in file -inc.val_size (bytes) = 4 ; INC Bytes per pixel in file -slope.val_size (bytes) = 8 ; SLOPE Bytes per pixel in file, 2x4 bytes per pixel -rtc.val_size (bytes) = 4 ; RTC Bytes per pixel in file -slc_mag.val_frmt (&) = COMPLEX_MAGNITUDE ; SLC Data Type -slc_phase.val_frmt (&) = COMPLEX_PHASE ; SLC Data Type -mlc_pwr.val_frmt (&) = REAL*4 ; MLC Data Type -mlc_mag.val_frmt (&) = COMPLEX_MAGNITUDE ; MLC Data Type -mlc_phase.val_frmt (&) = COMPLEX_PHASE ; MLC Data Type -grd_pwr.val_frmt (&) = REAL*4 ; GRD Data Type -grd_mag.val_frmt (&) = COMPLEX_MAGNITUDE ; GRD Data Type -grd_phase.val_frmt (&) = COMPLEX_PHASE ; GRD Data Type -hgt.val_frmt (&) = REAL*4 ; HGT Data Type -inc.val_frmt (&) = REAL*4 ; INC Data Type -slope.val_frmt (&) = REAL*4 ; SLOPE Data Type -rtc.val_frmt (&) = REAL*4 ; RTC Data Type -val_endi (&) = LITTLE ENDIAN -val_mult (-) = 1.0 ; Scale for Data -val_addr (-) = 0.0 ; Shift for Data -val_minv (dB) = -1000000. ; Minimum Value Default for display -val_maxv (dB) = 10000000. ; Maximum Value Default for display -slc_phase.val_mult (-) = 1.0 ; Maximum Value Default for display -slc_phase.val_minv (rad) = -3.14 ; Maximum Value Default for display -slc_phase.val_maxv (rad) = 3.14 ; Maximum Value Default for display -mlc_phase.val_mult (-) = 1.0 ; Maximum Value Default for display -mlc_phase.val_minv (rad) = -3.14 ; Maximum Value Default for display -mlc_phase.val_maxv (rad) = 3.14 ; Maximum Value Default for display -grd_phase.val_mult (-) = 1.0 ; Maximum Value Default for display -grd_phase.val_minv (rad) = -3.14 ; Maximum Value Default for display -grd_phase.val_maxv (rad) = 3.14 ; Maximum Value Default for display -dsp_cmap (&) = grey ; Grey Color Table -hgt.dsp_cmap (&) = cmy ; Color Table -inc.dsp_cmap (&) = grey ; Grey Color Table -slope.dsp_cmap (&) = grey ; Grey Color Table -rtc.dsp_cmap (&) = grey ; Grey Color Table -slc_phase.dsp_cmap (&) = cmy ; Color Table -slc_phase.dsp_cmap (&) = cmy ; Color Table -slc_phase.dsp_cmap (&) = cmy ; Color Table -mlc_phase.dsp_cmap (&) = cmy ; Color Table -grd_phase.dsp_cmap (&) = cmy ; Color Table - -; acquisition parameters - -Acquisition Mode (&) = PolSAR -Pulse Length (microsec) = 40.0 -Steering Angle (deg) = 90 ; 90 deg is boresight -Bandwidth (Mhz) = 80.0 -Date of Acquisition (&) = 17-Jul-2012 14:36:47 UTC ; note this flight line's synthetic aperture spans 245 seconds since it was flown at an average speed of 200 m/s -Start Time of Acquisition (&) = 17-Jul-2012 14:36:47 UTC ; note this flight line's synthetic aperture spans 245 seconds since it was flown at an average speed of 200 m/s -Stop Time of Acquisition (&) = 17-Jul-2012 14:43:40 UTC ; note this flight line's synthetic aperture spans 245 seconds since it was flown at an average speed of 200 m/s - -; processing parameters - -Peg Latitude (deg) = 0.49764166983E+02 -Peg Longitude (deg) = -0.98020046890E+02 -Peg Heading (deg) = -0.44275286985E+02 -Center Wavelength (cm) = 2.411846002e+01 -Ellipsoid Semi-major Axis (m) = 0.637813700E+07 -Ellipsoid Eccentricity Squared (-) = 0.669437999E-02 -Look Direction (&) = Left -Ping-Pong or Single Antenna Transmit (-) = 1 -Range Spacing per Bin (m) = 6.245676208e+00 -Image Starting Range (km) = 1.315005740e+01 -Nominal Azimuth Reference Length (-) = 8192 -Azimuth Resolution (m) = 7.0 -Azimuth Spacing (m) = 6.000000000e+00 -Sinc Interpolator Fractional Bandwidth (-) = 0.900 -Global Average Yaw (deg) = 0.0 -Global Average Pitch (deg) = 0.0 -Global Average Roll (deg) = 0.684647435E+00 -Global Average ESA (deg) = 0.0 -Global Average Altitude (m) = 0.124945193E+05 -Global Average Terrain Height (m) = 0.244630016E+03 -Global Average Squint Angle (deg) = 0.0 -Average Pulse Repetition Interval (ms) = 2.732907600e+01 -Average Terrain Height (m) = 0.244641797E+03 -Standard Deviation of Terrain Height (m) = 0.182294642E+02 -Average Altitude (m) = 0.124945193E+05 -Reskew Doppler (&) = Zero Doppler -Reskew Doppler Near Mid Far (hz,hz,hz) = 0.00000000 0.00000000 0.00000000 -Mocomp I Applied (&) = Y -Mocomp II Applied (&) = Y -Type of Secondary Motion Compensation Algorithm (&) = RTI Mocomp -Fix Reference Path from Patch-to-Patch (&) = Yes -Fix Doppler from Patch-to-Patch (-) = Yes -Global or Local Reference Height in Mocomp Common (&) = Local - -; post-processing parameters - -Number of Range Looks in MLC (-) = 1 -Number of Azimuth Looks in MLC (-) = 2 -Number of Range Looks in GRD (-) = 1 -Number of Azimuth Looks in GRD (-) = 2 -Ground Projection Method (&) = Nearest Neighbor -DEM Used in Ground Projection (&) = SRTM1 v3 -DEM Datum (&) = WGS-84 -DEM Source (&) = http://uavsar.jpl.nasa.gov/doc/dem.htm -DEM Original Pixel Spacing (arcsec) = 1 -DEM Citation Count (-) = 0 -Slope Calibration in GRD (&) = No -Radiometric Terrain Correction Method (&) = Hybrid Projection Angle -Approximate Upper Left Latitude (deg) = 49.846014006 -Approximate Upper Left Longitude (deg) = -98.669916943 -Approximate Upper Right Latitude (deg) = 49.986739651 -Approximate Upper Right Longitude (deg) = -98.449590490 -Approximate Lower Left Latitude (deg) = 49.342563873 -Approximate Lower Left Longitude (deg) = -97.909325095 -Approximate Lower Right Latitude (deg) = 49.481850617 -Approximate Lower Right Longitude (deg) = -97.689085853 -Precision DGPS Solution (&) = Post-Processed ; Real-Time or Post-Processed -Simulated NISAR Range Bandwidth (MHz) = 20.0 -Simulated NISAR Center Frequency (MHz) = 1243.0 -Simulated NISAR Polarizations (&) = HH HV -Simulated NISAR Near Range Incidence Angle (deg) = 33.88 -Simulated NISAR Far Range Incidence Angle (deg) = 47.2 -Simulated NISAR Near Range Look Angle (deg) = 29.9 -Simulated NISAR Far Range Look Angle (deg) = 41.0 -Simulated NISAR Dithering (&) = None ; None, Dithered With Gaps, or Dithered Without Gaps -Fraction of Swath with NISAR Doppler Overlap (-) = 1.00 -Simulated NISAR Dithering Gap Size (us) = 0 -Simulated NISAR Dithering Average Gap Fraction (-) = 0 -Simulated NISAR Dithering Maximum Gap Fraction (-) = 0 -Simulated NISAR Dithering Average PRF (&) = N/A -Simulated NISAR Product Version Number (-) = 1.1 -Date of Processing (&) = 03-Jan-2021 -Processor Version Number (&) = fff7d96682ed909c8d42b5bbf7cb2539d4fccd02 -Post Processor Version Number (&) = fff7d96682ed909c8d42b5bbf7cb2539d4fccd02 -Processor Release Notes (&) = N/A -Hardware Version Number (&) = N/A - -; radiometric calibration parameters - -Antenna Pattern Radiometric Correction Applied (&) = Yes -Range Dependent Radiometric Correction Applied (&) = Yes -Area Correction Factor in Slant Plane Applied (&) = Yes -RFI Removed (&) = Yes (Quick RFI Removal) -Adaptive RFI Removal Applied (&) = No -Cross Talk Removed (&) = Yes -Apply Receive Cal Pulse Phase (&) = Yes -Apply Transmit Cal Pulse Phase (&) = Yes -Elevation Boresight Bias HH LRTI80 (deg) = 0.0 -Elevation Boresight Bias VV LRTI80 (deg) = 0.0 -Sigma Nought Bias HH LRTI80 (-) = 0.09676936 -Sigma Nought Bias VV LRTI80 (-) = 0.06317530 -Sigma Nought Bias HV LRTI80 (-) = 0.06533468 -Sigma Nought Bias VH LRTI80 (-) = 0.09357103 -Sigma Nought Slope HH LRTI80 (-/deg) = 0.00000 -Sigma Nought Slope HV LRTI80 (-/deg) = 0.00000 -Sigma Nought Slope VH LRTI80 (-/deg) = 0.00000 -Sigma Nought Slope VV LRTI80 (-/deg) = 0.00000 -HH-VV Phase Bias LRTI80 (deg) = 79.91326 -HV-VH Phase Bias LRTI80 (deg) = 34.45363 -HH-VV Phase Slope LRTI80 (-) = -0.54829 -HV-VH Phase Slope LRTI80 (-) = 0.00000 -HH-VV Phase Acceleration LRTI80 (-/deg) = 0.00000 -HV-VH Phase Acceleration LRTI80 (-/deg) = 0.00000 -HH-VV Phase Jerk LRTI80 (-/deg/deg) = 0.00000 -HV-VH Phase Jerk LRTI80 (-/deg/deg) = 0.00000 -Noise Calibration Constant LRTI80 (-) = 0.0 -ISLR Noise Calibration Term LRTI80 (-) = 0.0 -SLC Data Units (&) = linear amplitude -MLC Data Units (&) = linear power -GRD Data Units (&) = linear power -HGT Data Units (&) = meters - -; comments - -comments = diff --git a/tests/data-files/winnip_31604_12061_004_120717_L090_CX_07/winnip_31604_12061_004_120717_L090_CX_129B_07.ann b/tests/data-files/winnip_31604_12061_004_120717_L090_CX_07/winnip_31604_12061_004_120717_L090_CX_129B_07.ann deleted file mode 100644 index 2b44321..0000000 --- a/tests/data-files/winnip_31604_12061_004_120717_L090_CX_07/winnip_31604_12061_004_120717_L090_CX_129B_07.ann +++ /dev/null @@ -1,333 +0,0 @@ -; Parameter file for winnip_31604_12061_004_120717_L090_CX_129B_07 -; -; Search for parameters/value rather than placement in file -; -; slc = single look complex slant range image -; mlc = multi look cross product slant range image -; grd = ground range projected (equiangular) and multi-looked data -; hgt = digital elevation model (DEM) used during processing and ground projection -; inc = ground range local incidence angle, the angle between the surface normal and the radar line of sight -; slope = ground range terrain slope containing the derivatives of the DEM in the East and North direction, used to compute the local incidence angle -; rtc = radiometric terrain correction factor that can be applied to grd files -; h5 = HDF5 file in NISAR format -; slc_mag and slc_phase are derived from the same 8 bytes per pixel of the slc input file -; mlc_mag and mlc_phase are derived from the same 8 bytes per pixel of the complex mlc input files -; grd_mag and grd_phase are ground range projected (equiangular) complex cross-product images -; -; Peg position is the nadir position of aircraft at the middle of the datatake -; Projection of image is relative to the flightline (S - along track position, C - cross track position) -; S0, C0 is offset to upper left coordinate of SLC in meters -; -; To display MLC amplitude and phase in mdx: -; mdx -h winnip_31604_12061_004_120717_L090_CX_129B_07.ann -mix + -PER -percent 95 -exp .5 winnip_31604_12061_004_120717_L090HHHH_CX_129B_07.mlc -set mlc_pwr -cmap red winnip_31604_12061_004_120717_L090HVHV_CX_129B_07.mlc -set mlc_pwr -cmap green -exp .5 winnip_31604_12061_004_120717_L090VVVV_CX_129B_07.mlc -set mlc_pwr -cmap blue -; To display GRD amplitude and phase in mdx: -; mdx -h winnip_31604_12061_004_120717_L090_CX_129B_07.ann -mix + -PER -percent 95 -exp .5 winnip_31604_12061_004_120717_L090HHHH_CX_129B_07.grd -set grd_pwr -cmap red winnip_31604_12061_004_120717_L090HVHV_CX_129B_07.grd -set grd_pwr -cmap green -exp .5 winnip_31604_12061_004_120717_L090VVVV_CX_129B_07.grd -set grd_pwr -cmap blue - - -; Annotation file version (when an annotation file contains no annotation version field, assume the version number is 1.0) - -UAVSAR PolSAR Annotation File Version Number (-) = 2.4 - -; general location of data (non-unique) - -Site Description = Winnipeg, Canada - -; URL of JPL website for precision data - -URL = http://uavsar.jpl.nasa.gov/cgi-bin/product.pl?jobName=winnip_31604_12061_004_120717_L090_CX_07 - -; list of precision data files - -slcHH = winnip_31604_12061_004_120717_L090HH_CX_129B_07.slc ; File Size 69067680 bytes -slcHV = winnip_31604_12061_004_120717_L090HV_CX_129B_07.slc ; File Size 69067680 bytes -slcVH = winnip_31604_12061_004_120717_L090VH_CX_129B_07.slc ; File Size 69067680 bytes -slcVV = winnip_31604_12061_004_120717_L090VV_CX_129B_07.slc ; File Size 69067680 bytes -mlcHHHH = winnip_31604_12061_004_120717_L090HHHH_CX_129B_07.mlc ; File Size 17265600 bytes -mlcHVHV = winnip_31604_12061_004_120717_L090HVHV_CX_129B_07.mlc ; File Size 17265600 bytes -mlcVVVV = winnip_31604_12061_004_120717_L090VVVV_CX_129B_07.mlc ; File Size 17265600 bytes -mlcHHHV = winnip_31604_12061_004_120717_L090HHHV_CX_129B_07.mlc ; File Size 34531200 bytes -mlcHHVV = winnip_31604_12061_004_120717_L090HHVV_CX_129B_07.mlc ; File Size 34531200 bytes -mlcHVVV = winnip_31604_12061_004_120717_L090HVVV_CX_129B_07.mlc ; File Size 34531200 bytes -grdHHHH = winnip_31604_12061_004_120717_L090HHHH_CX_129B_07.grd ; File Size 258149112 bytes -grdHVHV = winnip_31604_12061_004_120717_L090HVHV_CX_129B_07.grd ; File Size 258149112 bytes -grdVVVV = winnip_31604_12061_004_120717_L090VVVV_CX_129B_07.grd ; File Size 258149112 bytes -grdHHHV = winnip_31604_12061_004_120717_L090HHHV_CX_129B_07.grd ; File Size 516298224 bytes -grdHHVV = winnip_31604_12061_004_120717_L090HHVV_CX_129B_07.grd ; File Size 516298224 bytes -grdHVVV = winnip_31604_12061_004_120717_L090HVVV_CX_129B_07.grd ; File Size 516298224 bytes -hgt = winnip_31604_12061_004_120717_L090_CX_129B_07.hgt ; File Size 258149112 bytes -inc = winnip_31604_12061_004_120717_L090_CX_129B_07.inc ; File Size 258149112 bytes -flat.inc = winnip_31604_12061_004_120717_L090_CX_129B_07.flat.inc ; File Size 258149112 bytes -slope = winnip_31604_12061_004_120717_L090_CX_129B_07.slope ; File Size 516298224 bytes -rtc = winnip_31604_12061_004_120717_L090_CX_129B_07.rtc ; File Size 258149112 bytes -kmz = winnip_31604_12061_004_120717_L090_CX_129B_07.kmz ; File Size 39088635 bytes -h5 = winnip_31604_12061_004_120717_L090_CX_129_07.h5 ; File Size 1490157832 bytes - -; data format information, see comments after semicolon for descriptions -; also used as mdx display parameters (mdx header) - - -set_name (&) = ; Layers Described -slc_mag.set_rows (pixels) = 13081 ; SLC Lines -slc_mag.set_cols (pixels) = 660 ; SLC Samples -slc_phase.set_rows (pixels) = 13081 ; SLC Lines -slc_phase.set_cols (pixels) = 660 ; SLC Samples -mlc_pwr.set_rows (pixels) = 6540 ; MLC Lines -mlc_pwr.set_cols (pixels) = 660 ; MLC Samples -mlc_mag.set_rows (pixels) = 6540 ; MLC Lines -mlc_mag.set_cols (pixels) = 660 ; MLC Samples -mlc_phase.set_rows (pixels) = 6540 ; MLC Lines -mlc_phase.set_cols (pixels) = 660 ; MLC Samples -grd_pwr.set_rows (pixels) = 6558 ; GRD Lines -grd_pwr.set_cols (pixels) = 9841 ; GRD Samples -grd_mag.set_rows (pixels) = 6558 ; GRD Lines -grd_mag.set_cols (pixels) = 9841 ; GRD Samples -grd_phase.set_rows (pixels) = 6558 ; GRD Lines -grd_phase.set_cols (pixels) = 9841 ; GRD Samples -hgt.set_rows (pixels) = 6558 ; HGT Lines -hgt.set_cols (pixels) = 9841 ; HGT Samples -inc.set_rows (pixels) = 6558 ; INC Lines -inc.set_cols (pixels) = 9841 ; INC Samples -slope.set_rows (pixels) = 6558 ; SLOPE Lines -slope.set_cols (pixels) = 9841 ; SLOPE Samples -rtc.set_rows (pixels) = 6558 ; RTC Lines -rtc.set_cols (pixels) = 9841 ; RTC Samples -set_hddr (bytes) = 0 ; Header Bytes in Raw Data -set_tail (bytes) = 0 ; Tail Bytes in Raw Data -slc_mag.set_proj (&) = SCX ; SLC Data Projection: Slant Range -slc_phase.set_proj (&) = SCX ; SLC Data Projection: Slant Range -mlc_pwr.set_proj (&) = SCX ; MLC Data Projection: Slant Range -mlc_mag.set_proj (&) = SCX ; MLC Data Projection: Slant Range -mlc_phase.set_proj (&) = SCX ; MLC Data Projection: Slant Range -grd_pwr.set_proj (&) = EQA ; GRD Data Projection: Equiangular Ground Range -grd_mag.set_proj (&) = EQA ; GRD Data Projection: Equiangular Ground Range -grd_phase.set_proj (&) = EQA ; GRD Data Projection: Equiangular Ground Range -hgt.set_proj (&) = EQA ; HGT Data Projection: Equiangular Ground Range -inc.set_proj (&) = EQA ; INC Data Projection: Equiangular Ground Range -slope.set_proj (&) = EQA ; SLOPE Data Projection: Equiangular Ground Range -set_plat (deg) = 49.764166983 ; Peg Latitude -set_plon (deg) = -98.02004689 ; Peg Longitude -set_phdg (deg) = -44.275286985 ; Peg Heading -slc_mag.row_addr (m) = -39186.6 ; S (azimuth) Offset(S0) from Peg -slc_mag.col_addr (m) = 13150.0574 ; R (range) Offset(R0) from Peg -slc_phase.row_addr (m) = -39186.6 ; S (azimuth) Offset(S0) from Peg -slc_phase.col_addr (m) = 13150.0574 ; R (range) Offset(R0) from Peg -mlc_pwr.row_addr (m) = -39183.6 ; S (azimuth) Offset(S0) from Peg -mlc_pwr.col_addr (m) = 13150.0574 ; R (range) Offset(R0) from Peg -mlc_mag.row_addr (m) = -39183.6 ; S (azimuth) Offset(S0) from Peg -mlc_mag.col_addr (m) = 13150.0574 ; R (range) Offset(R0) from Peg -mlc_phase.row_addr (m) = -39183.6 ; S (azimuth) Offset(S0) from Peg -mlc_phase.col_addr (m) = 13150.0574 ; R (range) Offset(R0) from Peg -grd_pwr.row_addr (deg) = 49.9924 ; Center Latitude of Upper Left Pixel of GRD Image -grd_pwr.col_addr (deg) = -98.67119999999998 ; Center Longitude of Upper Left Pixel of GRD Image -grd_mag.row_addr (deg) = 49.9924 ; Center Latitude of Upper Left Pixel of GRD Image -grd_mag.col_addr (deg) = -98.67119999999998 ; Center Longitude of Upper Left Pixel of GRD Image -grd_phase.row_addr (deg) = 49.9924 ; Center Latitude of Upper Left Pixel of GRDImage -grd_phase.col_addr (deg) = -98.67119999999998 ; Center Longitude of Upper Left Pixel of GRD Image -hgt.row_addr (deg) = 49.9924 ; Center Latitude of Upper Left Pixel of HGT Image -hgt.col_addr (deg) = -98.67119999999998 ; Center Longitude of Upper Left Pixel of HGT Image -inc.row_addr (deg) = 49.9924 ; Center Latitude of Upper Left Pixel of INC Image -inc.col_addr (deg) = -98.67119999999998 ; Center Longitude of Upper Left Pixel of INC Image -slope.row_addr (deg) = 49.9924 ; Center Latitude of Upper Left Pixel of SLOPE Image -slope.col_addr (deg) = -98.67119999999998 ; Center Longitude of Upper Left Pixel of SLOPE Image -rtc.row_addr (deg) = 49.9924 ; Center Latitude of Upper Left Pixel of RTC Image -rtc.col_addr (deg) = -98.67119999999998 ; Center Longitude of Upper Left Pixel of RTC Image -slc_mag.row_mult (m/pixel) = 6.0 ; SLC S (azimuth) Slant Post Spacing -slc_mag.col_mult (m/pixel) = 24.98270483 ; SLC R (range) Slant Post Spacing -slc_phase.row_mult (m/pixel) = 6.0 ; SLC S (azimuth) Slant Post Spacing -slc_phase.col_mult (m/pixel) = 24.98270483 ; SLC R (range) Slant Post Spacing -mlc_pwr.row_mult (m/pixel) = 12.0 ; MLC S (azimuth) Slant Post Spacing -mlc_pwr.col_mult (m/pixel) = 24.98270483 ; MLC R (range) Slant Post Spacing -mlc_mag.row_mult (m/pixel) = 12.0 ; MLC S (azimuth) Slant Post Spacing -mlc_mag.col_mult (m/pixel) = 24.98270483 ; MLC R (range) Slant Post Spacing -mlc_phase.row_mult (m/pixel) = 12.0 ; MLC S (azimuth) Slant Post Spacing -mlc_phase.col_mult (m/pixel) = 24.98270483 ; MLC R (range) Slant Post Spacing -grd_pwr.row_mult (deg/pixel) = -0.0001 ; GRD Latitude Pixel Spacing -grd_pwr.col_mult (deg/pixel) = 0.0001 ; GRD Longitude Pixel Spacing -grd_mag.row_mult (deg/pixel) = -0.0001 ; GRD Latitude Pixel Spacing -grd_mag.col_mult (deg/pixel) = 0.0001 ; GRD Longitude Pixel Spacing -grd_phase.row_mult (deg/pixel) = -0.0001 ; GRD Latitude Pixel Spacing -grd_phase.col_mult (deg/pixel) = 0.0001 ; GRD Longitude Pixel Spacing -hgt.row_mult (deg/pixel) = -0.0001 ; HGT Latitude Pixel Spacing -hgt.col_mult (deg/pixel) = 0.0001 ; HGT Longitude Pixel Spacing -inc.row_mult (deg/pixel) = -0.0001 ; INC Latitude Pixel Spacing -inc.col_mult (deg/pixel) = 0.0001 ; INC Longitude Pixel Spacing -slope.row_mult (deg/pixel) = -0.0001 ; SLOPE Latitude Pixel Spacing -slope.col_mult (deg/pixel) = 0.0001 ; SLOPE Longitude Pixel Spacing -rtc.row_mult (deg/pixel) = -0.0001 ; RTC Latitude Pixel Spacing -rtc.col_mult (deg/pixel) = 0.0001 ; RTC Longitude Pixel Spacing -slc_mag.val_size (bytes) = 8 ; SLC Bytes per pixel in file -slc_phase.val_size (bytes) = 8 ; SLC Bytes per pixel in file -mlc_pwr.val_size (bytes) = 4 ; MLC Bytes per pixel in file -mlc_mag.val_size (bytes) = 8 ; MLC Bytes per pixel in file -mlc_phase.val_size (bytes) = 8 ; MLC Bytes per pixel in file -grd_pwr.val_size (bytes) = 4 ; GRD Bytes per pixel in file -grd_mag.val_size (bytes) = 8 ; GRD Bytes per pixel in file -grd_phase.val_size (bytes) = 8 ; GRD Bytes per pixel in file -hgt.val_size (bytes) = 4 ; HGT Bytes per pixel in file -inc.val_size (bytes) = 4 ; INC Bytes per pixel in file -slope.val_size (bytes) = 8 ; SLOPE Bytes per pixel in file, 2x4 bytes per pixel -rtc.val_size (bytes) = 4 ; RTC Bytes per pixel in file -slc_mag.val_frmt (&) = COMPLEX_MAGNITUDE ; SLC Data Type -slc_phase.val_frmt (&) = COMPLEX_PHASE ; SLC Data Type -mlc_pwr.val_frmt (&) = REAL*4 ; MLC Data Type -mlc_mag.val_frmt (&) = COMPLEX_MAGNITUDE ; MLC Data Type -mlc_phase.val_frmt (&) = COMPLEX_PHASE ; MLC Data Type -grd_pwr.val_frmt (&) = REAL*4 ; GRD Data Type -grd_mag.val_frmt (&) = COMPLEX_MAGNITUDE ; GRD Data Type -grd_phase.val_frmt (&) = COMPLEX_PHASE ; GRD Data Type -hgt.val_frmt (&) = REAL*4 ; HGT Data Type -inc.val_frmt (&) = REAL*4 ; INC Data Type -slope.val_frmt (&) = REAL*4 ; SLOPE Data Type -rtc.val_frmt (&) = REAL*4 ; RTC Data Type -val_endi (&) = LITTLE ENDIAN -val_mult (-) = 1.0 ; Scale for Data -val_addr (-) = 0.0 ; Shift for Data -val_minv (dB) = -1000000. ; Minimum Value Default for display -val_maxv (dB) = 10000000. ; Maximum Value Default for display -slc_phase.val_mult (-) = 1.0 ; Maximum Value Default for display -slc_phase.val_minv (rad) = -3.14 ; Maximum Value Default for display -slc_phase.val_maxv (rad) = 3.14 ; Maximum Value Default for display -mlc_phase.val_mult (-) = 1.0 ; Maximum Value Default for display -mlc_phase.val_minv (rad) = -3.14 ; Maximum Value Default for display -mlc_phase.val_maxv (rad) = 3.14 ; Maximum Value Default for display -grd_phase.val_mult (-) = 1.0 ; Maximum Value Default for display -grd_phase.val_minv (rad) = -3.14 ; Maximum Value Default for display -grd_phase.val_maxv (rad) = 3.14 ; Maximum Value Default for display -dsp_cmap (&) = grey ; Grey Color Table -hgt.dsp_cmap (&) = cmy ; Color Table -inc.dsp_cmap (&) = grey ; Grey Color Table -slope.dsp_cmap (&) = grey ; Grey Color Table -rtc.dsp_cmap (&) = grey ; Grey Color Table -slc_phase.dsp_cmap (&) = cmy ; Color Table -slc_phase.dsp_cmap (&) = cmy ; Color Table -slc_phase.dsp_cmap (&) = cmy ; Color Table -mlc_phase.dsp_cmap (&) = cmy ; Color Table -grd_phase.dsp_cmap (&) = cmy ; Color Table - -; acquisition parameters - -Acquisition Mode (&) = PolSAR -Pulse Length (microsec) = 40.0 -Steering Angle (deg) = 90 ; 90 deg is boresight -Bandwidth (Mhz) = 80.0 -Date of Acquisition (&) = 17-Jul-2012 14:36:47 UTC ; note this flight line's synthetic aperture spans 245 seconds since it was flown at an average speed of 200 m/s -Start Time of Acquisition (&) = 17-Jul-2012 14:36:47 UTC ; note this flight line's synthetic aperture spans 245 seconds since it was flown at an average speed of 200 m/s -Stop Time of Acquisition (&) = 17-Jul-2012 14:43:40 UTC ; note this flight line's synthetic aperture spans 245 seconds since it was flown at an average speed of 200 m/s - -; processing parameters - -Peg Latitude (deg) = 0.49764166983E+02 -Peg Longitude (deg) = -0.98020046890E+02 -Peg Heading (deg) = -0.44275286985E+02 -Center Wavelength (cm) = 2.360570535e+01 -Ellipsoid Semi-major Axis (m) = 0.637813700E+07 -Ellipsoid Eccentricity Squared (-) = 0.669437999E-02 -Look Direction (&) = Left -Ping-Pong or Single Antenna Transmit (-) = 1 -Range Spacing per Bin (m) = 2.498270483e+01 -Image Starting Range (km) = 1.315005740e+01 -Nominal Azimuth Reference Length (-) = 8192 -Azimuth Resolution (m) = 7.0 -Azimuth Spacing (m) = 6.000000000e+00 -Sinc Interpolator Fractional Bandwidth (-) = 0.900 -Global Average Yaw (deg) = 0.0 -Global Average Pitch (deg) = 0.0 -Global Average Roll (deg) = 0.684647435E+00 -Global Average ESA (deg) = 0.0 -Global Average Altitude (m) = 0.124945193E+05 -Global Average Terrain Height (m) = 0.244630016E+03 -Global Average Squint Angle (deg) = 0.0 -Average Pulse Repetition Interval (ms) = 2.732907600e+01 -Average Terrain Height (m) = 0.244641797E+03 -Standard Deviation of Terrain Height (m) = 0.182294642E+02 -Average Altitude (m) = 0.124945193E+05 -Reskew Doppler (&) = Zero Doppler -Reskew Doppler Near Mid Far (hz,hz,hz) = 0.00000000 0.00000000 0.00000000 -Mocomp I Applied (&) = Y -Mocomp II Applied (&) = Y -Type of Secondary Motion Compensation Algorithm (&) = RTI Mocomp -Fix Reference Path from Patch-to-Patch (&) = Yes -Fix Doppler from Patch-to-Patch (-) = Yes -Global or Local Reference Height in Mocomp Common (&) = Local - -; post-processing parameters - -Number of Range Looks in MLC (-) = 1 -Number of Azimuth Looks in MLC (-) = 2 -Number of Range Looks in GRD (-) = 1 -Number of Azimuth Looks in GRD (-) = 2 -Ground Projection Method (&) = Nearest Neighbor -DEM Used in Ground Projection (&) = SRTM1 v3 -DEM Datum (&) = WGS-84 -DEM Source (&) = http://uavsar.jpl.nasa.gov/doc/dem.htm -DEM Original Pixel Spacing (arcsec) = 1 -DEM Citation Count (-) = 0 -Slope Calibration in GRD (&) = No -Radiometric Terrain Correction Method (&) = Hybrid Projection Angle -Approximate Upper Left Latitude (deg) = 49.846144373 -Approximate Upper Left Longitude (deg) = -98.669713731 -Approximate Upper Right Latitude (deg) = 49.986739651 -Approximate Upper Right Longitude (deg) = -98.449590490 -Approximate Lower Left Latitude (deg) = 49.342692910 -Approximate Lower Left Longitude (deg) = -97.909121947 -Approximate Lower Right Latitude (deg) = 49.481850617 -Approximate Lower Right Longitude (deg) = -97.689085853 -Precision DGPS Solution (&) = Post-Processed ; Real-Time or Post-Processed -Simulated NISAR Range Bandwidth (MHz) = 5.0 -Simulated NISAR Center Frequency (MHz) = 1270.0 -Simulated NISAR Polarizations (&) = VH VV -Simulated NISAR Near Range Incidence Angle (deg) = 33.88 -Simulated NISAR Far Range Incidence Angle (deg) = 47.2 -Simulated NISAR Near Range Look Angle (deg) = 29.9 -Simulated NISAR Far Range Look Angle (deg) = 41.0 -Simulated NISAR Dithering (&) = None ; None, Dithered With Gaps, or Dithered Without Gaps -Fraction of Swath with NISAR Doppler Overlap (-) = 1.00 -Simulated NISAR Dithering Gap Size (us) = 0 -Simulated NISAR Dithering Average Gap Fraction (-) = 0 -Simulated NISAR Dithering Maximum Gap Fraction (-) = 0 -Simulated NISAR Dithering Average PRF (&) = N/A -Simulated NISAR Product Version Number (-) = 1.1 -Date of Processing (&) = 03-Jan-2021 -Processor Version Number (&) = fff7d96682ed909c8d42b5bbf7cb2539d4fccd02 -Post Processor Version Number (&) = fff7d96682ed909c8d42b5bbf7cb2539d4fccd02 -Processor Release Notes (&) = N/A -Hardware Version Number (&) = N/A - -; radiometric calibration parameters - -Antenna Pattern Radiometric Correction Applied (&) = Yes -Range Dependent Radiometric Correction Applied (&) = Yes -Area Correction Factor in Slant Plane Applied (&) = Yes -RFI Removed (&) = Yes (Quick RFI Removal) -Adaptive RFI Removal Applied (&) = No -Cross Talk Removed (&) = Yes -Apply Receive Cal Pulse Phase (&) = Yes -Apply Transmit Cal Pulse Phase (&) = Yes -Elevation Boresight Bias HH LRTI80 (deg) = 0.0 -Elevation Boresight Bias VV LRTI80 (deg) = 0.0 -Sigma Nought Bias HH LRTI80 (-) = 0.09676936 -Sigma Nought Bias VV LRTI80 (-) = 0.06317530 -Sigma Nought Bias HV LRTI80 (-) = 0.06533468 -Sigma Nought Bias VH LRTI80 (-) = 0.09357103 -Sigma Nought Slope HH LRTI80 (-/deg) = 0.00000 -Sigma Nought Slope HV LRTI80 (-/deg) = 0.00000 -Sigma Nought Slope VH LRTI80 (-/deg) = 0.00000 -Sigma Nought Slope VV LRTI80 (-/deg) = 0.00000 -HH-VV Phase Bias LRTI80 (deg) = 79.91326 -HV-VH Phase Bias LRTI80 (deg) = 34.45363 -HH-VV Phase Slope LRTI80 (-) = -0.54829 -HV-VH Phase Slope LRTI80 (-) = 0.00000 -HH-VV Phase Acceleration LRTI80 (-/deg) = 0.00000 -HV-VH Phase Acceleration LRTI80 (-/deg) = 0.00000 -HH-VV Phase Jerk LRTI80 (-/deg/deg) = 0.00000 -HV-VH Phase Jerk LRTI80 (-/deg/deg) = 0.00000 -Noise Calibration Constant LRTI80 (-) = 0.0 -ISLR Noise Calibration Term LRTI80 (-) = 0.0 -SLC Data Units (&) = linear amplitude -MLC Data Units (&) = linear power -GRD Data Units (&) = linear power -HGT Data Units (&) = meters - -; comments - -comments = diff --git a/tests/data-files/winnip_31604_12061_004_120717_L090_CX_07/winnip_31604_12061_004_120717_L090_CX_129_07.h5 b/tests/data-files/winnip_31604_12061_004_120717_L090_CX_07/winnip_31604_12061_004_120717_L090_CX_129_07.h5 deleted file mode 100644 index 520536ba3e9e8545f58fffa5e6b6354032493a40..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19776 zcmeHP&2Qtz6(8BoR!F?4lTFd2?V{5r2QL~c(wgvB(NZx#n{sB4mxW^v%nByLM%rU28f%ec_+e6X5H}jszH7&~W+6TuR1LW|{o5z{o zycxcEZ{$C2u5H|Y`zLP;O!>T+5;H2xm;X^JZ)*xabNL=+a&$kT`|}B%$%(wcvJZ$p zL-OUMCVWd3n~&Dl1#q%_zEibhirK>)Izy5=D^Z=}4pkcs5s6rC0dcIe9;CC|4y zmX8QOZF{Z$q2-2HVYFN|-AV2g@JIONmE4x+hGr`q*}fm)%SaBkby^gW0_~dya$c-@ z?h!N!x*RC_9RT^3Dp!wUbz`nnSVVsO8!Rh=$5|=>ged<&^N(7WzWb@>qbBKx?0RDm z7`86$k^V3c)t$;C%=0?1$psg@57Xbx54FGp(#uieAFkG`s!g<@a{JUe1(j=C&~RBT z$(`z|Z1`Tg50exUFT1SwwaQLKe%7ecXI;=V()EEK=R77ZZ$4O4&&;RhHBekTFnzBV zl)vaX1=kGBLf1P|ocgl+!`MTX%@D{C$Pma7$Pma7$Pma7$Pma7$Pma7$Pma7I2Qst zwfY+R5_li~Z`!D{AK|8=`Ak!#6;j5o(P#EVM2+@u1@@YRI$HPue`RVL7dapZn z%hVwNo`>ZNqIY_JzaYOP%N^HWc)?~|`)b4dt&O|7YdxCZdL5V=8pkaEQuCJyk-gvQ z%-8h%YE@@m(epoltuwnkU_{Su*AoF=2fiT(dXL7nw{^AsIlT_dlHRgfoz~;4ZO!$S z&gU68ki(V}<2VV?U(91TMVnGmb@nZ=u#i46F`-!VbRuFhck+>97(__)(|cr*A+z(% z$L%Oys^gq(D`@$4ZxAQOI48zXlyJCL_5;u9hnDpGeLIwH|8U>(fj%u};fj2>;0<}v zckK`(rC1+r6RwYR#|of`zf@Q&nY3O_QEP=L{vyc}r$~A@`Bj{n%l1tejh3EG#U|OJliUEG>K@6=Au!goJrxUJ;fG3k%Cg zSTYugU>K^(@^Xo)L^AH(D;A`CN`QqrE(U+5f2LW|Ps1zqHx z0V5FYKsW)Xu51tf4GmgI(RsVuz?TpsZw(z%)GG0fEEu_y^&ETv1Bm(Nl$K|Lv+H_r*tMmJo-bW5T#-$`kDC^`VLE|@uatNhnMUhJv@g?J zZ>`Y7arqbFLK}5zK@ykIdL1A44Id8T#>Rd8{g@ny#dTz0ea;W`S?@b@aGn|ypA+Q! zB&^2IDxXRq!1lRfej=c}3*UiQu5$>A*>CmNVFgPfYMn4zxIYDWv3hA1Hd- zJV2M8ZnY3qI|!xMk^7$KSf&fpK~D_Z?c&U6n<4x?gK1*=pcdYt?V1j%f8Xz_v(=0X z3(V1eoN;08Gf_c7B|+=0%3k7y1!(cZY723 z8WfGAS3idS4A-l>q*urlrKDcz5lho697@)!x(YKV7BVwvS+L=S%`U8F7_-(-_}-=H z$RrNuRh*s*0+gXTU+1Qs;#f# zd*5un@H+gQy3qJd)R(hzFNpa3cW0GGw7*jJMLD9Km3u|RmzA?huMh3=^lJT_dZoub zZ5@vLm+2?kGCb~C8r9t^1$P`gW}qd5btW;-o)8|$6{X}n8;uA4M4Z None: collection.validate() - def test_create_item(self) -> None: + def test_create_item(self, example_href: str) -> None: with TemporaryDirectory() as tmp_dir: # Run your custom create-item command and validate # Example: - inpath = "tests/data-files/winnip_31604_12061_004_120717_L090_CX_07" destination = os.path.join(tmp_dir, "item.json") dither = "X" nmode = "129" @@ -53,7 +52,7 @@ def test_create_item(self) -> None: [ "nisarsim", "create-item", - f"{inpath}", + example_href, f"{destination}", f"--dither {dither}", f"--nmode {nmode}", diff --git a/tests/test_metadata.py b/tests/test_metadata.py new file mode 100644 index 0000000..e8a898b --- /dev/null +++ b/tests/test_metadata.py @@ -0,0 +1,13 @@ +from stactools.nisar_sim import metadata + + +def test_MetadataLinks() -> None: + href = ( + "https://downloaduav.jpl.nasa.gov/Release2e/" + "Haywrd_14501_08037_007_080729_L090_CX_01/" + ) + metalinks = metadata.MetadataLinks(href=href, dither="X", nmode="X") + assert ( + metalinks.h5_href == "https://downloaduav.jpl.nasa.gov/Release2e/" + "Haywrd_14501_08037_007_080729_L090_CX_01/Haywrd_14501_08037_007_080729_L090_CX_X_01.h5" + ) diff --git a/tests/test_stac.py b/tests/test_stac.py index bbda8b4..43ef671 100644 --- a/tests/test_stac.py +++ b/tests/test_stac.py @@ -15,11 +15,11 @@ def test_create_collection() -> None: collection.validate() -def test_create_item() -> None: +def test_create_item(example_href: str) -> None: # Write tests for each for the creation of STAC Items # Create the STAC Item... item = stac.create_item( - "tests/data-files/winnip_31604_12061_004_120717_L090_CX_07", + example_href, dither="X", nmode="129", )