SparseStokvecMatrix
- class pyarts3.arts.SparseStokvecMatrix(*args, **kwargs)
A sparse matrix of Stokvec
Overview
Method
Method
Method
Method
Method
Method
Method
Method
Method
Method
Method
Method
Method
Method
Method
Read variable from file.
Method
Reduces the matrix by polarization.
Method
Method
Method
Method
Saves variable to file.
Method
Method
Method
Method
Method
Method
Method
Static Method
Create variable from file.
See
numpy.ndarray.T.Get a dense copy.
See
numpy.ndarray.dtype.See
numpy.ndarray.imag.See
numpy.ndarray.nbytes.See
numpy.ndarray.ndim.See
numpy.ndarray.real.See
numpy.ndarray.shape.See
numpy.ndarray.size.Allow using numpy on a copy of the class.
Operator
Operator
Operator
Operator
Allows
array()to be called with the object.Operator
Operator
Operator
Operator
Operator
__format__(self, arg: str, /) -> strOperator
Operator
Overloaded function.
Operator
Operator
Return hash(self).
Operator
Operator
Operator
Operator
See
numpy.matmulOperator
Operator
Operator
__init__(self, arg: pyarts3.arts.SparseStokvecMatrix) -> NoneOperator
Operator
Operator
Operator
See
iter()Operator
Operator
Operator
Operator
Operator
Operator
Operator
Operator
Operator
Operator
Operator
See
numpy.addOperator
Operator
See
numpy.divmodOperator
__repr__(self) -> strOperator
Operator
See
numpy.matmulOperator
See
numpy.remainderOperator
See
numpy.multiplyOperator
See
numpy.bitwise_orOperator
See
numpy.powerOperator
See
numpy.subtractOperator
Operator
Overloaded function.
Operator
__str__(self) -> strOperator
Constructors
- __init__(self) None
- __init__(self, arg: SparseStokvecMatrix) None
Methods
- cumprod(self, axis: object | None = None, dtype: object | None = None, out: object | None = None) object
- cumsum(self, axis: object | None = None, dtype: object | None = None, out: object | None = None) object
- mean(self, axis: object | None = None, dtype: object | None = None, out: object | None = None, keepdims: object = False) object
- prod(self, axis: object | None = None, dtype: object | None = None, out: object | None = None, keepdims: object = False) object
- readxml(self, file: str) str
Read variable from file.
- Parameters:
file (str) – A file that can be read.
- Raises:
RuntimeError – For any failure to read.
- Returns:
file – The file path found (may differ from input due to environment variables).
- Return type:
- reduce(self, pol: Stokvec = [1, 0, 0, 0], along_poslos: bool = False, along_freq: bool = False) Matrix | Vector | float
Reduces the matrix by polarization.
The reduction happens either along the position/line-of-sight axis, the frequency axis, or both. The reduction is the equivalent of performing
np.einsum("ijk,k->ij", weight_matrix, pol)where
iis the position/line-of-sight index,jis the frequency index, andkis the Stokes index if bothalong_poslosandalong_freqareFalse. If both areTrue, the result is a single number. If only one of them isTrue, the result is a vector the size of the remaining axis.- Parameters:
- Returns:
The reduced value, depending on the parameters.
- Return type:
- savexml(self, file: str, type: str = 'ascii', clobber: bool = True) str
Saves variable to file.
- Parameters:
file (str) – The path to which the file is written. Note that several of the options might modify the name or write more files.
type (str, optional) – Type of file to save. See
FileTypefor options. Defaults is “ascii”.clobber (bool, optional) – Overwrite existing files or add new file with modified name? Defaults is True.
- Raises:
RuntimeError – For any failure to write.
- Returns:
file – The file saved. May differ from input.
- Return type:
- std(self, axis: object | None = None, dtype: object | None = None, out: object | None = None, ddof: object = 0, keepdims: object = False) object
- sum(self, axis: object | None = None, dtype: object | None = None, out: object | None = None, keepdims: object = False) object
- trace(self, offset: object = 0, axis1: object = 0, axis2: object = 1, dtype: object | None = None, out: object | None = None) object
- var(self, axis: object | None = None, dtype: object | None = None, out: object | None = None, ddof: object = 0, keepdims: object = False) object
Static Methods
- fromxml(file: str) SparseStokvecMatrix
Create variable from file.
- Parameters:
file (str) – A file that can be read
- Raises:
RuntimeError – For any failure to read.
Attributes
- T: object
See
numpy.ndarray.T.
- dense: StokvecMatrix
Get a dense copy.
- dtype: object
See
numpy.ndarray.dtype.
- imag: object
See
numpy.ndarray.imag.
- nbytes: object
See
numpy.ndarray.nbytes.
- ndim: object
See
numpy.ndarray.ndim.
- real: object
See
numpy.ndarray.real.
- shape: object
See
numpy.ndarray.shape.
- size: object
See
numpy.ndarray.size.
Operators
- __array__(self, dtype: object | None = None, copy: object | None = None) object
Allows
array()to be called with the object.
- __getitem__(self, arg: tuple[int, int], /) Stokvec
- __getitem__(self, arg: tuple[int, int, int], /) float
- __getitem__(self, key: object) object
Overloaded function.
__getitem__(self, arg: tuple[int, int], /) -> pyarts3.arts.Stokvec__getitem__(self, arg: tuple[int, int, int], /) -> float__getitem__(self, key: object) -> object
- __hash__()
Return hash(self).
- __imatmul__(self, value: object) object
See
numpy.matmul
- __init__(self) None
- __init__(self, arg: SparseStokvecMatrix) None
- __rdivmod__(self, value: object) object
See
numpy.divmod
- __rmatmul__(self, value: object) object
See
numpy.matmul
- __rmod__(self, value: object) object
See
numpy.remainder
- __rmul__(self, value: object) object
See
numpy.multiply
- __ror__(self, value: object) object
See
numpy.bitwise_or
- __rsub__(self, value: object) object
See
numpy.subtract
- __setitem__(self, arg0: tuple[int, int], arg1: Stokvec, /) None
- __setitem__(self, arg0: tuple[int, int, int], arg1: float, /) None
- __setitem__(self, key: object, value: object) object
Overloaded function.
__setitem__(self, arg0: tuple[int, int], arg1: pyarts3.arts.Stokvec, /) -> None__setitem__(self, arg0: tuple[int, int, int], arg1: float, /) -> None__setitem__(self, key: object, value: object) -> object