Using the console

An essential part of PIT is the console. This is just a regular ipython console which allows you, in principle, to do anything you could imagine doing with python: set and use variables, define and run functions, run scripts, use matplotlib to create plots, etc. Check out the ipython crash course if you are unfamiliar with ipython (or python).

Importantly, all the visible objects and the underlying data structures can be accessed through the console. There are two objects through which this access is provided: pit and mw.

mw is short for main window and contains all the visible elements, e.g. the different plots (mw.main_plot, mw.cut_plot, mw.x_plot, mw.y_plot, etc.) The colormap setting is also handled through mw, through mw.set_cmap().

pit is an instance of PITDataHandler and is responsible for keeping all the visible and invisible data elements consistent. Use it to load data in (pit.open()), change the orientation in which we look at the data (pit.roll_axes() <data_slicer.pit.PITDataHandler.roll_axes()). Here’s an incomplete list of some of the more useful functions of the pit object: