Hi, I can look at it later. For requiring numpy 1.6, the following could be done:
- If you could delete the printout in dep_check, that would be good. The printouts are only used for the essential packages before calling sys.exit(). If you are interested in a message to the user, the message needs to be modified to say something like "numpy >= 1.6 is required for...", rather than "numpy einsum is not installed", and this needs to be used like the C_module_exp_fn_mesg variable in the dep_check and info modules rather than calling sys.stderr.write(). - Blacklist the system tests requiring this. This is absolutely essential for me to release the changes in a new relax version. Maybe you could tackle that one, as the problem is of your own doing ;) It's just a simple duplication of code in the setUp() method. Do you have a system with numpy < 1.6 to test on? - A RelaxError in the relax_disp.select_model user function for just these models. Could you give a list of these models, as I don't know if all numeric models are affected, or if non-numeric models are affected. The best would be to create a new variable in specific_analyses.relax_disp.variables for this model list. - A GUI error blocking the execution of the analysis. This would require the model list in specific_analyses.relax_disp.variables to identify the problem. But I can look at this one. Cheers, Edward On 25 June 2014 20:14, Troels Emtekær Linnet <tlin...@nmr-relax.com> wrote: > Hi Edward. > > Do you fix this? > > Thanks. > > Best > Troels > > > 2014-06-25 20:06 GMT+02:00 Edward d'Auvergne <edw...@nmr-relax.com>: >> >> Hi Troels, >> >> For this change, it might be better to not output a message to >> sys.stderr. For relax users who are not interested in a dispersion >> analysis, there is no need to bother them. What I would suggest for >> safety is, in the backend for the relax_disp.select_model user >> function, that we raise a RelaxError if one of these models are >> selected but numpy.einsum does not exist. The RelaxError message >> could be that numpy version 1.6 or greater is required for the numeric >> dispersion models. A message could also appear in the GUI when the >> execute button is clicked on, if these models have been selected. >> That should be the best for the user experience when they have numpy < >> 1.6. >> >> Regards, >> >> Edward >> >> >> >> On 25 June 2014 19:31, <tlin...@nmr-relax.com> wrote: >> > Author: tlinnet >> > Date: Wed Jun 25 19:31:40 2014 >> > New Revision: 24323 >> > >> > URL: http://svn.gna.org/viewcvs/relax?rev=24323&view=rev >> > Log: >> > Implemented a dependency check for numpy einsum, so relax can still >> > start. >> > >> > Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion >> > models for Clustered analysis. >> > >> > Modified: >> > branches/disp_spin_speed/dep_check.py >> > branches/disp_spin_speed/target_functions/relax_disp.py >> > >> > Modified: branches/disp_spin_speed/dep_check.py >> > URL: >> > http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/dep_check.py?rev=24323&r1=24322&r2=24323&view=diff >> > >> > ============================================================================== >> > --- branches/disp_spin_speed/dep_check.py (original) >> > +++ branches/disp_spin_speed/dep_check.py Wed Jun 25 19:31:40 2014 >> > @@ -57,6 +57,14 @@ >> > >> > # Optional packages. >> > #################### >> > + >> > +# numpy einsum import. >> > +try: >> > + from numpy import einsum >> > + einsum_module = True >> > +except ImportError: >> > + sys.stderr.write("The dependency 'numpy einsum' has not been >> > installed. Numerical models in dispersion analysis will not be >> > possible.\n") >> > + einsum_module = False >> > >> > # Bmrblib python package check. >> > try: >> > >> > Modified: branches/disp_spin_speed/target_functions/relax_disp.py >> > URL: >> > http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/target_functions/relax_disp.py?rev=24323&r1=24322&r2=24323&view=diff >> > >> > ============================================================================== >> > --- branches/disp_spin_speed/target_functions/relax_disp.py >> > (original) >> > +++ branches/disp_spin_speed/target_functions/relax_disp.py Wed Jun >> > 25 19:31:40 2014 >> > @@ -30,6 +30,7 @@ >> > from numpy.ma import masked_equal >> > >> > # relax module imports. >> > +import dep_check >> > from lib.dispersion.b14 import r2eff_B14 >> > from lib.dispersion.cr72 import r2eff_CR72 >> > from lib.dispersion.dpl94 import r1rho_DPL94 >> > @@ -40,13 +41,7 @@ >> > from lib.dispersion.m61b import r1rho_M61b >> > from lib.dispersion.mp05 import r1rho_MP05 >> > from lib.dispersion.mmq_cr72 import r2eff_mmq_cr72 >> > -from lib.dispersion.ns_cpmg_2site_3d import r2eff_ns_cpmg_2site_3D >> > from lib.dispersion.ns_cpmg_2site_expanded import >> > r2eff_ns_cpmg_2site_expanded >> > -from lib.dispersion.ns_cpmg_2site_star import r2eff_ns_cpmg_2site_star >> > -from lib.dispersion.ns_mmq_3site import r2eff_ns_mmq_3site_mq, >> > r2eff_ns_mmq_3site_sq_dq_zq >> > -from lib.dispersion.ns_mmq_2site import r2eff_ns_mmq_2site_mq, >> > r2eff_ns_mmq_2site_sq_dq_zq >> > -from lib.dispersion.ns_r1rho_2site import ns_r1rho_2site >> > -from lib.dispersion.ns_r1rho_3site import ns_r1rho_3site >> > from lib.dispersion.ns_matrices import r180x_3d >> > from lib.dispersion.tp02 import r1rho_TP02 >> > from lib.dispersion.tap03 import r1rho_TAP03 >> > @@ -56,6 +51,14 @@ >> > from target_functions.chi2 import chi2, chi2_rankN >> > from specific_analyses.relax_disp.variables import EXP_TYPE_CPMG_DQ, >> > EXP_TYPE_CPMG_MQ, EXP_TYPE_CPMG_PROTON_MQ, EXP_TYPE_CPMG_PROTON_SQ, >> > EXP_TYPE_CPMG_SQ, EXP_TYPE_CPMG_ZQ, EXP_TYPE_LIST_CPMG, EXP_TYPE_R1RHO, >> > MODEL_B14, MODEL_B14_FULL, MODEL_CR72, MODEL_CR72_FULL, MODEL_DPL94, >> > MODEL_IT99, MODEL_LIST_CPMG, MODEL_LIST_CPMG_FULL, MODEL_LIST_FULL, >> > MODEL_LIST_MMQ, MODEL_LIST_MQ_CPMG, MODEL_LIST_R1RHO, >> > MODEL_LIST_R1RHO_FULL, >> > MODEL_LM63, MODEL_LM63_3SITE, MODEL_M61, MODEL_M61B, MODEL_MP05, >> > MODEL_MMQ_CR72, MODEL_NOREX, MODEL_NS_CPMG_2SITE_3D, >> > MODEL_NS_CPMG_2SITE_3D_FULL, MODEL_NS_CPMG_2SITE_EXPANDED, >> > MODEL_NS_CPMG_2SITE_STAR, MODEL_NS_CPMG_2SITE_STAR_FULL, >> > MODEL_NS_MMQ_2SITE, >> > MODEL_NS_MMQ_3SITE, MODEL_NS_MMQ_3SITE_LINEAR, MODEL_NS_R1RHO_2SITE, >> > MODEL_NS_R1RHO_3SITE, MODEL_NS_R1RHO_3SITE_LINEAR, MODEL_TAP03, MODEL_TP02, >> > MODEL_TSMFK01 >> > >> > +# Check if eisum is available for numerical models. >> > +if dep_check.einsum_module: >> > + from lib.dispersion.ns_cpmg_2site_3d import r2eff_ns_cpmg_2site_3D >> > + from lib.dispersion.ns_cpmg_2site_star import >> > r2eff_ns_cpmg_2site_star >> > + from lib.dispersion.ns_mmq_3site import r2eff_ns_mmq_3site_mq, >> > r2eff_ns_mmq_3site_sq_dq_zq >> > + from lib.dispersion.ns_mmq_2site import r2eff_ns_mmq_2site_mq, >> > r2eff_ns_mmq_2site_sq_dq_zq >> > + from lib.dispersion.ns_r1rho_2site import ns_r1rho_2site >> > + from lib.dispersion.ns_r1rho_3site import ns_r1rho_3site >> > >> > class Dispersion: >> > def __init__(self, model=None, num_params=None, num_spins=None, >> > num_frq=None, exp_types=None, values=None, errors=None, missing=None, >> > frqs=None, frqs_H=None, cpmg_frqs=None, spin_lock_nu1=None, >> > chemical_shifts=None, offset=None, tilt_angles=None, r1=None, >> > relax_times=None, scaling_matrix=None, recalc_tau=True): >> > >> > >> > _______________________________________________ >> > relax (http://www.nmr-relax.com) >> > >> > This is the relax-commits mailing list >> > relax-comm...@gna.org >> > >> > 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 >> relax-devel@gna.org >> >> >> 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 relax-devel@gna.org 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