Let me introduce snapista, a GPT wrapper for Python. The goal is to provide an easy and pythonic way (to some extent) to write and run SNAP graphs using Python (a script or a Jupyter Notebook).
To create a graph, one would write:
from snapista import Graph from snapista import Operator g = Graph() g.add_node(operator=Operator('Read'), node_id='read_1') calibration = Operator('Calibration') calibration.createBetaBand = 'false' g.add_node(operator=calibration, node_id='calibration', source='read_1')
There’s a demo on Binder (linked in the software repo README) and a set of examples in the documentation.
You’ll also find other elements that may support your activities on the Github organization https://github.com/snap-contrib, eg:
- SNAP packaged with conda
- a docker container with SNAP and Python
- how to use Visual Studio Code with remote containers
- a Jupyter/Theia docker image with SNAP and Python
Feedback and comments welcome!