Input plugins: the mpop.satin package

Available plugins and their requirements

mipp_xrit

Reader for for hrit/lrit formats. Recommends numexpr and pyresample.

Interface to Eumetcast level 1.5 HRIT/LRIT format. Uses the MIPP reader.

class mpop.satin.mipp_xrit.XritReader(scene)
load(*args, **kwargs)
pformat = 'mipp_xrit'
mpop.satin.mipp_xrit.load(satscene, calibrate=True, area_extent=None)

Read data from file and load it into satscene. The calibrate argument is passed to mipp (should be 0 for off, 1 for default, and 2 for radiances only).

mpop.satin.mipp_xrit.load_generic(satscene, options, calibrate=True, area_extent=None)

Read imager data from file and load it into satscene.

aapp1b

Reader for aapp level 1b format. Requires AHAMAP, recommends pyresample.

Reader for aapp level 1b data.

http://research.metoffice.gov.uk/research/interproj/nwpsaf/aapp/ NWPSAF-MF-UD-003_Formats.pdf

class mpop.satin.aapp1b.AAPP1b(fname)

AAPP-level 1b data reader

calibrate(chns=('1', '2', '3A', '3B', '4', '5'), calibrate=1)

Calibrate the data

navigate()

Return the longitudes and latitudes of the scene.

read()

Read the data.

mpop.satin.aapp1b.load(satscene, *args, **kwargs)

Read data from file and load it into satscene. A possible calibrate keyword argument is passed to the AAPP reader. Should be 0 for off (counts), 1 for default (brightness temperatures and reflectances), and 2 for radiances only.

mpop.satin.aapp1b.load_avhrr(satscene, options)

Read avhrr data from file and load it into satscene.

mpop.satin.aapp1b.show(data, negate=False)

Show the stetched data.

eps_format

Reader for eps level 1b format. Recommends pyresample.

thin_modis

Reader for thinned modis format (as send via Eumetcast). Require pyhdf.

msg_hdf

Reader for msg cloud products. Requires pytable and acpg.

pps_hdf

Reader for pps cloud products. Requires acpg.

Plugin for reading PPS’s cloud products hdf files.

class mpop.satin.pps_hdf.PpsCTTH
copy(other)
read(filename)
class mpop.satin.pps_hdf.PpsCloudType
copy(other)
is_loaded()
read(filename)
mpop.satin.pps_hdf.load(scene, **kwargs)

Load data into the channels. Channels is a list or a tuple containing channels we will load data into. If None, all channels are loaded.

hrpt

Reader for level 0 hrpt format. Requires AAPP and pynav.

eps1a

Reader for level 1a metop segments. Requires AAPP, kai and eugene.

Interaction with reader plugins

The reader plugin instance used for a specific scene is accessible through a scene attribute named after the plugin format. For example, the attribute for the foo format would be called foo_reader.

This way the other methods present in the plugins are available through the scene object.

The plugin API

Changed in version 0.13.0: New plugin API

The mpop.plugin_base module defines the plugin API.

class mpop.plugin_base.Plugin

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

class mpop.plugin_base.Reader(scene)

Reader plugins. They should have a pformat attribute, and implement the load method. This is an abstract class to be inherited.

load(channels_to_load)

Loads the channels_to_load into the scene object.

ptype = 'reader'
class mpop.plugin_base.Writer(scene)

Writer plugins. They must implement the save method. This is an abstract class to be inherited.

ptype = 'writer'
save(filename)

Saves the scene to a given filename.

Adding a new plugin

For now only reader and writer plugins base classes are defined.

To add one of those, just create a new class that subclasses the plugin.

The interface of any reader plugin must include the load() method.

Take a look at the existing readers for more insight.