satpy.readers.msi_safe module
SAFE MSI L1C/L2A 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'])
L1C/L2A format description for the files read here:
NOTE: At present, L1B data is not supported. If the user needs radiance data instead of counts or reflectances, these are retrieved by first calculating the reflectance and then working back to the radiance. L1B radiance data support will be added once the data is published onto the Copernicus data ecosystem.
- 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, solar_zenith, band_name)[source]
Calibrate data to radiance using the radiometric information for the metadata.
- calibrate_to_radiances_l1b(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 solar_irradiances
Get the TOA solar irradiance values from the metadata.
- property special_values
Get the special values from the metadata.
- property sun_earth_dist
Get the sun-earth distance 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.