ivis.readers.ms_casacore¶
Functions
|
Concatenate a list of VisIData slabs (same channels, different beams) into one VisIData with all beams. |
|
Stream over (block_index, c, b, I, sI, uu, vv, ww) without concatenating. |
|
Yield (bi, c_abs, b, I, sI, uu, vv, ww), streaming through slabs per block. |
|
Yield slabs for each block, or concatenated slabs if concat=True. |
|
Yield contiguous channel slabs so you can stream a big cube with low RAM. |
|
Load a directory of .ms files (one per beam) into an I-only, channel-major VisIData. |
|
Load multiple |
Classes
|
Concrete Reader backed by casacore. |
- class ivis.readers.ms_casacore.CasacoreReader(*, prefer_weight_spectrum=True, keep_autocorr=False, n_workers=0)[source]¶
Bases:
objectConcrete Reader backed by casacore. Delegates to the module-level functions defined above.
- ivis.readers.ms_casacore.concat_visidata_slabs(slabs)[source]¶
Concatenate a list of VisIData slabs (same channels, different beams) into one VisIData with all beams.
- Return type:
- ivis.readers.ms_casacore.iter_blocks_chan_beam_I(ms_root, uvmin=0.0, uvmax=inf, chan_sel=None, rest_freq=1420405751.77, keep_autocorr=False, prefer_weight_spectrum=True, n_workers=0, beam_sel=None)[source]¶
Stream over (block_index, c, b, I, sI, uu, vv, ww) without concatenating.
- ivis.readers.ms_casacore.iter_blocks_chan_beam_via_slabs(ms_root, uvmin=0.0, uvmax=inf, chan_sel=None, slab=64, keep_autocorr=False, prefer_weight_spectrum=True, n_workers=0, beam_sel=None)[source]¶
Yield (bi, c_abs, b, I, sI, uu, vv, ww), streaming through slabs per block. c_abs is the absolute channel index in the SPW.
- ivis.readers.ms_casacore.iter_blocks_channel_slabs(ms_root, uvmin=0.0, uvmax=inf, chan_sel=None, slab=64, keep_autocorr=False, prefer_weight_spectrum=True, n_workers=0, concat=False, beam_sel=None)[source]¶
Yield slabs for each block, or concatenated slabs if concat=True.
- If concat=False:
Yields (bi, block_dir, c0, c1, visI) for each block slab.
- If concat=True:
Yields (c0, c1, visI_concat) where visI_concat has all beams from all blocks for that channel range (like mode=”concat” but streaming).
- ivis.readers.ms_casacore.iter_channel_slabs(ms_dir, uvmin=0.0, uvmax=inf, chan_sel=None, rest_freq=1420405751.77, slab=64, keep_autocorr=False, prefer_weight_spectrum=True, n_workers=0, beam_sel=None)[source]¶
Yield contiguous channel slabs so you can stream a big cube with low RAM.
- Yields:
(start, stop, visI) where start/stop are absolute channel indices into the SPW (Python slice semantics), and visI is a VisIData with shape (stop-start, nbeam, nvis_max).
- Return type:
Iterator[Tuple[int,int,VisIData]]
- ivis.readers.ms_casacore.read_ms_block_I(ms_dir, uvmin=0.0, uvmax=inf, chan_sel=None, rest_freq=1420405751.77, keep_autocorr=False, prefer_weight_spectrum=True, n_workers=0, target_center=None, target_radius=None, beam_sel=None)[source]¶
Load a directory of .ms files (one per beam) into an I-only, channel-major VisIData.
Primary-beam order is preserved even if some beams are skipped: we do not remove beam slots; we simply avoid reading DATA for out-of-radius beams and leave their slots empty (nvis=0, flag=True).
- Return type:
- ivis.readers.ms_casacore.read_ms_blocks_I(ms_root, uvmin=0.0, uvmax=inf, chan_sel=None, rest_freq=1420405751.77, keep_autocorr=False, prefer_weight_spectrum=True, mode='merge', n_workers=0, target_center=None, target_radius=None, center_tol_deg=1e-12, beam_sel=None)[source]¶
Load multiple
blocksof observations located underms_root, then either:merge: concatenate vis per beam across blocks, assuming same beam order and centersstack: stack beams (Nblock × beams)separate: return a list ofVisIData, one per block
Block discovery policy¶
If
ms_rootitself contains*.msdirectly, it’s treated as a single block.Any immediate subdirectory of
ms_rootthat contains*.msis also a block.
- returns:
merge: beams equal to the number of unique centers (per order in block 0)stack: beams equal to the sum of beams across blocksseparate: list ofVisIDataobjects
- rtype:
VisIData | list[VisIData]