Skip to main content

Tools to read or process ARTS data

Project description

ARTS tools

DOI PyPI version CI
Scripts for handling Apertif Radio Transient System data.

Dependencies

  • python >= 3.6
  • numpy >= 1.17
  • astropy
  • psrqpy
  • python-irodsclient (optional)
  • psrdada-python (only for converting raw IQUV data to PSRFITS)
  • dadafits (only for converting raw IQUV data to PSRFITS)

Installation

pip install arts_tools
or
pip install arts_tools[irods]
to include the iRODS tools necessary for directly downloading files from the archive (ASTRON internal use only).

Usage

An overview of the scripts included in this package is given below. Each script has as -h option that lists all available options.

For those that prefer using these tools from within Python, an overview of all functions and their usage is available at https://loostrum.github.io/arts_tools.

Finding known pulsars in the Apertif field-of-view

To find which pulsars are within the field of a given pointing, run arts_find_pulsars_in_field --ra hh:mm:ss.s --dec dd:mm:ss.s. This tool also prints in which compound beam the pulsars should be, so you only need to download those CBs from the archive instead of the entire observation.
To convert the tied-array beam data, which have frequency-and time-dependent pointing, to a beam tracking a single point on the sky, use arts_tracking_beams.

Downloading files from the Apertif Long-Term Archive (ALTA)

Observations are identified by a unique task ID. To download all tied-array beams of a single compound beam to the current directory, run arts_download_from_alta --taskid <taskid> --cbs <cb_index>. The default data release is the 2019 Science Verification Campaign (SVC). To change this, use the --release option.

To download data directly from ALTA using iRODS, use --release internal. This requires that the user has set up their iRODS environment for communication with ALTA.

Reading parametersets

The FITS headers contain an encoded observation parameterset. To print the parameterset, use arts_read_parameterset file.fits. It can also be loaded in python as a dictionary with:

from arts_tools import read_parameterset
parset = read_parameterset('/path/to/file.fits')

Note that all values are read as strings.

Fixing archival FITS files

NOTE: The FITS files have been fixed in the archive itself, there is no need to run this script on downloaded data.

FITS files retrieved from the ALTA from before 2020/04/08 can be made readable with arts_fix_fits_from_before_20200408 file.fits. These fixes are applied:

  1. The NAXIS2 value in the header is changed from zero to the correct value
  2. The data size is expressed in bytes instead of bits
  3. The frequency and time axes of the data are swapped
  4. The frequency order of the data and weights, scales, offsets, and frequencies columns is flipped

By default, the script appends _fixed to the filename. Run arts_fix_fits_from_before_20200408 -h for more options.

Note for Science Verification Campaign data

Data from the SVC has a correct NAXIS2 value in some cases. However, the other fixes do need to be applied. This can be forced by running arts_fix_fits_from_before_20200408 --force file.fits.

Converting raw IQUV data to PSRFITS

IQUV data are initially written to disk as-is with PSRDADA's dada_dbdisk. To convert these to PSRFITS with dadafits, use arts_psrdada_iquv_to_fits --sb <space-separated synthesised beam list> --output_dir <output directory> <input psrdada file>. Instead of writing synthesised beams, the script can also write all tied-array beams. To do this, specifcy --tab instead of --sb. If --sb is the last option before the path to the psrdada files, add -- like this: arts_psrdada_iquv_to_fits --sb 35 36 -- input.dada, otherwise the input files will be added to the SB list and the script will crash. Run arts_psrdada_iquv_to_fits -h for more options.

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

arts_tools-1.5.5.tar.gz (30.0 kB view details)

Uploaded Source

Built Distribution

arts_tools-1.5.5-py3-none-any.whl (35.0 kB view details)

Uploaded Python 3

File details

Details for the file arts_tools-1.5.5.tar.gz.

File metadata

  • Download URL: arts_tools-1.5.5.tar.gz
  • Upload date:
  • Size: 30.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for arts_tools-1.5.5.tar.gz
Algorithm Hash digest
SHA256 f753600d276d04c1f24e66ecee5c4edb47f8fce2b78bffdf8814db9b0869fdc1
MD5 c0b3d2bca71c95cb2254beba65292def
BLAKE2b-256 5e510bd4cec06b09d969b3de8c37e42c8a66115eda565174b8db56032f17fc50

See more details on using hashes here.

Provenance

File details

Details for the file arts_tools-1.5.5-py3-none-any.whl.

File metadata

  • Download URL: arts_tools-1.5.5-py3-none-any.whl
  • Upload date:
  • Size: 35.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for arts_tools-1.5.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f7330d9799d982c8bcbbf0b1a7fa10a38ca1b90251c51fd4cc806754e10f11fc
MD5 3eba457d4577083d1dcefd538b319cf0
BLAKE2b-256 8b7ff27f667481c3142c41e982b8f5975f9d2dedebfcd9aacf493081d2316bb5

See more details on using hashes here.

Provenance

Supported by

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