Skip to content

Functional Overview

Chris Meyer edited this page Jan 15, 2021 · 8 revisions

This describes the functional overview of the software. This document is a mix of the current state and the desired state of the software.

Library Model

A master library tracks libraries and workspaces. There is one master library per user account on the computer.

A library tracks data items, display items, workspaces, groups, data channels, computations, and relationships.

A data item is an individually tracked data item in the library with one or more associated display items. A data item stores data on disk.

A display item is a display for one or more data items.

Display items may have graphics, which may also serve as regions when the display represents data.

A library group is an application or user defined, ordered or unordered set of display items.

A data structure is an object tracked by the library which has properties and references to other objects.

A computation is relationship between data items and other objects and has inputs and outputs. When inputs change, the computation is executed and updates its outputs.

A data channel maps acquisition data to data items efficiently. It is used to push data into the library from threads, typically during acquisition.

A relationship may exist between entities such as data items, display items, graphics, data structures, and computations.

User Interface

A workspace is graphical layouts of display panels. A display panel is a drawn display.

A library browser allows the user to filter and display the display items.

An inspector is a panel attached to the main workspace display to inspect selected display items.

A utility window is a stay-on-top window for editing more complex items. Scripting is done through utility windows.

A recorder window...

A console window...

An interactive scripting window...

A computation editor window...

A display script editor window...

A notebook window...

An output window...

The programming interface provides access to functionality from Python.

The library API...

The interactive API...

The external API...

The declarative UI API...

An application is a module using the API to extend functionality.

Details

Master Library

See updated data storage page.

A master library tracks libraries and workspaces. There is one master library per user account on the computer.

The user can add and subtract libraries from the master library. For instance, a visiting user can create a new library (which can be stored into a folder on disk or a single file such as HDF5) and take it with them when they leave.

Libraries

A library is associated with a particular storage entity such as a folder or an HDF5 file.

A library has multiple ways of forming subsets of its items.

Data Items

A data item represents data having a sequence dimension, one or more collection dimension sets, and a data dimension set that is typically 1d, 2d, or 3d. The data may be backed by a continuous array, a sparse array, or a program/equation.

A data item has the ability to be paged into and out of memory or at least be memory mapped.

Display Items

A display item tracks metadata, graphics, and references to one or more data items.

A display item may belong to any number of groups in a hierarchical group structure.

A display item may belong to any number of dynamic sets based on metadata.

A display item may belong to any number of workspaces.

A composite display item is a display item with multiple data items .

A display data channel is associated with each data item within the display item to describe the conversion from data to 1d or 2d display data.

A display item is displayed via a display canvas item, which describes its conversion to drawing commands.

Library Groups

Display items can be organized into various groupings.

A group is an arbitrary grouping of display items organized by the user with a fixed ordering.

A set is a grouping of display items generated by an application such as spectrum imaging.

A folder is a grouping of display items where any display item can only be in a single folder.

Data Structures

See updated data structures page.

A data structure is an object tracked by the library which contains properties and references to other objects.

Computations

See updated processing page.

A computation is a small thunk of code which watches a set of inputs for changes and then executes its code to produce or update its outputs.

A computation input can be a data item, special subsets of a data item, or dynamic sets of data items.

An example of a special subset would be a data source comprised of data from a data item and a rectangular sub-region on a display item.

Another example of a special subset would be data plus a mask.

A computation executes its code in a thread but makes updates to the model in the model update thread.

Data Channels

A data channel facilitates an efficient pipeline from an acquisition device to display.

A data channel allows the acquisition device to push data into the application on a thread, record it in the library, and ultimately display it on a thread.

A data channel works towards reducing latency and increasing throughput of data and displays.

Graphics

Graphics are annotations drawn on top of data such as rectangles, lines, masks, etc.

Graphics are not to be confused with adornments that are intrinsic to a display such as axes labels on a line plot.

Relationships

The master library tracks various types of relationships between items. The relationships are used to manage writing to disk, deleting, and more.

Computations have inputs, outputs, and a source.

Data structures have referenced objects.

Library items, data structures, and computations may have sources.

Connections have source, target, and a parent.

Top level dependencies are established when creating or modifying a computation. All outputs are dependencies of all inputs.

When an item is marked for a transaction (limited disk writes, for performance), related items are also marked for transaction according to transaction rules.

When an item is removed, related items are deleted according to cascade delete rules.

Transaction Rules

For an item, all top level dependent items (computation related dependencies) are recursively included in the transaction.

If the item is a display item, the display items graphics are recursively included in the transaction.

If the item is a data structure, all referenced items are recursively included in the transaction.

If the item is a connection, both source and target items are recursively included in the transaction.

Cascade Delete Rules

For an item, all top level dependent items (computation related dependencies) are recursively included in the cascade.

A data item which is the only dependency of a graphic recursively includes the graphic in the cascade.

A computation where any required input is deleted or any output is deleted is recursively included in the cascade.

If the item is a data item with a single display item, the display item is recursively included in the cascade.

If the item is a display item, the display items graphics are recursively included in the cascade.

If the item is a computation, all outputs of the computation are recursively included in the cascade.

If the item is a source for a data item, the data item is recursively included in the cascade.

If the item is a source for a data structure, the data structure is recursively included in the cascade.

If the item is a source for a computation, the computation is recursively included in the cascade.

If the item is a parent for a connection, the connection is recursively included in the cascade.

Data structure references are not directly included in the cascade. TODO: Should they be?

Displays

A raster display displays a 2d data.

A line plot display displays multiple 1d data with a common y-axis and x-axis.

A multi-raster display displays multiple 2d data within a larger coordinate system.

A composite display displays multiple displays using a layout such as a grid or tabs.

A notebook display is a composite display oriented in a column of interspersed displays, text, and other information.

A report display is a composite display with a specific visual layout and possibly split into multiple pages or slides.

Workspaces

Workspaces are graphical layouts of display panels, which are where display items are drawn.

A workspace may be associated with the master library, a library, applications, or users.

Library Browsers

A library browser gives a tree structure of with libraries at the base and folders below.

Folders may represent sessions with individual data sets below; or samples with individual areas below, etc.

Some applications (spectrum imaging) will generate sets of data represented as a folder.

Some applications (multi channel scan) will generate sets of data related via metadata.

A data browser allows filtering based on data sets or smart filtering based on metadata.