satpy.writers.mitiff module

MITIFF writer objects for creating MITIFF files from Dataset objects.

class satpy.writers.mitiff.MITIFFWriter(name=None, tags=None, **kwargs)[source]

Bases: ImageWriter

Writer to produce MITIFF image files.

Initialize reader with tag and other configuration information.

_add_calibration(channels, cns, datasets, **kwargs)[source]
_add_calibration_datasets(ch, datasets, reverse_offset, reverse_scale, decimals)[source]
_add_corners(datasets, first_dataset)[source]
_add_palette_info(datasets, palette_unit, palette_description, **kwargs)[source]
_add_pixel_sizes(datasets, first_dataset)[source]
_add_proj4_string(datasets, first_dataset, **kwargs)[source]
_add_sizes(datasets, first_dataset)[source]
_append_projection_center(proj4_string, dataset, x_0, y_0, mitiff_pixel_adjustment)[source]
_calibrate_data(dataset, calibration, min_val, max_val)[source]
_channel_names(channels, cns, **kwargs)[source]
_convert_epsg_to_proj(proj4_string, x_0)[source]
_generate_intermediate_filename(gen_filename)[source]

Replace mitiff ext because pillow doesn’t recognise the file type.

_get_dataset_len(datasets)[source]
_get_platform_name(first_dataset, translate_platform_name, kwargs)[source]
_make_channel_list(datasets, **kwargs)[source]
_make_image_description(datasets, **kwargs)[source]

Generate image description for mitiff.

Satellite: NOAA 18 Date and Time: 06:58 31/05-2016 SatDir: 0 Channels: 6 In this file: 1-VIS0.63 2-VIS0.86 3(3B)-IR3.7 4-IR10.8 5-IR11.5 6(3A)-VIS1.6 Xsize: 4720 Ysize: 5544 Map projection: Stereographic Proj string: +proj=stere +lon_0=0 +lat_0=90 +lat_ts=60 +ellps=WGS84 +towgs84=0,0,0 +units=km +x_0=2526000.000000 +y_0=5806000.000000 TrueLat: 60 N GridRot: 0 Xunit:1000 m Yunit: 1000 m NPX: 0.000000 NPY: 0.000000 Ax: 1.000000 Ay: 1.000000 Bx: -2526.000000 By: -262.000000

Satellite: <satellite name> Date and Time: <HH:MM dd/mm-yyyy> SatDir: 0 Channels: <number of chanels> In this file: <channels names in order> Xsize: <number of pixels x> Ysize: <number of pixels y> Map projection: Stereographic Proj string: <proj4 string with +x_0 and +y_0 which is the positive distance from proj origo to the lower left corner of the image data> TrueLat: 60 N GridRot: 0 Xunit:1000 m Yunit: 1000 m NPX: 0.000000 NPY: 0.000000 Ax: <pixels size x in km> Ay: <pixel size y in km> Bx: <left corner of upper right pixel in km> By: <upper corner of upper right pixel in km>

if palette image write special palette if normal channel write table calibration: Table_calibration: <channel name>, <calibration type>, [<unit>], <no of bits of data>, [<calibration values space separated>]nn

_reorder_channels(datasets, **kwargs)[source]
_save_as_enhanced(datasets, tmp_gen_filename, **kwargs)[source]

Save datasets as an enhanced RGB image.

_save_as_palette(datasets, tmp_gen_filename, tiffinfo, **kwargs)[source]
_save_datasets_as_mitiff(datasets, image_description, gen_filename, **kwargs)[source]

Put all together and save as a tiff file.

Include the special tags making it a mitiff file.

_save_single_dataset(datasets, cns, tmp_gen_filename, tiffinfo, kwargs)[source]
_set_correction_size(dataset, mitiff_pixel_adjustment)[source]
_special_correction_of_proj_string(proj4_string)[source]
save_dataset(dataset, filename=None, fill_value=None, compute=True, **kwargs)[source]

Save single dataset as mitiff file.

save_datasets(datasets, filename=None, fill_value=None, compute=True, **kwargs)[source]

Save all datasets to one or more files.

save_image()[source]

Save dataset as an image array.

satpy.writers.mitiff._adjust_kwargs(dataset, kwargs)[source]