Dear Edward. This method is a copy of the one implemented in the auto analysis protocol.
It was not intended to implement a new functionality. Since this is a back-end function, and "hard" to reach, I will prefer to let it stay there. But let me know if I should remove it. Best Troels 2014-08-28 9:02 GMT+02:00 Edward d'Auvergne <[email protected]>: > Hi Troels, > > This should really be performed by the user and not automatically by > relax. The current spectrum sub-setting you perform is no good. > Sometimes a user will have different settings for the same > spectrometer but for different offsets, for example they may change > the spectral width. A good example is of HEHAHA experiments where you > only look at a spectrum with a single peak (you isolate each peak). > There is actually no sub-setting assumptions you can make > automatically here for the user that will be correct. There are far > too many error analysis combinations that a user could come up with. > The best behaviour is to raise a RelaxError to tell the user that they > forgot to do something. I would strongly prefer that this automatic > behaviour is not used, it's far to risky and will cause users to > perform something incorrectly without them ever knowing! > > Cheers, > > Edward > > > > > > On 27 August 2014 20:06, <[email protected]> wrote: >> Author: tlinnet >> Date: Wed Aug 27 20:06:24 2014 >> New Revision: 25348 >> >> URL: http://svn.gna.org/viewcvs/relax?rev=25348&view=rev >> Log: >> Added method to automatically perform error analysis on peak heights. >> >> task #7822(https://gna.org/task/index.php?7822): Implement user function to >> estimate R2eff and associated errors for exponential curve fitting. >> >> Modified: >> trunk/specific_analyses/relax_disp/data.py >> >> Modified: trunk/specific_analyses/relax_disp/data.py >> URL: >> http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/data.py?rev=25348&r1=25347&r2=25348&view=diff >> ============================================================================== >> --- trunk/specific_analyses/relax_disp/data.py (original) >> +++ trunk/specific_analyses/relax_disp/data.py Wed Aug 27 20:06:24 2014 >> @@ -68,13 +68,14 @@ >> from lib.physical_constants import g1H, return_gyromagnetic_ratio >> from lib.sequence import read_spin_data, write_spin_data >> from lib.software.grace import write_xy_data, write_xy_header, >> script_grace2images >> +from lib.text.sectioning import section >> from lib.warnings import RelaxWarning, RelaxNoSpinWarning >> from pipe_control import pipes >> from pipe_control.mol_res_spin import check_mol_res_spin_data, >> exists_mol_res_spin_data, generate_spin_id_unique, generate_spin_string, >> return_spin, spin_loop >> from pipe_control.result_files import add_result_file >> from pipe_control.selection import desel_spin >> from pipe_control.sequence import return_attached_protons >> -from pipe_control.spectrum import add_spectrum_id >> +from pipe_control.spectrum import add_spectrum_id, error_analysis >> from pipe_control.spectrometer import check_frequency, get_frequency >> from pipe_control import value >> import specific_analyses >> @@ -247,6 +248,50 @@ >> >> # Return the dic and list of keys >> return [theta_spin_dic, Domega_spin_dic, w_eff_spin_dic, dic_key_list] >> + >> + >> +def check_intensity_errors(spin_id=None): >> + """Check if intensity errors have already been calculated by the user. >> + >> + @keyword spin_id: The spin identification string. >> + @type spin_id: str >> + """ >> + >> + # Check if intensity errors have already been calculated by the user. >> + precalc = True >> + for cur_spin, mol_name, resi, resn, cur_spin_id in >> spin_loop(selection=spin_id, full_info=True, return_id=True, >> skip_desel=True): >> + # No structure. >> + if not hasattr(cur_spin, 'peak_intensity_err'): >> + precalc = False >> + break >> + >> + # Determine if a spectrum ID is missing from the list. >> + for id in cdp.spectrum_ids: >> + if id not in cur_spin.peak_intensity_err: >> + precalc = False >> + break >> + >> + # If no error analysis of peak heights exists. >> + if not precalc: >> + # Printout. >> + section(file=sys.stdout, text="Error analysis", prespace=2) >> + >> + # Loop over the spectrometer frequencies. >> + for frq in loop_frq(): >> + # Generate a list of spectrum IDs matching the frequency. >> + ids = [] >> + for id in cdp.spectrum_ids: >> + # Check that the spectrometer frequency matches. >> + match_frq = True >> + if frq != None and cdp.spectrometer_frq[id] != frq: >> + match_frq = False >> + >> + # Add the ID. >> + if match_frq: >> + ids.append(id) >> + >> + # Run the error analysis on the subset. >> + error_analysis(subset=ids) >> >> >> def count_exp(): >> >> >> _______________________________________________ >> relax (http://www.nmr-relax.com) >> >> This is the relax-commits mailing list >> [email protected] >> >> To unsubscribe from this list, get a password >> reminder, or change your subscription options, >> visit the list information page at >> https://mail.gna.org/listinfo/relax-commits > > _______________________________________________ > relax (http://www.nmr-relax.com) > > This is the relax-devel mailing list > [email protected] > > To unsubscribe from this list, get a password > reminder, or change your subscription options, > visit the list information page at > https://mail.gna.org/listinfo/relax-devel _______________________________________________ relax (http://www.nmr-relax.com) This is the relax-devel mailing list [email protected] To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-devel

