Package: arts-tools
ARTS toolsScripts for handling Apertif Radio Transient System data.Dependenciespython >= 3.6numpy >= 1.17astropypsrqpypython-irodsclient (optional)psrdada-python(only for converting raw IQUV data to PSRFITS)dadafits(only for converting raw IQUV data to PSRFITS)Installationpip install arts_toolsorpip install arts_tools[irods]to include the iRODS tools necessary for directly downloading files from the archive
(ASTRON internal use only).UsageAn overview of the scripts included in this package is given below. Each script has as-hoption 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
athttps://loostrum.github.io/arts_tools.Finding known pulsars in the Apertif field-of-viewTo find which pulsars are within the field of a given pointing, runarts_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, usearts_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, runarts_download_from_alta --taskid <taskid> --cbs <cb_index>. The default data release is the 2019 Science Verification
Campaign (SVC). To change this, use the--releaseoption.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 parametersetsThe FITS headers contain an encoded observation parameterset. To print the parameterset, usearts_read_parameterset file.fits. It can also be loaded in python as a dictionary with:fromarts_toolsimportread_parametersetparset=read_parameterset('/path/to/file.fits')Note that all values are read as strings.Fixing archival FITS filesNOTE: 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 witharts_fix_fits_from_before_20200408 file.fits. These fixes are applied:The NAXIS2 value in the header is changed from zero to the correct valueThe data size is expressed in bytes instead of bitsThe frequency and time axes of the data are swappedThe frequency order of the data and weights, scales, offsets, and frequencies columns is flippedBy default, the script appends_fixedto the filename. Runarts_fix_fits_from_before_20200408 -hfor more options.Note for Science Verification Campaign dataData 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 runningarts_fix_fits_from_before_20200408 --force file.fits.Converting raw IQUV data to PSRFITSIQUV data are initially written to disk as-is with PSRDADA'sdada_dbdisk. To convert these to PSRFITS withdadafits,
usearts_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--tabinstead
of--sb. If--sbis 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.
Runarts_psrdada_iquv_to_fits -hfor more options.