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.2.tar.gz (89.5 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.2-py3-none-any.whl (108.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xarray_kat-0.0.2.tar.gz
  • Upload date:
  • Size: 89.5 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.2.tar.gz
Algorithm Hash digest
SHA256 d3ce05e8907608ece0b591500190a3c1e654248988a8b1163e7208e5f7839c35
MD5 2b06bf7075a3ae5ed2919aa6d1227961
BLAKE2b-256 f26f66a9c688b05e7b5d6850b454e3044fa4653335e116979343694441c783ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for xarray_kat-0.0.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: xarray_kat-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 108.0 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c9cfcc88b50deb019abac5284eca8283062f04e5c324a258e26678632b07ef12
MD5 d66de89928b0e2822bcc75b2a9acbf17
BLAKE2b-256 3e4dc8dc79794714312cd381ee7d76306c4931ef890d0d79520d087b3a2378bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for xarray_kat-0.0.2-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