def return_parameter_object(analysis_type=None, pipe_name=None): """Return the specific analysis API parameter object corresponding to the function type. @keyword analysis_type: The specific analysis type. This overrides the pipe_name argument. @type analysis_type: str or None @keyword pipe_name: The name of the data pipe to obtain the analysis type from. This is ignored if the analysis_type argument is given. If both arguments are None, then the current data pipe will be used. """ # The analysis type, if not given. if analysis_type is None: # Check if a data pipe exists. check_pipe() # Use a custom data pipe name. if pipe_name: analysis_type = ds[pipe_name].pipe_type # Use the current data pipe. else: analysis_type = cdp.pipe_type # Consistency testing. if analysis_type == 'ct': from specific_analyses.consistency_tests.parameter_object import Consistency_tests_params return Consistency_tests_params() # The Frame Order theories. elif analysis_type == 'frame order': from specific_analyses.frame_order.parameter_object import Frame_order_params return Frame_order_params() # Hybrid models. elif analysis_type == 'hybrid': from specific_analyses.hybrid import Hybrid_params return Hybrid_params() # Reduced spectral density mapping. elif analysis_type == 'jw': from specific_analyses.jw_mapping.parameter_object import Jw_mapping_params return Jw_mapping_params() # Model-free analysis. elif analysis_type == 'mf': from specific_analyses.model_free.parameter_object import Model_free_params return Model_free_params() # The N-state model. elif analysis_type == 'N-state': from specific_analyses.n_state_model.parameter_object import N_state_params return N_state_params() # NOE calculation. elif analysis_type == 'noe': from specific_analyses.noe.parameter_object import Noe_params return Noe_params() # Relaxation dispersion curve fitting. elif analysis_type == 'relax_disp': from specific_analyses.relax_disp.parameter_object import Relax_disp_params return Relax_disp_params() # Relaxation curve fitting. elif analysis_type == 'relax_fit': from specific_analyses.relax_fit.parameter_object import Relax_fit_params return Relax_fit_params() # Unknown analysis. else: raise RelaxError("The analysis type '%s' is unknown." % analysis_type)
# # ############################################################################### # Module docstring. """The value user function definitions.""" # Python module imports. from os import sep # relax module imports. from graphics import WIZARD_IMAGE_PATH from pipe_control import pipes, value from specific_analyses.consistency_tests.parameter_object import Consistency_tests_params; consistency_test_params = Consistency_tests_params() from specific_analyses.frame_order.parameter_object import Frame_order_params; frame_order_params = Frame_order_params() from specific_analyses.jw_mapping.parameter_object import Jw_mapping_params; jw_mapping_params = Jw_mapping_params() from specific_analyses.model_free.parameter_object import Model_free_params; model_free_params = Model_free_params() from specific_analyses.n_state_model.parameter_object import N_state_params; n_state_params = N_state_params() from specific_analyses.noe.parameter_object import Noe_params; noe_params = Noe_params() from specific_analyses.relax_disp.parameter_object import Relax_disp_params; relax_disp_params = Relax_disp_params() from specific_analyses.relax_fit.parameter_object import Relax_fit_params; relax_fit_params = Relax_fit_params() from user_functions.data import Uf_info; uf_info = Uf_info() from user_functions.data import Uf_tables; uf_tables = Uf_tables() from user_functions.objects import Desc_container # The user function class. uf_class = uf_info.add_class('value') uf_class.title = "Class for setting parameter values." uf_class.menu_text = "&value" uf_class.gui_icon = "relax.value"
# # ############################################################################### # Module docstring. """The grace user function definitions for controlling the Grace data viewing software.""" # relax module imports. from graphics import WIZARD_IMAGE_PATH from pipe_control import grace from pipe_control.plotting import write_xy from specific_analyses.consistency_tests.parameter_object import Consistency_tests_params consistency_test_params = Consistency_tests_params() from specific_analyses.jw_mapping.parameter_object import Jw_mapping_params jw_mapping_params = Jw_mapping_params() from specific_analyses.model_free.parameter_object import Model_free_params model_free_params = Model_free_params() from specific_analyses.noe.parameter_object import Noe_params noe_params = Noe_params() from specific_analyses.relax_disp.parameter_object import Relax_disp_params relax_disp_params = Relax_disp_params() from specific_analyses.relax_fit.parameter_object import Relax_fit_params relax_fit_params = Relax_fit_params() from user_functions.data import Uf_info uf_info = Uf_info() from user_functions.objects import Desc_container from user_functions.wildcards import WILDCARD_GRACE_ALL # The user function class. uf_class = uf_info.add_class('grace') uf_class.title = "Class for interfacing with Grace." uf_class.menu_text = "&grace"
# Module docstring. """The dx user function definitions for controlling the OpenDX visualisation software.""" # Python module imports. import dep_check if dep_check.wx_module: from wx import FD_OPEN else: FD_OPEN = -1 # relax module imports. from graphics import WIZARD_IMAGE_PATH from lib.software.opendx.execute import run from pipe_control.opendx import map from specific_analyses.frame_order.parameter_object import Frame_order_params; frame_order_params = Frame_order_params() from specific_analyses.model_free.parameter_object import Model_free_params; model_free_params = Model_free_params() from specific_analyses.n_state_model.parameter_object import N_state_params; n_state_params = N_state_params() from specific_analyses.relax_disp.parameter_object import Relax_disp_params; relax_disp_params = Relax_disp_params() from user_functions.data import Uf_info; uf_info = Uf_info() from user_functions.data import Uf_tables; uf_tables = Uf_tables() from user_functions.objects import Desc_container # The user function class. uf_class = uf_info.add_class("dx") uf_class.title = "Class for interfacing with OpenDX." uf_class.menu_text = "&dx" uf_class.gui_icon = "relax.opendx" # The dx.execute user function.
# relax module imports. from graphics import WIZARD_IMAGE_PATH from pipe_control import pipes, value from specific_analyses.consistency_tests.parameter_object import Consistency_tests_params consistency_test_params = Consistency_tests_params() from specific_analyses.frame_order.parameter_object import Frame_order_params frame_order_params = Frame_order_params() from specific_analyses.jw_mapping.parameter_object import Jw_mapping_params jw_mapping_params = Jw_mapping_params() from specific_analyses.model_free.parameter_object import Model_free_params model_free_params = Model_free_params() from specific_analyses.n_state_model.parameter_object import N_state_params n_state_params = N_state_params() from specific_analyses.noe.parameter_object import Noe_params noe_params = Noe_params() from specific_analyses.relax_disp.parameter_object import Relax_disp_params relax_disp_params = Relax_disp_params() from specific_analyses.relax_fit.parameter_object import Relax_fit_params relax_fit_params = Relax_fit_params() from user_functions.data import Uf_info uf_info = Uf_info()
# Python module imports. import dep_check if dep_check.wx_module: from wx import FD_OPEN, FD_SAVE else: FD_OPEN = -1 FD_SAVE = -1 # relax module imports. from graphics import WIZARD_IMAGE_PATH from pipe_control import grace from pipe_control.plotting import write_xy from specific_analyses.consistency_tests.parameter_object import Consistency_tests_params; consistency_test_params = Consistency_tests_params() from specific_analyses.jw_mapping.parameter_object import Jw_mapping_params; jw_mapping_params = Jw_mapping_params() from specific_analyses.model_free.parameter_object import Model_free_params; model_free_params = Model_free_params() from specific_analyses.noe.parameter_object import Noe_params; noe_params = Noe_params() from specific_analyses.relax_disp.parameter_object import Relax_disp_params; relax_disp_params = Relax_disp_params() from specific_analyses.relax_fit.parameter_object import Relax_fit_params; relax_fit_params = Relax_fit_params() from user_functions.data import Uf_info; uf_info = Uf_info() from user_functions.objects import Desc_container from user_functions.wildcards import WILDCARD_GRACE_ALL # The user function class. uf_class = uf_info.add_class('grace') uf_class.title = "Class for interfacing with Grace." uf_class.menu_text = "&grace" uf_class.gui_icon = "relax.grace_icon"