Re: r24323 - in /branches/disp_spin_speed: dep_check.py target_functions/relax_disp.py

2014-06-27 Thread Troels Emtekær Linnet
Hi ed.

I have already been looking at the systemtests.

Our server has numpy 1.4.1

But some of the analytical models fails as well, since 1.4.1 does not
recognise the 'out' keyword.

Sigh...

2014-06-26 17:26 GMT+02:00 Edward d'Auvergne edw...@nmr-relax.com:
 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=24323view=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=24323r1=24322r2=24323view=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=24323r1=24322r2=24323view=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 

Re: r24323 - in /branches/disp_spin_speed: dep_check.py target_functions/relax_disp.py

2014-06-27 Thread Edward d'Auvergne
Hi Troels,

This is ok.  If you would like to have the relax numpy dependency
increased to 1.6, then you'll just have to blacklist all system tests
that do not work, so they obtain a printout at the end that X number
of tests were skipped due to numpy  1.6.  Then on the website and in
the manual, we tell users to use numpy  1.6 at their own risk.  We
could even block the relaxation dispersion analysis in the pipe.create
user function via a RelaxError if numpy  1.6, if all models are
affected.  But if this is the case, then maybe we make numpy = 1.6 an
essential dependency which is checked in dep_check, calling sys.exit()
if not.

Regards,

Edward


On 27 June 2014 10:34, Troels Emtekær Linnet tlin...@nmr-relax.com wrote:
 Hi ed.

 I have already been looking at the systemtests.

 Our server has numpy 1.4.1

 But some of the analytical models fails as well, since 1.4.1 does not
 recognise the 'out' keyword.

 Sigh...

 2014-06-26 17:26 GMT+02:00 Edward d'Auvergne edw...@nmr-relax.com:
 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=24323view=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=24323r1=24322r2=24323view=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=24323r1=24322r2=24323view=diff
 
  ==
  --- branches/disp_spin_speed/target_functions/relax_disp.py
  

Skipping unit tests

2014-06-27 Thread Troels Emtekær Linnet
Hej Edward.

How do I skip unit tests?

Best
Troels

___
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


Re: r24339 - /branches/disp_spin_speed/test_suite/system_tests/relax_disp.py

2014-06-27 Thread Edward d'Auvergne
Wow, are their any dispersion models that can be used in this case?
If not, we should probably add a
specific_analyses.relax_disp.checks.check_numpy_out() function which
raises a RelaxError when the out argument is unavailable.  This
function can then be called at the start of any relaxation dispersion
specific user functions where it is important (minimise, calc, and
grid_search for example).  This will the prevent a user from
encountering the numpy ValueError and clearly tell them that they need
to upgrade their numpy version.

Cheers,

Edward




On 27 June 2014 12:58,  tlin...@nmr-relax.com wrote:
 Author: tlinnet
 Date: Fri Jun 27 12:58:29 2014
 New Revision: 24339

 URL: http://svn.gna.org/viewcvs/relax?rev=24339view=rev
 Log:
 Added a list of systemtests to skip, if numpy out argument is not available.

 Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion 
 models for Clustered analysis.

 Modified:
 branches/disp_spin_speed/test_suite/system_tests/relax_disp.py

 Modified: branches/disp_spin_speed/test_suite/system_tests/relax_disp.py
 URL: 
 http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/test_suite/system_tests/relax_disp.py?rev=24339r1=24338r2=24339view=diff
 ==
 --- branches/disp_spin_speed/test_suite/system_tests/relax_disp.py  
 (original)
 +++ branches/disp_spin_speed/test_suite/system_tests/relax_disp.py  Fri 
 Jun 27 12:58:29 2014
 @@ -23,7 +23,7 @@

  # Python module imports.
  from os import F_OK, access, getcwd, path, sep
 -from numpy import array, median
 +from numpy import array, median, version
  import re, math
  from tempfile import mkdtemp

 @@ -68,6 +68,73 @@
  if methodName in to_skip:
  status.skipped_tests.append([methodName, 'Relax 
 curve-fitting C module', self._skip_type])

 +# Missing numpy out argument in numpy.multiply, numpy.add, 
 numpy.subtract.
 +if not dep_check.numpy_out:
 +# The list of tests to skip.
 +to_skip = [
 +test_baldwin_synthetic,
 +test_baldwin_synthetic_full,
 +test_bug_21460_disp_cluster_fail,
 +test_bug_22146_unpacking_r2a_r2b_cluster_B14,
 +test_bug_22146_unpacking_r2a_r2b_cluster_CR72,
 +test_bug_22146_unpacking_r2a_r2b_cluster_NS_3D,
 +test_bug_22146_unpacking_r2a_r2b_cluster_NS_STAR,
 +test_cpmg_synthetic_b14_to_ns3d_cluster,
 +test_cpmg_synthetic_b14_to_ns_star_cluster,
 +test_cpmg_synthetic_dx_map_points,
 +test_cpmg_synthetic_ns3d_to_b14,
 +test_cpmg_synthetic_ns3d_to_cr72,
 +test_cpmg_synthetic_ns3d_to_cr72_noise_cluster,
 +test_dpl94_data_to_dpl94,
 +test_hansen_cpmg_data_auto_analysis,
 +test_hansen_cpmg_data_auto_analysis_numeric,
 +test_hansen_cpmg_data_auto_analysis_r2eff,
 +test_hansen_cpmg_data_missing_auto_analysis,
 +test_hansen_cpmg_data_to_cr72,
 +test_hansen_cpmg_data_to_cr72_full,
 +test_hansen_cpmg_data_to_it99,
 +test_hansen_cpmg_data_to_lm63,
 +test_hansen_cpmg_data_to_ns_cpmg_2site_3D,
 +test_hansen_cpmg_data_to_ns_cpmg_2site_3D_full,
 +test_hansen_cpmg_data_to_ns_cpmg_2site_expanded,
 +test_hansen_cpmg_data_to_ns_cpmg_2site_star,
 +test_hansen_cpmg_data_to_ns_cpmg_2site_star_full,
 +test_korzhnev_2005_15n_dq_data,
 +test_korzhnev_2005_15n_mq_data,
 +test_korzhnev_2005_15n_sq_data,
 +test_korzhnev_2005_15n_zq_data,
 +test_korzhnev_2005_1h_mq_data,
 +test_korzhnev_2005_1h_sq_data,
 +test_korzhnev_2005_all_data,
 +test_korzhnev_2005_all_data_disp_speed_bug,
 +test_kteilum_fmpoulsen_makke_cpmg_data_048m_guhcl_to_cr72,
 +
 test_kteilum_fmpoulsen_makke_cpmg_data_048m_guhcl_to_cr72_full,
 +
 test_kteilum_fmpoulsen_makke_cpmg_data_048m_guhcl_to_tsmfk01,
 +
 test_kteilum_fmpoulsen_makke_cpmg_data_101m_guhcl_to_tsmfk01,
 +test_lm63_3site_synthetic,
 +test_m61_data_to_m61,
 +test_m61_exp_data_to_m61,
 +test_ns_mmq_3site,
 +test_ns_mmq_3site_linear,
 +test_ns_r1rho_3site,
 +test_ns_r1rho_3site_linear,
 +test_r1rho_kjaergaard_auto,
 +test_r1rho_kjaergaard_man,
 +test_r1rho_kjaergaard_missing_r1,
 +test_r20_from_min_r2eff_cpmg,
 +test_sod1wt_t25_to_cr72,
 +test_sprangers_data_to_mmq_cr72,
 +

Re: r24336 - /branches/disp_spin_speed/target_functions/relax_disp.py

2014-06-27 Thread Troels Emtekær Linnet
Hi Ed.

You can just grep for out or einsum in lib/dispersion.

Best
Troels

2014-06-27 14:15 GMT+02:00 Edward d'Auvergne edw...@nmr-relax.com:
 Hi Troels,

 I think if would be better if we caught this earlier, specifically the
 select_model() method of the specific_analyses.relax_disp.uf module if
 the user chooses a model which is not supported by their numpy
 version.  Such a check with a RelaxError would only be two lines of
 code, plus a comment (which could include the current version in
 numpy.version.version).  It would be very useful to add the models to
 a list variable in specific_analyses.relax_disp.variables so that I
 can replicate the checks in the GUI.  Even better would be to add the
 2 line check to a function in specific_analyses.relax_disp.checks to
 allow for consistent checking in all user interfaces.  There could
 even be two separate tests, one for the numpy.einsum and one for the
 numpy out argument, each with their own model lists, if you wish.

 Cheers,

 Edward






 On 27 June 2014 12:58,  tlin...@nmr-relax.com wrote:
 Author: tlinnet
 Date: Fri Jun 27 12:58:22 2014
 New Revision: 24336

 URL: http://svn.gna.org/viewcvs/relax?rev=24336view=rev
 Log:
 Added to target function that experiment_type_setup() should not be 
 initiated, if numpy.einsum is missing.

 Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion 
 models for Clustered analysis.

 Modified:
 branches/disp_spin_speed/target_functions/relax_disp.py

 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=24336r1=24335r2=24336view=diff
 ==
 --- branches/disp_spin_speed/target_functions/relax_disp.py (original)
 +++ branches/disp_spin_speed/target_functions/relax_disp.py Fri Jun 27 
 12:58:22 2014
 @@ -365,8 +365,10 @@
  # This is to make sure, that the chi2 values is not affected by 
 missing values.
  self.mask_replace_blank = masked_equal(self.missing, 1.0)

 -# Check the experiment types, simplifying the data structures as 
 needed.
 -self.experiment_type_setup()
 +# Check if eisum is available for numerical models.
 +if dep_check.einsum_module:
 +# Check the experiment types, simplifying the data structures 
 as needed.
 +self.experiment_type_setup()

  # Scaling initialisation.
  self.scaling_flag = False


 ___
 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


Re: r24336 - /branches/disp_spin_speed/target_functions/relax_disp.py

2014-06-27 Thread Edward d'Auvergne
Hmmm:

$ grep -c out=\|einsum lib/dispersion/*
lib/dispersion/b14.py:0
lib/dispersion/cr72.py:2
lib/dispersion/dpl94.py:0
lib/dispersion/__init__.py:0
lib/dispersion/it99.py:0
lib/dispersion/lm63_3site.py:0
lib/dispersion/lm63.py:0
lib/dispersion/m61b.py:0
lib/dispersion/m61.py:0
lib/dispersion/matrix_exponential.py:5
lib/dispersion/matrix_power.py:0
lib/dispersion/mmq_cr72.py:0
lib/dispersion/mp05.py:0
lib/dispersion/ns_cpmg_2site_3d.py:6
lib/dispersion/ns_cpmg_2site_expanded.py:0
lib/dispersion/ns_cpmg_2site_star.py:3
lib/dispersion/ns_matrices.py:0
lib/dispersion/ns_mmq_2site.py:12
lib/dispersion/ns_mmq_3site.py:12
lib/dispersion/ns_r1rho_2site.py:3
lib/dispersion/ns_r1rho_3site.py:3
lib/dispersion/tap03.py:0
lib/dispersion/tp02.py:0
lib/dispersion/tsmfk01.py:0
lib/dispersion/two_point.py:0


What do you think of the idea of making this a hard dependency:


Index: dep_check.py
===
--- dep_check.py(revision 24343)
+++ dep_check.py(working copy)
@@ -37,6 +37,9 @@
 # numpy.
 try:
 import numpy
+if float(numpy.version.version[:3])  1.6:
+sys.stderr.write(Version %s of the 'numpy' dependency is not
supported, numpy = 1.6 is required.\n % numpy.version.version)
+sys.exit()
 except ImportError:
 sys.stderr.write(The dependency 'numpy' has not been installed.\n)
 sys.exit()


This might be the easiest way, just forcing users to upgrade.  I've
used the out argument a lot with the frame order analysis as well and
plan to use it more often, so maybe we just have to put our foot down
and make this a hard dependency.  That will make everyone's life
easier, and simplify what we as developers have to do to handle this.
I can apply this to the trunk and release relax 3.2.3 with all the
current fixes and this hard numpy version dependency, and then in a
few weeks when you are ready, merge the disp_spin_speed branch and
release relax 3.2.4.  What do you think?

Regards,

Edward





On 27 June 2014 14:40, Troels Emtekær Linnet tlin...@nmr-relax.com wrote:
 Hi Ed.

 You can just grep for out or einsum in lib/dispersion.

 Best
 Troels

 2014-06-27 14:15 GMT+02:00 Edward d'Auvergne edw...@nmr-relax.com:
 Hi Troels,

 I think if would be better if we caught this earlier, specifically the
 select_model() method of the specific_analyses.relax_disp.uf module if
 the user chooses a model which is not supported by their numpy
 version.  Such a check with a RelaxError would only be two lines of
 code, plus a comment (which could include the current version in
 numpy.version.version).  It would be very useful to add the models to
 a list variable in specific_analyses.relax_disp.variables so that I
 can replicate the checks in the GUI.  Even better would be to add the
 2 line check to a function in specific_analyses.relax_disp.checks to
 allow for consistent checking in all user interfaces.  There could
 even be two separate tests, one for the numpy.einsum and one for the
 numpy out argument, each with their own model lists, if you wish.

 Cheers,

 Edward






 On 27 June 2014 12:58,  tlin...@nmr-relax.com wrote:
 Author: tlinnet
 Date: Fri Jun 27 12:58:22 2014
 New Revision: 24336

 URL: http://svn.gna.org/viewcvs/relax?rev=24336view=rev
 Log:
 Added to target function that experiment_type_setup() should not be 
 initiated, if numpy.einsum is missing.

 Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion 
 models for Clustered analysis.

 Modified:
 branches/disp_spin_speed/target_functions/relax_disp.py

 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=24336r1=24335r2=24336view=diff
 ==
 --- branches/disp_spin_speed/target_functions/relax_disp.py (original)
 +++ branches/disp_spin_speed/target_functions/relax_disp.py Fri Jun 27 
 12:58:22 2014
 @@ -365,8 +365,10 @@
  # This is to make sure, that the chi2 values is not affected by 
 missing values.
  self.mask_replace_blank = masked_equal(self.missing, 1.0)

 -# Check the experiment types, simplifying the data structures as 
 needed.
 -self.experiment_type_setup()
 +# Check if eisum is available for numerical models.
 +if dep_check.einsum_module:
 +# Check the experiment types, simplifying the data structures 
 as needed.
 +self.experiment_type_setup()

  # Scaling initialisation.
  self.scaling_flag = False


 ___
 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

 

Re: r24336 - /branches/disp_spin_speed/target_functions/relax_disp.py

2014-06-27 Thread Troels Emtekær Linnet
This sounds good.

What is needed to be done, to merge disp_spin_speed in trunk now?

Best
Troels

2014-06-27 15:53 GMT+02:00 Edward d'Auvergne edw...@nmr-relax.com:
 Hmmm:

 $ grep -c out=\|einsum lib/dispersion/*
 lib/dispersion/b14.py:0
 lib/dispersion/cr72.py:2
 lib/dispersion/dpl94.py:0
 lib/dispersion/__init__.py:0
 lib/dispersion/it99.py:0
 lib/dispersion/lm63_3site.py:0
 lib/dispersion/lm63.py:0
 lib/dispersion/m61b.py:0
 lib/dispersion/m61.py:0
 lib/dispersion/matrix_exponential.py:5
 lib/dispersion/matrix_power.py:0
 lib/dispersion/mmq_cr72.py:0
 lib/dispersion/mp05.py:0
 lib/dispersion/ns_cpmg_2site_3d.py:6
 lib/dispersion/ns_cpmg_2site_expanded.py:0
 lib/dispersion/ns_cpmg_2site_star.py:3
 lib/dispersion/ns_matrices.py:0
 lib/dispersion/ns_mmq_2site.py:12
 lib/dispersion/ns_mmq_3site.py:12
 lib/dispersion/ns_r1rho_2site.py:3
 lib/dispersion/ns_r1rho_3site.py:3
 lib/dispersion/tap03.py:0
 lib/dispersion/tp02.py:0
 lib/dispersion/tsmfk01.py:0
 lib/dispersion/two_point.py:0


 What do you think of the idea of making this a hard dependency:

 
 Index: dep_check.py
 ===
 --- dep_check.py(revision 24343)
 +++ dep_check.py(working copy)
 @@ -37,6 +37,9 @@
  # numpy.
  try:
  import numpy
 +if float(numpy.version.version[:3])  1.6:
 +sys.stderr.write(Version %s of the 'numpy' dependency is not
 supported, numpy = 1.6 is required.\n % numpy.version.version)
 +sys.exit()
  except ImportError:
  sys.stderr.write(The dependency 'numpy' has not been installed.\n)
  sys.exit()
 

 This might be the easiest way, just forcing users to upgrade.  I've
 used the out argument a lot with the frame order analysis as well and
 plan to use it more often, so maybe we just have to put our foot down
 and make this a hard dependency.  That will make everyone's life
 easier, and simplify what we as developers have to do to handle this.
 I can apply this to the trunk and release relax 3.2.3 with all the
 current fixes and this hard numpy version dependency, and then in a
 few weeks when you are ready, merge the disp_spin_speed branch and
 release relax 3.2.4.  What do you think?

 Regards,

 Edward





 On 27 June 2014 14:40, Troels Emtekær Linnet tlin...@nmr-relax.com wrote:
 Hi Ed.

 You can just grep for out or einsum in lib/dispersion.

 Best
 Troels

 2014-06-27 14:15 GMT+02:00 Edward d'Auvergne edw...@nmr-relax.com:
 Hi Troels,

 I think if would be better if we caught this earlier, specifically the
 select_model() method of the specific_analyses.relax_disp.uf module if
 the user chooses a model which is not supported by their numpy
 version.  Such a check with a RelaxError would only be two lines of
 code, plus a comment (which could include the current version in
 numpy.version.version).  It would be very useful to add the models to
 a list variable in specific_analyses.relax_disp.variables so that I
 can replicate the checks in the GUI.  Even better would be to add the
 2 line check to a function in specific_analyses.relax_disp.checks to
 allow for consistent checking in all user interfaces.  There could
 even be two separate tests, one for the numpy.einsum and one for the
 numpy out argument, each with their own model lists, if you wish.

 Cheers,

 Edward






 On 27 June 2014 12:58,  tlin...@nmr-relax.com wrote:
 Author: tlinnet
 Date: Fri Jun 27 12:58:22 2014
 New Revision: 24336

 URL: http://svn.gna.org/viewcvs/relax?rev=24336view=rev
 Log:
 Added to target function that experiment_type_setup() should not be 
 initiated, if numpy.einsum is missing.

 Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion 
 models for Clustered analysis.

 Modified:
 branches/disp_spin_speed/target_functions/relax_disp.py

 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=24336r1=24335r2=24336view=diff
 ==
 --- branches/disp_spin_speed/target_functions/relax_disp.py (original)
 +++ branches/disp_spin_speed/target_functions/relax_disp.py Fri Jun 27 
 12:58:22 2014
 @@ -365,8 +365,10 @@
  # This is to make sure, that the chi2 values is not affected by 
 missing values.
  self.mask_replace_blank = masked_equal(self.missing, 1.0)

 -# Check the experiment types, simplifying the data structures as 
 needed.
 -self.experiment_type_setup()
 +# Check if eisum is available for numerical models.
 +if dep_check.einsum_module:
 +# Check the experiment types, simplifying the data structures 
 as needed.
 +self.experiment_type_setup()

  # Scaling initialisation.
  self.scaling_flag = False


 ___
 relax (http://www.nmr-relax.com)

 This is the relax-commits mailing list
 

Re: r24336 - /branches/disp_spin_speed/target_functions/relax_disp.py

2014-06-27 Thread Edward d'Auvergne
Let me see.  You've covered most of the running list, there's just one
or two things left.  I'll add a few more trivial things as well.

- Some modules have = operators outside of functions that need
spaces around them.

- Trailing whitespace, most of it is in the trunk, but there are some
new ones.  Just run:  grep  $ lib/dispersion/* | grep -v  

- There are some empty lines straight after a 'for' loop in many places.

- Your copyright in the tsmfk01.py file needs to be extended to 2014.

- There are some FIXME comments in the lib.dispersion package.

- In some places, comment lines require empty lines before them (in
target_functions.relax_disp and lib.dispersion).

- Not very important, but the target function calc_ns_mmq_3site_chi2()
can have the Once off parameter conversions shifted into the
lib.dispersion module to simplify this.

- The newline spacing between target function methods needs some fixes.


I'll keep looking.  I'm guessing you will not be tackling the numeric
models to speed them up to match 'NS CPMG 2-site expanded' model via
the ultimate solution of brute-force expansion
(http://www.mail-archive.com/relax-users@gna.org/msg01641.html) any
time soon.  This will have a similar effect as the ultimate speed up
at http://www.mail-archive.com/relax-devel%40gna.org/msg05691.html
which you have so successfully achieved in this branch.  Can you
remember if there were any other changes required?  I will create a
new timings file just before tagging the relax release.

Cheers,

Edward

On 27 June 2014 16:53, Troels Emtekær Linnet tlin...@nmr-relax.com wrote:
 This sounds good.

 What is needed to be done, to merge disp_spin_speed in trunk now?

 Best
 Troels

 2014-06-27 15:53 GMT+02:00 Edward d'Auvergne edw...@nmr-relax.com:
 Hmmm:

 $ grep -c out=\|einsum lib/dispersion/*
 lib/dispersion/b14.py:0
 lib/dispersion/cr72.py:2
 lib/dispersion/dpl94.py:0
 lib/dispersion/__init__.py:0
 lib/dispersion/it99.py:0
 lib/dispersion/lm63_3site.py:0
 lib/dispersion/lm63.py:0
 lib/dispersion/m61b.py:0
 lib/dispersion/m61.py:0
 lib/dispersion/matrix_exponential.py:5
 lib/dispersion/matrix_power.py:0
 lib/dispersion/mmq_cr72.py:0
 lib/dispersion/mp05.py:0
 lib/dispersion/ns_cpmg_2site_3d.py:6
 lib/dispersion/ns_cpmg_2site_expanded.py:0
 lib/dispersion/ns_cpmg_2site_star.py:3
 lib/dispersion/ns_matrices.py:0
 lib/dispersion/ns_mmq_2site.py:12
 lib/dispersion/ns_mmq_3site.py:12
 lib/dispersion/ns_r1rho_2site.py:3
 lib/dispersion/ns_r1rho_3site.py:3
 lib/dispersion/tap03.py:0
 lib/dispersion/tp02.py:0
 lib/dispersion/tsmfk01.py:0
 lib/dispersion/two_point.py:0


 What do you think of the idea of making this a hard dependency:

 
 Index: dep_check.py
 ===
 --- dep_check.py(revision 24343)
 +++ dep_check.py(working copy)
 @@ -37,6 +37,9 @@
  # numpy.
  try:
  import numpy
 +if float(numpy.version.version[:3])  1.6:
 +sys.stderr.write(Version %s of the 'numpy' dependency is not
 supported, numpy = 1.6 is required.\n % numpy.version.version)
 +sys.exit()
  except ImportError:
  sys.stderr.write(The dependency 'numpy' has not been installed.\n)
  sys.exit()
 

 This might be the easiest way, just forcing users to upgrade.  I've
 used the out argument a lot with the frame order analysis as well and
 plan to use it more often, so maybe we just have to put our foot down
 and make this a hard dependency.  That will make everyone's life
 easier, and simplify what we as developers have to do to handle this.
 I can apply this to the trunk and release relax 3.2.3 with all the
 current fixes and this hard numpy version dependency, and then in a
 few weeks when you are ready, merge the disp_spin_speed branch and
 release relax 3.2.4.  What do you think?

 Regards,

 Edward





 On 27 June 2014 14:40, Troels Emtekær Linnet tlin...@nmr-relax.com wrote:
 Hi Ed.

 You can just grep for out or einsum in lib/dispersion.

 Best
 Troels

 2014-06-27 14:15 GMT+02:00 Edward d'Auvergne edw...@nmr-relax.com:
 Hi Troels,

 I think if would be better if we caught this earlier, specifically the
 select_model() method of the specific_analyses.relax_disp.uf module if
 the user chooses a model which is not supported by their numpy
 version.  Such a check with a RelaxError would only be two lines of
 code, plus a comment (which could include the current version in
 numpy.version.version).  It would be very useful to add the models to
 a list variable in specific_analyses.relax_disp.variables so that I
 can replicate the checks in the GUI.  Even better would be to add the
 2 line check to a function in specific_analyses.relax_disp.checks to
 allow for consistent checking in all user interfaces.  There could
 even be two separate tests, one for the numpy.einsum and one for the
 numpy out argument, each with their own model lists, if you wish.

 Cheers,

 Edward






 On 27 June 2014 12:58,  tlin...@nmr-relax.com wrote:
 Author: 

Re: r24336 - /branches/disp_spin_speed/target_functions/relax_disp.py

2014-06-27 Thread Edward d'Auvergne
To add to the list of trivialities to fix:

- The 'chi2_sum' initialisation in func_ns_mmq_2site() should go.

Cheers,

Edward



On 27 June 2014 17:23, Edward d'Auvergne edw...@nmr-relax.com wrote:
 Let me see.  You've covered most of the running list, there's just one
 or two things left.  I'll add a few more trivial things as well.

 - Some modules have = operators outside of functions that need
 spaces around them.

 - Trailing whitespace, most of it is in the trunk, but there are some
 new ones.  Just run:  grep  $ lib/dispersion/* | grep -v  

 - There are some empty lines straight after a 'for' loop in many places.

 - Your copyright in the tsmfk01.py file needs to be extended to 2014.

 - There are some FIXME comments in the lib.dispersion package.

 - In some places, comment lines require empty lines before them (in
 target_functions.relax_disp and lib.dispersion).

 - Not very important, but the target function calc_ns_mmq_3site_chi2()
 can have the Once off parameter conversions shifted into the
 lib.dispersion module to simplify this.

 - The newline spacing between target function methods needs some fixes.


 I'll keep looking.  I'm guessing you will not be tackling the numeric
 models to speed them up to match 'NS CPMG 2-site expanded' model via
 the ultimate solution of brute-force expansion
 (http://www.mail-archive.com/relax-users@gna.org/msg01641.html) any
 time soon.  This will have a similar effect as the ultimate speed up
 at http://www.mail-archive.com/relax-devel%40gna.org/msg05691.html
 which you have so successfully achieved in this branch.  Can you
 remember if there were any other changes required?  I will create a
 new timings file just before tagging the relax release.

 Cheers,

 Edward

 On 27 June 2014 16:53, Troels Emtekær Linnet tlin...@nmr-relax.com wrote:
 This sounds good.

 What is needed to be done, to merge disp_spin_speed in trunk now?

 Best
 Troels

 2014-06-27 15:53 GMT+02:00 Edward d'Auvergne edw...@nmr-relax.com:
 Hmmm:

 $ grep -c out=\|einsum lib/dispersion/*
 lib/dispersion/b14.py:0
 lib/dispersion/cr72.py:2
 lib/dispersion/dpl94.py:0
 lib/dispersion/__init__.py:0
 lib/dispersion/it99.py:0
 lib/dispersion/lm63_3site.py:0
 lib/dispersion/lm63.py:0
 lib/dispersion/m61b.py:0
 lib/dispersion/m61.py:0
 lib/dispersion/matrix_exponential.py:5
 lib/dispersion/matrix_power.py:0
 lib/dispersion/mmq_cr72.py:0
 lib/dispersion/mp05.py:0
 lib/dispersion/ns_cpmg_2site_3d.py:6
 lib/dispersion/ns_cpmg_2site_expanded.py:0
 lib/dispersion/ns_cpmg_2site_star.py:3
 lib/dispersion/ns_matrices.py:0
 lib/dispersion/ns_mmq_2site.py:12
 lib/dispersion/ns_mmq_3site.py:12
 lib/dispersion/ns_r1rho_2site.py:3
 lib/dispersion/ns_r1rho_3site.py:3
 lib/dispersion/tap03.py:0
 lib/dispersion/tp02.py:0
 lib/dispersion/tsmfk01.py:0
 lib/dispersion/two_point.py:0


 What do you think of the idea of making this a hard dependency:

 
 Index: dep_check.py
 ===
 --- dep_check.py(revision 24343)
 +++ dep_check.py(working copy)
 @@ -37,6 +37,9 @@
  # numpy.
  try:
  import numpy
 +if float(numpy.version.version[:3])  1.6:
 +sys.stderr.write(Version %s of the 'numpy' dependency is not
 supported, numpy = 1.6 is required.\n % numpy.version.version)
 +sys.exit()
  except ImportError:
  sys.stderr.write(The dependency 'numpy' has not been installed.\n)
  sys.exit()
 

 This might be the easiest way, just forcing users to upgrade.  I've
 used the out argument a lot with the frame order analysis as well and
 plan to use it more often, so maybe we just have to put our foot down
 and make this a hard dependency.  That will make everyone's life
 easier, and simplify what we as developers have to do to handle this.
 I can apply this to the trunk and release relax 3.2.3 with all the
 current fixes and this hard numpy version dependency, and then in a
 few weeks when you are ready, merge the disp_spin_speed branch and
 release relax 3.2.4.  What do you think?

 Regards,

 Edward





 On 27 June 2014 14:40, Troels Emtekær Linnet tlin...@nmr-relax.com wrote:
 Hi Ed.

 You can just grep for out or einsum in lib/dispersion.

 Best
 Troels

 2014-06-27 14:15 GMT+02:00 Edward d'Auvergne edw...@nmr-relax.com:
 Hi Troels,

 I think if would be better if we caught this earlier, specifically the
 select_model() method of the specific_analyses.relax_disp.uf module if
 the user chooses a model which is not supported by their numpy
 version.  Such a check with a RelaxError would only be two lines of
 code, plus a comment (which could include the current version in
 numpy.version.version).  It would be very useful to add the models to
 a list variable in specific_analyses.relax_disp.variables so that I
 can replicate the checks in the GUI.  Even better would be to add the
 2 line check to a function in specific_analyses.relax_disp.checks to
 allow for consistent checking in all user interfaces.  There could
 

Re: r24336 - /branches/disp_spin_speed/target_functions/relax_disp.py

2014-06-27 Thread Edward d'Auvergne
Also the documentation in the get_back_calc() method of the target
function needs a little polish - it is not a float that is returned.
So, the running list:

- Some modules have = operators outside of functions that need
spaces around them.

- Trailing whitespace, most of it is in the trunk, but there are some
new ones.  Just run:  grep  $ lib/dispersion/* | grep -v  

- There are some empty lines straight after a 'for' loop in many places.

- Your copyright in the tsmfk01.py file needs to be extended to 2014.

- There are some FIXME comments in the lib.dispersion package.

- In some places, comment lines require empty lines before them (in
target_functions.relax_disp and lib.dispersion).

- Not very important, but the target function calc_ns_mmq_3site_chi2()
can have the Once off parameter conversions shifted into the
lib.dispersion module to simplify this.

- The newline spacing between target function methods needs some fixes.

- The 'chi2_sum' initialisation in func_ns_mmq_2site() should go.

- The get_back_calc() method of the target function needs a little
polish - it is not a float that is returned.

Cheers,

Edward



On 27 June 2014 17:26, Edward d'Auvergne edw...@nmr-relax.com wrote:
 To add to the list of trivialities to fix:

 - The 'chi2_sum' initialisation in func_ns_mmq_2site() should go.

 Cheers,

 Edward



 On 27 June 2014 17:23, Edward d'Auvergne edw...@nmr-relax.com wrote:
 Let me see.  You've covered most of the running list, there's just one
 or two things left.  I'll add a few more trivial things as well.

 - Some modules have = operators outside of functions that need
 spaces around them.

 - Trailing whitespace, most of it is in the trunk, but there are some
 new ones.  Just run:  grep  $ lib/dispersion/* | grep -v  

 - There are some empty lines straight after a 'for' loop in many places.

 - Your copyright in the tsmfk01.py file needs to be extended to 2014.

 - There are some FIXME comments in the lib.dispersion package.

 - In some places, comment lines require empty lines before them (in
 target_functions.relax_disp and lib.dispersion).

 - Not very important, but the target function calc_ns_mmq_3site_chi2()
 can have the Once off parameter conversions shifted into the
 lib.dispersion module to simplify this.

 - The newline spacing between target function methods needs some fixes.


 I'll keep looking.  I'm guessing you will not be tackling the numeric
 models to speed them up to match 'NS CPMG 2-site expanded' model via
 the ultimate solution of brute-force expansion
 (http://www.mail-archive.com/relax-users@gna.org/msg01641.html) any
 time soon.  This will have a similar effect as the ultimate speed up
 at http://www.mail-archive.com/relax-devel%40gna.org/msg05691.html
 which you have so successfully achieved in this branch.  Can you
 remember if there were any other changes required?  I will create a
 new timings file just before tagging the relax release.

 Cheers,

 Edward

 On 27 June 2014 16:53, Troels Emtekær Linnet tlin...@nmr-relax.com wrote:
 This sounds good.

 What is needed to be done, to merge disp_spin_speed in trunk now?

 Best
 Troels

 2014-06-27 15:53 GMT+02:00 Edward d'Auvergne edw...@nmr-relax.com:
 Hmmm:

 $ grep -c out=\|einsum lib/dispersion/*
 lib/dispersion/b14.py:0
 lib/dispersion/cr72.py:2
 lib/dispersion/dpl94.py:0
 lib/dispersion/__init__.py:0
 lib/dispersion/it99.py:0
 lib/dispersion/lm63_3site.py:0
 lib/dispersion/lm63.py:0
 lib/dispersion/m61b.py:0
 lib/dispersion/m61.py:0
 lib/dispersion/matrix_exponential.py:5
 lib/dispersion/matrix_power.py:0
 lib/dispersion/mmq_cr72.py:0
 lib/dispersion/mp05.py:0
 lib/dispersion/ns_cpmg_2site_3d.py:6
 lib/dispersion/ns_cpmg_2site_expanded.py:0
 lib/dispersion/ns_cpmg_2site_star.py:3
 lib/dispersion/ns_matrices.py:0
 lib/dispersion/ns_mmq_2site.py:12
 lib/dispersion/ns_mmq_3site.py:12
 lib/dispersion/ns_r1rho_2site.py:3
 lib/dispersion/ns_r1rho_3site.py:3
 lib/dispersion/tap03.py:0
 lib/dispersion/tp02.py:0
 lib/dispersion/tsmfk01.py:0
 lib/dispersion/two_point.py:0


 What do you think of the idea of making this a hard dependency:

 
 Index: dep_check.py
 ===
 --- dep_check.py(revision 24343)
 +++ dep_check.py(working copy)
 @@ -37,6 +37,9 @@
  # numpy.
  try:
  import numpy
 +if float(numpy.version.version[:3])  1.6:
 +sys.stderr.write(Version %s of the 'numpy' dependency is not
 supported, numpy = 1.6 is required.\n % numpy.version.version)
 +sys.exit()
  except ImportError:
  sys.stderr.write(The dependency 'numpy' has not been installed.\n)
  sys.exit()
 

 This might be the easiest way, just forcing users to upgrade.  I've
 used the out argument a lot with the frame order analysis as well and
 plan to use it more often, so maybe we just have to put our foot down
 and make this a hard dependency.  That will make everyone's life
 easier, and simplify what we as developers have to 

Re: r24336 - /branches/disp_spin_speed/target_functions/relax_disp.py

2014-06-27 Thread Edward d'Auvergne
There are also a number of double spacing issues.  You can find these
by running:

$ ./devel_scripts/code_validator lib/dispersion/b14.py
$ ./devel_scripts/code_validator lib/dispersion/cr72.py

Etc.  Some things can be ignored, like the capitals in the function
name and double spacing or trailing spacing for equations in
docstrings.  This script will identify most formatting problems
remaining.

Cheers,

Edward



On 27 June 2014 17:28, Edward d'Auvergne edw...@nmr-relax.com wrote:
 Also the documentation in the get_back_calc() method of the target
 function needs a little polish - it is not a float that is returned.
 So, the running list:

 - Some modules have = operators outside of functions that need
 spaces around them.

 - Trailing whitespace, most of it is in the trunk, but there are some
 new ones.  Just run:  grep  $ lib/dispersion/* | grep -v  

 - There are some empty lines straight after a 'for' loop in many places.

 - Your copyright in the tsmfk01.py file needs to be extended to 2014.

 - There are some FIXME comments in the lib.dispersion package.

 - In some places, comment lines require empty lines before them (in
 target_functions.relax_disp and lib.dispersion).

 - Not very important, but the target function calc_ns_mmq_3site_chi2()
 can have the Once off parameter conversions shifted into the
 lib.dispersion module to simplify this.

 - The newline spacing between target function methods needs some fixes.

 - The 'chi2_sum' initialisation in func_ns_mmq_2site() should go.

 - The get_back_calc() method of the target function needs a little
 polish - it is not a float that is returned.

 Cheers,

 Edward



 On 27 June 2014 17:26, Edward d'Auvergne edw...@nmr-relax.com wrote:
 To add to the list of trivialities to fix:

 - The 'chi2_sum' initialisation in func_ns_mmq_2site() should go.

 Cheers,

 Edward



 On 27 June 2014 17:23, Edward d'Auvergne edw...@nmr-relax.com wrote:
 Let me see.  You've covered most of the running list, there's just one
 or two things left.  I'll add a few more trivial things as well.

 - Some modules have = operators outside of functions that need
 spaces around them.

 - Trailing whitespace, most of it is in the trunk, but there are some
 new ones.  Just run:  grep  $ lib/dispersion/* | grep -v  

 - There are some empty lines straight after a 'for' loop in many places.

 - Your copyright in the tsmfk01.py file needs to be extended to 2014.

 - There are some FIXME comments in the lib.dispersion package.

 - In some places, comment lines require empty lines before them (in
 target_functions.relax_disp and lib.dispersion).

 - Not very important, but the target function calc_ns_mmq_3site_chi2()
 can have the Once off parameter conversions shifted into the
 lib.dispersion module to simplify this.

 - The newline spacing between target function methods needs some fixes.


 I'll keep looking.  I'm guessing you will not be tackling the numeric
 models to speed them up to match 'NS CPMG 2-site expanded' model via
 the ultimate solution of brute-force expansion
 (http://www.mail-archive.com/relax-users@gna.org/msg01641.html) any
 time soon.  This will have a similar effect as the ultimate speed up
 at http://www.mail-archive.com/relax-devel%40gna.org/msg05691.html
 which you have so successfully achieved in this branch.  Can you
 remember if there were any other changes required?  I will create a
 new timings file just before tagging the relax release.

 Cheers,

 Edward

 On 27 June 2014 16:53, Troels Emtekær Linnet tlin...@nmr-relax.com wrote:
 This sounds good.

 What is needed to be done, to merge disp_spin_speed in trunk now?

 Best
 Troels

 2014-06-27 15:53 GMT+02:00 Edward d'Auvergne edw...@nmr-relax.com:
 Hmmm:

 $ grep -c out=\|einsum lib/dispersion/*
 lib/dispersion/b14.py:0
 lib/dispersion/cr72.py:2
 lib/dispersion/dpl94.py:0
 lib/dispersion/__init__.py:0
 lib/dispersion/it99.py:0
 lib/dispersion/lm63_3site.py:0
 lib/dispersion/lm63.py:0
 lib/dispersion/m61b.py:0
 lib/dispersion/m61.py:0
 lib/dispersion/matrix_exponential.py:5
 lib/dispersion/matrix_power.py:0
 lib/dispersion/mmq_cr72.py:0
 lib/dispersion/mp05.py:0
 lib/dispersion/ns_cpmg_2site_3d.py:6
 lib/dispersion/ns_cpmg_2site_expanded.py:0
 lib/dispersion/ns_cpmg_2site_star.py:3
 lib/dispersion/ns_matrices.py:0
 lib/dispersion/ns_mmq_2site.py:12
 lib/dispersion/ns_mmq_3site.py:12
 lib/dispersion/ns_r1rho_2site.py:3
 lib/dispersion/ns_r1rho_3site.py:3
 lib/dispersion/tap03.py:0
 lib/dispersion/tp02.py:0
 lib/dispersion/tsmfk01.py:0
 lib/dispersion/two_point.py:0


 What do you think of the idea of making this a hard dependency:

 
 Index: dep_check.py
 ===
 --- dep_check.py(revision 24343)
 +++ dep_check.py(working copy)
 @@ -37,6 +37,9 @@
  # numpy.
  try:
  import numpy
 +if float(numpy.version.version[:3])  1.6:
 +sys.stderr.write(Version %s of the 'numpy' dependency is not
 supported, numpy = 

Re: r24336 - /branches/disp_spin_speed/target_functions/relax_disp.py

2014-06-27 Thread Edward d'Auvergne
Here is one more point.  For the DPL94 model, the denominator is
kex**2 + spin_lock_fields**2.  This can only be zero when kex is
zero, and then there should be no exchange.  Therefore we can add a
kex == 0 check at the start to return R1_R2 and then delete the
mask_denom_zero logic.  This should slightly speed things up by
removing one 'if' statement.  Also, kex**2 is not a repetitive
operation.

Cheers,

Edward


On 27 June 2014 17:33, Edward d'Auvergne edw...@nmr-relax.com wrote:
 There are also a number of double spacing issues.  You can find these
 by running:

 $ ./devel_scripts/code_validator lib/dispersion/b14.py
 $ ./devel_scripts/code_validator lib/dispersion/cr72.py

 Etc.  Some things can be ignored, like the capitals in the function
 name and double spacing or trailing spacing for equations in
 docstrings.  This script will identify most formatting problems
 remaining.

 Cheers,

 Edward



 On 27 June 2014 17:28, Edward d'Auvergne edw...@nmr-relax.com wrote:
 Also the documentation in the get_back_calc() method of the target
 function needs a little polish - it is not a float that is returned.
 So, the running list:

 - Some modules have = operators outside of functions that need
 spaces around them.

 - Trailing whitespace, most of it is in the trunk, but there are some
 new ones.  Just run:  grep  $ lib/dispersion/* | grep -v  

 - There are some empty lines straight after a 'for' loop in many places.

 - Your copyright in the tsmfk01.py file needs to be extended to 2014.

 - There are some FIXME comments in the lib.dispersion package.

 - In some places, comment lines require empty lines before them (in
 target_functions.relax_disp and lib.dispersion).

 - Not very important, but the target function calc_ns_mmq_3site_chi2()
 can have the Once off parameter conversions shifted into the
 lib.dispersion module to simplify this.

 - The newline spacing between target function methods needs some fixes.

 - The 'chi2_sum' initialisation in func_ns_mmq_2site() should go.

 - The get_back_calc() method of the target function needs a little
 polish - it is not a float that is returned.

 Cheers,

 Edward



 On 27 June 2014 17:26, Edward d'Auvergne edw...@nmr-relax.com wrote:
 To add to the list of trivialities to fix:

 - The 'chi2_sum' initialisation in func_ns_mmq_2site() should go.

 Cheers,

 Edward



 On 27 June 2014 17:23, Edward d'Auvergne edw...@nmr-relax.com wrote:
 Let me see.  You've covered most of the running list, there's just one
 or two things left.  I'll add a few more trivial things as well.

 - Some modules have = operators outside of functions that need
 spaces around them.

 - Trailing whitespace, most of it is in the trunk, but there are some
 new ones.  Just run:  grep  $ lib/dispersion/* | grep -v  

 - There are some empty lines straight after a 'for' loop in many places.

 - Your copyright in the tsmfk01.py file needs to be extended to 2014.

 - There are some FIXME comments in the lib.dispersion package.

 - In some places, comment lines require empty lines before them (in
 target_functions.relax_disp and lib.dispersion).

 - Not very important, but the target function calc_ns_mmq_3site_chi2()
 can have the Once off parameter conversions shifted into the
 lib.dispersion module to simplify this.

 - The newline spacing between target function methods needs some fixes.


 I'll keep looking.  I'm guessing you will not be tackling the numeric
 models to speed them up to match 'NS CPMG 2-site expanded' model via
 the ultimate solution of brute-force expansion
 (http://www.mail-archive.com/relax-users@gna.org/msg01641.html) any
 time soon.  This will have a similar effect as the ultimate speed up
 at http://www.mail-archive.com/relax-devel%40gna.org/msg05691.html
 which you have so successfully achieved in this branch.  Can you
 remember if there were any other changes required?  I will create a
 new timings file just before tagging the relax release.

 Cheers,

 Edward

 On 27 June 2014 16:53, Troels Emtekær Linnet tlin...@nmr-relax.com wrote:
 This sounds good.

 What is needed to be done, to merge disp_spin_speed in trunk now?

 Best
 Troels

 2014-06-27 15:53 GMT+02:00 Edward d'Auvergne edw...@nmr-relax.com:
 Hmmm:

 $ grep -c out=\|einsum lib/dispersion/*
 lib/dispersion/b14.py:0
 lib/dispersion/cr72.py:2
 lib/dispersion/dpl94.py:0
 lib/dispersion/__init__.py:0
 lib/dispersion/it99.py:0
 lib/dispersion/lm63_3site.py:0
 lib/dispersion/lm63.py:0
 lib/dispersion/m61b.py:0
 lib/dispersion/m61.py:0
 lib/dispersion/matrix_exponential.py:5
 lib/dispersion/matrix_power.py:0
 lib/dispersion/mmq_cr72.py:0
 lib/dispersion/mp05.py:0
 lib/dispersion/ns_cpmg_2site_3d.py:6
 lib/dispersion/ns_cpmg_2site_expanded.py:0
 lib/dispersion/ns_cpmg_2site_star.py:3
 lib/dispersion/ns_matrices.py:0
 lib/dispersion/ns_mmq_2site.py:12
 lib/dispersion/ns_mmq_3site.py:12
 lib/dispersion/ns_r1rho_2site.py:3
 lib/dispersion/ns_r1rho_3site.py:3
 lib/dispersion/tap03.py:0
 

Re: r24323 - in /branches/disp_spin_speed: dep_check.py target_functions/relax_disp.py

2014-06-27 Thread Edward d'Auvergne
Hi Troels,

Because of the change
http://www.mail-archive.com/relax-commits@gna.org/msg21976.html, the
changes of r24323 are now redundant so you can revert them.

Cheers,

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=24323view=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=24323r1=24322r2=24323view=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=24323r1=24322r2=24323view=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 

Re: r24339 - /branches/disp_spin_speed/test_suite/system_tests/relax_disp.py

2014-06-27 Thread Edward d'Auvergne
Hi Troels,

Again because of the strict numpy = 1.6 requirement now found in
relax, this change is also not required and can be reverted.

Cheers,

Edward



On 27 June 2014 12:58,  tlin...@nmr-relax.com wrote:
 Author: tlinnet
 Date: Fri Jun 27 12:58:29 2014
 New Revision: 24339

 URL: http://svn.gna.org/viewcvs/relax?rev=24339view=rev
 Log:
 Added a list of systemtests to skip, if numpy out argument is not available.

 Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion 
 models for Clustered analysis.

 Modified:
 branches/disp_spin_speed/test_suite/system_tests/relax_disp.py

 Modified: branches/disp_spin_speed/test_suite/system_tests/relax_disp.py
 URL: 
 http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/test_suite/system_tests/relax_disp.py?rev=24339r1=24338r2=24339view=diff
 ==
 --- branches/disp_spin_speed/test_suite/system_tests/relax_disp.py  
 (original)
 +++ branches/disp_spin_speed/test_suite/system_tests/relax_disp.py  Fri 
 Jun 27 12:58:29 2014
 @@ -23,7 +23,7 @@

  # Python module imports.
  from os import F_OK, access, getcwd, path, sep
 -from numpy import array, median
 +from numpy import array, median, version
  import re, math
  from tempfile import mkdtemp

 @@ -68,6 +68,73 @@
  if methodName in to_skip:
  status.skipped_tests.append([methodName, 'Relax 
 curve-fitting C module', self._skip_type])

 +# Missing numpy out argument in numpy.multiply, numpy.add, 
 numpy.subtract.
 +if not dep_check.numpy_out:
 +# The list of tests to skip.
 +to_skip = [
 +test_baldwin_synthetic,
 +test_baldwin_synthetic_full,
 +test_bug_21460_disp_cluster_fail,
 +test_bug_22146_unpacking_r2a_r2b_cluster_B14,
 +test_bug_22146_unpacking_r2a_r2b_cluster_CR72,
 +test_bug_22146_unpacking_r2a_r2b_cluster_NS_3D,
 +test_bug_22146_unpacking_r2a_r2b_cluster_NS_STAR,
 +test_cpmg_synthetic_b14_to_ns3d_cluster,
 +test_cpmg_synthetic_b14_to_ns_star_cluster,
 +test_cpmg_synthetic_dx_map_points,
 +test_cpmg_synthetic_ns3d_to_b14,
 +test_cpmg_synthetic_ns3d_to_cr72,
 +test_cpmg_synthetic_ns3d_to_cr72_noise_cluster,
 +test_dpl94_data_to_dpl94,
 +test_hansen_cpmg_data_auto_analysis,
 +test_hansen_cpmg_data_auto_analysis_numeric,
 +test_hansen_cpmg_data_auto_analysis_r2eff,
 +test_hansen_cpmg_data_missing_auto_analysis,
 +test_hansen_cpmg_data_to_cr72,
 +test_hansen_cpmg_data_to_cr72_full,
 +test_hansen_cpmg_data_to_it99,
 +test_hansen_cpmg_data_to_lm63,
 +test_hansen_cpmg_data_to_ns_cpmg_2site_3D,
 +test_hansen_cpmg_data_to_ns_cpmg_2site_3D_full,
 +test_hansen_cpmg_data_to_ns_cpmg_2site_expanded,
 +test_hansen_cpmg_data_to_ns_cpmg_2site_star,
 +test_hansen_cpmg_data_to_ns_cpmg_2site_star_full,
 +test_korzhnev_2005_15n_dq_data,
 +test_korzhnev_2005_15n_mq_data,
 +test_korzhnev_2005_15n_sq_data,
 +test_korzhnev_2005_15n_zq_data,
 +test_korzhnev_2005_1h_mq_data,
 +test_korzhnev_2005_1h_sq_data,
 +test_korzhnev_2005_all_data,
 +test_korzhnev_2005_all_data_disp_speed_bug,
 +test_kteilum_fmpoulsen_makke_cpmg_data_048m_guhcl_to_cr72,
 +
 test_kteilum_fmpoulsen_makke_cpmg_data_048m_guhcl_to_cr72_full,
 +
 test_kteilum_fmpoulsen_makke_cpmg_data_048m_guhcl_to_tsmfk01,
 +
 test_kteilum_fmpoulsen_makke_cpmg_data_101m_guhcl_to_tsmfk01,
 +test_lm63_3site_synthetic,
 +test_m61_data_to_m61,
 +test_m61_exp_data_to_m61,
 +test_ns_mmq_3site,
 +test_ns_mmq_3site_linear,
 +test_ns_r1rho_3site,
 +test_ns_r1rho_3site_linear,
 +test_r1rho_kjaergaard_auto,
 +test_r1rho_kjaergaard_man,
 +test_r1rho_kjaergaard_missing_r1,
 +test_r20_from_min_r2eff_cpmg,
 +test_sod1wt_t25_to_cr72,
 +test_sprangers_data_to_mmq_cr72,
 +test_sprangers_data_to_ns_mmq_2site,
 +test_tp02_data_to_mp05,
 +test_tp02_data_to_ns_r1rho_2site,
 +test_tp02_data_to_ns_r1rho_2site_cluster,
 +test_tp02_data_to_tap03,
 +test_tp02_data_to_tp02
 +]
 +
 +# Store in the status object.
 +if methodName in to_skip:
 +

Re: r24336 - /branches/disp_spin_speed/target_functions/relax_disp.py

2014-06-27 Thread Edward d'Auvergne
This change is also redundant thanks to
http://www.mail-archive.com/relax-commits@gna.org/msg21976.html.

Regards,

Edward



On 27 June 2014 12:58,  tlin...@nmr-relax.com wrote:
 Author: tlinnet
 Date: Fri Jun 27 12:58:22 2014
 New Revision: 24336

 URL: http://svn.gna.org/viewcvs/relax?rev=24336view=rev
 Log:
 Added to target function that experiment_type_setup() should not be 
 initiated, if numpy.einsum is missing.

 Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion 
 models for Clustered analysis.

 Modified:
 branches/disp_spin_speed/target_functions/relax_disp.py

 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=24336r1=24335r2=24336view=diff
 ==
 --- branches/disp_spin_speed/target_functions/relax_disp.py (original)
 +++ branches/disp_spin_speed/target_functions/relax_disp.py Fri Jun 27 
 12:58:22 2014
 @@ -365,8 +365,10 @@
  # This is to make sure, that the chi2 values is not affected by 
 missing values.
  self.mask_replace_blank = masked_equal(self.missing, 1.0)

 -# Check the experiment types, simplifying the data structures as 
 needed.
 -self.experiment_type_setup()
 +# Check if eisum is available for numerical models.
 +if dep_check.einsum_module:
 +# Check the experiment types, simplifying the data structures as 
 needed.
 +self.experiment_type_setup()

  # Scaling initialisation.
  self.scaling_flag = False


 ___
 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


Re: r24337 - /branches/disp_spin_speed/dep_check.py

2014-06-27 Thread Edward d'Auvergne
Hi Troels,

This commit is also no longer required because of
http://www.mail-archive.com/relax-commits@gna.org/msg21976.html.  Feel
free to revert.

Regards,

Edward



On 27 June 2014 12:58,  tlin...@nmr-relax.com wrote:
 Author: tlinnet
 Date: Fri Jun 27 12:58:24 2014
 New Revision: 24337

 URL: http://svn.gna.org/viewcvs/relax?rev=24337view=rev
 Log:
 Added a numpy out argument check to dep_check.py.

 This is for checking the out argument of:
 numpy.multiply
 numpy.add
 numpy.subtract

 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

 Modified: branches/disp_spin_speed/dep_check.py
 URL: 
 http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/dep_check.py?rev=24337r1=24336r2=24337view=diff
 ==
 --- branches/disp_spin_speed/dep_check.py   (original)
 +++ branches/disp_spin_speed/dep_check.py   Fri Jun 27 12:58:24 2014
 @@ -64,6 +64,16 @@
  einsum_module = True
  except ImportError:
  einsum_module = False
 +
 +# numpy out argument to numpy.multiply or numpy.add.
 +try:
 +a = numpy.array([1])
 +numpy.multiply(1, 1, a)
 +numpy.add(1, 1, a)
 +numpy.subtract(1, 1, a)
 +numpy_out = True
 +except ValueError:
 +numpy_out = False

  # Bmrblib python package check.
  try:


 ___
 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