Hi,

Firstly, for the change to the loop_time() function, you should
consider also sending in the experiment type, the offset, and the
dispersion point.  In all these cases, that information is available,
so it should be used.  For example if you are analysing a combination
of data types simultaneously (SQ CPMG, DQ CPMG, R1rho), you will not
have the same relaxation time for each.  For different spin-lock or
180 degree pulse offsets and even different dispersion points, the
time may also be different.  You may find that this solves the other
problems later on.

As for the check_exp_type_fixed_time(), this does appear to be the
source of the second system test failure.  I would, however, suggest a
different approach.  First loop over the experiment types,
spectrometer frequencies, offsets, and dispersion points.  Then,
inside this one loop_*() function, call the loop_time() with these
values as arguments and count the number of time points for that
combination of four metadata values.  Even better would be to modify
the count_relax_times() function to accept these 4 metadata points and
to count the time points for each combination, raising the RelaxError
when the count of one set is greater than 1.  Alternatively, the
get_times() function in that specific_analyses.relax_disp.checks
module could be completely overhauled.  Actually, that is probably the
cause of all these headaches.  So maybe you should kill it and replace
it with a loop_*() loop and a count_relax_times() call all over that
module.  What do you think?

Cheers,

Edward



On 24 February 2014 18:40, Troels Emtekær Linnet <tlin...@nmr-relax.com> wrote:
> Hi Edward.
>
> ./relax -s 
> Relax_disp.test_bug_21665_cpmg_two_fields_two_delaytimes_fail_relax_disp
>
> is now passing the test until now.
>
> But I am unsure how to handle:
> ./relax -s Relax_disp.test_bug_21665_cpmg_two_fields_two_delaytimes_fail_calc
>
>   File 
> "/sbinlab2/tlinnet/software/NMR-relax/relax_trunk/specific_analyses/relax_disp/checks.py",
> line 112, in check_exp_type_fixed_time
>     raise RelaxError("The experiment '%s' is not of the fixed
> relaxation time period data type." % exp_type)
> RelaxError: RelaxError: The experiment 'SQ CPMG' is not of the fixed
> relaxation time period data type.
>
> ------
> The code is:
>
> def check_exp_type_fixed_time():
>     """Check that only fixed time experiment types have been set up.
>
>     @raises RelaxError: If exponential curves are present.
>     """
>
>     # Get the times.
>     times = get_times()
>
>     # Loop over all experiment types.
>     for exp_type in times:
>         if len(times[exp_type]) > 1:
>             raise RelaxError("The experiment '%s' is not of the fixed
> relaxation time period data type." % exp_type)
>
> And return
> {'SQ CPMG': [0.040000000000000001, 0.059999999999999998]}
>
> Should I modify the code to loop over all spectra IDs, and count the
> number of times insted for each spectrum?
>
>
> ---------- Forwarded message ----------
> From:  <tlin...@nmr-relax.com>
> Date: 2014-02-24 18:28 GMT+01:00
> Subject: r22294 - in /trunk/specific_analyses/relax_disp: api.py disp_data.py
> To: relax-comm...@gna.org
>
>
> Author: tlinnet
> Date: Mon Feb 24 18:28:11 2014
> New Revision: 22294
>
> URL: http://svn.gna.org/viewcvs/relax?rev=22294&view=rev
> Log:
> Replacing looping over time points from cdp.relax_time_list to
> loop_time(frq=frq).
>
> Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG
> analysis with two fields at two delay times.
>
> loop_time has been modified to accept spectrometer frequency as input
> to restrict the looping.
>
> Modified:
>     trunk/specific_analyses/relax_disp/api.py
>     trunk/specific_analyses/relax_disp/disp_data.py
>
> Modified: trunk/specific_analyses/relax_disp/api.py
> URL: 
> http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/api.py?rev=22294&r1=22293&r2=22294&view=diff
> ==============================================================================
> --- trunk/specific_analyses/relax_disp/api.py (original)
> +++ trunk/specific_analyses/relax_disp/api.py Mon Feb 24 18:28:11 2014
> @@ -149,7 +149,7 @@
>          values = []
>          errors = []
>          times = []
> -        for time in cdp.relax_time_list:
> +        for time in loop_time(frq=frq):
>              # The data.
>              values.append(average_intensity(spin=spin,
> exp_type=exp_type, frq=frq, offset=offset, point=point, time=time))
>              errors.append(average_intensity(spin=spin,
> exp_type=exp_type, frq=frq, offset=offset, point=point, time=time,
> error=True))
> @@ -378,7 +378,7 @@
>                  values = []
>                  errors = []
>                  times = []
> -                for time in cdp.relax_time_list:
> +                for time in loop_time(frq=frq):
>                      values.append(average_intensity(spin=spin,
> exp_type=exp_type, frq=frq, offset=offset, point=point, time=time,
> sim_index=sim_index))
>                      errors.append(average_intensity(spin=spin,
> exp_type=exp_type, frq=frq, offset=offset, point=point, time=time,
> error=True))
>                      times.append(time)
> @@ -1373,7 +1373,7 @@
>
>              # Generate the data structure to return.
>              errors = []
> -            for time in cdp.relax_time_list:
> +            for time in loop_time(frq=frq):
>                  errors.append(average_intensity(spin=spin,
> exp_type=exp_type, frq=frq, offset=offset, point=point, time=time,
> error=True))
>
>          # All other models.
> @@ -1597,7 +1597,7 @@
>
>              # Loop over each time point.
>              ti = 0
> -            for time in loop_time():
> +            for time in loop_time(frq=frq):
>                  # Get the intensity keys.
>                  int_keys = find_intensity_keys(exp_type=exp_type,
> frq=frq, point=point, time=time)
>
>
> Modified: trunk/specific_analyses/relax_disp/disp_data.py
> URL: 
> http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/disp_data.py?rev=22294&r1=22293&r2=22294&view=diff
> ==============================================================================
> --- trunk/specific_analyses/relax_disp/disp_data.py (original)
> +++ trunk/specific_analyses/relax_disp/disp_data.py Mon Feb 24 18:28:11 2014
> @@ -1930,7 +1930,7 @@
>                      set_labels.append("Spin %s" % id)
>
>                  # Loop over the relaxation time periods.
> -                for time in cdp.relax_time_list:
> +                for time in loop_time(frq=frq):
>                      # The key.
>                      keys = find_intensity_keys(exp_type=exp_type,
> frq=frq, point=point, time=time)
>
>
>
> _______________________________________________
> 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

Reply via email to