fitroom.selection_tool module

Created on Fri Apr 14 22:41:43 2017

@author: erwan

Summary

A window to select conditions along two axis (to calculate, or retrieve from a database)

Notes

# TODO: interface
  • used keyboards keys to move rectangle selector


class CaseSelector(dbInteractx=None, dbInteracty=None, xparam='', yparam='', slbInteractx=None, slbInteracty=None, nfig=None, xmin=0, xmax=0, ymin=0, ymax=0, plot_data_color='k')[source]

Bases: object

Main tool to choose which cases to plot

Examples

connect(fitroom)[source]

Triggered on connection to FitRoom

line_select_callback(eclick, erelease)[source]

eclick and erelease are the press and release events

precompute_residual(Slablist, xspace='database', yspace='database', contour='contourf', normalize=False, normalize_how='max', vmin=None, vmax=None)[source]

Plot residual for all points in database.

Parameters
  • Slablist (configuration)

  • xspace (array, or ‘database’) – values of points to precompute. If ‘database’, residual is calculated for all points in database. Default ‘database’.

  • yspace (array, or ‘database’) – values of points to precompute. If ‘database’, residual is calculated for all points in database. Default ‘database’.

Other Parameters

vmin, vmax (float) – used for colorbar

Examples

When yparam is mole_fraction and we want to calculate for many mole fraction conditions from 0 to 1.

selectTool.precompute_residual(Slablist, normalize=normalize,
                   yspace=np.linspace(0.1, 1, 10))
toggle_selector(event)[source]
update_action(xmin, xmax, ymin, ymax)[source]
update_markers(fconfig, i=1, j=1)[source]
Parameters

i,j (int) – marker position (different from 1,1 in 3x3 grid )

update_target_config(xcen, ycen)[source]