ginga

class imexam.ginga_viewer.ginga(exam=None, close_on_del=True, logger=None, port=None, host='localhost', use_opencv=False)[source]

Bases: imexam.ginga_viewer.ginga_general

A ginga-based viewer that displays to an HTML5 widget in a browser.

This is compatible with the Jupyter notebook and can be run from a server.

This kind of viewer has slower performance than if we choose some widget back ends, but the advantage is that it works so long as the user has a working browser.

All the rendering is done on the server side and the browser only acts as a display front end. Using this you could create an analysis type environment on a server and view it via a browser or from a Jupyter notebook.

initialize a general ginga viewer object.

Parameters
  • exam (imexam object) – This is the imexamine object which contains the examination functions

  • close_on_del (bool) – If True, the window connection shuts down when the object is deleted

  • logger (logger object) – Ginga viewers all need a logger, if none is provided it will create one

  • port (int) – This is used as the communication port for the HTML5 viewer. The user can choose to have multiple windows open at the same time as long as they have different port designations. If no port is specified, this class will choose an open port.

Methods Summary

close()

Close the viewing window.

reopen()

Reopen the viewer window if the user closes it accidentally.

Methods Documentation

close()[source]

Close the viewing window.

reopen()[source]

Reopen the viewer window if the user closes it accidentally.