pr

sans.perspectives.pr.pr

class sans.perspectives.pr.pr.Plugin

Bases: sans.guiframe.plugin_base.PluginBase

DEFAULT_ALPHA = 0.0001
DEFAULT_DMAX = 140.0
DEFAULT_NFUNC = 10
add_color()

Adds color to a plugin

can_load_data()

if return True, then call handler to laod data

clear_panel()

clear all related panels

delete_data()

delete the data association with prview

estimate_file_inversion()
estimate_plot_inversion()
get_batch_capable()

Check if the plugin has a batch capability

get_context_menu()

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_data()
get_extensions()

return state reader and its extensions

get_npts()

Returns the number of points in the I(q) data

get_panels()

Create and return a list of panel objects

get_perspective()

Get the list of panel names for this perspective

get_tools()

Returns a set of menu entries for tools

help()

Show a general help dialog.

Todo :replace the text with a nice image
is_always_active()

return True is this plugin is always active and it is local to guiframe even if the user is switching between perspectives

is_in_use()
get a data id a list of data name if data data is
currently used by the plugin and the name of the plugin

data_name = ‘None’ in_use = False example [(data_name, self.sub_menu)]

load()

Load data. This will eventually be replaced by our standard DataLoader class.

load_abs()

Load an IGOR .ABS reduced file

Parameters:path – file path
Returns:x, y, err vectors
load_columns()

Load 2- or 3- column ascii

load_data()

Load data

load_folder()

Load entire folder

on_batch_selection()

need to be overwritten by the derivated class

on_perspective()

Call back function for the perspective menu item. We notify the parent window that the perspective has changed.

Parameters:event – menu event
on_set_state_helper()

update state

perform_estimate()
perform_estimateNT()
perform_inversion()
populate_file_menu()

Append menu item under file menu item of the frame

populate_menu()

Create and return the list of application menu items for the plug-in.

Parameters:parent – parent window
Returns:plug-in menu
post_init()

Post initialization call back to close the loose ends [Somehow openGL needs this call]

pr_theory()
save_data()

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_batch_selection()

the plugin to its batch state if flag is True

set_data()

receive a list of data to compute pr

set_default_perspective()

Call back method that True to notify the parent that the current plug-in can be set as default perspective. when returning False, the plug-in is not candidate for an automatic default perspective setting

set_is_active()
set_state()

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]
set_theory()
Parameters:theory_list – list of information

related to available theory state

setup_file_inversion()
setup_plot_inversion()
show_data()

Show data read from a file

Parameters:
  • path – file path
  • reset – if True all other plottables will be cleared
show_iq()
show_pr()
show_shpere()
start_thread()
use_data()

return True if these plugin use data

Table Of Contents

Previous topic

inversion_state

Next topic

pr_thread

This Page