I may try it,
in mf.py are two crucial things:
run of the process
data.jw_dipY[z] = data.calc_dipY_jw(data, params, z)
selection of the process
data.calc_dipY_jw = calc_dipY_S2_jw
so you want to exclude the second one and let there only one general
selection of the model. And the run will be done somehow like:
for (i in xrange data.xy_vect_num)
data.ci=data.ci_dipY[z]
data.jw_dipY[z] = data.calc_jw(data, params)
is it your vision? But it means, that we rewrite one variable by the
another. I do not know if it is correct to do it like this.
By the way, I do not want anything to hide, but is it really OK we are
discussing these things here? I feel a bit like a spammer of this mailing
list. (But if you say yes, I will forget about my feelings.)
Regards
Pavel
On Thu, 22 Jan 2009, Edward d'Auvergne wrote:
Date: Thu, 22 Jan 2009 14:46:16 +0100
From: Edward d'Auvergne <edward@xxxxxxxxxxxxx>
To: Pavel Kaderavek <kada@xxxxxxxxxxxxx>
Cc: relax-devel@xxxxxxx
Subject: Re: cst branch development
On Thu, Jan 22, 2009 at 2:34 PM, Pavel Kaderavek <kada@xxxxxxxxxxxxx> wrote:
If I understood, your note is also valid for weights_csa1 and weights_csa2
(weights_csaC.py is different because it is connected to the crosscorelation
term and in the weights_dipY is necessary to add dimension for each variable
to include the possibility to work with an arbitrary number of the
interacting spins ... but I think it is the same issue as
in dipY_jw_mf.py), isn't it?
Yes, I've had a look at that other code now and I think it applies to
all. The difficulty is with the i index in data.ci_dipY[i]. An
elegent solution will need to be found for this one, so that the code
isn't duplicated. Maybe there could be one 'data' object per index
here. I think this would be the simplest and fastest (number
crunching wise) solution. Alternatively the index i could be optional
- i.e. a keyword argument in the form of:
def calc_dipY_S2_jw(data, params, i=None):
and if 'i' is not None, then the index used, otherwise the normal code
used. This, however, introduces an unnecessary if-statement at the
lowest level of number crunching code which will cause a slowdown.
Therefore I think we should avoid this. Do you think it would be
feasible to create an array of these data objects, one for each
neighbouring dipole, and then loop over them and operate one by one?
This will allow all code in maths_fns/, except for 'mf.py' to remain
unchanged (with the benefit of being easier, quicker, and more elegent
to implement).
Regards,
Edward