epygram.formats.TIFFMF — Interface-Class to the TIFFMF format

Contains the class to handle TIFFMF format.

class epygram.formats.TIFFMF.TIFFMF(*args, **kwargs)[source]

Bases: epygram.resources.FileResource.FileResource

Class implementing all specificities for TIFFMF resource format.

Footprint:

dict(
    attr = dict(
        filename = dict(
            access = 'rxx', 
            alias = set([]), 
            default = None, 
            info = 'File name (absolute or relative) of the resource.', 
            optional = False, 
            outcast = set([]), 
            remap = dict(), 
            values = set([]),
        ), 
        fmtdelayedopen = dict(
            access = 'rxx', 
            alias = set([]), 
            default = False, 
            info = 'Opening of the resource delayed (not at time of construction).', 
            optional = True, 
            outcast = set([]), 
            remap = dict(), 
            type = bool, 
            values = set([]),
        ), 
        format = dict(
            access = 'rxx', 
            alias = set([]), 
            default = 'TIFFMF', 
            info = 'Format of the resource.', 
            optional = True, 
            outcast = set([]), 
            remap = dict(), 
            values = set(['TIFFMF']),
        ), 
        openmode = dict(
            access = 'rxx', 
            alias = set([]), 
            default = None, 
            info = 'Opening mode.', 
            optional = False, 
            outcast = set([]), 
            remap = dict(
                append = 'a', 
                read = 'r', 
                write = 'w',
            ), 
            values = set(['a', 'write', 'r', 'w', 'read', 'append']),
        ),
    ), 
    bind = [], 
    info = 'Not documented', 
    only = dict(), 
    priority = dict(
        level = footprints.priorities.PriorityLevel::DEFAULT,
    ),
)
close()[source]

Closes a TIFFMF file.

find_fields_in_resource(seed=None, fieldtype=[], generic=False)[source]

Returns a list of the fields from resource whose identifier match the given seed.

Args:

  • seed: might be a tuple of regular expressions, a list of regular expressions tuples or None.

    If None (default), returns the list of all fields in resource.

  • fieldtype: optional, among (‘H2D’, ‘Misc’) or a list of these strings. If provided, filters out the fields not of the given types.

  • generic: if True, returns a list of tuples (fieldname, generic fid) of the fields.

listfields(**kwargs)[source]

Returns a list containing the TIFFMF identifiers of all the fields of the resource.

open()[source]

Opens a TIFFMF, and initializes some attributes.

readfield(*args, **kwargs)[source]

Reads one field, given its identifier, and returns a Field instance. Interface to Fortran routines from ‘ifsaux’.

Args:

  • fieldidentifier: name.

  • getdata: optional, if False, only metadata are read, the field do not contain data.

    Default is True.

readfields(requestedfields=None, getdata=True)[source]

Returns a epygram.base.FieldSet containing requested fields read in the resource.

Args:

  • requestedfields: might be

    • an expressions with regular expressions (e.g. ‘CMS‘)
    • a list of TIFFMF fields identifiers with regular expressions (e.g. [‘TIME‘, ‘CMS‘])
    • if not specified, interpretated as all fields that will be found in resource
  • getdata: optional, if False, only metadata are read, the fields do not contain data.

    Default is True.

sortfields()[source]

Returns a sorted list of fields with regards to their name, as a dict of lists.

what(*args, **kwargs)[source]

Writes in file a summary of the contents of the TIFFMF.

Args:

  • out: the output open file-like object (duck-typing: out.write() only is needed).
  • sortfields: True if the fields have to be sorted.
writefield(field)[source]

Write a field in the resource.

Args:

writefields(fieldset)[source]

Write the fields of the fieldset in the resource.

Args:

Previous topic

epygram.formats.GeoPoints — Interface-Class to the GeoPoints format

Next topic

epygram.formats.netCDF — Interface-Class to the netCDF format

This Page