furax.interfaces
Modules:
-
lineax– -
litebird_sim– -
sotodlib– -
toast–
furax.interfaces.lineax
Functions:
-
as_lineax_operator–Wrap a furax operator for use with lineax solvers.
as_lineax_operator(operator, tags=OperatorTag.NONE)
Wrap a furax operator for use with lineax solvers.
This function creates a lineax-compatible wrapper that stores the furax operator as a pytree field, ensuring JIT compatibility. Tags from the furax operator are automatically copied.
Parameters:
-
operator(AbstractLinearOperator) –A furax AbstractLinearOperator instance
-
tags(OperatorTag, default:NONE) –Extra operator tags to attach to the wrapper, combined with those copied from the furax operator.
Returns:
-
AbstractLinearOperator–A lineax AbstractLinearOperator that wraps the furax operator
Examples:
>>> import furax as fx
>>> import lineax as lx
>>> import jax.numpy as jnp
>>> op = fx.IdentityOperator(in_structure=fx.tree.as_structure(jnp.ones(10)))
>>> lx_op = fx.as_lineax_operator(op)
>>> solution = lx.linear_solve(lx_op, jnp.ones(10))
Source code in src/furax/interfaces/lineax.py
furax.interfaces.litebird_sim
Modules:
Classes:
LazyLBSObservation
Bases: FileBackedLazyObservation[Observation]
Attributes:
Source code in src/furax/interfaces/litebird_sim/observation.py
interface_class = LBSObservation
class-attribute
instance-attribute
LBSObservation
Bases: AbstractSatelliteObservation[Observation]
Methods:
-
from_file– -
get_tods– -
get_detector_offset_angles– -
get_hwp_angles– -
get_sample_mask– -
get_timestamps– -
get_wcs_shape_and_kernel– -
get_pointing_and_spin_angles– -
get_noise_model– -
get_boresight_quaternions– -
get_detector_quaternions–
Attributes:
-
name(str) – -
telescope(str) – -
n_samples(int) – -
detectors(list[str]) – -
n_detectors(int) – -
sample_rate(float) –
Source code in src/furax/interfaces/litebird_sim/observation.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | |
name
property
telescope
property
n_samples
property
detectors
property
n_detectors
property
sample_rate
property
from_file(filename, requested_fields=None)
classmethod
Source code in src/furax/interfaces/litebird_sim/observation.py
get_tods()
get_detector_offset_angles()
get_hwp_angles()
get_sample_mask()
get_timestamps()
get_wcs_shape_and_kernel(resolution_arcmin, projection=ProjectionType.CAR)
get_pointing_and_spin_angles(landscape)
Source code in src/furax/interfaces/litebird_sim/observation.py
get_noise_model()
Source code in src/furax/interfaces/litebird_sim/observation.py
get_boresight_quaternions()
Source code in src/furax/interfaces/litebird_sim/observation.py
observation
Classes:
LBSObservation
Bases: AbstractSatelliteObservation[Observation]
Methods:
-
from_file– -
get_tods– -
get_detector_offset_angles– -
get_hwp_angles– -
get_sample_mask– -
get_timestamps– -
get_wcs_shape_and_kernel– -
get_pointing_and_spin_angles– -
get_noise_model– -
get_boresight_quaternions– -
get_detector_quaternions–
Attributes:
-
name(str) – -
telescope(str) – -
n_samples(int) – -
detectors(list[str]) – -
n_detectors(int) – -
sample_rate(float) –
Source code in src/furax/interfaces/litebird_sim/observation.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | |
name
property
telescope
property
n_samples
property
detectors
property
n_detectors
property
sample_rate
property
from_file(filename, requested_fields=None)
classmethod
Source code in src/furax/interfaces/litebird_sim/observation.py
get_tods()
get_detector_offset_angles()
get_hwp_angles()
get_sample_mask()
get_timestamps()
get_wcs_shape_and_kernel(resolution_arcmin, projection=ProjectionType.CAR)
get_pointing_and_spin_angles(landscape)
Source code in src/furax/interfaces/litebird_sim/observation.py
get_noise_model()
Source code in src/furax/interfaces/litebird_sim/observation.py
get_boresight_quaternions()
Source code in src/furax/interfaces/litebird_sim/observation.py
LazyLBSObservation
Bases: FileBackedLazyObservation[Observation]
Attributes:
Source code in src/furax/interfaces/litebird_sim/observation.py
interface_class = LBSObservation
class-attribute
instance-attribute
furax.interfaces.sotodlib
Modules:
Classes:
-
LazyPreprocSOTODLibObservation–Lazy observation backed by the preprocessing database (no intermediate file).
-
LazySOTODLibObservation– -
SOTODLibObservation–Class for interfacing with sotodlib's AxisManager.
LazyPreprocSOTODLibObservation
Bases: AbstractLazyObservation[AxisManager]
Lazy observation backed by the preprocessing database (no intermediate file).
Loads on demand via SOTODLibObservation.from_preproc_group, so observations are
streamed straight from the preproc archive at mapmaking time and never copied to disk.
Methods:
-
__init__– -
get_data– -
probe_shape–Returns an upper bound on the variable padded-buffer dimensions for
fields.
Attributes:
-
interface_class– -
observation_id– -
init_config– -
proc_config– -
detector_selection– -
downsample– -
name(str) –
Source code in src/furax/interfaces/sotodlib/observation.py
interface_class = SOTODLibObservation
class-attribute
instance-attribute
observation_id = observation_id
instance-attribute
init_config = Path(init_config).resolve()
instance-attribute
proc_config = Path(proc_config).resolve() if proc_config else None
instance-attribute
detector_selection = detector_selection
instance-attribute
downsample = downsample
instance-attribute
name
property
__init__(observation_id, init_config, proc_config=None, detector_selection=None, downsample=1, sotodlib_config=None)
Source code in src/furax/interfaces/sotodlib/observation.py
get_data(requested_fields=None)
Source code in src/furax/interfaces/sotodlib/observation.py
probe_shape(intervals=False)
Returns an upper bound on the variable padded-buffer dimensions for fields.
All values are read from the init preprocess metadata: no heavy I/O work is done.
The value is only an upper bound, not the exact post-pipeline shape:
n_detectorsis the count after applyingdetector_selection(wafer slot / bandpass) but before the process pipeline, which only ever restricts detectors further.n_samplesisceil(meta.samps.count / downsample). The process pipeline only trims samples (e.g. edge cuts) before downsampling, so this bounds the actual samps count.
Source code in src/furax/interfaces/sotodlib/observation.py
LazySOTODLibObservation
Bases: FileBackedLazyObservation[AxisManager]
Methods:
Attributes:
Source code in src/furax/interfaces/sotodlib/observation.py
interface_class = SOTODLibObservation
class-attribute
instance-attribute
__init__(filename, sotodlib_config=None)
get_data(requested_fields=None)
SOTODLibObservation
Bases: AbstractGroundObservation[AxisManager]
Class for interfacing with sotodlib's AxisManager.
Methods:
-
__init__– -
from_file– -
from_preprocess–Loads and preprocesses an observation.
-
from_preproc_group–Loads a (already preprocessed) observation directly from the preprocessing db.
-
get_tods–Returns the timestream data.
-
get_demodulated_tods–Returns the demodulated timestream data as a Stokes pytree.
-
get_detector_offset_angles–Returns the detector offset angles.
-
get_hwp_angles–Returns the HWP angles.
-
get_scanning_intervals–Returns scanning intervals of the chosen detector.
-
get_sample_mask– -
get_left_scan_mask– -
get_right_scan_mask– -
get_azimuth–Returns the azimuth of the boresight for each sample.
-
get_elevation–Returns the elevation of the boresight for each sample.
-
get_wcs_shape_and_kernel–Returns astropy WCS kernel object corresponding to the observed sky.
-
get_pointing_and_spin_angles–Obtain pointing information and spin angles from the observation.
-
get_timestamps–Returns timestamps (sec) of the samples.
-
get_scanning_mask– -
get_noise_model–Load precomputed noise model from the data, if present. Otherwise, return None.
-
get_demodulated_noise_model–Returns a single noise model covering every requested Stokes leg.
-
get_boresight_quaternions–Returns the boresight quaternions at each time sample.
-
get_detector_quaternions–Returns the quaternion offsets of the detectors.
Attributes:
-
name(str) – -
telescope(str) – -
n_samples(int) – -
detectors(list[str]) – -
n_detectors(int) – -
sample_rate(float) –Returns the sampling rate (in Hz) of the data.
Source code in src/furax/interfaces/sotodlib/observation.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 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 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 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 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 | |
name
property
telescope
property
n_samples
property
detectors
property
n_detectors
property
sample_rate
property
Returns the sampling rate (in Hz) of the data.
__init__(data, sotodlib_config=None)
from_file(filename, requested_fields=None, sotodlib_config=None)
classmethod
Source code in src/furax/interfaces/sotodlib/observation.py
from_preprocess(preprocess_config, observation_id, detector_selection=None, sotodlib_config=None)
classmethod
Loads and preprocesses an observation.
Parameters:
-
preprocess_config(str | Path | dict[str, Any]) –Preprocessing configuration as a path to a yaml file or dictionary.
-
observation_id(str) –Observation id. (e.g. 'obs_1714550584_satp3_1111111').
-
detector_selection(dict[str, str] | None, default:None) –Optional dictionary to select a subset of detectors (e.g. {'wafer_slot': 'ws0', 'wafer.bandpass': 'f150'}).
-
sotodlib_config(SotodlibConfig | None, default:None) –Optional sotodlib-specific configuration.
Returns:
-
SOTODLibObservation–An instance of SOTODLibObservation.
Source code in src/furax/interfaces/sotodlib/observation.py
from_preproc_group(observation_id, init_config, proc_config=None, detector_selection=None, downsample=1, sotodlib_config=None)
classmethod
Loads a (already preprocessed) observation directly from the preprocessing db.
This reads the saved preprocessing products from the archive and re-applies the
process pipeline, without writing any intermediate file. It mirrors the load path
of preproc_or_load_group (as used by the furax-so-prepare tool) but skips
the archive/proc-aman saving, so the result is identical to mapping a binary file
produced by that tool.
Parameters:
-
observation_id(str) –Observation id (e.g. 'obs_1714550584_satp3_1111111').
-
init_config(str | Path) –Base-layer preprocessing config (path or posix string).
-
proc_config(str | Path | None, default:None) –Optional second-layer preprocessing config. If given, the two-layer (init+proc) load path is used.
-
detector_selection(dict[str, str] | None, default:None) –Optional detector restriction (e.g. {'wafer_slot': 'ws0', 'wafer.bandpass': 'f150'}).
-
downsample(int, default:1) –Integer downsampling factor applied after preprocessing.
-
sotodlib_config(SotodlibConfig | None, default:None) –Optional sotodlib-specific configuration.
Returns:
-
SOTODLibObservation–An instance of SOTODLibObservation.
Raises:
-
RuntimeError–If no detectors remain after cuts (nothing to load).
Source code in src/furax/interfaces/sotodlib/observation.py
get_tods()
Returns the timestream data.
Source code in src/furax/interfaces/sotodlib/observation.py
get_demodulated_tods(stokes='IQU')
Returns the demodulated timestream data as a Stokes pytree.
'IQUV' is not supported.
Source code in src/furax/interfaces/sotodlib/observation.py
get_detector_offset_angles()
get_hwp_angles()
get_scanning_intervals(det_ind=0)
Returns scanning intervals of the chosen detector.
The output is a list of the starting and ending sample indices
Source code in src/furax/interfaces/sotodlib/observation.py
get_sample_mask()
Source code in src/furax/interfaces/sotodlib/observation.py
get_left_scan_mask()
Source code in src/furax/interfaces/sotodlib/observation.py
get_right_scan_mask()
Source code in src/furax/interfaces/sotodlib/observation.py
get_azimuth()
get_elevation()
get_wcs_shape_and_kernel(resolution_arcmin, projection=ProjectionType.CAR)
Returns astropy WCS kernel object corresponding to the observed sky.
Source code in src/furax/interfaces/sotodlib/observation.py
get_pointing_and_spin_angles(landscape)
Obtain pointing information and spin angles from the observation.
Source code in src/furax/interfaces/sotodlib/observation.py
get_timestamps()
get_scanning_mask()
Source code in src/furax/interfaces/sotodlib/observation.py
get_noise_model()
Load precomputed noise model from the data, if present. Otherwise, return None.
Source code in src/furax/interfaces/sotodlib/observation.py
get_demodulated_noise_model(stokes='IQU')
Returns a single noise model covering every requested Stokes leg.
Each Stokes leg is fit independently (I/Q/U noise properties genuinely differ), so the per-detector parameters carry a leading Stokes axis rather than being separate models.
Source code in src/furax/interfaces/sotodlib/observation.py
get_boresight_quaternions()
Returns the boresight quaternions at each time sample.
Source code in src/furax/interfaces/sotodlib/observation.py
get_detector_quaternions()
Returns the quaternion offsets of the detectors.
Source code in src/furax/interfaces/sotodlib/observation.py
mapmaker
Functions:
-
main–Mapmaking script for SO observation data.
-
load_result–Load results from a directory into a dictionary.
-
get_parser– -
main_cli–
Attributes:
-
logger–
logger = init_logger('preprocess')
module-attribute
main(preprocess_config, mapmaking_config, obs_id=None, wafer=None, band=None, verbosity=3, binary_filepath=None, obs=None, output_path=None)
Mapmaking script for SO observation data.
Parameters:
-
preprocess_config(path or dict, or None) –Preprocessing configuration dictionary or path to a yaml file
-
mapmaking_config(path or dict) –Mapmaking configuration dictionary or path to a yaml file
-
obs_id(str, default:None) –Observation id. e.g., obs_1714550584_satp3_1111111.
-
wafer(str, default:None) –If specified, select a subset of detectors by wafer slot, e.g. 'ws0'.
-
band(str, default:None) –If specified, select a subset of detectors by bandpass, e.g. 'f150'.
-
verbosity(int, default:3) –verbosity level of logging.Logger
-
binary_filepath(path, default:None) –If specified, load the observation from a binary file instead. Overrides preprocess_config, obs_id, wafer, band.
-
obs(AxisManager, default:None) –If specified, use the observation object passed. Overrides preprocess_config, obs_id, wafer, band, binary_filepath.
-
output_path(path, default:None) –If specified, create directories leading to the path and save the output map and configuration files.
Returns:
-
map_results(dict) –Product of the mapmaking pipeline. The contents vary depending on the mapmaker used. See individual mapmakers for details on the outputs.
Source code in src/furax/interfaces/sotodlib/mapmaker.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | |
load_result(result_path)
Load results from a directory into a dictionary.
Source code in src/furax/interfaces/sotodlib/mapmaker.py
get_parser(parser=None)
Source code in src/furax/interfaces/sotodlib/mapmaker.py
mapmaker_multi
Functions:
-
main–Mapmaking script for SO observation data.
-
get_output_dir– -
get_parser– -
main_cli–
Attributes:
-
logger–
logger = init_logger('preprocess')
module-attribute
main(preprocess_config, mapmaking_configs, obs_ids, wafer_slot=None, wafer_bandpass=None, verbosity=3, output_path=None, log_path=None)
Mapmaking script for SO observation data.
Parameters:
-
preprocess_config(str or dict) –Preprocessing configuration dictionary or path to a yaml file.
-
mapmaking_configs(list) –Paths to mapmaking configuration yaml files.
-
obs_ids(list) –Observation ids. e.g., ['obs_1714550584_satp3_1111111']
-
wafer_slot(str or None, default:None) –If specified, select a subset of wafers e.g. 'ws0'
-
wafer_bandpass(str or None, default:None) –If specified, select a subset of bandpasses e.g. 'f150'
-
verbosity(int, default:3) –verboisity level of logging.Logger.
-
output_path(str or None, default:None) –If specified, create directories leading to the path and save the output map and configuration files.
-
log_path(str or None, default:None) –If specified, save output logs in a file of the given path.
Returns:
-
map_results(dict) –Product of the mapmaking pipeline. The contents vary depending on the mapmaker used. See individual mapmakers for details on the outputs.
Source code in src/furax/interfaces/sotodlib/mapmaker_multi.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 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 | |
get_output_dir(root_dir, mapmaking_config, obs_id, det_select=None)
Source code in src/furax/interfaces/sotodlib/mapmaker_multi.py
get_parser(parser=None)
Source code in src/furax/interfaces/sotodlib/mapmaker_multi.py
observation
Classes:
-
SOTODLibObservation–Class for interfacing with sotodlib's AxisManager.
-
LazySOTODLibObservation– -
LazyPreprocSOTODLibObservation–Lazy observation backed by the preprocessing database (no intermediate file).
SOTODLibObservation
Bases: AbstractGroundObservation[AxisManager]
Class for interfacing with sotodlib's AxisManager.
Methods:
-
__init__– -
from_file– -
from_preprocess–Loads and preprocesses an observation.
-
from_preproc_group–Loads a (already preprocessed) observation directly from the preprocessing db.
-
get_tods–Returns the timestream data.
-
get_demodulated_tods–Returns the demodulated timestream data as a Stokes pytree.
-
get_detector_offset_angles–Returns the detector offset angles.
-
get_hwp_angles–Returns the HWP angles.
-
get_scanning_intervals–Returns scanning intervals of the chosen detector.
-
get_sample_mask– -
get_left_scan_mask– -
get_right_scan_mask– -
get_azimuth–Returns the azimuth of the boresight for each sample.
-
get_elevation–Returns the elevation of the boresight for each sample.
-
get_wcs_shape_and_kernel–Returns astropy WCS kernel object corresponding to the observed sky.
-
get_pointing_and_spin_angles–Obtain pointing information and spin angles from the observation.
-
get_timestamps–Returns timestamps (sec) of the samples.
-
get_scanning_mask– -
get_noise_model–Load precomputed noise model from the data, if present. Otherwise, return None.
-
get_demodulated_noise_model–Returns a single noise model covering every requested Stokes leg.
-
get_boresight_quaternions–Returns the boresight quaternions at each time sample.
-
get_detector_quaternions–Returns the quaternion offsets of the detectors.
Attributes:
-
name(str) – -
telescope(str) – -
n_samples(int) – -
detectors(list[str]) – -
n_detectors(int) – -
sample_rate(float) –Returns the sampling rate (in Hz) of the data.
Source code in src/furax/interfaces/sotodlib/observation.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 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 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 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 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 | |
name
property
telescope
property
n_samples
property
detectors
property
n_detectors
property
sample_rate
property
Returns the sampling rate (in Hz) of the data.
__init__(data, sotodlib_config=None)
from_file(filename, requested_fields=None, sotodlib_config=None)
classmethod
Source code in src/furax/interfaces/sotodlib/observation.py
from_preprocess(preprocess_config, observation_id, detector_selection=None, sotodlib_config=None)
classmethod
Loads and preprocesses an observation.
Parameters:
-
preprocess_config(str | Path | dict[str, Any]) –Preprocessing configuration as a path to a yaml file or dictionary.
-
observation_id(str) –Observation id. (e.g. 'obs_1714550584_satp3_1111111').
-
detector_selection(dict[str, str] | None, default:None) –Optional dictionary to select a subset of detectors (e.g. {'wafer_slot': 'ws0', 'wafer.bandpass': 'f150'}).
-
sotodlib_config(SotodlibConfig | None, default:None) –Optional sotodlib-specific configuration.
Returns:
-
SOTODLibObservation–An instance of SOTODLibObservation.
Source code in src/furax/interfaces/sotodlib/observation.py
from_preproc_group(observation_id, init_config, proc_config=None, detector_selection=None, downsample=1, sotodlib_config=None)
classmethod
Loads a (already preprocessed) observation directly from the preprocessing db.
This reads the saved preprocessing products from the archive and re-applies the
process pipeline, without writing any intermediate file. It mirrors the load path
of preproc_or_load_group (as used by the furax-so-prepare tool) but skips
the archive/proc-aman saving, so the result is identical to mapping a binary file
produced by that tool.
Parameters:
-
observation_id(str) –Observation id (e.g. 'obs_1714550584_satp3_1111111').
-
init_config(str | Path) –Base-layer preprocessing config (path or posix string).
-
proc_config(str | Path | None, default:None) –Optional second-layer preprocessing config. If given, the two-layer (init+proc) load path is used.
-
detector_selection(dict[str, str] | None, default:None) –Optional detector restriction (e.g. {'wafer_slot': 'ws0', 'wafer.bandpass': 'f150'}).
-
downsample(int, default:1) –Integer downsampling factor applied after preprocessing.
-
sotodlib_config(SotodlibConfig | None, default:None) –Optional sotodlib-specific configuration.
Returns:
-
SOTODLibObservation–An instance of SOTODLibObservation.
Raises:
-
RuntimeError–If no detectors remain after cuts (nothing to load).
Source code in src/furax/interfaces/sotodlib/observation.py
get_tods()
Returns the timestream data.
Source code in src/furax/interfaces/sotodlib/observation.py
get_demodulated_tods(stokes='IQU')
Returns the demodulated timestream data as a Stokes pytree.
'IQUV' is not supported.
Source code in src/furax/interfaces/sotodlib/observation.py
get_detector_offset_angles()
get_hwp_angles()
get_scanning_intervals(det_ind=0)
Returns scanning intervals of the chosen detector.
The output is a list of the starting and ending sample indices
Source code in src/furax/interfaces/sotodlib/observation.py
get_sample_mask()
Source code in src/furax/interfaces/sotodlib/observation.py
get_left_scan_mask()
Source code in src/furax/interfaces/sotodlib/observation.py
get_right_scan_mask()
Source code in src/furax/interfaces/sotodlib/observation.py
get_azimuth()
get_elevation()
get_wcs_shape_and_kernel(resolution_arcmin, projection=ProjectionType.CAR)
Returns astropy WCS kernel object corresponding to the observed sky.
Source code in src/furax/interfaces/sotodlib/observation.py
get_pointing_and_spin_angles(landscape)
Obtain pointing information and spin angles from the observation.
Source code in src/furax/interfaces/sotodlib/observation.py
get_timestamps()
get_scanning_mask()
Source code in src/furax/interfaces/sotodlib/observation.py
get_noise_model()
Load precomputed noise model from the data, if present. Otherwise, return None.
Source code in src/furax/interfaces/sotodlib/observation.py
get_demodulated_noise_model(stokes='IQU')
Returns a single noise model covering every requested Stokes leg.
Each Stokes leg is fit independently (I/Q/U noise properties genuinely differ), so the per-detector parameters carry a leading Stokes axis rather than being separate models.
Source code in src/furax/interfaces/sotodlib/observation.py
get_boresight_quaternions()
Returns the boresight quaternions at each time sample.
Source code in src/furax/interfaces/sotodlib/observation.py
get_detector_quaternions()
Returns the quaternion offsets of the detectors.
Source code in src/furax/interfaces/sotodlib/observation.py
LazySOTODLibObservation
Bases: FileBackedLazyObservation[AxisManager]
Methods:
Attributes:
Source code in src/furax/interfaces/sotodlib/observation.py
interface_class = SOTODLibObservation
class-attribute
instance-attribute
__init__(filename, sotodlib_config=None)
get_data(requested_fields=None)
LazyPreprocSOTODLibObservation
Bases: AbstractLazyObservation[AxisManager]
Lazy observation backed by the preprocessing database (no intermediate file).
Loads on demand via SOTODLibObservation.from_preproc_group, so observations are
streamed straight from the preproc archive at mapmaking time and never copied to disk.
Methods:
-
__init__– -
get_data– -
probe_shape–Returns an upper bound on the variable padded-buffer dimensions for
fields.
Attributes:
-
interface_class– -
observation_id– -
init_config– -
proc_config– -
detector_selection– -
downsample– -
name(str) –
Source code in src/furax/interfaces/sotodlib/observation.py
interface_class = SOTODLibObservation
class-attribute
instance-attribute
observation_id = observation_id
instance-attribute
init_config = Path(init_config).resolve()
instance-attribute
proc_config = Path(proc_config).resolve() if proc_config else None
instance-attribute
detector_selection = detector_selection
instance-attribute
downsample = downsample
instance-attribute
name
property
__init__(observation_id, init_config, proc_config=None, detector_selection=None, downsample=1, sotodlib_config=None)
Source code in src/furax/interfaces/sotodlib/observation.py
get_data(requested_fields=None)
Source code in src/furax/interfaces/sotodlib/observation.py
probe_shape(intervals=False)
Returns an upper bound on the variable padded-buffer dimensions for fields.
All values are read from the init preprocess metadata: no heavy I/O work is done.
The value is only an upper bound, not the exact post-pipeline shape:
n_detectorsis the count after applyingdetector_selection(wafer slot / bandpass) but before the process pipeline, which only ever restricts detectors further.n_samplesisceil(meta.samps.count / downsample). The process pipeline only trims samples (e.g. edge cuts) before downsampling, so this bounds the actual samps count.
Source code in src/furax/interfaces/sotodlib/observation.py
furax.interfaces.toast
Modules:
Classes:
LazyToastObservation
Bases: FileBackedLazyObservation[Data]
Attributes:
Source code in src/furax/interfaces/toast/observation.py
interface_class = ToastObservation
class-attribute
instance-attribute
ToastObservation
Bases: AbstractGroundObservation[Data]
Methods:
-
__init__–Create a
ToastObservationfrom atoast.Dataobject. -
from_file– -
get_tods–Returns the timestream data.
-
get_detector_offset_angles–Returns the detector offset angles.
-
get_hwp_angles–Returns the HWP angles.
-
get_scanning_intervals–Returns scanning intervals.
-
get_sample_mask– -
get_left_scan_mask– -
get_right_scan_mask– -
get_azimuth–Returns the azimuth of the boresight for each sample.
-
get_elevation–Returns the elevation of the boresight for each sample.
-
get_timestamps–Returns timestamps (sec) of the samples.
-
get_wcs_shape_and_kernel–Returns the shape and object corresponding to a WCS projection.
-
get_pointing_and_spin_angles–Obtain pointing information and spin angles from the observation.
-
get_noise_model–Load noise model from the focalplane data, if present. Otherwise, return None.
-
get_boresight_quaternions– -
get_detector_quaternions–
Attributes:
-
data(Observation) – -
name(str) – -
telescope(str) – -
n_samples(int) – -
detectors(list[str]) – -
sample_rate(float) –Returns the sampling rate (in Hz) of the data.
Source code in src/furax/interfaces/toast/observation.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 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 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 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 | |
data = data.obs[observation_index]
instance-attribute
name
property
telescope
property
n_samples
property
detectors
property
sample_rate
property
Returns the sampling rate (in Hz) of the data.
__init__(data, observation_index=0, *, det_selection=None, det_mask=defaults.det_mask_nonscience, det_data=defaults.det_data, pixels=defaults.pixels, quats=defaults.quats, hwp_angle=defaults.hwp_angle, noise_model=defaults.noise_model, azimuth=defaults.azimuth, elevation=defaults.elevation, boresight=defaults.boresight_radec, cross_psd=None)
Parameters:
-
data(Data) –The toast data container.
-
observation_index(int, default:0) –The index of the observation of interest in the list. Defaults to zero (the first one).
-
det_selection(list[str] | None, default:None) –A list of detector names to select.
-
det_mask(int, default:det_mask_nonscience) –A bitmask to exclude detectors.
-
det_data(str, default:det_data) –The key for the detector sample data buffer.
-
pixels(str, default:pixels) –The key for the pixel indices buffer.
-
quats(str, default:quats) –The key for the (RA/dec) expanded quaternions buffer.
-
hwp_angle(str | None, default:hwp_angle) –The key for the HWP angle buffer.
-
noise_model(str | None, default:noise_model) –The key for the noise model.
-
azimuth(str, default:azimuth) –The key for the azimuth angle buffer.
-
elevation(str, default:elevation) –The key for the elevation angle buffer.
-
boresight(str, default:boresight_radec) –The key for the (RA/dec) boresight quaternions buffer.
-
cross_psd(tuple[Float[Array, ' freq'], Float[Array, 'det det freq']] | None, default:None) –Optional
(frequencies, cross-PSD matrix)tuple defining a correlated noise model across detectors.
Source code in src/furax/interfaces/toast/observation.py
from_file(filename, requested_fields=None)
classmethod
Source code in src/furax/interfaces/toast/observation.py
get_tods()
Returns the timestream data.
Source code in src/furax/interfaces/toast/observation.py
get_detector_offset_angles()
Returns the detector offset angles.
get_hwp_angles()
Returns the HWP angles.
Source code in src/furax/interfaces/toast/observation.py
get_scanning_intervals()
Returns scanning intervals.
The output is a list of the starting and ending sample indices
Source code in src/furax/interfaces/toast/observation.py
get_sample_mask()
get_left_scan_mask()
Source code in src/furax/interfaces/toast/observation.py
get_right_scan_mask()
Source code in src/furax/interfaces/toast/observation.py
get_azimuth()
Returns the azimuth of the boresight for each sample.
Source code in src/furax/interfaces/toast/observation.py
get_elevation()
Returns the elevation of the boresight for each sample.
Source code in src/furax/interfaces/toast/observation.py
get_timestamps()
get_wcs_shape_and_kernel(resolution_arcmin, projection=ProjectionType.CAR)
Returns the shape and object corresponding to a WCS projection.
Here, this is obtained while we compute the pointing and pixelisation.
Source code in src/furax/interfaces/toast/observation.py
get_pointing_and_spin_angles(landscape)
Obtain pointing information and spin angles from the observation.
Source code in src/furax/interfaces/toast/observation.py
get_noise_model()
Load noise model from the focalplane data, if present. Otherwise, return None.
Source code in src/furax/interfaces/toast/observation.py
get_boresight_quaternions()
Source code in src/furax/interfaces/toast/observation.py
get_detector_quaternions()
obs_matrix
Classes:
-
ToastObservationMatrixOperator–Class for applying a Toast observation matrix.
-
ToastObservationMatrixTransposeOperator–Class for applying the transpose of a Toast observation matrix.
ToastObservationMatrixOperator
Bases: AbstractLinearOperator
Class for applying a Toast observation matrix.
Usage
path = '/path/to/nside064/toast_telescope_all_time_all_obs_matrix.npz' O = ToastObservationMatrixOperator.from_file(path) x = jnp.ones(O.in_structure.shape) y = O(x) y = O.T(x)
Methods:
Attributes:
Source code in src/furax/interfaces/toast/obs_matrix.py
matrix
instance-attribute
__init__(matrix)
from_file(path)
classmethod
Source code in src/furax/interfaces/toast/obs_matrix.py
mv(x)
ToastObservationMatrixTransposeOperator
dataclass
Bases: TransposeOperator
Class for applying the transpose of a Toast observation matrix.
Methods:
-
mv–
Attributes:
Source code in src/furax/interfaces/toast/obs_matrix.py
observation
Classes:
Functions:
-
get_local_meridian_angle–Compute angle between local meridian and orientation vector from quaternions.
ToastObservation
Bases: AbstractGroundObservation[Data]
Methods:
-
__init__–Create a
ToastObservationfrom atoast.Dataobject. -
from_file– -
get_tods–Returns the timestream data.
-
get_detector_offset_angles–Returns the detector offset angles.
-
get_hwp_angles–Returns the HWP angles.
-
get_scanning_intervals–Returns scanning intervals.
-
get_sample_mask– -
get_left_scan_mask– -
get_right_scan_mask– -
get_azimuth–Returns the azimuth of the boresight for each sample.
-
get_elevation–Returns the elevation of the boresight for each sample.
-
get_timestamps–Returns timestamps (sec) of the samples.
-
get_wcs_shape_and_kernel–Returns the shape and object corresponding to a WCS projection.
-
get_pointing_and_spin_angles–Obtain pointing information and spin angles from the observation.
-
get_noise_model–Load noise model from the focalplane data, if present. Otherwise, return None.
-
get_boresight_quaternions– -
get_detector_quaternions–
Attributes:
-
data(Observation) – -
name(str) – -
telescope(str) – -
n_samples(int) – -
detectors(list[str]) – -
sample_rate(float) –Returns the sampling rate (in Hz) of the data.
Source code in src/furax/interfaces/toast/observation.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 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 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 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 | |
data = data.obs[observation_index]
instance-attribute
name
property
telescope
property
n_samples
property
detectors
property
sample_rate
property
Returns the sampling rate (in Hz) of the data.
__init__(data, observation_index=0, *, det_selection=None, det_mask=defaults.det_mask_nonscience, det_data=defaults.det_data, pixels=defaults.pixels, quats=defaults.quats, hwp_angle=defaults.hwp_angle, noise_model=defaults.noise_model, azimuth=defaults.azimuth, elevation=defaults.elevation, boresight=defaults.boresight_radec, cross_psd=None)
Parameters:
-
data(Data) –The toast data container.
-
observation_index(int, default:0) –The index of the observation of interest in the list. Defaults to zero (the first one).
-
det_selection(list[str] | None, default:None) –A list of detector names to select.
-
det_mask(int, default:det_mask_nonscience) –A bitmask to exclude detectors.
-
det_data(str, default:det_data) –The key for the detector sample data buffer.
-
pixels(str, default:pixels) –The key for the pixel indices buffer.
-
quats(str, default:quats) –The key for the (RA/dec) expanded quaternions buffer.
-
hwp_angle(str | None, default:hwp_angle) –The key for the HWP angle buffer.
-
noise_model(str | None, default:noise_model) –The key for the noise model.
-
azimuth(str, default:azimuth) –The key for the azimuth angle buffer.
-
elevation(str, default:elevation) –The key for the elevation angle buffer.
-
boresight(str, default:boresight_radec) –The key for the (RA/dec) boresight quaternions buffer.
-
cross_psd(tuple[Float[Array, ' freq'], Float[Array, 'det det freq']] | None, default:None) –Optional
(frequencies, cross-PSD matrix)tuple defining a correlated noise model across detectors.
Source code in src/furax/interfaces/toast/observation.py
from_file(filename, requested_fields=None)
classmethod
Source code in src/furax/interfaces/toast/observation.py
get_tods()
Returns the timestream data.
Source code in src/furax/interfaces/toast/observation.py
get_detector_offset_angles()
Returns the detector offset angles.
get_hwp_angles()
Returns the HWP angles.
Source code in src/furax/interfaces/toast/observation.py
get_scanning_intervals()
Returns scanning intervals.
The output is a list of the starting and ending sample indices
Source code in src/furax/interfaces/toast/observation.py
get_sample_mask()
get_left_scan_mask()
Source code in src/furax/interfaces/toast/observation.py
get_right_scan_mask()
Source code in src/furax/interfaces/toast/observation.py
get_azimuth()
Returns the azimuth of the boresight for each sample.
Source code in src/furax/interfaces/toast/observation.py
get_elevation()
Returns the elevation of the boresight for each sample.
Source code in src/furax/interfaces/toast/observation.py
get_timestamps()
get_wcs_shape_and_kernel(resolution_arcmin, projection=ProjectionType.CAR)
Returns the shape and object corresponding to a WCS projection.
Here, this is obtained while we compute the pointing and pixelisation.
Source code in src/furax/interfaces/toast/observation.py
get_pointing_and_spin_angles(landscape)
Obtain pointing information and spin angles from the observation.
Source code in src/furax/interfaces/toast/observation.py
get_noise_model()
Load noise model from the focalplane data, if present. Otherwise, return None.
Source code in src/furax/interfaces/toast/observation.py
get_boresight_quaternions()
Source code in src/furax/interfaces/toast/observation.py
get_detector_quaternions()
LazyToastObservation
Bases: FileBackedLazyObservation[Data]
Attributes:
Source code in src/furax/interfaces/toast/observation.py
interface_class = ToastObservation
class-attribute
instance-attribute
get_local_meridian_angle(quat)
Compute angle between local meridian and orientation vector from quaternions.
Assumes that the quaternions encode the rotation between the celestial frame and some other frame (e.g. detector or boresight frame). The "orientation vector" is the unit vector of the latter frame obtained by rotating the X axis of the celestial frame. For a detector this will be the polarization sensitive direction. The local meridian vector is obtained by projecting the -Z axis of the celestial frame onto the plane orthogonal to the pointing direction.
taken from https://github.com/hpc4cmb/toast/blob/toast3/src/toast/ops/stokes_weights/kernels_numpy.py#L12