Quick example notebook for radiopadre

The example below show how to use the radiopadre machinery.

You must select "Cell|Run All" from the above menu to (re)run the notebook, and wait for it to finish rendering.

This particular notebook is built for the example data directory in the radiopadre github repo. But it will probably work well enough with any directory containing fits files and images.

In [ ]:
### mandatory init
%matplotlib inline
from radiopadre import DirList
# dirs is a directory list object
# It recursively includes all directories under your results directory 
# dirs.show() will have the same effect
dirs = DirList('data')

In [ ]:
root = dirs[0]
root.fits  # gives list of FITS files in directory #0 above

In [ ]:
# displays thumbnails for all FITS files in directory #0

In [ ]:

In [ ]:
# gives list of FITS files matching the pattern

In [ ]:

In [ ]:
# list of images (PNG, JPG, etc.) in directory #3

In [ ]:
# clickable thumbnails of same

In [ ]:
# first FITS file in directory #0. Stokes axis is unrolled by default (if it exists), but this can be controlled by
# invoking dirs[0].fits[0].show() with some extra arguments. Try this on a file with an actual Stokes axis...

In [ ]:
# and this shows how to invoke show() on a FITS file with some explicit arguments to control the rendering

In [ ]:
# just some info about the given file

In [ ]:
# A more elaborate rendering of the same file using aplpy. Note that .fullpath gives you the path to the file.
# aplpy is quite slow so we don't use it by default for all files, but this example shows you how to do
# a proper rendering
import aplpy
import matplotlib.pyplot as plt

fig = aplpy.FITSFigure(root.fits[0].fullpath,slices=[0,0])