-
Notifications
You must be signed in to change notification settings - Fork 4
Python Overview
This file provides a high level overview of the Python files that comprise components of Firefly. All the files listed are called sequentially in firefly.py when the Firefly application is started.
Base script file that mainly serves to import the necessary Omegalib modules: (overlay,omium and signac),
and call the other firefly scripts. In addition, the base Signac module sig
, as well as world camera: camera
is initialized here.
The file called is sent as an argument when firefly is called, and is intended to be customized by the user based on user needs. The file is primarily intended to specify the file Paths where hdf5 data and loader file is located. However, the file can also be used to initialize global variables, such as initial camera position, initial pivot point, image and colormap load/save paths, among others.
More information can be found on the page Configuration File
Loads all shaders and contains the drawing, rendering, and update functions.
A Program Class can be created from signac using sig.addProgram()
, which returns a Program Object.
The Program combines a Vertex Shader, a Geometry Shader and a Fragment Shader.
Point/Vertex-Shaders, consist of code that is processed for every individual point.
Geometry Shaders are also processed for every point, but can generate larger evaluation areas for calculating the colormaps.
Fragment Shaders modify actual pixel on screen when the texture image is created.
You can specify shaders using shader.setVertexShader('path')
, shader.setGeometryShader('path')
,
and shader.setFragmentShader('path')
.
More information regarding shaders can be found on the page Shader Files.
All dynamic decimation and progressive scan options are located here.
redraw()
: used to redraw the 3D view. Can be called after modifying variables and reupdating
the image drawn on screen. Currently called automatically upon editing any variable in the UI,
or upon camera movements.
onUpdate()
: Is mainly used for progressive scan updates. Firefly will steadily decrease decimation to the minimum decimation specified by the variable dqDec
as long as the view does not change. The variable dqDec
is a global variable that can be set in the Configuration File.
Controls camera movements and galaxy rotation. Also contains code to handle keyboard and mouse inputs related to camera movements and pivot position settings.
More on functions and variables can be found on the page flyControl.
A file that is specified in the Configuration file by changing the variable loaderScript
. Intended to be modified by the user to accommodate different Data representation needs. The file is intended to specify which variables from the hdf5 data to load, and what dataModes the user intends to represent for colormaps. The file is also where dataSet and pointCloud objects are initialized.
More information can be found on the page Loader File
Holds initialization information for the User interface information and colormap information.
Initializes the omegalib base that the firefly module is then built upon. Creates the Scene Node and the 2d overlay that the scene is rendered on top of. The Scene node serves as the root node for all PointCloud objects.
Coordinates values and controls between the other modules of firefly, and the Firefly user interface. THe Firefly interface is written in Javascript using primarily the Controlkit-js library. When firefly starts, it hosts a local web server. The interface is then loaded as a web interface and overlapped on top of point cloud display.
For more information regarding the interface, refer to the page: FireflyUi.
Works with the preset panel in the user interface and allows for the saving and loading of preset settings, which encompass all current settings in the user interface. Files are saved to the path presetPath
a global variable that can be specified in the Configuration File.