brahmap.core.BlockDiagonalPreconditionerLO¶
Bases: LinearOperator
A block-diagonal preconditioner operator for iterative map-making solvers.
Computes the standard map-making preconditioner defined as:
where \(P\) is the pointing matrix and \(N\) is the noise covariance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
processed_samples
|
ProcessTimeSamples
|
The pre-processed time samples object containing accumulated map-making weights |
required |
solver_type
|
SolverType | None
|
The map-making solver configuration to use. If |
None
|
Attributes:
| Name | Type | Description |
|---|---|---|
solver_type |
SolverType
|
The active map-making solver configuration |
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. |
Source code in brahmap/core/linearoperators.py
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 | |
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 |
solver_type: SolverType
property
¶
The current map-making solver configuration.
Returns:
| Type | Description |
|---|---|
SolverType
|
The map-making solver type |
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 |