satpy package

Subpackages

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.

get_section_type(section_name)
load_config(conf)

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/readthedocs.org/user_builds/satpy/checkouts/latest/satpy/etc', 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.

all_composite_ids(sensor_names=None)

Get all composite IDs that are configured.

Returns:generator of configured composite names
all_composite_names(sensor_names=None)
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)
all_modifier_names()
available_composite_ids(available_datasets=None)

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

Returns:generator of available compositor’s names
available_composite_names(available_datasets=None)
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(nodes=None)

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.

end_time

Return the end time of the file.

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

Generate images for all the datasets from the scene.

iter_by_area()

Generate datasets grouped by Area.

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

Read, compute and unload.

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

Load datasets from the necessary reader.

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

DatasetDict of loaded datasets

read_composites(compositor_nodes)

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.

start_time

Return the start time of the file.

unload(keepables=None)

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.

satpy.tools module

Helper functions for eg. performing Sun zenith angle correction.

satpy.tools.sunzen_corr_cos(data, 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.

emit(record)

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.

read(filename)

Reads config file

sections()

Get sections from config file

satpy.utils.angle2xyz(azi, zen)

Convert azimuth and zenith to cartesian.

satpy.utils.debug_on()

Turn debugging logging on.

satpy.utils.ensure_dir(filename)

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

satpy.utils.get_logger(name)

Return logger with null handle

satpy.utils.logging_off()

Turn logging off.

satpy.utils.logging_on(level=30)

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.