Skip banner and navigation tools.

 |  site map

Bulk downloading GRB products

Contents

Introduction

It is increasingly common for people to request the ability to download XRT data products for a sample of GRBs. We don't currently offer such a service, but this page explains how you can download the products yourself, enabling scripting of such things.

Note for Python users, we recommend downloading this Jupyter notebook which gives a worked example in Python (note: the link is to the notebook file; we do not provide a Jupyter server).

To carry out bulk downloads, you need:

We will explain here each of these in turn. Note: it is not the purpose of this page to teach the technical aspects such as how to download data in a script, or how to identify the GRBs which meet your scientific criteria. For the former, it depends on how you are working: command-line tools such as curl or wget can be used, as can the Python requests module, for example. For the latter: creating the appropriate sample of GRBs is obviously a project-specific goal. This documentation simply explains how to find the data you want from the UKSSDC.

Back to contents.


The list of GRBs to download

The process of selecting which GRBs meet your criteria to download is, at present, something you will have to do yourself. For most scientific uses it is expected that the selection criteria will be more rigorous than can readily be done by any form of simple user interface. There are a few tools that may be of use to you: the Swift GRB data table provided by the Swift Data Center in the US, and the XRT GRB catalogue provided by ourselves. You can use the information in these to filter your GRBs, but of course we remind users that they should check the provenance and accuracy of all data used to filter their samples. In the Jupyter notebook, we obtain the Swift GRB data table and apply a (crude) cut on GRB duration, as an example.

Back to contents.


The GRB-targetID index

All GRB data at the UKSSDC are indexed by the Swift targetID associated with that GRB. This index table gives each GRB for which we have data, and the corresponding targetID under which the GRB data are stored. The two columns are separated by a tab character, and the GRB names are all of the format “GRB YYMMDDn”, where “n” is an optional, uppercase letter.

Back to contents.


The download URLs

To download a product, you just need to combine the targetID of the GRB, with the URL of the product, as given below, where $targetID is the targetID of interest: this must be 8 digits (i.e. include the leading zeroes) and is obtained from the index file, above. For the main GRB products a single archive file can be downloaded containing all of the files for that GRB and product; the URLs for these are given below. You can, of course, download individual files if those are what you need; in that case you will need to see the documentation for the specific products to identify what the filenames are for the product you desire.

Note: in the examples below, a zip file is download. The file suffix can be changed to tar or tar.gz if preferred — except for the spectra, where only .tar.gz is supported at present.

Light curves
https://www.swift.ac.uk/xrt_curves/$targetID/lcfiles_$targetID.zip
Burst analyser
https://www.swift.ac.uk/burst_analyser/$targetID/batxrtfiles_$targetID.zip
Spectra
Time averaged
https://www.swift.ac.uk/xrt_spectra/$targetID/interval0.tar.gz
Late-time
https://www.swift.ac.uk/xrt_spectra/$targetID/late_time.tar.gz

Not shown above are the XRT positions, and the XRT GRB catalogue; these can simply be downloaded as tables:

Positions
https://www.swift.ac.uk/xrt_positions/index.php?basic=none&txt=1
Catalogue
https://www.swift.ac.uk/xrt_live_cat/getTable_txt.php?ascii=2&sumcols=,ra,dec,poserr,numbreaks,lctype,gal,z&acols=&bcols=&nhwtcols=&gwtcols=&fwtcols=&nhpccols=&gpccols=&fpccols=&tavwtcols=&tavpccols=&fcols=&sex=0

For the catalogue, other columns to retrieve can be changed by setting the arguments in the URL; this will be fully documented at a later date: generally the easiest way of downloading the entire catalogue is simply to visit the webpage, click, “Select columns and formatting options” and then change the output type to ASCII.

Back to contents.