pr

sans.perspectives.pr.pr

class sans.perspectives.pr.pr.Plugin(standalone=True)
choose_file(path=None)
estimate_file_inversion(alpha, nfunc, d_max, path, q_min=None, q_max=None, bck=False, height=0, width=0)
estimate_plot_inversion(alpha, nfunc, d_max, q_min=None, q_max=None, bck=False, height=0, width=0)
get_context_menu(graph=None)

Get the context menu items available for P(r)

Parameters:
  • graph – the Graph object to which we attach the context menu
Returns:

a list of menu items with call-back function

get_npts()
Returns the number of points in the I(q) data
get_panels(parent)
Create and return a list of panel objects
get_perspective()
Get the list of panel names for this perspective
help(evt)

Show a general help dialog.

Todo :replace the text with a nice image
load(path)
Load data. This will eventually be replaced by our standard DataLoader class.
load_abs(path)

Load an IGOR .ABS reduced file

Parameters:
  • path – file path
Returns:

x, y, err vectors

load_columns(path='sphere_60_q0_2.txt')
Load 2- or 3- column ascii
on_perspective(event)
Call back function for the perspective menu item. We notify the parent window that the perspective has changed.
perform_estimate()
perform_estimateNT()
perform_inversion()
populate_menu(id, owner)
Create a menu for the plug-in
post_init()
Post initialization call back to close the loose ends [Somehow openGL needs this call]
pr_theory(r, R)
save_data(filepath, prstate=None)

Save data in provided state object.

Todo :

move the state code away from inversion_panel and move it here. Then remove the “prstate” input and make this method private.

Parameters:
  • filepath – path of file to write to
  • prstate – P(r) inversion state
set_state(state, datainfo=None)

Call-back method for the inversion state reader. This method is called when a .prv file is loaded.

Parameters:
  • state – InversionState object
  • datainfo – Data1D object [optional]
setup_file_inversion(alpha, nfunc, d_max, path, q_min=None, q_max=None, bck=False, height=0, width=0)
setup_plot_inversion(alpha, nfunc, d_max, q_min=None, q_max=None, bck=False, height=0, width=0)
show_data(path=None, reset=False)

Show data read from a file

Parameters:
  • path – file path
  • reset – if True all other plottables will be cleared
show_iq(out, pr, q=None)
show_pr(out, pr, cov=None)
show_shpere(x, radius=70.0, x_range=70.0)
start_thread()

Table Of Contents

Previous topic

pr_widgets

This Page