brahmap.lbsim.LBSimSharedMemProcessTimeSamples¶
Bases: SharedMemProcessTimeSamples
An MPI shared memory data container to store the pre-processed and
pre-computed arrays and metadata from litebird_sim observations.
Similar to LBSimProcessTimeSamples,
this container object can be used to create pointing operators,
block-diagonal preconditioners, etc. as required for map-making, but
using MPI shared memory to reduce the memory footprint.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
nside
|
int
|
The HEALPix \(N_{side}\) resolution parameter defining the number of pixels |
required |
observations
|
Observation | List[Observation]
|
An instance of the |
required |
pointings
|
NDArray[number] | List[NDArray[number]] | None
|
Array of detector pointing indices mapping time samples to observed
sky pixels, by default |
None
|
hwp
|
HWP | None
|
The Half-Wave Plate (HWP) angles or configuration, by default |
None
|
pointings_flag
|
NDArray[bool_] | None
|
Boolean array indicating valid pointing samples, by default |
None
|
solver_type
|
SolverType
|
The level of map-making solver to construct (\(I\), \(QU\), or
\(IQU\)), by default |
IQU
|
noise_weights
|
NDArray[number] | None
|
Array of noise inverse noise variance for each time sample, by
default |
None
|
output_coordinate_system
|
CoordinateSystem
|
The celestial coordinate system to use for the generated output maps,
by default |
Galactic
|
threshold
|
float
|
The condition number threshold used to flag degenerate or under-sampled
pixels, by default |
1e-05
|
dtype_float
|
DTypeFloat
|
The data type to use for floating point arrays, by default
|
float64
|
nproc_reduce
|
int
|
Number of processes used in parallel Reduction within nodes for shared memory mode. See
|
1
|
Methods:
| Name | Description |
|---|---|
get_hit_counts |
Returns hit counts of the pixel indices. |
free_shmem_arrays |
Frees all allocated shared-memory arrays and windows. |
Attributes:
| Name | Type | Description |
|---|---|---|
npix |
int
|
Number of pixels on which the map-making has to be done. |
pointings |
NDArray[integer]
|
A 1-d array of pixel indices pointing to the observed sky pixel |
pointings_flag |
NDArray[bool_] | None
|
A 1-d boolean array where |
nsamples |
int
|
The number of time samples processed by the current MPI rank |
nsamples_global |
int
|
The total number of time samples across all MPI ranks |
solver_type |
SolverType
|
The current map-making solver configuration (\(I\), \(QU\), or \(IQU\)) |
threshold |
float
|
The condition number threshold used to flag bad pixels |
dtype_float |
Any
|
The inferred or specified data type for floating point arrays |
observed_pixels |
NDArray[integer]
|
A 1-d array containing the original indices of the pixels that |
pixel_flag |
NDArray[bool_]
|
A 1-d boolean array of size |
bad_pixels |
NDArray[integer]
|
A 1-d array that contains all the pixel indices that will be excluded |
old2new_pixel |
NDArray[integer]
|
A 1-d array mapping old pixel indices to new pixel indices |
weighted_counts |
NDArray[number]
|
A 1-d array accumulating the inverse noise weights per valid pixel |
sin2phi |
NDArray[number]
|
A 1-d array containing \(\sin(2\phi)\) evaluated at the valid time samples |
cos2phi |
NDArray[number]
|
A 1-d array containing \(\cos(2\phi)\) evaluated at the valid time samples |
weighted_sin |
NDArray[number]
|
A 1-d array accumulating the noise-weighted \(\sin(2\phi)\) sum |
weighted_cos |
NDArray[number]
|
A 1-d array accumulating the noise-weighted \(\cos(2\phi)\) sum |
weighted_sin_sq |
NDArray[number]
|
A 1-d array accumulating the noise-weighted \(\sin^2(2\phi)\) sum |
weighted_cos_sq |
NDArray[number]
|
A 1-d array accumulating the noise-weighted \(\cos^2(2\phi)\) sum |
weighted_sincos |
NDArray[number]
|
A 1-d array accumulating the noise-weighted \(\sin(2\phi)\cos(2\phi)\) |
one_over_determinant |
NDArray[number]
|
A 1-d array containing the inverse determinant of the |
new_npix |
int
|
The number of pixels on which the map-making will be done |
nproc_reduce |
int
|
The size of each sub-communicator group within the node-level |
shared_mem_root |
int
|
The designated root rank within the node-level shared memory |
shared_mem_manager |
SharedMemoryManager
|
The manager class for MPI shared-memory communicators and windows |
obs_list |
list[Observation]
|
A list of the parsed |
nside |
int
|
The HEALPix resolution parameter. |
coordinate_system |
CoordinateSystem
|
The output celestial coordinate system used in data processing. |
Source code in brahmap/lbsim/lbsim_process_time_samples.py
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 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 | |
Attributes¶
npix: int
property
¶
Number of pixels on which the map-making has to be done.
Returns:
| Type | Description |
|---|---|
int
|
Number of pixels on which the map-making has to be done |
pointings: npt.NDArray[np.integer]
property
¶
A 1-d array of pixel indices pointing to the observed sky pixel for each time sample
Returns:
| Type | Description |
|---|---|
NDArray[integer]
|
A 1-d array of pixel pointing indices for each time sample |
pointings_flag: npt.NDArray[np.bool_] | None
property
¶
A 1-d boolean array where True indicates a valid pointing and
False flags a bad pointing
Returns:
| Type | Description |
|---|---|
NDArray[bool_]
|
The 1-d array of flags indicating valid ( |
(`False`) time samples
|
|
nsamples: int
property
¶
The number of time samples processed by the current MPI rank
Returns:
| Type | Description |
|---|---|
int
|
Number of samples on current MPI rank |
nsamples_global: int
property
¶
The total number of time samples across all MPI ranks
Returns:
| Type | Description |
|---|---|
int
|
Global number of samples |
solver_type: SolverType
property
¶
The current map-making solver configuration (\(I\), \(QU\), or \(IQU\))
Returns:
| Type | Description |
|---|---|
SolverType
|
Level of map-making: \(I\), \(QU\), or \(IQU\) |
threshold: float
property
¶
The condition number threshold used to flag bad pixels
Returns:
| Type | Description |
|---|---|
float
|
Threshold to used for flagging the pixels in the sky |
dtype_float: Any
property
¶
The inferred or specified data type for floating point arrays
Returns:
| Type | Description |
|---|---|
DTypeFloat
|
|
observed_pixels: npt.NDArray[np.integer]
property
¶
A 1-d array containing the original indices of the pixels that are fully valid for map-making
Returns:
| Type | Description |
|---|---|
NDArray[integer]
|
A 1-d array that contains all the pixel indices that are considered valid for map-making |
pixel_flag: npt.NDArray[np.bool_]
property
¶
A 1-d boolean array of size npix where True indicates a bad
pixel and False flags a valid pixel
Returns:
| Type | Description |
|---|---|
NDArray[bool_]
|
A 1-d boolean array of size |
bad_pixels: npt.NDArray[np.integer]
property
¶
A 1-d array that contains all the pixel indices that will be excluded in map-making.
Returns:
| Type | Description |
|---|---|
NDArray[integer]
|
A 1-d array that contains all the pixel indices that will be excluded in map-making |
old2new_pixel: npt.NDArray[np.integer]
property
¶
A 1-d array mapping old pixel indices to new pixel indices
Returns:
| Type | Description |
|---|---|
NDArray[integer]
|
A 1-d array mapping old pixel indices to new pixel indices |
weighted_counts: npt.NDArray[np.number]
property
¶
A 1-d array accumulating the inverse noise weights per valid pixel
Returns:
| Type | Description |
|---|---|
NDArray[number]
|
A 1-d array accumulating the inverse noise weights per valid pixel |
sin2phi: npt.NDArray[np.number]
property
¶
A 1-d array containing \(\sin(2\phi)\) evaluated at the valid time samples
Returns:
| Type | Description |
|---|---|
NDArray[number]
|
A 1-d array containing \(\sin(2\phi)\) evaluated at the valid time samples |
cos2phi: npt.NDArray[np.number]
property
¶
A 1-d array containing \(\cos(2\phi)\) evaluated at the valid time samples
Returns:
| Type | Description |
|---|---|
NDArray[number]
|
A 1-d array containing \(\cos(2\phi)\) evaluated at the valid time samples |
weighted_sin: npt.NDArray[np.number]
property
¶
A 1-d array accumulating the noise-weighted \(\sin(2\phi)\) sum per valid pixel
Returns:
| Type | Description |
|---|---|
NDArray[number]
|
A 1-d array accumulating the noise-weighted \(\sin(2\phi)\) sum per valid pixel |
weighted_cos: npt.NDArray[np.number]
property
¶
A 1-d array accumulating the noise-weighted \(\cos(2\phi)\) sum per valid pixel
Returns:
| Type | Description |
|---|---|
NDArray[number]
|
A 1-d array accumulating the noise-weighted \(\cos(2\phi)\) sum per valid pixel |
weighted_sin_sq: npt.NDArray[np.number]
property
¶
A 1-d array accumulating the noise-weighted \(\sin^2(2\phi)\) sum per valid pixel
Returns:
| Type | Description |
|---|---|
NDArray[number]
|
A 1-d array accumulating the noise-weighted \(\sin^2(2\phi)\) sum per valid pixel |
weighted_cos_sq: npt.NDArray[np.number]
property
¶
A 1-d array accumulating the noise-weighted \(\cos^2(2\phi)\) sum per valid pixel
Returns:
| Type | Description |
|---|---|
NDArray[number]
|
A 1-d array accumulating the noise-weighted \(\cos^2(2\phi)\) sum per valid pixel |
weighted_sincos: npt.NDArray[np.number]
property
¶
A 1-d array accumulating the noise-weighted \(\sin(2\phi)\cos(2\phi)\) sum per valid pixel
Returns:
| Type | Description |
|---|---|
NDArray[number]
|
A 1-d array accumulating the noise-weighted \(\sin(2\phi)\cos(2\phi)\) sum per valid pixel |
one_over_determinant: npt.NDArray[np.number]
property
¶
A 1-d array containing the inverse determinant of the block-diagonal operator \(P^T diag(N)^{-1} P\)
Returns:
| Type | Description |
|---|---|
NDArray[number]
|
A 1-d array containing the inverse determinant of the block-diagonal operator \(P^T diag(N)^{-1} P\) |
new_npix: int
property
¶
The number of pixels on which the map-making will be done
Returns:
| Type | Description |
|---|---|
int
|
Number of pixels on which the map-making will be done |
nproc_reduce: int
property
¶
The size of each sub-communicator group within the node-level communicator
Returns:
| Type | Description |
|---|---|
int
|
The group size for local reductions |
shared_mem_root: int
property
¶
The designated root rank within the node-level shared memory communicator
Returns:
| Type | Description |
|---|---|
int
|
The root rank |
shared_mem_manager: SharedMemoryManager
property
¶
The manager class for MPI shared-memory communicators and windows
Returns:
| Type | Description |
|---|---|
SharedMemoryManager
|
The shared memory manager object. |
obs_list: List[lbs.Observation]
property
¶
A list of the parsed litebird_sim observations.
Returns:
| Type | Description |
|---|---|
list[Observation]
|
The list of observations |
nside: int
property
¶
The HEALPix resolution parameter.
Returns:
| Type | Description |
|---|---|
int
|
The \(N_{side}\) parameter |
coordinate_system: lbs.CoordinateSystem
property
¶
The output celestial coordinate system used in data processing.
Returns:
| Type | Description |
|---|---|
CoordinateSystem
|
The configured coordinate system |
Methods:¶
get_hit_counts() -> np.ma.MaskedArray
¶
Returns hit counts of the pixel indices.
Returns:
| Type | Description |
|---|---|
NDArray[integer]
|
Hit counts of the pixel indices |
Source code in brahmap/base/pts.py
free_shmem_arrays() -> None
¶
Frees all allocated shared-memory arrays and windows.
Returns:
| Type | Description |
|---|---|
None
|
|