satpy.readers.sar_c_safe module
SAFE SAR-C reader.
This module implements a reader for Sentinel 1 SAR-C GRD (level1) SAFE format as provided by ESA. The format is comprised of a directory containing multiple files, most notably two measurement files in geotiff and a few xml files for calibration, noise and metadata.
References
Level 1 Product Formatting https://sentinel.esa.int/web/sentinel/technical-guides/sentinel-1-sar/products-algorithms/level-1-product-formatting
J. Park, A. A. Korosov, M. Babiker, S. Sandven and J. Won, “Efficient Thermal Noise Removal for Sentinel-1 TOPSAR Cross-Polarization Channel,” in IEEE Transactions on Geoscience and Remote Sensing, vol. 56, no. 3, pp. 1555-1565, March 2018. doi: 10.1109/TGRS.2017.2765248
- class satpy.readers.sar_c_safe.AzimuthNoiseReader(root, shape)[source]
Bases:
object
Class to parse and read azimuth-noise data.
The azimuth noise vector is provided as a series of blocks, each comprised of a column of data to fill the block and a start and finish column number, and a start and finish line. For example, we can see here a (fake) azimuth noise array:
[[ 1. 1. 1. nan nan nan nan nan nan nan] [ 1. 1. 1. nan nan nan nan nan nan nan] [ 2. 2. 3. 3. 3. 4. 4. 4. 4. nan] [ 2. 2. 3. 3. 3. 4. 4. 4. 4. nan] [ 2. 2. 3. 3. 3. 4. 4. 4. 4. nan] [ 2. 2. 5. 5. 5. 5. 6. 6. 6. 6.] [ 2. 2. 5. 5. 5. 5. 6. 6. 6. 6.] [ 2. 2. 5. 5. 5. 5. 6. 6. 6. 6.] [ 2. 2. 7. 7. 7. 7. 7. 8. 8. 8.] [ 2. 2. 7. 7. 7. 7. 7. 8. 8. 8.]]
As is shown here, the blocks may not cover the full array, and hence it has to be gap-filled with NaNs.
Set up the azimuth noise reader.
- _assemble_azimuth_noise_blocks(chunks)[source]
Assemble the azimuth noise blocks into one single array.
- _create_dask_slice_from_block_line(current_line, chunks)[source]
Create a dask slice from the blocks at the current line.
- _create_dask_slices_from_blocks(chunks)[source]
Create full-width slices from azimuth noise blocks.
- class satpy.readers.sar_c_safe.Calibrator(filename, filename_info, filetype_info, header_file=None, image_shape=None)[source]
Bases:
SAFEXML
XML file reader for the SAFE format, Calibration file.
Init the XML calibration reader.
- class satpy.readers.sar_c_safe.Denoiser(filename, filename_info, filetype_info, header_file=None, image_shape=None)[source]
Bases:
SAFEXML
XML file reader for the SAFE format, Noise file.
Init the xml filehandler.
- class satpy.readers.sar_c_safe.SAFEGRD(filename, filename_info, filetype_info, calibrator, denoiser)[source]
Bases:
BaseFileHandler
Measurement file reader.
The measurement files are in geotiff format and read using rasterio. For performance reasons, the reading adapts the chunk size to match the file’s block size.
Init the grd filehandler.
- property _data
- property end_time
Get the end time.
- property start_time
Get the start time.
- class satpy.readers.sar_c_safe.SAFESARReader(config, filter_parameters=None)[source]
Bases:
GenericYAMLReader
A reader for SAFE SAR-C data for Sentinel 1 satellites.
Set up the SAR reader.
- _abc_impl = <_abc._abc_data object>
- property end_time
Get the end time.
- property start_time
Get the start time.
- class satpy.readers.sar_c_safe.SAFEXML(filename, filename_info, filetype_info, header_file=None, image_shape=None)[source]
Bases:
BaseFileHandler
XML file reader for the SAFE format.
Init the xml filehandler.
- property end_time
Get the end time.
- property start_time
Get the start time.
- class satpy.readers.sar_c_safe.SAFEXMLAnnotation(filename, filename_info, filetype_info, header_file=None)[source]
Bases:
SAFEXML
XML file reader for the SAFE format, Annotation file.
Init the XML annotation reader.
- property image_shape
Return the image shape of this dataset.
- class satpy.readers.sar_c_safe.XMLArray(root, list_tag, element_tag)[source]
Bases:
object
A proxy for getting xml data as an array.
Set up the XML array.
- class satpy.readers.sar_c_safe._AzimuthBlock(xml_element)[source]
Bases:
object
Implementation of an single azimuth-noise block.
Set up the block from an XML element.
- property first_line
- property first_pixel
- property last_line
- property last_pixel
- property lines
- property lut
- satpy.readers.sar_c_safe._get_calibration_name(calibration)[source]
Get the proper calibration name.
- satpy.readers.sar_c_safe.get_gcps_from_array(val)[source]
Get the gcps from the spatial_ref coordinate as a geojson dict.