Author: bugman Date: Thu Apr 10 17:58:47 2014 New Revision: 22689 URL: http://svn.gna.org/viewcvs/relax?rev=22689&view=rev Log: Created the specific analysis API common method _is_spin_param_false(). This simply returns False. The is_spin_param() frame order method has been deleted and this common method is now used instead. Modified: trunk/specific_analyses/api_common.py trunk/specific_analyses/frame_order/api.py Modified: trunk/specific_analyses/api_common.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/api_common.py?rev=22689&r1=22688&r2=22689&view=diff ============================================================================== --- trunk/specific_analyses/api_common.py (original) +++ trunk/specific_analyses/api_common.py Thu Apr 10 17:58:47 2014 @@ -194,10 +194,25 @@ return False + def _is_spin_param_false(self, name): + """Common method stating that the parameter is not spin specific. + + This method always returns False, hence all parameters will be considered global. + + @param name: The name of the parameter. + @type name: str + @return: False + @rtype: bool + """ + + # Return the default of False. + return False + + def _is_spin_param_true(self, name): - """Dummy method stating that the parameter is spin specific. - - This method always returns true, hence all parameters will be considered residents of a SpinContainer object unless this method is overwritten. + """Common method stating that the parameter is spin specific. + + This method always returns true, hence all parameters will be considered residents of a SpinContainer object. @param name: The name of the parameter. @type name: str Modified: trunk/specific_analyses/frame_order/api.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/frame_order/api.py?rev=22689&r1=22688&r2=22689&view=diff ============================================================================== --- trunk/specific_analyses/frame_order/api.py (original) +++ trunk/specific_analyses/frame_order/api.py Thu Apr 10 17:58:47 2014 @@ -57,6 +57,7 @@ # Place methods into the API. self.deselect = self._deselect_global + self.is_spin_param = self._is_spin_param_false self.overfit_deselect = self._overfit_deselect_dummy self.return_conversion_factor = self._return_no_conversion_factor self.set_param_values = self._set_param_values_global @@ -370,15 +371,10 @@ end_point = True # The pivot point. - if cdp.params[i] == 'pivot_x': - lower = cdp.pivot_x - 10.0 - upper = cdp.pivot_x + 10.0 - elif cdp.params[i] == 'pivot_y': - lower = cdp.pivot_y - 10.0 - upper = cdp.pivot_y + 10.0 - elif cdp.params[i] == 'pivot_z': - lower = cdp.pivot_z - 10.0 - upper = cdp.pivot_z + 10.0 + if cdp.params[i] in ['pivot_x', 'pivot_y', 'pivot_z']: + val = getattr(cdp, cdp.params[i]) + lower = val - 10.0 + upper = val + 10.0 # Average domain position translation (in a +/- 5 Angstrom box). if cdp.params[i] in ['ave_pos_x', 'ave_pos_y', 'ave_pos_z']: @@ -472,19 +468,6 @@ # Minimisation. self.minimise(min_algor='grid', min_options=pts, constraints=constraints, verbosity=verbosity, sim_index=sim_index) - - - def is_spin_param(self, name): - """State that the parameter is not spin specific. - - @param name: The name of the parameter. - @type name: str - @return: False. - @rtype: bool - """ - - # Not spin specific! - return False def map_bounds(self, param, spin_id=None):