arrakis.makecat
Make an Arrakis catalogue
Attributes
Classes
Functions
|
Add metadata to VO Table for CASDA |
|
|
|
Command-line interface |
|
Return all combinations of data with itself |
|
Compute the local RM flag |
|
Cut out bad sources, and add flag columns |
|
Fix blank units in table |
|
Identify blended components in a catalogue and flag them. |
|
|
|
Fit an envelope to define leakage sources |
|
|
|
Determine if a source is leakage |
|
Return a log-normal distribuion X parametrized by: |
|
Make a catalogue from the Arrakis database flow |
|
Replace NaNs in a XML table with a string |
|
|
|
Update the tile separations in the catalogue |
|
Module Contents
- arrakis.makecat.add_metadata(vo_table: astropy.io.votable.tree.VOTableFile, filename: str)[source]
Add metadata to VO Table for CASDA
- Parameters:
vo_table (vot) – VO Table object
- Returns:
VO Table object with metadata
- Return type:
vot
- arrakis.makecat.combinate(data: arrakis.utils.typing.ArrayLike) Tuple[arrakis.utils.typing.ArrayLike, arrakis.utils.typing.ArrayLike] [source]
Return all combinations of data with itself
- Parameters:
data (ArrayLike) – Data to combine.
- Returns:
Data_1 matched with Data_2
- Return type:
Tuple[ArrayLike, ArrayLike]
- arrakis.makecat.compute_local_rm_flag(good_cat: astropy.table.Table, big_cat: astropy.table.Table) astropy.table.Table [source]
Compute the local RM flag
- Parameters:
good_cat (Table) – Table with just good RMs
big_cat (Table) – Overall table
- Returns:
Table with local RM flag
- Return type:
Table
- arrakis.makecat.cuts_and_flags(cat: arrakis.utils.typing.TableLike, leakage_degree: int = 4, leakage_bins: int = 16, leakage_snr: float = 30.0) arrakis.utils.typing.TableLike [source]
Cut out bad sources, and add flag columns
A flag of ‘True’ means the source is bad.
- Parameters:
cat (rmt) – Catalogue to cut and flag
- arrakis.makecat.fix_blank_units(rmtab: arrakis.utils.typing.TableLike) arrakis.utils.typing.TableLike [source]
Fix blank units in table
- Parameters:
rmtab (TableLike) – TableLike
- arrakis.makecat.flag_blended_components(cat: arrakis.utils.typing.TableLike) arrakis.utils.typing.TableLike [source]
Identify blended components in a catalogue and flag them.
- Parameters:
cat (TableLike) – Input catalogue
- Returns:
Output catalogue with minor components flagged
- Return type:
TableLike
- arrakis.makecat.get_alpha(cat: arrakis.utils.typing.TableLike) SpectralIndices [source]
- arrakis.makecat.get_fit_func(tab: arrakis.utils.typing.TableLike, nbins: int = 21, offset: float = 0.002, degree: int = 2, do_plot: bool = False, high_snr_cut: float = 30.0) Tuple[Callable, matplotlib.pyplot.Figure] [source]
Fit an envelope to define leakage sources
- Parameters:
tab (TableLike) – Catalogue to fit
nbins (int, optional) – Number of bins along seperation axis. Defaults to 21.
- Returns:
3rd order polynomial fit.
- Return type:
Callable
- arrakis.makecat.get_integration_time(cat: rmtable.RMTable, field_col: pymongo.collection.Collection, sbid: int | None = None)[source]
- arrakis.makecat.is_leakage(frac: float, sep: float, fit: Callable) bool [source]
Determine if a source is leakage
- Parameters:
frac (float) – Polarised fraction
sep (float) – Separation from tile centre
fit (function) – Fitting function
- Returns:
True if source is leakage
- Return type:
bool
- arrakis.makecat.lognorm_from_percentiles(x1, p1, x2, p2)[source]
Return a log-normal distribuion X parametrized by:
P(X < p1) = x1 P(X < p2) = x2
- arrakis.makecat.main(field: str, host: str, epoch: int, sbid: int | None = None, leakage_degree: int = 4, leakage_bins: int = 16, leakage_snr: float = 30.0, username: str | None = None, password: str | None = None, verbose: bool = True, outfile: str | None = None) None [source]
Make a catalogue from the Arrakis database flow
- Parameters:
field (str) – RACS field name
host (str) – MongoDB host IP
username (str, optional) – Mongo username. Defaults to None.
password (str, optional) – Mongo password. Defaults to None.
verbose (bool, optional) – Verbose output. Defaults to True.
outfile (str, optional) – Output file name. Defaults to None.
cat_format (str, optional) – Type of catalogue .e.g. fits. Defaults to None.
- arrakis.makecat.replace_nans(filename: str)[source]
Replace NaNs in a XML table with a string
- Parameters:
filename (str) – File name
- arrakis.makecat.sigma_add_fix(tab: arrakis.utils.typing.TableLike) arrakis.utils.typing.TableLike [source]
- arrakis.makecat.update_tile_separations(rmtab: arrakis.utils.typing.TableLike, field_col: pymongo.collection.Collection) arrakis.utils.typing.TableLike [source]
Update the tile separations in the catalogue
- Parameters:
rmtab (TableLike) – Table to update
field_col (Collection) – Field collection
- Returns:
Updated table
- Return type:
TableLike