WsvMap

class pyarts3.arts.WsvMap(*args, **kwargs)

A map from String to Wsv

Overview

Method

clear()

Remove all items

Method

items()

Returns an iterable view of the map’s items.

Method

keys()

Returns an iterable view of the map’s keys.

Method

update()

Update the map with element from arg

Method

values()

Returns an iterable view of the map’s values.

Method

write_split()

Write the workspace variables to files

Static Data

pyarts3.arts.WsvMap.ItemView

<class ‘pyarts3.arts.WsvMap.ItemView’> (nb_type_0)

Static Data

pyarts3.arts.WsvMap.KeyView

<class ‘pyarts3.arts.WsvMap.KeyView’> (nb_type_0)

Static Data

pyarts3.arts.WsvMap.ValueView

<class ‘pyarts3.arts.WsvMap.ValueView’> (nb_type_0)

Operator

__contains__()

__contains__(self, arg: object, /) -> bool

Operator

__delitem__()

__delitem__(self, arg: str, /) -> None

Operator

__eq__()

Return self==value.

Operator

__format__()

Default object formatter.

Operator

__ge__()

Return self>=value.

Operator

__getitem__()

__getitem__(self, arg: str, /) -> pyarts3.arts.Wsv

Operator

__getstate__()

Helper for pickle.

Operator

__gt__()

Return self>value.

Operator

__hash__()

Return hash(self).

Operator

__init__()

Overloaded function.

Operator

__iter__()

__iter__(self) -> collections.abc.Iterator[str]

Operator

__le__()

Return self<=value.

Operator

__len__()

__len__(self) -> int

Operator

__lt__()

Return self<value.

Operator

__ne__()

Return self!=value.

Operator

__repr__()

__repr__(self) -> str

Operator

__setitem__()

__setitem__(self, arg0: str, arg1: pyarts3.arts.Wsv, /) -> None

Operator

__str__()

Return str(self).

Constructors

__init__(self) None
__init__(self, arg: pyarts3.arts.WsvMap) None
__init__(self, arg: dict[str, pyarts3.arts.Wsv], /) None
__init__(self, files: pyarts3.arts.ArrayOfString, allow_errors: bool = False) None

Overloaded function.

  1. __init__(self) -> None

Default constructor

  1. __init__(self, arg: pyarts3.arts.WsvMap) -> None

Copy constructor

  1. __init__(self, arg: dict[str, pyarts3.arts.Wsv], /) -> None

Construct from a dictionary

  1. __init__(self, files: pyarts3.arts.ArrayOfString, allow_errors: bool = False) -> None

Initialize from a list of files

The keys are going to be the file names after the internal pathing has been applied.

Parameters:
  • files (list of str) – The files to read

  • allow_errors (bool, optional) – If False (default) then an exception is thrown if any file cannot be read. Otherwise the files that cannot be read are put into the workspace variable “errors” as a list of strings.

Methods

clear(self) None

Remove all items

items(self) pyarts3.arts.WsvMap.ItemView

Returns an iterable view of the map’s items.

keys(self) pyarts3.arts.WsvMap.KeyView

Returns an iterable view of the map’s keys.

update(self, arg: pyarts3.arts.WsvMap, /) None

Update the map with element from arg

values(self) pyarts3.arts.WsvMap.ValueView

Returns an iterable view of the map’s values.

write_split(self, basename: str | None = None, ftype: pyarts3.arts.FileType = 'ascii', clobber: bool = True) pyarts3.arts.ArrayOfString

Write the workspace variables to files

The variables are written to the files named by the keys.

Parameters:
  • basename (str, optional) – The base name to use for the output files. The key is appended to this to form the file name. If not provided (default) the key is used as the file name. Note that it is not basename + "/" key, but just basename + key, so if you want a directory separator you must provide it.

  • ftype (FileType, optional) – The file type to write, default is ascii.

  • clobber (bool, optional) – If True (default) overwrite existing files, if False use a unique file name.

Returns:

The list of files written. If basename is provided, the key is appended to it. If not, the key is the file name. If file writing fails an exception is not thrown, but the file is not in the returned list.

Return type:

list of str

Operators

__contains__(self, arg: str, /) bool
__contains__(self, arg: object, /) bool
__delitem__(self, arg: str, /) None
__eq__(value, /)

Return self==value.

__format__(format_spec, /)

Default object formatter.

Return str(self) if format_spec is empty. Raise TypeError otherwise.

__ge__(value, /)

Return self>=value.

__getitem__(self, arg: str, /) pyarts3.arts.Wsv
__getstate__()

Helper for pickle.

__gt__(value, /)

Return self>value.

__hash__()

Return hash(self).

__init__(self) None
__init__(self, arg: pyarts3.arts.WsvMap) None
__init__(self, arg: dict[str, pyarts3.arts.Wsv], /) None
__init__(self, files: pyarts3.arts.ArrayOfString, allow_errors: bool = False) None

Overloaded function.

  1. __init__(self) -> None

Default constructor

  1. __init__(self, arg: pyarts3.arts.WsvMap) -> None

Copy constructor

  1. __init__(self, arg: dict[str, pyarts3.arts.Wsv], /) -> None

Construct from a dictionary

  1. __init__(self, files: pyarts3.arts.ArrayOfString, allow_errors: bool = False) -> None

Initialize from a list of files

The keys are going to be the file names after the internal pathing has been applied.

Parameters:
  • files (list of str) – The files to read

  • allow_errors (bool, optional) – If False (default) then an exception is thrown if any file cannot be read. Otherwise the files that cannot be read are put into the workspace variable “errors” as a list of strings.

__iter__(self) collections.abc.Iterator[str]
__le__(value, /)

Return self<=value.

__len__(self) int
__lt__(value, /)

Return self<value.

__ne__(value, /)

Return self!=value.

__repr__(self) str
__setitem__(self, arg0: str, arg1: pyarts3.arts.Wsv, /) None
__str__()

Return str(self).