Skarabina (dungbeetle): An all purpose 1GC flagger
Project description
Skarabina
skarabina: a basic 1GC radio astronomy RFI flagger
Author: Tim Molteno (tim@elec.ac.nz)
Intended to reduce I/O costs by performing the standard flagging during 1GC efficiently, and with low memory requirements. Skarabina is named after the latin name Skarabinae, the genus of many interesting beetles (uncluding the dungbeetle) in Africa.
Install
pip install skarabina
skarabina-analyze
Analyze a measurement set and recommend an image size:
skarabina-analyze --ms foo.ms --image-fov 2.5 --oversampling-factor 5
Computes the angular resolution from the longest baseline and highest frequency, then recommends pixel dimensions given the field-of-view and oversampling factor (pixels per synthesised beam).
Usage
Command-line options
--ms MS Input measurement set (required)
--summary / --no-summary Print flagging summary with histogram,
field list, spectral window info, and
fringe-rotation integration time limits
--barber / --no-barber Run barber flagging report
--barber-pol INTEGER Polarization for barber
--flag-uv-above FLOAT Flag baselines longer than this (metres)
--flag-nan / --no-flag-nan Flag NaN visibilities
--flag-clip TUPLE Flag visibilities outside [min, max]
--flag-spectral-window FILE YAML file with frequency ranges and
optional UV constraints to flag
--time-average-factor INTEGER Combine every N consecutive rows by
averaging (before --optimize)
--frequency-average-factor INTEGER Combine every N consecutive frequency
channels by averaging
--field-of-view FLOAT Half-width from phase centre in degrees
(default 1.0). Used for fringe-rotation
integration time limit.
--optimize / --no-optimize Remove fully-flagged rows and channels
--apply / --no-apply Modify input MS in place
--clobber / --no-clobber Overwrite existing output
--msout MS Output measurement set path
--debug / --no-debug Verbose debug output
--version Print version and exit
Barber flagging
Generate a report (in the style of barber).
skarabina --ms foo.ms --barber
Clip and Nan Flagging
This will flag a measurement set, and modify it in-place.
skarabina --ms test.ms --flag-nan --flag-clip [0,100] --apply --clobber
The following will write a new measurement set.
skarabina --ms test.ms --flag-nan --flag-clip [0,100] --apply --clobber --msout bar.ms
Spectral-window flagging
Flag known RFI frequency ranges from a YAML file:
skarabina --ms test.ms --flag-spectral-window spectral-flags.example.yml --msout cleaned.ms
See spectral-flags.example.yml for the format — a list of entries with
spw frequency ranges in MHz and optional uv_below / uv_above constraints.
Time averaging
Reduce data volume by averaging consecutive integrations:
skarabina --ms test.ms --time-average-factor 4 --optimize --msout averaged.ms
This averages every 4 rows (mean for DATA/UVW, OR for FLAG, sum for INTERVAL), discarding any trailing rows that don't form a complete block.
Full pipeline example
skarabina --ms raw.ms \
--flag-uv-above 4000 \
--flag-nan \
--flag-spectral-window spectral-flags.yml \
--time-average-factor 3 \
--optimize \
--field-of-view 1.5 \
--summary \
--msout clean.ms \
--clobber
Build
Install uv, then sync the project (creates a virtual environment and installs skarabina in editable mode):
uv sync
Build distributables:
uv build
Stimela
skarabina is available as a stimela package. You can include it in your pipeline (after installing skarabina) thusly
_include:
- (skarabina):
- skarabina.yml
my-recpipe:
info: "Print a flagging summary using skarabina"
inputs:
ms: MS
steps:
flag-summary:
cab: skarabina
params:
ms: =recipe.ms
summary: true
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file skarabina-0.5.0.tar.gz.
File metadata
- Download URL: skarabina-0.5.0.tar.gz
- Upload date:
- Size: 98.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d94c684c1c9c49b95bf65e89404ff0b986641fbbd5099b194f873e269fce2a86
|
|
| MD5 |
5421b2766608568fd8313caff9d8d312
|
|
| BLAKE2b-256 |
d38aa6bc1c88512aa1d255149f9c6194e7366ba4457e05a574cd1f38fdfbb3c9
|
Provenance
The following attestation bundles were made for skarabina-0.5.0.tar.gz:
Publisher:
deploy_module.yaml on tmolteno/skarabina
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
skarabina-0.5.0.tar.gz -
Subject digest:
d94c684c1c9c49b95bf65e89404ff0b986641fbbd5099b194f873e269fce2a86 - Sigstore transparency entry: 2043179860
- Sigstore integration time:
-
Permalink:
tmolteno/skarabina@64856513efd88cb81cf41eb819a2ed6b5142dc13 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/tmolteno
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy_module.yaml@64856513efd88cb81cf41eb819a2ed6b5142dc13 -
Trigger Event:
push
-
Statement type:
File details
Details for the file skarabina-0.5.0-py3-none-any.whl.
File metadata
- Download URL: skarabina-0.5.0-py3-none-any.whl
- Upload date:
- Size: 28.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df0fd59246bba61fe08ee8e9a7b4d13950e0d032c9bad3efcae33d80bfcaf1ab
|
|
| MD5 |
6a70d67bad5f96e4127992caa60fea7f
|
|
| BLAKE2b-256 |
c3dac1d40c982b4b3af37caae1b13e988fab60a3c1ff52b6ec6dd380b62bfd80
|
Provenance
The following attestation bundles were made for skarabina-0.5.0-py3-none-any.whl:
Publisher:
deploy_module.yaml on tmolteno/skarabina
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
skarabina-0.5.0-py3-none-any.whl -
Subject digest:
df0fd59246bba61fe08ee8e9a7b4d13950e0d032c9bad3efcae33d80bfcaf1ab - Sigstore transparency entry: 2043180009
- Sigstore integration time:
-
Permalink:
tmolteno/skarabina@64856513efd88cb81cf41eb819a2ed6b5142dc13 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/tmolteno
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy_module.yaml@64856513efd88cb81cf41eb819a2ed6b5142dc13 -
Trigger Event:
push
-
Statement type: