satpy package


satpy module

SatPy Package initializer.

satpy.plugin_base module

The satpy.plugin_base module defines the plugin API.

class satpy.plugin_base.Plugin(ppp_config_dir=None, default_config_filename=None, config_files=None, **kwargs)

Bases: object

The base plugin class. It is not to be used as is, it has to be inherited by other classes.


satpy.projectable module

satpy.resample module

satpy.scene module

Scene objects to hold satellite data.

class satpy.scene.Scene(filenames=None, ppp_config_dir='/home/docs/checkouts/', reader=None, base_dir=None, sensor=None, start_time=None, end_time=None, area=None, reader_kwargs=None, **metadata)

Bases: satpy.dataset.InfoObject

The almighty scene class.


Get all composite IDs that are configured.

Returns:generator of configured composite names
all_dataset_ids(reader_name=None, composites=False)

Get names of all datasets from loaded readers or reader_name if specified..

Returns:list of all dataset names
all_dataset_names(reader_name=None, composites=False)

Get names of compositors that can be generated from the available datasets.

Returns:generator of available compositor’s names
available_dataset_ids(reader_name=None, composites=False)

Get names of available datasets, globally or just for reader_name if specified, that can be loaded.

Available dataset names are determined by what each individual reader can load. This is normally determined by what files are needed to load a dataset and what files have been provided to the scene/reader.

Returns:list of available dataset names
available_dataset_names(reader_name=None, composites=False)

Get the list of the names of the available datasets.


Compute all the composites contained in requirements.

create_reader_instances(filenames=None, base_dir=None, reader=None, reader_kwargs=None)

Find readers and return their instanciations.


Return the end time of the file.

get_writer(writer='geotiff', **kwargs)
get_writer_by_ext(extension, **kwargs)

Generate images for all the datasets from the scene.


Generate datasets grouped by Area.

Returns:generator of (area_obj, list of dataset objects)
load(wishlist, calibration=None, resolution=None, polarization=None, compute=True, unload=True, **kwargs)

Read, compute and unload.

load_writer_config(config_files, **kwargs)
read(nodes=None, **kwargs)

Load datasets from the necessary reader.

  • nodes (iterable) – DependencyTree Node objects
  • **kwargs – Keyword arguments to pass to the reader’s load method.

DatasetDict of loaded datasets


Read (generate) composites.

read_datasets(dataset_nodes, **kwargs)

Read the given datasets from file.

resample(destination, datasets=None, compute=True, unload=True, **resample_kwargs)

Resample the datasets and return a new scene.

save_dataset(dataset_id, filename=None, writer=None, overlay=None, **kwargs)

Save the dataset_id to file using writer (geotiff by default).

save_datasets(writer='geotiff', datasets=None, **kwargs)

Save all the datasets present in a scene to disk using writer.

show(dataset_id, overlay=None)

Show the dataset on screen as an image.


Return the start time of the file.


Unload all unneeded datasets.

Datasets are considered unneeded if they weren’t directly requested or added to the Scene by the user or they are no longer needed to compute composites that have yet to be computed.

Parameters:keepables (iterable) – DatasetIDs to keep whether they are needed or not. module

Helper functions for eg. performing Sun zenith angle correction., cos_zen, limit=88.0)

Perform Sun zenith angle correction to the given data using cosine of the zenith angle (cos_zen). The correction is limited to limit degrees (default: 88.0 degrees). For larger zenith angles, the correction is the same as at the limit. Both data and cos_zen are given as 2-dimensional Numpy arrays or Numpy MaskedArrays, and they should have equal shapes.

satpy.utils module

Module defining various utilities.

class satpy.utils.NullHandler(level=0)

Bases: logging.Handler

Empty handler.


Record a message.

class satpy.utils.OrderedConfigParser(*args, **kwargs)

Bases: object

Intercepts read and stores ordered section names. Cannot use inheritance and super as ConfigParser use old style classes.


Reads config file


Get sections from config file

satpy.utils.angle2xyz(azi, zen)

Convert azimuth and zenith to cartesian.


Turn debugging logging on.


Checks if the dir of f exists, otherwise create it.


Return logger with null handle


Turn logging off.


Turn logging on.

satpy.utils.lonlat2xyz(lon, lat)

Convert lon lat to cartesian.

satpy.utils.strftime(utctime, format_string)

Like datetime.strftime, except it works with string formatting conversion specifier items on windows, making the assumption that all conversion specifiers use mapping keys.

E.g.: >>> from datetime import datetime >>> t = datetime.utcnow() >>> a = “blabla%Y%d%m-%H%M%S-%(value)s” >>> strftime(t, a) ‘blabla20120911-211448-%(value)s’

satpy.utils.xyz2angle(x, y, z)

Convert cartesian to azimuth and zenith.

satpy.utils.xyz2lonlat(x, y, z)

Convert cartesian to lon lat.

Module contents

SatPy Package initializer.