Author: bugman Date: Thu Jun 6 18:36:30 2013 New Revision: 19902 URL: http://svn.gna.org/viewcvs/relax?rev=19902&view=rev Log: Better support for missing frequency information in the specific_analyses.relax_disp.disp_data module. This is in the return_index_from_frq() function which now returns an index of 0, and in return_r2eff_arrays() which skips calculating the frequency information. Modified: branches/relax_disp/specific_analyses/relax_disp/disp_data.py 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=19902&r1=19901&r2=19902&view=diff ============================================================================== --- branches/relax_disp/specific_analyses/relax_disp/disp_data.py (original) +++ branches/relax_disp/specific_analyses/relax_disp/disp_data.py Thu Jun 6 18:36:30 2013 @@ -430,7 +430,7 @@ # No frequency present. if value == None: - return None + return 0 # Return the index. return cdp.spectrometer_frq_list.index(value) @@ -595,7 +595,8 @@ key = return_param_key_from_data(frq=frq, point=point) # The Larmor frequency for this spin and field strength (in MHz*2pi to speed up the ppm to rad/s conversion). - frqs[spin_index, frq_index] = 2.0 * pi * frq / g1H * return_gyromagnetic_ratio(spin.isotope) * 1e-6 + if frq != None: + frqs[spin_index, frq_index] = 2.0 * pi * frq / g1H * return_gyromagnetic_ratio(spin.isotope) * 1e-6 # Missing data. if key not in spin.r2eff: