Author: tlinnet Date: Wed Jun 18 19:25:29 2014 New Revision: 24131 URL: http://svn.gna.org/viewcvs/relax?rev=24131&view=rev Log: Removal of junk for profiling script CR72 full. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. Modified: branches/disp_spin_speed/test_suite/shared_data/dispersion/profiling/profiling_cr72_full.py Modified: branches/disp_spin_speed/test_suite/shared_data/dispersion/profiling/profiling_cr72_full.py URL: http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/test_suite/shared_data/dispersion/profiling/profiling_cr72_full.py?rev=24131&r1=24130&r2=24131&view=diff ============================================================================== --- branches/disp_spin_speed/test_suite/shared_data/dispersion/profiling/profiling_cr72_full.py (original) +++ branches/disp_spin_speed/test_suite/shared_data/dispersion/profiling/profiling_cr72_full.py Wed Jun 18 19:25:29 2014 @@ -183,24 +183,6 @@ @return: The numpy array structures of the R2eff/R1rho values, errors, missing data, and corresponding Larmor frequencies. For each structure, the first dimension corresponds to the experiment types, the second the spins of a spin block, the third to the spectrometer field strength, and the fourth is the dispersion points. For the Larmor frequency structure, the fourth dimension is omitted. For R1rho-type data, an offset dimension is inserted between the spectrometer field strength and the dispersion points. @rtype: lists of numpy float arrays, lists of numpy float arrays, lists of numpy float arrays, numpy rank-2 int array """ - - # Unpack the parameter values. - # Initialise the post spin parameter indices. - end_index = [] - # The spin and frequency dependent R2 parameters. - end_index.append(len(self.exp_type) * self.num_spins * len(self.fields)) - if self.model in [MODEL_B14_FULL, MODEL_CR72_FULL, MODEL_NS_CPMG_2SITE_3D_FULL, MODEL_NS_CPMG_2SITE_STAR_FULL]: - end_index.append(2 * len(self.exp_type) * self.num_spins * len(self.fields)) - # The spin and dependent parameters (phi_ex, dw, padw2). - end_index.append(end_index[-1] + self.num_spins) - - # Unpack the parameter values. - R20 = self.params[:end_index[1]].reshape(self.num_spins*2, len(self.fields)) - R20A = R20[::2].flatten() - R20B = R20[1::2].flatten() - dw = self.params[end_index[1]:end_index[2]] - pA = self.params[end_index[2]] - kex = self.params[end_index[2]+1] # Initialise the data structures for the target function. exp_types = [] @@ -272,13 +254,6 @@ # Get the cpmg frq. cpmg_frqs[ei][mi][oi] = self.points[mi] - # Calculate how the value should be, so chi2 gets zero. - # The R20 index. - r20_index = mi + si*len(self.fields) - # Convert dw from ppm to rad/s. - dw_frq = dw[si] * frqs[ei][si][mi] - r20a=R20A[r20_index] - r20b=R20B[r20_index] back_calc = array([0.0]*len(cpmg_frqs[ei][mi][oi])) for oi in range(len(self.offset)): @@ -476,39 +451,4 @@ # Execute main function. if __name__ == "__main__": - main() - -def test_reshape(): - C1 = Profile(num_spins=1, model=MODEL_CR72_FULL, r2a=5.0, r2b=10.0, dw=3.0, pA=0.9, kex=1000.0, spins_params=['r2a', 'r2b', 'dw', 'pA', 'kex']) - end_index = C1.model.end_index - #print("end_index:", end_index) - num_spins = C1.model.num_spins - #print("num_spins:", num_spins) - num_frq = C1.model.num_frq - #print("num_frq:", num_frq) - params = C1.params - #print("params", params) - - R20 = params[:end_index[1]].reshape(num_spins*2, num_frq) - R20A = R20[::2].flatten() - R20B = R20[1::2].flatten() - dw = params[end_index[1]:end_index[2]] - pA = params[end_index[2]] - kex = params[end_index[2]+1] - print("R20A", R20A, len(R20A)) - print("R20B", R20B, len(R20B)) - print("dw", dw, len(dw)) - print("dw", pA) - print("kex", kex) - - for si in range(num_spins): - for mi in range(num_frq): - r20_index = mi + si*num_frq - r20a=R20A[r20_index] - r20b=R20B[r20_index] - print("r20a", r20a, "r20b", r20b) - - model = C1.calc(params) - print(model) - -#test_reshape() + main()