API Reference

Special field names

Velocities

Allows one to visualize vector field data by checking the “Show Velocity Vectors” checkbox in a particle group UI sub-panel. This checkbox will only appear if one of the fields is named specifically “Velocities.”

SmoothingLength

If a field is named specifically “SmoothingLength” and the doSPHrad flag in the settings file is set to True then the particles in that group will be scaled by their smoothing lengths and have opacities that vary across their face according to a cubic spline.

Warning

This feature is experimental.

Base classes

firefly.data_reader.Reader([JSONdir, …])

This class provides a framework to unify the Settings and ParticleGroup classes to make sure that the user can easily produce firefly compatible files.

firefly.data_reader.ParticleGroup(UIname, …)

This is a class for organizing data that you want to interface with a Reader instance.

firefly.data_reader.Settings([settings_filename])

This is a class for organizing the various settings you can pass to Firefly to customize how the app is initialized and what features the user has access to.

firefly.data_reader.TweenParams([coords, …])

A class to store tween parameters and make an output file

Pre-built Readers

firefly.data_reader.SimpleReader(path_to_data)

A wrapper to firefly.data_reader.ArrayReader that attempts to flexibily open generically formatetd data with minimal interaction from the user.

firefly.data_reader.ArrayReader(coordinates)

A wrapper to firefly.data_reader.Reader that stores raw numpy array data without opening anything from disk.

firefly.data_reader.FIREreader(snapdir, snapnum)

This is an example of a “custom” Reader that has been tuned to open data from the FIRE galaxy formation collaboration.

firefly.data_reader.SimpleFIREreader(…[, …])

Server Utitities

firefly.server.startFireflyServer([port, …])

Creates a global interpreter locked process to host a mock web-server

firefly.server.spawnFireflyServer([port, …])

Wrapper to firefly.server.startFireflyServer() that instead starts a background process.

firefly.server.killAllFireflyServers([pid])

Kill python processes associated with hosting Flask web-servers.