mailRe: Regarding systemtest: ./relax -s Relax_disp.test_bug_21344_sparse_time_spinlock_acquired_r1rho_fail_relax_disp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on February 27, 2014 - 12:09:
Hi,

This looks like another rather stupid typo/mistake :)  I added a print
statement for the int_keys variable and ran the test.  There should
only be one key for a given {exp_type, frq, offset, point, time}
metadata set, but the printout shows this not to be the case.  If you
carefully look at the find_intensity_keys() call, you will see that
one of these 5 bits of information are not sent in as an argument ;)

Regards,

Edward




On 27 February 2014 11:38, Troels Emtekær Linnet <tlinnet@xxxxxxxxxxxxx> 
wrote:
Hi Edward.

When I run:
./relax -s 
Relax_disp.test_bug_21344_sparse_time_spinlock_acquired_r1rho_fail_relax_disp

I get:
-------------------
Parameter values: [2.4392597217423719, 149801.17120634759]
Function value:   252.36349493927844
Iterations:       135
Function calls:   281
Gradient calls:   0
Hessian calls:    0
Warning:          None


relax> eliminate(function=None, args=None)

relax> monte_carlo.setup(number=5)

relax> monte_carlo.create_data(method='back_calc')
Traceback (most recent call last):
  File 
"/sbinlab2/tlinnet/software/NMR-relax/relax_trunk/test_suite/system_tests/relax_disp.py",
line 284, in 
test_bug_21344_sparse_time_spinlock_acquired_r1rho_fail_relax_disp
    relax_disp.Relax_disp(pipe_name='base pipe',
pipe_bundle='relax_disp', results_dir=self.tmpdir, models=['R2eff'],
grid_inc=3, mc_sim_num=5, modsel='AIC', pre_run_dir=None,
insignificance=1.0, numeric_only=False, mc_sim_all_models=False,
eliminate=True)
  File 
"/sbinlab2/tlinnet/software/NMR-relax/relax_trunk/auto_analyses/relax_disp.py",
line 118, in __init__
    self.run()
  File 
"/sbinlab2/tlinnet/software/NMR-relax/relax_trunk/auto_analyses/relax_disp.py",
line 471, in run
    self.optimise(model=model)
  File 
"/sbinlab2/tlinnet/software/NMR-relax/relax_trunk/auto_analyses/relax_disp.py",
line 379, in optimise
    self.interpreter.monte_carlo.create_data()
  File 
"/sbinlab2/tlinnet/software/NMR-relax/relax_trunk/prompt/uf_objects.py",
line 221, in __call__
    self._backend(*new_args, **uf_kargs)
  File 
"/sbinlab2/tlinnet/software/NMR-relax/relax_trunk/pipe_control/monte_carlo.py",
line 113, in create_data
    pack_sim_data(data_index, random)
  File 
"/sbinlab2/tlinnet/software/NMR-relax/relax_trunk/specific_analyses/relax_disp/api.py",
line 1609, in sim_pack_data
    raise RelaxError("Monte Carlo simulation data for the key '%s'
already exists." % int_key)
RelaxError: RelaxError: Monte Carlo simulation data for the key
'1_0_46_0' already exists.

---------------------

I have looked into:
specific_analyses/relax_disp/api.py

There it is:
----------------------------------------------
    def sim_pack_data(self, data_id, sim_data):
        """Pack the Monte Carlo simulation data.

        @param data_id:     The tuple of the spin container and the
exponential curve identifying key, as yielded by the base_data_loop()
generator method.
        @type data_id:      SpinContainer instance and float
        @param sim_data:    The Monte Carlo simulation data.
        @type sim_data:     list of float
        """

        # The R2eff model (with peak intensity base data).
        if cdp.model_type == 'R2eff':
            # Unpack the data.
            spin, exp_type, frq, offset, point = data_id

            # Initialise the data structure if needed.
            if not hasattr(spin, 'intensity_sim'):
                spin.intensity_sim = {}

            # Loop over each time point.
            ti = 0
            for time in loop_time(exp_type=exp_type, frq=frq,
offset=offset, point=point):
                # Get the intensity keys.
                int_keys = find_intensity_keys(exp_type=exp_type,
frq=frq, point=point, time=time)

                # Loop over the intensity keys.
                for int_key in int_keys:
                    # Test if the simulation data point already exists.
                    if int_key in spin.intensity_sim:
                        raise RelaxError("Monte Carlo simulation data
for the key '%s' already exists." % int_key)

                    # Initialise the list.
                    spin.intensity_sim[int_key] = []

                    # Loop over the simulations, appending the
corresponding data.
                    for i in range(cdp.sim_number):
                        spin.intensity_sim[int_key].append(sim_data[i][ti])

                # Increment the time index.
                ti += 1
---------------------

For me, this looks okay.

Do you have an Idea why this is not working?

Best
Troels



Related Messages


Powered by MHonArc, Updated Thu Feb 27 12:40:07 2014