Skip to main content

Add your description here

Project description

This package present an xarray view over observations in the MeerKAT archive.

Required Reading

You’ll need some familiarity with xarray. In particular:

Example Usage

At a basic level, one can use xarray’s selection and lazy loading mechanisms to interact with the data:

import xarray_kat
import xarray

token = "eyFILLMEIN"
capture_block_id = 123456789
url = f"https://archive-gw-1.kat.ac.za/{capture_block_id}/{capture_block_id}_sdp_l0.full.rdb?token={token}"

# If the dataset is small you may be able to load it all in at once
dt = xarray.open_datatree(url, chunked_array_type="xarray-kat", chunks={})
dt.load()

# Otherwise one can select a small partition of the data
# that can fit in memory and interact with that
ds = dt["123456789_sdp_l0"].ds
ds = ds.isel(time=slice(10, 20), baseline_id=[1, 20, 30, 31, 32, 50], frequency=slice(256, 768))
ds.load()

If dask is installed, one can request chunking along dimensions:

import xarray_kat
import xarray

token = "eyFILLMEIN"
capture_block_id = 123456789
url = f"https://archive-gw-1.kat.ac.za/{capture_block_id}/{capture_block_id}_sdp_l0.full.rdb?token={token}"

# This specifies the natural chunking of the
# underlying store
dt = xarray.open_datatree(url, chunks={})
dt = dt.compute()

# More exotic chunking can be selected, but
# as this pattern does not match the natural
# chunking, it results in repeated requests for
# the same data. It may be better to use a
# dask.rechunk operation ontop of the natural
# chunking, or use cache pools to ameliorate this
dt = xarray.open_datatree(url, chunks={"time": 20, "baseline_id": 155, "frequency": 256})
dt = dt.compute()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xarray_kat-0.0.1.tar.gz (89.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xarray_kat-0.0.1-py3-none-any.whl (107.7 kB view details)

Uploaded Python 3

File details

Details for the file xarray_kat-0.0.1.tar.gz.

File metadata

  • Download URL: xarray_kat-0.0.1.tar.gz
  • Upload date:
  • Size: 89.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for xarray_kat-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c35373a10b9a0f059f000fe6bd1ebebdd38c976b4f8c179d56babafad18983e7
MD5 38e2236a9892169dfee87797cc1ea603
BLAKE2b-256 9b27bbf4fdd94a66d159641a3391e46f2823e8493ad6bdf6aa3c60d7843581de

See more details on using hashes here.

Provenance

The following attestation bundles were made for xarray_kat-0.0.1.tar.gz:

Publisher: ci.yml on ratt-ru/xarray-kat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xarray_kat-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: xarray_kat-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 107.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for xarray_kat-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bccec2d6eb024bdd221f1b79caf8310868c5c310b3898dcc6ccff5b2eb868c85
MD5 ae460fa05d728afe183339743072e7fa
BLAKE2b-256 bd4afacdc63eb6bcadcfa4942530bfc50d1a4956d3da917c59ea4f589a4c353e

See more details on using hashes here.

Provenance

The following attestation bundles were made for xarray_kat-0.0.1-py3-none-any.whl:

Publisher: ci.yml on ratt-ru/xarray-kat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page