pyresample.image module
Handles resampling of images with assigned geometry definitions.
- class pyresample.image.ImageContainer(image_data, geo_def, fill_value=0, nprocs=1)
Bases:
objectHolds image with geometry definition. Allows indexing with linesample arrays.
- Parameters:
- image_data
Image data
- Type:
numpy array
Initialize ImageContainer.
- __init__(image_data, geo_def, fill_value=0, nprocs=1)
Initialize ImageContainer.
- get_array_from_linesample(row_indices, col_indices)
Get array sampled from image based on index arrays.
- Parameters:
row_indices (numpy array) – Row indices. Dimensions must match col_indices
col_indices (numpy array) – Col indices. Dimensions must match row_indices
- Returns:
image_data – Resampled image data
- Return type:
numpy_array
- get_array_from_neighbour_info(*args, **kwargs)
Resample from preprocessed data.
- resample(target_geo_def)
Resample data to target definition.
- class pyresample.image.ImageContainerBilinear(image_data, geo_def, radius_of_influence, epsilon=0, fill_value=0, reduce_data=False, nprocs=1, segments=None, neighbours=32)
Bases:
ImageContainerHolds image with geometry definition. Allows bilinear to new geometry definition.
- Parameters:
image_data (numpy array) – Image data
geo_def (object) – Geometry definition
radius_of_influence (float) – Cut off distance in meters
epsilon (float, optional) – Allowed uncertainty in meters. Increasing uncertainty reduces execution time
fill_value (int or None, optional) – Set undetermined pixels to this value. If fill_value is None a masked array is returned with undetermined pixels masked
reduce_data (bool, optional) – Perform coarse data reduction before resampling in order to reduce execution time
nprocs (int, optional) – Number of processor cores to be used for geometry operations
segments (int or None) – Number of segments to use when resampling. If set to None an estimate will be calculated
- image_data
Image data
- Type:
numpy array
Initialize ImageContainer.
- __init__(image_data, geo_def, radius_of_influence, epsilon=0, fill_value=0, reduce_data=False, nprocs=1, segments=None, neighbours=32)
Initialize ImageContainer.
- class pyresample.image.ImageContainerNearest(image_data, geo_def, radius_of_influence, epsilon=0, fill_value=0, reduce_data=True, nprocs=1, segments=None)
Bases:
ImageContainerHolds image with geometry definition. Allows nearest neighbour to new geometry definition.
- Parameters:
image_data (numpy array) – Image data
geo_def (object) – Geometry definition
radius_of_influence (float) – Cut off distance in meters
epsilon (float, optional) – Allowed uncertainty in meters. Increasing uncertainty reduces execution time
fill_value (int or None, optional) – Set undetermined pixels to this value. If fill_value is None a masked array is returned with undetermined pixels masked
reduce_data (bool, optional) – Perform coarse data reduction before resampling in order to reduce execution time
nprocs (int, optional) – Number of processor cores to be used for geometry operations
segments (int or None) – Number of segments to use when resampling. If set to None an estimate will be calculated
- image_data
Image data
- Type:
numpy array
Initialize ImageContainer.
- __init__(image_data, geo_def, radius_of_influence, epsilon=0, fill_value=0, reduce_data=True, nprocs=1, segments=None)
Initialize ImageContainer.
- class pyresample.image.ImageContainerQuick(image_data, geo_def, fill_value=0, nprocs=1, segments=None)
Bases:
ImageContainerHolds image with area definition and allows quick resampling within area.
- Parameters:
image_data (numpy array) – Image data
geo_def (object) – Area definition as AreaDefinition object
fill_value (int or None, optional) – Set undetermined pixels to this value. If fill_value is None a masked array is returned with undetermined pixels masked
nprocs (int, optional) – Number of processor cores to be used for geometry operations
segments (int or None) – Number of segments to use when resampling. If set to None an estimate will be calculated
- image_data
Image data
- Type:
numpy array
- fill_value
Resample result fill value If fill_value is None a masked array is returned with undetermined pixels masked
- Type:
int or None
Initialize ImageContainer.
- __init__(image_data, geo_def, fill_value=0, nprocs=1, segments=None)
Initialize ImageContainer.