Configuration Reference
All settings are read from config.yaml in the project directory. If a
config_local.yaml file is present it takes precedence over config.yaml,
allowing per-machine overrides without modifying the tracked file.
Paths
Key |
Type |
Description |
|---|---|---|
|
|
Directory containing scan files ( |
|
|
Output directory for TOD files ( |
|
|
Path to the HEALPix sky-map FITS file containing Stokes I, Q, U in fields 0, 1, 2 respectively. |
|
|
Directory containing beam FITS files. |
|
|
Filename of the intensity (I) beam map inside |
|
|
Filename of the Q-polarisation beam map inside |
|
|
Filename of the U-polarisation beam map inside |
Beam Pixel Selection
Key |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Fraction of total beam power to retain for the I beam. Pixels whose
dB value falls below the implied cut are discarded. Increase toward
|
|
|
|
Same for the Q beam. |
|
|
|
Same for the U beam. |
Batch Range
These keys control which scan files are processed. The pipeline uses the term
day for the index suffix of the scan files (theta_N.npy, etc.), but the
index can represent any batching unit you choose — an observation session, a
CES, an hour of data, etc.
Key |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
First batch index to process (inclusive). |
|
|
total batches |
Last batch index to process (exclusive). Set to |
Multiprocessing
Key |
Type |
Description |
|---|---|---|
|
|
Maximum worker processes on a local machine. On a cluster the scheduler
allocation ( |
|
|
Per-process memory budget in GB. Used as a fallback when |
Calibration Cache
The first run measures sustained throughput at several batch sizes and
process counts, writes the optimal values back to the active config, and
sets calibration_enabled: false for future runs so calibration is
skipped automatically.
Key |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Run calibration on this invocation. Automatically reset to |
|
|
|
Cached optimal process count. Written automatically after calibration. |
|
|
|
Cached optimal batch size. Written automatically after calibration. |
Beam Rotation Cache
Pre-computing the psi-roll rotation (via precompute_beam_cache)
eliminates one of the two Rodrigues rotations per sample, yielding roughly a
25 % speed-up. An additional flat-sky approximation can eliminate the second
rotation for narrow beams. Because the psi-roll is evaluated on a discrete
grid rather than continuously, using the cache introduces a small
interpolation error. Not recommended for experiments requiring high
precision.
Key |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Path to the directory containing |
|
|
|
Number of psi bins in the cache. Must match the |
Beam Interpolation
Key |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Interpolation strategy. See the table below. |
|
|
|
Gaussian kernel width [degrees]. Defaults to one HEALPix pixel
resolution. Ignored when |
|
|
|
Neighbour search radius [degrees]. Defaults to |
Available interpolation methods:
Value |
Description |
Speed |
|---|---|---|
|
Single nearest-pixel lookup. No blending between adjacent pixels. Fastest option; suitable when the beam pixel resolution is much finer than the sky-map resolution. |
Fastest |
|
4-pixel bilinear HEALPix interpolation via a fused Numba kernel. Best balance of speed and accuracy for most beams. This is the recommended method. |
Fast |
|
Isotropic Gaussian kernel over all HEALPix pixels within
|
Slow |
Beam Pixel Clustering
Spatial k-means clustering on the unit sphere can reduce the number of effective beam pixels during TOD generation. Only the low-power tail of the beam is clustered; the high-power main-lobe pixels are kept pixel-exact. This trades a small, controllable accuracy loss for a proportional reduction in computation.
Workflow
Set
clustering_calibration_enabled: trueand run the pipeline once. The calibration sweeps a(tail_fraction × n_clusters)grid. For each pair it clusters the beam pixels and computes the beam transfer function B_ℓ from the clustered geometry, comparing it against the reference B_ℓ of the unclustered beam. The pair that maximises the pixel-count speedup while keeping B_ℓ divergence belowclustering_error_thresholdis written back to the config.On all subsequent runs the saved values are used directly and clustering calibration is skipped (
clustering_calibration_enabledis reset tofalseautomatically).
No scan data or TOD generation is needed during calibration — the metric is computed purely from beam geometry. See Beam Pixel Clustering & Calibration for a detailed description of the B_ℓ divergence metric and guidance on choosing the threshold.
Manual override: set clustering_calibration_enabled: false and
fill in n_beam_clusters and beam_cluster_tail_fraction by hand.
Disable entirely: set n_beam_clusters: null.
Key |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Maximum number of clusters for the tail. |
|
|
|
Fraction of total beam power treated as the “tail” to be clustered.
The remaining |
|
|
|
Run the clustering calibration sweep on this invocation.
Automatically reset to |
|
|
|
Maximum tolerated relative RMS B_ℓ divergence between the clustered and reference beam transfer function. The calibration selects the pair that maximises speedup subject to this constraint. See Beam Pixel Clustering & Calibration for metric definition and tier-based recommendations. |
Full Example
---
FOLDER_SCAN: "/data/scan/"
FOLDER_TOD_OUTPUT: "/data/tod/"
path_to_map: "/data/maps/cmb_IQU.fits"
FOLDER_BEAM: "/data/beams/"
beam_file_I: "beam_I.fits"
beam_file_Q: "beam_Q.fits"
beam_file_U: "beam_U.fits"
power_fraction_threshold_I: 0.99
power_fraction_threshold_Q: 0.99
power_fraction_threshold_U: 0.99
start_day: 0
end_day: 366
n_processes: 8
max_memory_per_process: 2.0
calibration_enabled: true
calibration_n_processes: null
calibration_batch_size: null
beam_cache_dir: "/data/beam_cache/"
beam_cache_n_psi: 720
beam_interp_method: 'bilinear'
beam_interp_sigma_deg: null
beam_interp_radius_deg: null
n_beam_clusters: null
beam_cluster_tail_fraction: null
clustering_calibration_enabled: false
clustering_error_threshold: 1.0e-5