satpy.readers.msi_safe module
SAFE MSI L1C reader.
The MSI data has a special value for saturated pixels. By default, these
pixels are set to np.inf, but for some applications it might be desirable
to have these pixels left untouched.
For this case, the mask_saturated flag is available in the reader, and can be
toggled with reader_kwargs
upon Scene creation:
scene = satpy.Scene(filenames,
reader='msi_safe',
reader_kwargs={'mask_saturated': False})
scene.load(['B01'])
L1B format description for the files read here:
- class satpy.readers.msi_safe.SAFEMSIL1C(filename, filename_info, filetype_info, mda, tile_mda, mask_saturated=True)[source]
Bases:
BaseFileHandler
File handler for SAFE MSI files (jp2).
Initialize the reader.
- property end_time
Get the end time.
- property start_time
Get the start time.
- class satpy.readers.msi_safe.SAFEMSIMDXML(filename, filename_info, filetype_info, mask_saturated=True)[source]
Bases:
SAFEMSIXMLMetadata
File handle for sentinel 2 safe XML generic metadata.
Init the reader.
- property band_indices
Get the band indices from the metadata.
- property band_offsets
Get the band offsets from the metadata.
- calibrate_to_radiances(data, band_name)[source]
Calibrate data to radiance using the radiometric information for the metadata.
- calibrate_to_reflectances(data, band_name)[source]
Calibrate data using the radiometric information for the metadata.
- property no_data
Get the nodata value from the metadata.
- property physical_gains
Get the physical gains dictionary.
- property saturated
Get the saturated value from the metadata.
- property special_values
Get the special values from the metadata.
- class satpy.readers.msi_safe.SAFEMSITileMDXML(filename, filename_info, filetype_info, mask_saturated=True)[source]
Bases:
SAFEMSIXMLMetadata
File handle for sentinel 2 safe XML tile metadata.
Init the reader.
- property projection
Get the geographic projection.
- class satpy.readers.msi_safe.SAFEMSIXMLMetadata(filename, filename_info, filetype_info, mask_saturated=True)[source]
Bases:
BaseFileHandler
Base class for SAFE MSI XML metadata filehandlers.
Init the reader.
- property end_time
Get end time.
- property start_time
Get start time.