Author: bugman Date: Fri Nov 30 14:06:42 2012 New Revision: 18057 URL: http://svn.gna.org/viewcvs/relax?rev=18057&view=rev Log: Merged revisions 18053-18055 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r18053 | bugman | 2012-11-30 13:06:46 +0100 (Fri, 30 Nov 2012) | 3 lines Modified the temperature user function - the value can be set twice if it is the same value. ........ r18054 | bugman | 2012-11-30 13:09:13 +0100 (Fri, 30 Nov 2012) | 3 lines Modified the frq.set user function - the value can be set twice if it is the same value. ........ r18055 | bugman | 2012-11-30 14:00:58 +0100 (Fri, 30 Nov 2012) | 3 lines The rdc.back_calc user function now handles absolute RDCs. ........ Modified: branches/inversion-recovery/ (props changed) branches/inversion-recovery/generic_fns/frq.py branches/inversion-recovery/generic_fns/rdc.py branches/inversion-recovery/generic_fns/temperature.py Propchange: branches/inversion-recovery/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Fri Nov 30 14:06:42 2012 @@ -1,1 +1,1 @@ -/trunk:1-18050 +/trunk:1-18055 Modified: branches/inversion-recovery/generic_fns/frq.py URL: http://svn.gna.org/viewcvs/relax/branches/inversion-recovery/generic_fns/frq.py?rev=18057&r1=18056&r2=18057&view=diff ============================================================================== --- branches/inversion-recovery/generic_fns/frq.py (original) +++ branches/inversion-recovery/generic_fns/frq.py Fri Nov 30 14:06:42 2012 @@ -54,8 +54,7 @@ def set(id=None, frq=None): """Set the spectrometer frequency of the experiment. - @keyword id: The experimental identification string (allowing for multiple experiments per - data pipe). + @keyword id: The experimental identification string (allowing for multiple experiments per data pipe). @type id: str @keyword frq: The spectrometer frequency in Hertz. @type frq: float @@ -69,8 +68,8 @@ cdp.frq = {} # Test the frequency has not already been set. - if id in cdp.frq: - raise RelaxError("The frequency for the experiment " + repr(id) + " has already been set.") + if id in cdp.frq and cdp.frq[id] != frq: + raise RelaxError("The frequency for the experiment '%s' has already been set to %s Hz." % (id, cdp.frq[id])) # Set the frequency. cdp.frq[id] = frq Modified: branches/inversion-recovery/generic_fns/rdc.py URL: http://svn.gna.org/viewcvs/relax/branches/inversion-recovery/generic_fns/rdc.py?rev=18057&r1=18056&r2=18057&view=diff ============================================================================== --- branches/inversion-recovery/generic_fns/rdc.py (original) +++ branches/inversion-recovery/generic_fns/rdc.py Fri Nov 30 14:06:42 2012 @@ -116,7 +116,12 @@ # Calculate the RDCs. for id in align_ids: + # The signed value. interatom.rdc_bc[id] = ave_rdc_tensor(dj, unit_vect, cdp.N, cdp.align_tensors[get_tensor_index(id)].A, weights=weights) + + # The absolute value. + if id in interatom.absolute_rdc.keys() and interatom.absolute_rdc[id]: + interatom.rdc_bc[id] = abs(interatom.rdc_bc[id]) def convert(value, align_id, to_intern=False): Modified: branches/inversion-recovery/generic_fns/temperature.py URL: http://svn.gna.org/viewcvs/relax/branches/inversion-recovery/generic_fns/temperature.py?rev=18057&r1=18056&r2=18057&view=diff ============================================================================== --- branches/inversion-recovery/generic_fns/temperature.py (original) +++ branches/inversion-recovery/generic_fns/temperature.py Fri Nov 30 14:06:42 2012 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2008-2009 Edward d'Auvergne # +# Copyright (C) 2008-2012 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -30,8 +30,7 @@ def set(id=None, temp=None): """Set the experimental temperature. - @keyword id: The experimental identification string (allowing for multiple experiments per - data pipe). + @keyword id: The experimental identification string (allowing for multiple experiments per data pipe). @type id: str @keyword temp: The temperature in kelvin. @type temp: float @@ -44,9 +43,12 @@ if not hasattr(cdp, 'temperature'): cdp.temperature = {} + # Convert to a float. + temp = float(temp) + # Test the temperature has not already been set. - if id in cdp.temperature: - raise RelaxError("The temperature for the experiment " + repr(id) + " has already been set.") + if id in cdp.temperature and cdp.temperature[id] != temp: + raise RelaxError("The temperature for the experiment '%s' has already been set to %s K." % (id, cdp.temperature[id])) # Set the temperature. - cdp.temperature[id] = float(temp) + cdp.temperature[id] = temp