Tutorial

This is the tutorial page for GWAPA.

Plotting data

Archived data

GWAPA includes an archive of data for different GRBs. To select a GRB from this archive, use the Dataset drop down menu. The data available for that GRB in the selected bands will be added to the plot.

Uploading data files

You can also upload your own data files for GWAPA to plot in the form of a .csv file. The uploaded file (along with those in the archive) is parsed by pandas and then run through an interpreter to extract the light curve.

Each column in the .csv must be labelled at the top. The interpreter searches for specific column names to build the light curve to be plotted and ignores any other columns. To plot, the interpreter needs three columns - time, filter and flux density:

Examples of correctly formatted files can be viewed by downloading the included data files.

Downloading data files

Data files from the archive can also be downloaded by clicking the download data button. The currently plotted data will be downloaded. Note that if uploaded data have been plotted, the download data button will not be available.

Selecting bands

The different bands to be plotted can be selected using the widget. To choose a band, click on it in the widget. Multiple bands can be plotted using Ctrl+click or command+click. Shift+click can be used to select all bands between two particular choices.

Modelling light curves

GWAPA uses models from afterglowpy which derives includes several jet structures. These structures can be selected using the dropdown menu. As different models are dependent on different parameters, the available widgets change when switching between jet types. For more information on afterglowpy and the different jet structures, see Ryan et al, 2020.

Model parameters are changed using the widgets. The redshift can be inputted in the text box while other parameters can be varied using the sliders or dropdowns.

Fitting script

There is also a Python script available to be downloaded. This is automatically updated to use the parameter values identified using the GWAPA interface and can be used to print or save them as a csv. The script can also be used to perform a full fit of the data, taking the GWAPA values as the initial guess and then using the emcee module to fit the data using a Markov Chain Monte Carlo algorithm. Both afterglowpy and emcee will be required to run the script, both are availabe via pip. For more information on using the script, use the -h option when running it.

Plot controls

Bokeh plots include a few controls. These are found below the plot and they can be used to, from left to right, pan, zoom into a region, zoom by scrolling, save the current view of the plot and reset the plot.