Calculator

This application lets users add and modify data stored on objects with a simplified Python scripting interface. The calculator leverages functions from the Numpy package.

7a828bf05f7d4da2be97e0f9665a65f5

New user? Visit the Getting Started page.

Application

The following sections provide details on the different parameters controling the application. Interactive widgets shown below are for demonstration purposes only.

[1]:
from geoapps.calculator import Calculator

app = Calculator(h5file=r"../../../assets/FlinFlon.geoh5")
app()

Project Selection

Select and connect to an existing geoh5 project file containing data.

[2]:
app.project_panel

See the Project Panel page for more details.

Object/Data Selection

List of objects and associated data pulled from the target workspace.

[3]:
app.data_panel

The >> Add Variables >> button appends the selected channels to the scripting window. Channels can also be added manually by typing the name of the channel enclosed in curly braces (i.e. {var}).

See the Object Selection page for more details.

Scripting Window

Free-format text window to write Python-like expressions.

  • All core operations are accepted: add (+), subtract (-), multiply (*), divide (/), power (**).

  • Most Numpy functions can also be called e.g.: numpy.log10({var})

  • Data variables are identified by curly braces {var}.

  • Line breaks are allowed but must be enclosed in parentheses ().

[4]:
app.equation

Run

Trigger the evaluation of the expression and store the result.

[5]:
app.output_panel

See the Output Panel page for more details.

Need help? Contact us at support@mirageoscience.com