planetmapper.gui
Hint
See also the page of examples of using the PlanetMapper GUI
- planetmapper.gui.run_gui(path: str | PathLike | None = None) None[source]
Launch the PlanetMapper Graphical User Interface (GUI) to fit observations.
This is the Python equivalent of running
planetmapperfrom the command line. See the user interface documentation for more details about how to use the GUI. Note that running the PlanetMapper GUI may change the Matplotlib backend totkaggif it is not already set to a compatible backend.See also
Observation.run_gui().- Parameters:
path – Optionally specify a FITS file to open in the GUI. If this is provided, the GUI will open with the observation from the FITS file loaded and ready to fit. If not provided, you can select a file to open from the GUI. Passed to the
pathargument ofplanetmapper.Observation.
- class planetmapper.gui.GUI(*, allow_open: bool = True, check_matplotlib_backend: bool = True)[source]
Bases:
objectClass to create and run graphical user interface to fit observations.
This class does not usually need to be run directly, as a GUI can be created directly from an
planetmapper.Observationobject usingplanetmapper.Observation.run_gui(), or by callingplanetmapperfrom the command line.- Parameters:
allow_open – If
True, the GUI will allow the user to open an observation file using the “Open” button. IfFalse, the GUI will hide the “Open” button.check_matplotlib_backend – If
True, the GUI will check the matplotlib backend and switch to thetkaggbackend if necessary. IfFalse, the GUI will not check the matplotlib backend.
- click_locations: list[tuple[float, float]]
List of click locations marked on the plot in
(x, y)pixel coordinates.This list is cleared whenever a new observation is opened.
- set_observation(observation: Observation) None[source]
Set the observation used in the GUI.
For example, to run the GUI with the data in
'europa.fits', use:gui = planetmapper.gui.GUI() gui.set_observation(planetmapper.Observation('europa.fits')) gui.run()
- Parameters:
observation – Observation to fit.