brahmap.lbsim.LBSim_InvNoiseCovLO_Circulant¶
Bases: BlockDiagInvNoiseCovLO
A block-diagonal linear operator where each diagonal block represents the inverse of a circulant noise covariance matrix \(N^{-1}\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
obs
|
Observation | List[Observation]
|
An instance of the |
required |
input
|
dict | ArrayLike
|
The input array or data defining the operator. It can be a dictionary that maps the detector name to the corresponding input array OR a single array that is used for all the detectors |
required |
input_type
|
Literal['covariance', 'power_spectrum']
|
Specifies whether the |
'power_spectrum'
|
dtype
|
DTypeFloat
|
The data type of the operator, by default |
float64
|
Methods:
| Name | Description |
|---|---|
reset_counters |
Resets matrix-vector product counter to zero. |
dot |
Numpy-like dot() method. |
matvec |
Matrix-vector multiplication method. |
to_array |
Returns the dense form of the linear operator as a 2D NumPy array. |
get_inverse |
Returns the inverse block-diagonal covariance operator. |
Attributes:
| Name | Type | Description |
|---|---|---|
dtype |
DTypeLike
|
The data type of the operator. |
nargin |
int
|
Size of the input vector \(x\), i.e. the number of columns of the operator |
nargout |
int
|
Size of the output vector \(A(x)\), i.e. the number of rows of the operator |
symmetric |
bool
|
Indicates whether the operator is symmetric or not |
shape |
tuple[int, int]
|
A tuple |
nMatvec |
int
|
The number of matrix-vector multiplications computed so far |
T |
LinearOperator
|
The transpose operator |
H |
LinearOperator
|
The adjoint operator |
block_list |
list[LinearOperator]
|
A list of linear operators representing the individual diagonal blocks. |
num_blocks |
int
|
The total number of diagonal blocks in the operator. |
row_size |
NDArray[integer]
|
Array containing the number of rows for each block. |
col_size |
NDArray[integer]
|
Array containing the number of columns for each block. |
size |
int
|
Array containing the number of rows/columns for each block |
diag |
NDArray[number]
|
Array containing the diagonal of the operator |
Source code in brahmap/lbsim/lbsim_noise_operators.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | |
Attributes¶
dtype: npt.DTypeLike
property
writable
¶
The data type of the operator.
Returns:
| Type | Description |
|---|---|
DTypeLike
|
The NumPy data type of the operator |
nargin: int
property
¶
Size of the input vector \(x\), i.e. the number of columns of the operator
Returns:
| Type | Description |
|---|---|
int
|
The number of input columns |
nargout: int
property
¶
Size of the output vector \(A(x)\), i.e. the number of rows of the operator
Returns:
| Type | Description |
|---|---|
int
|
The number of output rows |
symmetric: bool
property
¶
Indicates whether the operator is symmetric or not
Returns:
| Type | Description |
|---|---|
bool
|
|
shape: Tuple[int, int]
property
¶
A tuple (nargout, nargin) representing the shape of the operator
Returns:
| Type | Description |
|---|---|
tuple[int, int]
|
A tuple |
nMatvec: int
property
¶
The number of matrix-vector multiplications computed so far
Returns:
| Type | Description |
|---|---|
int
|
The number of matrix-vector multiplications performed |
T: LinearOperator
property
¶
The transpose operator
Returns:
| Type | Description |
|---|---|
LinearOperator
|
The transpose of this linear operator |
H: LinearOperator
property
¶
The adjoint operator
Returns:
| Type | Description |
|---|---|
LinearOperator
|
The Hermitian adjoint of this linear operator |
block_list: List[LinearOperator]
property
¶
A list of linear operators representing the individual diagonal blocks.
Returns:
| Type | Description |
|---|---|
list[LinearOperator]
|
A list of linear operators representing the individual diagonal blocks |
num_blocks: int
property
¶
The total number of diagonal blocks in the operator.
Returns:
| Type | Description |
|---|---|
int
|
The total number of diagonal blocks in the operator |
row_size: npt.NDArray[np.integer]
property
¶
Array containing the number of rows for each block.
Returns:
| Type | Description |
|---|---|
NDArray[integer]
|
Array containing the number of rows for each block |
col_size: npt.NDArray[np.integer]
property
¶
Array containing the number of columns for each block.
Returns:
| Type | Description |
|---|---|
NDArray[integer]
|
Array containing the number of columns for each block |
size: int
property
¶
Array containing the number of rows/columns for each block
Returns:
| Type | Description |
|---|---|
int
|
Array containing the number of rows/columns for each block |
diag: npt.NDArray[np.number]
property
¶
Array containing the diagonal of the operator
Returns:
| Type | Description |
|---|---|
NDArray[number]
|
Array containing the diagonal of the operator |
Functions¶
reset_counters() -> None
¶
dot(x) -> npt.NDArray[np.number]
¶
Numpy-like dot() method.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
Any
|
The input vector or object to multiply with. |
required |
Returns:
| Type | Description |
|---|---|
NDArray[number]
|
The result of the dot product. |
Source code in brahmap/base/linop.py
matvec(x) -> npt.NDArray[np.number]
¶
Matrix-vector multiplication method.
The matvec method encapsulates the matvec
routine specified at construct time, to ensure the
consistency of the input and output arrays with the
operator's shape.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
NDArray[number]
|
The input vector \(x\) to be multiplied by the operator |
required |
Returns:
| Type | Description |
|---|---|
NDArray[number]
|
The result of the matrix-vector multiplication \(A(x)\) |
Source code in brahmap/base/linop.py
to_array() -> npt.NDArray[np.number]
¶
Returns the dense form of the linear operator as a 2D NumPy array.
Warning
This method first allocates a NumPy array of shape self.shape
and data-type self.dtype, and then fills them with numbers. As
such, for a large linear operator, it can occupy an enormous
amount of memory and crash your system. Don't use it unless you
understand the risk!
Returns:
| Type | Description |
|---|---|
NDArray[number]
|
The dense 2D array representation of the linear operator |
Source code in brahmap/base/linop.py
get_inverse() -> BaseBlockDiagInvNoiseCovLinearOperator
¶
Returns the inverse block-diagonal covariance operator.
Returns:
| Type | Description |
|---|---|
BaseBlockDiagInvNoiseCovLinearOperator
|
The inverse block-diagonal covariance operator |