satpy.readers.hrit_base module

HRIT/LRIT format reader.

This module is the base module for all HRIT-based formats. Here, you will find the common building blocks for hrit reading.

One of the features here is the on-the-fly decompression of hrit files. It needs a path to the xRITDecompress binary to be provided through the environment variable called XRIT_DECOMPRESS_PATH. When compressed hrit files are then encountered (files finishing with .C_), they are decompressed to the system’s temporary directory for reading.

class satpy.readers.hrit_base.HRITFileHandler(filename, filename_info, filetype_info, hdr_info)[source]

Bases: BaseFileHandler

HRIT standard format reader.

Initialize the reader.

_get_hd(hdr_info)[source]

Open the file, read and get the basic file header info and set the mda dictionary.

_get_output_info()[source]
property end_time

Get end time.

get_area_def(dsid)[source]

Get the area definition of the band.

get_area_extent(size, offsets, factors, platform_height)[source]

Get the area extent of the file.

get_dataset(key, info)[source]

Load a dataset.

get_xy_from_linecol(line, col, offsets, factors)[source]

Get the intermediate coordinates from line & col.

Intermediate coordinates are actually the instruments scanning angles.

property observation_end_time

Get observation end time.

property observation_start_time

Get observation start time.

read_band(key, info)[source]

Read the data.

property start_time

Get start time.

class satpy.readers.hrit_base.HRITSegment(filename, mda)[source]

Bases: object

An HRIT segment with data.

Set up the segment.

_get_input_info()[source]
_is_file_like()[source]
_read_data_from_disk()[source]
_read_data_from_file()[source]
_read_file_like()[source]
read_data()[source]

Read the data.

satpy.readers.hrit_base.decompress(infile, outdir='.')[source]

Decompress an XRIT data file and return the path to the decompressed file.

It expect to find Eumetsat’s xRITDecompress through the environment variable XRIT_DECOMPRESS_PATH.

satpy.readers.hrit_base.decompressed(filename)[source]

Decompress context manager.

satpy.readers.hrit_base.get_header_content(fp, header_dtype, count=1)[source]

Return the content of the HRIT header.

satpy.readers.hrit_base.get_header_id(fp)[source]

Return the HRIT header common data.

satpy.readers.hrit_base.get_xritdecompress_cmd()[source]

Find a valid binary for the xRITDecompress command.

satpy.readers.hrit_base.get_xritdecompress_outfile(stdout)[source]

Analyse the output of the xRITDecompress command call and return the file.