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 planetmapper from 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 to tkagg if 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 path argument of planetmapper.Observation.

class planetmapper.gui.GUI(*, allow_open: bool = True, check_matplotlib_backend: bool = True)[source]

Bases: object

Class 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.Observation object using planetmapper.Observation.run_gui(), or by calling planetmapper from the command line.

Parameters:
  • allow_open – If True, the GUI will allow the user to open an observation file using the “Open” button. If False, the GUI will hide the “Open” button.

  • check_matplotlib_backend – If True, the GUI will check the matplotlib backend and switch to the tkagg backend if necessary. If False, 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.

run() None[source]

Run the GUI.

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.