Crystalball Module¶
This is a customized version of crystalball packagge, https://github.com/caracal-pipeline/crystalball.git, for MeerSOLAR pipeline
meersolar.crystalball.budget module¶
meersolar.crystalball.crystalball module¶
- meersolar.crystalball.crystalball.fill_correlations(vis, pol)[source]¶
Expands single correlation produced by wsclean_predict to the full set of correlations.
- Parameters:
vis (
dask.array.Array) – dask array of visibilities of shape(row, chan, 1)pol (
xarray.Dataset) – MS Polarisation dataset.
- Returns:
vis – dask array of visibilities of shape
(row, chan, corr)- Return type:
dask.array.Array
meersolar.crystalball.filtering module¶
- meersolar.crystalball.filtering.filter_datasets(datasets, field_id)[source]¶
- Parameters:
datasets (list of
daskms.Dataset) – List of datasets representing partitions of the Measurement Set. Should be partitioned by FIELD_ID and DATA_DESC_ID at leastfield_id (list of ints) – List of valid fields
- Returns:
datasets – Filtered list of datasets
- Return type:
list of
daskms.Dataset
- meersolar.crystalball.filtering.select_field_id(field_datasets, field=None)[source]¶
- Parameters:
field_datasets (list of
daskms.Dataset)field (None or str) –
if None, will try and return the only field in the MS.
select_field_id(field_ds, "PKS-1934")
- Returns:
fields_id – Selected field ID
- Return type:
int
meersolar.crystalball.logger_init module¶
meersolar.crystalball.ms module¶
meersolar.crystalball.region module¶
meersolar.crystalball.wsclean module¶
- class meersolar.crystalball.wsclean.WSCleanModel(source_type, radec, flux, spi, ref_freq, log_poly, gauss_shape)¶
Bases:
tuple- flux¶
Alias for field number 2
- gauss_shape¶
Alias for field number 6
- log_poly¶
Alias for field number 5
- radec¶
Alias for field number 1
- ref_freq¶
Alias for field number 4
- source_type¶
Alias for field number 0
- spi¶
Alias for field number 3
- meersolar.crystalball.wsclean.import_from_wsclean(wsclean_comp_list, include_regions=[], point_only=False, num=None)[source]¶
Imports sources from wsclean, sorted from brightest to faintest. If
include_regionsis specified only those sources within are returned. Similarly ifnumis specified,numbrightest sources are returned.- Parameters:
wsclean_comp_list (str) – wsclean component list file.
include_regions (List[
regions.CircleSkyRegion]) – List of valid region’s. Only sources within these regions will be loaded. Defaults to[]in which case, all sources are loaded.point_only (bool, optional) – Only include point sources. Defaults to False
num (integer, optional) – Number of sources to include. If
Noneall sources are returned.
- Returns:
source_type (
numpy.ndarray) – Source types of shape(source,)radec (
numpy.ndarray) – Source radec coordinates of shape(source, 2).stokes (
numpy.ndarray) – Source stokes paramters of shape(source, 4).spectral_index (
numpy.ndarray) – Spectral index of shape(source, spi)ref_freq (
numpy.ndarray) – Reference frequency of shape(source,)log_si (bool) – Boolean indicated whether to use the logarithmic spectral index.
gauss_shape (
numpy.ndarray) – Gaussian shape parameters of shape(source, 3). The three components are MajorAxis, MinorAxis and Orientation, respectively.