Using GFINDER
Contents
Using GFINDER#
Start GFINDER
From your terminal, in your working directory, run the GFINDER starting script:
source start_gfinder.sh
GFINDER CLI#
You can use GFINDER CLI from a terminal window or from the JupyterLab web interface to:
search opportunities
compute opportunity geometry
read opportunity data (timing/geometry)
retrieve data store information (scenarios, events, definitions)
check configuration and default settings
get information about available Geometry classes
To visualise the results of your opportunity calculations (search and/or compute), you currently must head to JupiterLab and use the GFINDER Python API.
Run a first simple command to know the version of GFINDER you’re using.
From a terminal, you should type this:
gfinder --version
From a Jupyter Notebook cell, we should type this:
!gfinder --version
Note
You can run any shell command from a Jupyter cell by prefixing it with the !
character. All the examples
given in this documentation are shown from JupyterLab.
To get the list of all GFINDER commands:
$ gfinder --help
Usage: gfinder [OPTIONS] COMMAND [ARGS]...
MAJIS Operations Simulator CLI.
Options:
--version Show the version and exit.
-h, --help Show this message and exit.
Commands:
compute Compute observation geometry.
config Get information about configuration.
definition Get information about an observation opportunity...
definitions List available observation opportunity definitions (ODF...
event Get information about a mission event for a given event...
events List mission events for a given mission scenario.
export Export opportunity data to external data format...
geometries List available geometry classes.
geometry Get information about a given geometry class.
opportunities List available opportunities (for a given mission...
opportunity Get information about an opportunity.
ptrgen (beta) Generate a PTR file based on a pre-defined "PTR...
scenario Get information about a mission scenario.
scenarios List available mission scenarios.
search Search observation opportunities.
To get help/usage of a particular command:
$ gfinder config --help
Usage: gfinder config [OPTIONS]
Get information about configuration.
Options:
-h, --help Show this message and exit.
Check that the current GFINDER configuration is what you expect it to be:
$ gfinder config
Kernels directory : /Users/nmanaud/workspace/git-repos/spice_kernels/juice/kernels
Application data directory : /Users/nmanaud/workspace/majis/gfinder-data
User data directory : /Users/nmanaud/workspace/majis/data
Default mission scenario ID : CREMA50
GFINDER Python API#
GFINDER CLI is build using the GFINDER Python API (see full ref_gfinder_python_api).
In addition to all computation and data management functions, the GFINDER Python API provides a set of DataViewer
objects to interact with opportunity data.
High-level API objects your need are:
Viewers:
Go to JupyterLab , create a new notebook and try running the following cell:
from gfinder.datastore import DataStore
from gfinder.dataviewer import TimeSeriesViewer, MapViewer
opportunity_id = 'crema50_eur_europa_disk_scan_20320702_20320702'
opportunity = DataStore().load_opportunity(opportunity_id)
TimeSeriesViewer(opportunity).show(ref=0.5)
MapViewer([opportunity]).show(geometries=['SubSC_Point'])