Library Management Functions

Tools for managing sets and libraries of images, and retrieving sets of related images in order.

class imtools.library.ImageSet(basedir)

An ImageSet represents a folder containing images from a set of 60 models, sharing all of the same imaging choices and differing only in underlying physics. Thus the only parameters it needs to distinguish models are BH flux level (MAD/SANE), BH spin, and the electron heating model (usually parameterized solely by Rhigh).

average_image(flux, spin, rhigh, nprocs=15)

Return the “average” image of a run, summing all Stokes of all images and dividing. This is not good for polarized images: the average will not be representative

get_image(flux, spin, rhigh, nimg, **kwargs)

Get the image with

run_lc(flux, spin, rhigh, fn, nprocs=15)

Apply a function to every image in a model, and also return the simulation time of the image.

Returns

a list of tuples (t, fn(image))

run_on(flux, spin, rhigh, fn, nprocs=15)

Apply a function to every existing image in a model.

Returns

a list of results