Author: bugman Date: Mon Jul 21 09:07:47 2014 New Revision: 24577 URL: http://svn.gna.org/viewcvs/relax?rev=24577&view=rev Log: Updated all of the specific API calculate() methods to accept the scaling_matrix argument. The list of per-model scaling matrices is now created independently of the analysis type by the pipe_control.minimise methods for the minimise.calculate, minimise.grid_search and minimise.execute user functions and sent into the specific analysis backend. Modified: branches/zooming_grid_search/specific_analyses/consistency_tests/api.py branches/zooming_grid_search/specific_analyses/frame_order/api.py branches/zooming_grid_search/specific_analyses/jw_mapping/api.py branches/zooming_grid_search/specific_analyses/model_free/api.py branches/zooming_grid_search/specific_analyses/n_state_model/api.py branches/zooming_grid_search/specific_analyses/noe/api.py branches/zooming_grid_search/specific_analyses/relax_disp/api.py Modified: branches/zooming_grid_search/specific_analyses/consistency_tests/api.py URL: http://svn.gna.org/viewcvs/relax/branches/zooming_grid_search/specific_analyses/consistency_tests/api.py?rev=24577&r1=24576&r2=24577&view=diff ============================================================================== --- branches/zooming_grid_search/specific_analyses/consistency_tests/api.py (original) +++ branches/zooming_grid_search/specific_analyses/consistency_tests/api.py Mon Jul 21 09:07:47 2014 @@ -64,15 +64,17 @@ self._PARAMS = Consistency_tests_params() - def calculate(self, spin_id=None, verbosity=1, sim_index=None): + def calculate(self, spin_id=None, scaling_matrix=None, verbosity=1, sim_index=None): """Calculation of the consistency functions. - @keyword spin_id: The spin identification string. - @type spin_id: None or str - @keyword verbosity: The amount of information to print. The higher the value, the greater the verbosity. - @type verbosity: int - @keyword sim_index: The optional MC simulation index. - @type sim_index: None or int + @keyword spin_id: The spin identification string. + @type spin_id: None or str + @keyword scaling_matrix: The per-model list of diagonal and square scaling matrices. + @type scaling_matrix: list of numpy rank-2, float64 array or list of None + @keyword verbosity: The amount of information to print. The higher the value, the greater the verbosity. + @type verbosity: int + @keyword sim_index: The optional MC simulation index. + @type sim_index: None or int """ # Test if the frequency has been set. Modified: branches/zooming_grid_search/specific_analyses/frame_order/api.py URL: http://svn.gna.org/viewcvs/relax/branches/zooming_grid_search/specific_analyses/frame_order/api.py?rev=24577&r1=24576&r2=24577&view=diff ============================================================================== --- branches/zooming_grid_search/specific_analyses/frame_order/api.py (original) +++ branches/zooming_grid_search/specific_analyses/frame_order/api.py Mon Jul 21 09:07:47 2014 @@ -105,15 +105,17 @@ yield ['pcs', spin_id, align_id] - def calculate(self, spin_id=None, verbosity=1, sim_index=None): + def calculate(self, spin_id=None, scaling_matrix=None, verbosity=1, sim_index=None): """Calculate the chi-squared value for the current parameter values. - @keyword spin_id: The spin identification string (unused). - @type spin_id: None - @keyword verbosity: The amount of information to print. The higher the value, the greater the verbosity. - @type verbosity: int - @keyword sim_index: The optional MC simulation index (unused). - @type sim_index: None or int + @keyword spin_id: The spin identification string (unused). + @type spin_id: None + @keyword scaling_matrix: The per-model list of diagonal and square scaling matrices. + @type scaling_matrix: list of numpy rank-2, float64 array or list of None + @keyword verbosity: The amount of information to print. The higher the value, the greater the verbosity. + @type verbosity: int + @keyword sim_index: The optional MC simulation index (unused). + @type sim_index: None or int """ # Set up the target function for direct calculation. Modified: branches/zooming_grid_search/specific_analyses/jw_mapping/api.py URL: http://svn.gna.org/viewcvs/relax/branches/zooming_grid_search/specific_analyses/jw_mapping/api.py?rev=24577&r1=24576&r2=24577&view=diff ============================================================================== --- branches/zooming_grid_search/specific_analyses/jw_mapping/api.py (original) +++ branches/zooming_grid_search/specific_analyses/jw_mapping/api.py Mon Jul 21 09:07:47 2014 @@ -63,15 +63,17 @@ self._PARAMS = Jw_mapping_params() - def calculate(self, spin_id=None, verbosity=1, sim_index=None): + def calculate(self, spin_id=None, scaling_matrix=None, verbosity=1, sim_index=None): """Calculation of the spectral density values. - @keyword spin_id: The spin identification string. - @type spin_id: None or str - @keyword verbosity: The amount of information to print. The higher the value, the greater the verbosity. - @type verbosity: int - @keyword sim_index: The optional MC simulation index. - @type sim_index: None or int + @keyword spin_id: The spin identification string. + @type spin_id: None or str + @keyword scaling_matrix: The per-model list of diagonal and square scaling matrices. + @type scaling_matrix: list of numpy rank-2, float64 array or list of None + @keyword verbosity: The amount of information to print. The higher the value, the greater the verbosity. + @type verbosity: int + @keyword sim_index: The optional MC simulation index. + @type sim_index: None or int """ # Test if the frequency has been set. Modified: branches/zooming_grid_search/specific_analyses/model_free/api.py URL: http://svn.gna.org/viewcvs/relax/branches/zooming_grid_search/specific_analyses/model_free/api.py?rev=24577&r1=24576&r2=24577&view=diff ============================================================================== --- branches/zooming_grid_search/specific_analyses/model_free/api.py (original) +++ branches/zooming_grid_search/specific_analyses/model_free/api.py Mon Jul 21 09:07:47 2014 @@ -404,15 +404,17 @@ star.write() - def calculate(self, spin_id=None, verbosity=1, sim_index=None): + def calculate(self, spin_id=None, scaling_matrix=None, verbosity=1, sim_index=None): """Calculation of the model-free chi-squared value. - @keyword spin_id: The spin identification string. - @type spin_id: str - @keyword verbosity: The amount of information to print. The higher the value, the greater the verbosity. - @type verbosity: int - @keyword sim_index: The optional MC simulation index. - @type sim_index: int + @keyword spin_id: The spin identification string. + @type spin_id: str + @keyword scaling_matrix: The per-model list of diagonal and square scaling matrices. + @type scaling_matrix: list of numpy rank-2, float64 array or list of None + @keyword verbosity: The amount of information to print. The higher the value, the greater the verbosity. + @type verbosity: int + @keyword sim_index: The optional MC simulation index. + @type sim_index: int """ # Test if sequence data is loaded. Modified: branches/zooming_grid_search/specific_analyses/n_state_model/api.py URL: http://svn.gna.org/viewcvs/relax/branches/zooming_grid_search/specific_analyses/n_state_model/api.py?rev=24577&r1=24576&r2=24577&view=diff ============================================================================== --- branches/zooming_grid_search/specific_analyses/n_state_model/api.py (original) +++ branches/zooming_grid_search/specific_analyses/n_state_model/api.py Mon Jul 21 09:07:47 2014 @@ -133,18 +133,20 @@ yield data - def calculate(self, spin_id=None, verbosity=1, sim_index=None): + def calculate(self, spin_id=None, scaling_matrix=None, verbosity=1, sim_index=None): """Calculation function. Currently this function simply calculates the NOESY flat-bottom quadratic energy potential, if NOE restraints are available. - @keyword spin_id: The spin identification string (unused). - @type spin_id: None or str - @keyword verbosity: The amount of information to print. The higher the value, the greater the verbosity. - @type verbosity: int - @keyword sim_index: The MC simulation index (unused). - @type sim_index: None + @keyword spin_id: The spin identification string (unused). + @type spin_id: None or str + @keyword scaling_matrix: The per-model list of diagonal and square scaling matrices. + @type scaling_matrix: list of numpy rank-2, float64 array or list of None + @keyword verbosity: The amount of information to print. The higher the value, the greater the verbosity. + @type verbosity: int + @keyword sim_index: The MC simulation index (unused). + @type sim_index: None """ # Set up the target function for direct calculation. Modified: branches/zooming_grid_search/specific_analyses/noe/api.py URL: http://svn.gna.org/viewcvs/relax/branches/zooming_grid_search/specific_analyses/noe/api.py?rev=24577&r1=24576&r2=24577&view=diff ============================================================================== --- branches/zooming_grid_search/specific_analyses/noe/api.py (original) +++ branches/zooming_grid_search/specific_analyses/noe/api.py Mon Jul 21 09:07:47 2014 @@ -53,7 +53,7 @@ self._PARAMS = Noe_params() - def calculate(self, spin_id=None, verbosity=1, sim_index=None): + def calculate(self, spin_id=None, scaling_matrix=None, verbosity=1, sim_index=None): """Calculate the NOE and its error. The error for each peak is calculated using the formula:: @@ -62,12 +62,14 @@ sd(NOE) = ----------------------------------------------- I(unsat)^2 - @keyword spin_id: The spin identification string. - @type spin_id: None or str - @keyword verbosity: The amount of information to print. The higher the value, the greater the verbosity. - @type verbosity: int - @keyword sim_index: The MC simulation index (unused). - @type sim_index: None + @keyword spin_id: The spin identification string. + @type spin_id: None or str + @keyword scaling_matrix: The per-model list of diagonal and square scaling matrices. + @type scaling_matrix: list of numpy rank-2, float64 array or list of None + @keyword verbosity: The amount of information to print. The higher the value, the greater the verbosity. + @type verbosity: int + @keyword sim_index: The MC simulation index (unused). + @type sim_index: None """ # Test if the current pipe exists. Modified: branches/zooming_grid_search/specific_analyses/relax_disp/api.py URL: http://svn.gna.org/viewcvs/relax/branches/zooming_grid_search/specific_analyses/relax_disp/api.py?rev=24577&r1=24576&r2=24577&view=diff ============================================================================== --- branches/zooming_grid_search/specific_analyses/relax_disp/api.py (original) +++ branches/zooming_grid_search/specific_analyses/relax_disp/api.py Mon Jul 21 09:07:47 2014 @@ -121,15 +121,17 @@ yield spin, spin_id - def calculate(self, spin_id=None, verbosity=1, sim_index=None): + def calculate(self, spin_id=None, scaling_matrix=None, verbosity=1, sim_index=None): """Calculate the model chi-squared value or the R2eff values for fixed time period data. - @keyword spin_id: The spin identification string. - @type spin_id: None or str - @keyword verbosity: The amount of information to print. The higher the value, the greater the verbosity. - @type verbosity: int - @keyword sim_index: The MC simulation index (unused). - @type sim_index: None + @keyword spin_id: The spin identification string. + @type spin_id: None or str + @keyword scaling_matrix: The per-model list of diagonal and square scaling matrices. + @type scaling_matrix: list of numpy rank-2, float64 array or list of None + @keyword verbosity: The amount of information to print. The higher the value, the greater the verbosity. + @type verbosity: int + @keyword sim_index: The MC simulation index (unused). + @type sim_index: None """ # Data checks.