Author: bugman Date: Thu Sep 5 14:05:46 2013 New Revision: 20840 URL: http://svn.gna.org/viewcvs/relax?rev=20840&view=rev Log: Fixes for the specific_analyses.relax_disp.disp_data.find_intensity_keys() function. This is for the cdp.exp_type changes. Modified: branches/relax_disp/specific_analyses/relax_disp/api.py branches/relax_disp/specific_analyses/relax_disp/disp_data.py Modified: branches/relax_disp/specific_analyses/relax_disp/api.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp/api.py?rev=20840&r1=20839&r2=20840&view=diff ============================================================================== --- branches/relax_disp/specific_analyses/relax_disp/api.py (original) +++ branches/relax_disp/specific_analyses/relax_disp/api.py Thu Sep 5 14:05:46 2013 @@ -850,8 +850,8 @@ # Loop over all the data. for exp_type, frq, point, time in loop_exp_frq_point_time(): # The three keys. - ref_keys = find_intensity_keys(frq=frq, point=None, time=time) - int_keys = find_intensity_keys(frq=frq, point=point, time=time) + ref_keys = find_intensity_keys(exp_type=exp_type, frq=frq, point=None, time=time) + int_keys = find_intensity_keys(exp_type=exp_type, frq=frq, point=point, time=time) param_key = return_param_key_from_data(frq=frq, point=point) # Check for missing data. @@ -1599,7 +1599,7 @@ # The R2eff model (with peak intensity base data). if cdp.model_type == 'R2eff': # Unpack the data. - spin, frq, point = data_id + spin, exp_type, frq, point = data_id # Initialise the data structure if needed. if not hasattr(spin, 'intensity_sim'): @@ -1609,7 +1609,7 @@ time_index = 0 for time in loop_time(): # Get the intensity keys. - int_keys = find_intensity_keys(frq=frq, point=point, time=time) + int_keys = find_intensity_keys(exp_type=exp_type, frq=frq, point=point, time=time) # Loop over the intensity keys. for int_key in int_keys: Modified: branches/relax_disp/specific_analyses/relax_disp/disp_data.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp/disp_data.py?rev=20840&r1=20839&r2=20840&view=diff ============================================================================== --- branches/relax_disp/specific_analyses/relax_disp/disp_data.py (original) +++ branches/relax_disp/specific_analyses/relax_disp/disp_data.py Thu Sep 5 14:05:46 2013 @@ -226,21 +226,23 @@ print(text) -def find_intensity_keys(frq=None, point=None, time=None): +def find_intensity_keys(exp_type=None, frq=None, point=None, time=None): """Return the key corresponding to the spectrometer frequency, dispersion point, and relaxation time. - @keyword frq: The spectrometer frequency. - @type frq: float - @keyword point: The dispersion point data (either the spin-lock field strength in Hz or the nu_CPMG frequency in Hz). - @type point: float - @keyword time: The relaxation time period. - @type time: float - @return: The keys corresponding to the spectrometer frequency, dispersion point, and relaxation time. - @rtype: list of str + @keyword exp_type: The experiment type. + @type exp_type: str + @keyword frq: The spectrometer frequency. + @type frq: Float + @keyword point: The dispersion point data (either the spin-lock field strength in Hz or the nu_CPMG frequency in Hz). + @type point: Float + @keyword time: The relaxation time period. + @type time: Float + @return: The keys corresponding to the spectrometer frequency, dispersion point, and relaxation time. + @rtype: List of str """ # The dispersion data. - if cdp.exp_type in EXP_TYPE_LIST_CPMG: + if exp_type in EXP_TYPE_LIST_CPMG: disp_data = cdp.cpmg_frqs else: disp_data = cdp.spin_lock_nu1