Hi, For the eta value calculated in the consistency_tests code, I don't know if it is the eta_z or eta_xy value. In the original paper by Fushman & Cowburn (1998, JACS, 120: 7109-7110) as well as in the consistency tests paper (Fushman et al., 1998, JACS, 120: 10947-10952), eta is only described as the cross-correlation rate between 15N CSA and 15N-1H dipolar interaction. Cheers Séb :) Sébastien Morin wrote: Hi Ed, Here is the first part of the split patch as you asked for. This one if for docstrings and comments in files : /branches/consistency_tests_1.2/prompt/consistency_tests.py /branches/consistency_tests_1.2/maths_fns/consistency_tests.py /branches/consistency_tests_1.2/test_suite/consistency_tests.py /branches/consistency_tests_1.2/sample_scripts/consistency_tests.py /branches/consistency_tests_1.2/specific_fns/consistency_tests.py Should the commit log be something like what follows ? "This patch (patch_consistency_tests__l1.2_r3340__docstrings_and_comments) corrects docstrings and comments errors which were remnants of the jw_mapping code from which the consistency_tests code was inspired. Also, this patch adds docstrings and comments to the code for making it easier for users to understand what the code actually does." Cheers Séb :) Selon Edward d'Auvergne <edward.dauvergne@xxxxxxxxx>, 13.07.2007:Hi, This patch will need a few small changes before being committed. The first is the docstring of the set_frq function of 'prompt/consistency_tests.py'. In the user function docstrings, the list of keyword arguments need to be separated by newlines. This is a relax convention as can be seen in the equivalent function of 'prompt/jw_mapping.py'. One problem with this is that the docstring parser used to generate the relax manual might fail in this keyword argument section. An additional formatting convention is the use of two blank lines in front of the section titles in the docstring. This allows easier reading of the much longer docstrings. This isn't important but for the eta value, do you know if this is eta_z or eta_xy? A more important point is that the patch should be split up so that there are different patches for different types of fixes. For example there are docstring and comment changes which could be grouped together into a single patch. Then there are modifications to the test suite for the consistency tests which should be separate. In 'specific_fns/consistency_tests.py' there is a change to the default value of the CSA and a number of other fundamental changes. These should all be separate. It would be a good exercise in preparation for having full commit access to the relax repository to split this patch into a number of small patches. No patch or commit to the relax repository should contain two unrelated changes, even if these are tiny one line changes. For each commit to the repository, a detailed description of the changes should be placed into the commit log (which is automatically emailed to the relax-commits mailing list but remains in the repository and is important for repository maintenance). You can see these messages by typing something like 'svn log -v --limit=100 | less' within your checked out copy. So if you could prepare a similar commit message for the patches, it would be much appreciated. Cheers, Edward P.S. A small fix is needed in 'prompt/consistency_tests.py' at line 4. And as for the self.__relax_help_ string, this isn't actually a docstring but is used by the relax prompt help system. These __init__() functions don't have docstrings, and I don't remember if this was deliberate because of the special help system or not. On 7/13/07, Sébastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:Hi, Here is a patch for the consistency tests branch of the 1.2 line (r3340). Some comments and docstrings were added as well as errors corrected fromtheadaptation of this code from the jw_mapping code... The following file are modified : prompt/consistency_tests.py maths_fns/consistency_tests.py test_suite/consistency_tests.py sample_scripts/consistency_tests.py specific_fns/consistency_tests.py Formating should be OK in these files except maybe for one thing for whichI'mnot sure. It's between lines 29 and 33 of prompt/consistency_tests.py whereIdon't know if the docstring should be below the line 'def __init__(self, relax):' or below the line 'self.__relax_help__ = \' as it is now... Notethatthis is seen in many other code files... Cheers Sébastien :) Selon Edward d'Auvergne <edward.dauvergne@xxxxxxxxx>, 09.07.2007:Hi, Both patches have been applied to the repository. The patch 'patch_sample_scripts_consistency_tests' was committed at r3331. Change from 5000 to 500 simulations is reasonable. The large number of simulations was because the calculation was so quick, but 500 should be more than sufficient. The addition of Grace plotting functions to the Reduced Spectral Density Mapping sample script is very useful and I will probably port this commit very soon to the 1.3 line. The patch 'patch_sample_scripts_jw_mapping' was applied (at r3332) directly to the 1.2 line rather than the 'consistency_tests_1.2' branch. Cheers, Edward On 7/9/07, Sébastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:Hi again ! I added lines for plotting using grace in the sample script. Since thissamplescript was inspired by the jw_mapping sample script, I also submit apatchforthis file (adding lines for plotting, changing the number of MonteCarlosimulations from 5000 to 500 and changing the sequence file fromnoe.500.out tonoe.600.out for more consistency)... Ciao ! Sébastien :) Selon Sébastien Morin <sebastien.morin.1@xxxxxxxxx>, 09.07.2007:Hi Ed Tell me if this works better. I'm now using the mail server directlyfromtheinternet GUI... (not with Thuderbird). If this does not work neither, maybe we could try with the task... Ciao ! Sébastien Selon Edward d'Auvergne <edward.dauvergne@xxxxxxxxx>, 09.07.2007:I've tried cutting an pasting the patch but I get the following: edau@klymene:/media/usbdisk/relax/branches/consistency_tests_1.2> patch -p0 < patch patching file prompt/consistency_tests.py Hunk #2 FAILED at 26. Hunk #3 FAILED at 40. Hunk #4 FAILED at 49. Hunk #5 FAILED at 74. 4 out of 5 hunks FAILED -- saving rejects to file prompt/consistency_tests.py.rej edau@klymene:/media/usbdisk/relax/branches/consistency_tests_1.2> I don't know why, but thunderbird is destroying the attachment.Thefailed 'hunks' are the wrapped lines. Maybe there is a way topreventthunderbird from doing this. Otherwise using another email client(orwebmail) may work. I could also create a task for this consistency test work and these could be attached to the task. It's best that, for the record, the files are located within the permanent relax infrastructure. Cheers, Edward On 7/9/07, Sebastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:Hi again ! Here is again the first patch for the file'prompt/consistency_tests.py'.I modified the header for the copyrights. Also, the former patches were not copied-pasted, but attachedusingThunderbird after their creation using a command like 'svn diff >patch'under Linux. When I send those kinds of files as attachment, Iusuallysee them as text in the e-mail, but also as an attachment thatcan besave. Tell me if it is okay and if it is still a problem, I'llputthemon my lab's website... Cheers Séb :) Edward d'Auvergne wrote:Hi, Just add some text such as 'Copyright (C) 2007 Sebastien Morin <sebastien.morin.1 at ulaval.ca>' underneath the alreadyexistentcopyright text. The can be changed later, for example I cangiveyoua ???@nmr-relax.com email address which is an alias for anyotheremail address (once voted in as a relax developer). Could youaddthis and then resend the patches? Ta. If they are attachedratherthan cut and paste that would be much easier for applying thepatches(as email wraps lines). Also, maybe responding to youroriginalpostswill allow the patches to be more easily tracked in the mailinglisthttps://mail.gna.org/public/relax-devel/. Cheers, Edward On 7/9/07, Sebastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:Hi ! I'm about to create the patches to merge the consistency testscodeintothe 1.2 branch. However, I have one question. How do I treat the copyrights ?Do Ileavethe original author from which I copied the code and thenmodifieditordo I had my name to the code headers..? Thanks ! Sébastien :) Edward d'Auvergne wrote:Oh, I've committed your patch athttp://maple.rsvs.ulaval.ca/mediawiki/index.php/Patch_consistency_tests_2007-06-26as revision r3324, applying it to the 1.2 branch. I'vecarefullychecked the code and none of the changes are detrimental orcouldaffect the stability of the stable 1.2 relax codebase. Notehoweverthat the code in the branch will not run as theconsistency_test.pyfiles are still identical copies of the jw_mapping.py files. Cheers, Edward On 7/9/07, Edward d'Auvergne <edward.dauvergne@xxxxxxxxx>wrote:Hi, I've now created two branches within the relax repositoryforyoutoplay with. The first is a copy of the 1.2 line and islocatedatsvn.gna.org/svn/relax/branches/consistency_tests_1.2/. Thesecondisa copy of the 1.3 line and is located at svn.gna.org/svn/relax/branches/consistency_tests_1.3/.I'veinitiallyused 'svn cp' to create the 5 consistency_tests.py files asdescribedinhttps://mail.gna.org/public/relax-devel/2007-07/msg00001.html(Message-id:<7f080ed10707090251ve1c4a8fl7f8618843e5c9459@xxxxxxxxxxxxxx>).Would you be able to create patches for these files (inthe1.2linefirst, no need to worry about the 1.3 line yet), and thenposttheindividual patches as text file attachments to the mailinglist?Thanks. I will then be able to commit these patchesindividually,checking them in fine detail. Things to note in creating the patches from the code athttp://maple.rsvs.ulaval.ca/mediawiki/index.php/Relax_developmentinclude the copyright preservation, a number of integers in 'maths_fns/consistency_tests.py' which should be floatingpointnumbers (just add '.0' to the end of the number), theadditionofGrace plots as an output in the'sample_scripts/consistency_tests.py'script to be able to create a picture similar to that onyourrelaxdevelopment site, maybe only allowing 'Tc' and 'tc' in the return_data_name() function and not 'TC', and 'degrees'insteadof'degree' in the return_units() function. One bug includes: setattr(self.relax.data.res[self.run][index],'csa',float(value[0])) setattr(self.relax.data.res[self.run][index],'r',float(value[1])) + setattr(self.relax.data.res[self.run][index], 'orientation', float(value[1])) + setattr(self.relax.data.res[self.run][index],'tc',float(value[1])) value[1] has been used twice. I have a feeling there isanotherbugsomewhere where an index has been repeated a few times whenitshouldbe different indices, but I can't find it at the moment.Theindividual patches should help. Finally, I have a feelingthatthereis unused code which can be deleted as it is a relic fromthecopyofthe J(w) mapping code and is not needed. For the 1.3 linecodeIwould recommend that identical functions are shifted intofilessuchas 'specific_fns/base_class.py', but for the 1.2 line codeIwouldprefer the duplication as this means that the currentstablecodebaseremains stable. Cheers, Edward On 6/26/07, Sebastien Morin <sebastien.morin.1@xxxxxxxxx>wrote:Hi, I started working on implementing the consistency testslastweekbeforethe last post was made and, hence, I worked on repositoryline1.2(revision 3303). I implemented the consistency tests as a new type of run('ct')similarto the one for Jw mapping. The calculations are made for J(0), F_eta and F_R2separatelyfor eachmagnetic field (one at a time). The output results fileissimilar tothe one for Jw mapping. The user then needs to plot themandlook forconsistency with its own criteria (calculationcorrelationcoefficients, mean ratios and standard deviations, etc). Please look at the followinr URL for a listing of themodifications toold files and also necessary new files.http://maple.rsvs.ulaval.ca/mediawiki/index.php/Relax_developmentThe file 'sample_scripts/consistency_tests.py' should beusefultounderstand how the new procedure works. Even if this was done on repository line 1.2, I think itisquite finesince nothing was deleted but only things added (maybetoomuch,as Ireproduced the Jw mapping approach, maybe too much as Iaddedlines inthe codes for grace, molmol, etc, maybe too much alsosincesomecode isduplicated from the Jw mapping code). The test-suitestillworksperfectly and, so, I think it could be fine to add theteststothe1.2line as well... However, if necessary, I could implementtheconsistencytesting procedure on line 1.3, following your comments asIamquite newto Python and maybe made things somehow not perfectly... Please tell me what you think about this. Cheers, Sébastien :) Edward d'Auvergne wrote:Hi, I have previously talked about data set consistency.Forexampleseethe post athttps://mail.gna.org/public/relax-users/2007-06/msg00001.htmlin which a few reasons for inconsistencies have beenexplained. Ihave, from experience, noticed that small changes inproteinconcentration can change the collected relaxation ratessignificantly- most likely because of packing interactions. Allsamplesshouldessentially be identical in all respects for therelaxationrates tobe compared. And the temperate should always be finetunedbetweenexperiments and spectrometers using methanol (andalwayscheckedlateron if there is a large time between collecting the sameexperiment).Therefore these tests would be quite useful. Dataconsistencyisessential for the model-free results to be correct (aswellasreducedspectral density mapping, SRLS, etc.) as this affectsboththeoptimisation and model selection and can result inartificialmotionsappearing. However I don't know how these test wouldcurrently fitwithin relax. Maybe a new type of analysis should becreatedforthis(see the pipe.create() user function in the 1.3 line ortherun.create() user function in the 1.2 line). Theseideasshould allgo into the 1.3 line (via a branch) as the 1.2 line isstableand nonew major features will be added to this code. Whataretheideas youhave been playing with? Cheers, Edward On 6/15/07, Sebastien Morin<sebastien.morin.1@xxxxxxxxx>wrote:Hi everyone During the last months, I was astonished to realizethatsomespinrelaxation data I had acquired at different fieldswerenotconsistentbetween each other. The way I realized that was byseeingdiscrepancybetween J(0) values calculated with those differentdatasets.I looked a little bit in the litterature and foundsomeinterestingconsistency tests in a paper by Fushman (Fushman etal.,JACS,1998,120:10947-10952). This paper present 2 consistency tests to comparedatasetsfromdifferent magnetic fields / samples / time / etc. I think it would be interesting to implement thosesimpletestsin relaxso the user can, before trying to fit their data, knowthequality ofthose... Regrettably, very few people look at theconsistencyoftheirdatasets before analysis... The underlying principle is the same as when lookingatconsistency forJ(0). Thus, I think that those two tests and a J(0)testshould beimplemented altogether... I'll try to work a bit on this. Mimicking the code forspectraldensityshould be a good starting point. Am I right ? Do you see any value in those tests ? Cheers Sébastien :) _______________________________________________ relax (http://nmr-relax.com) This is the relax-devel mailing list relax-devel@xxxxxxx 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-- ______________________________________ _______________________________________________ | | || Sebastien Morin || ||| Etudiant au PhD en biochimie ||| |||| Laboratoire de resonance magnetique nucleaire |||| ||||| Dr Stephane Gagne ||||| |||| CREFSIP (Universite Laval, Quebec, CANADA) |||| ||| 1-418-656-2131 #4530 ||| || || |_______________________________________________| ______________________________________-- ______________________________________ _______________________________________________ | | || Sebastien Morin || ||| Etudiant au PhD en biochimie ||| |||| Laboratoire de resonance magnetique nucleaire |||| ||||| Dr Stephane Gagne ||||| |||| CREFSIP (Universite Laval, Quebec, CANADA) |||| ||| 1-418-656-2131 #4530 ||| || || |_______________________________________________| ______________________________________-- ______________________________________ _______________________________________________ | | || Sebastien Morin || ||| Etudiant au PhD en biochimie ||| |||| Laboratoire de resonance magnetique nucleaire |||| ||||| Dr Stephane Gagne ||||| |||| CREFSIP (Universite Laval, Quebec, CANADA) |||| ||| 1-418-656-2131 #4530 ||| || || |_______________________________________________| ______________________________________ Index: prompt/consistency_tests.py===================================================================--- prompt/consistency_tests.py (revision 3324) +++ prompt/consistency_tests.py (working copy) @@ -1,6 +1,7 @@################################################################################## Copyright (C) 2004-2005 Edward d'Auvergne#+# Copyright (C) 2007 Sebastien Morin <sebastien.morin.1 atulaval.ca>### This file is part of the program relax.###@@ -25,11 +26,11 @@ import help -class Jw_mapping: +class Consistency_tests: def __init__(self, relax): # Help. self.__relax_help__ = \ - """Class containing functions specific to reducedspectraldensitymapping."""+ """Class containing functions specific to consistencytestsfordatasets from different fields."""# Add the generic help string. self.__relax_help__ = self.__relax_help__ + "\n" +help.relax_class_help@@ -39,7 +40,7 @@ def set_frq(self, run=None, frq=None): - """Function for selecting which relaxation data to useintheJ(w)mapping.+ """Function for selecting which relaxation data to useintheconsistency tests.Keyword Arguments ~~~~~~~~~~~~~~~~~ @@ -48,24 +49,23 @@ frq: The spectrometer frequency in Hz. - Description ~~~~~~~~~~~ - This function will select the relaxation data to use inthereduced spectral density mapping- corresponding to the given frequency. + This function will select the relaxation data to use intheconsistency tests+ corresponding to the given frequencies. Examples ~~~~~~~~ - relax> jw_mapping.set_frq('jw', 600.0 * 1e6) - relax> jw_mapping.set_frq(run='jw', frq=600.0 * 1e6) + relax> consistency_tests.set_frq('test', 600.0 * 1e6) + relax> consistency_tests.set_frq(run='test', frq=600.0 *1e6)""" # Function intro text. if self.__relax__.interpreter.intro: - text = sys.ps3 + "jw_mapping.set_frq(" + text = sys.ps3 + "consistency_tests.set_frq(" text = text + "run=" + `run` text = text + ", frq=" + `frq` + ")" print text @@ -74,9 +74,9 @@ if type(run) != str: raise RelaxStrError, ('run', run) - # The frq argument. + # The frq arguments. if type(frq) != float: raise RelaxStrError, ('frq', frq) # Execute the functional code. - self.__relax__.specific.jw_mapping.set_frq(run=run,frq=frq)+self.__relax__.specific.consistency_tests.set_frq(run=run,frq=frq)------------------------ Sébastien Morin Étudiant M.Sc. Biochimie Laboratoire S. Gagné 3252 Pav. Marchand (Université Laval) Tél : (418) 656-2131 #4530 Fax : (418) 656-7176 e-mail : sebastien.morin.1@xxxxxxxxx -- ______________________________________ _______________________________________________ | | || Sebastien Morin || ||| Etudiant au PhD en biochimie ||| |||| Laboratoire de resonance magnetique nucleaire |||| ||||| Dr Stephane Gagne ||||| |||| CREFSIP (Universite Laval, Quebec, CANADA) |||| ||| 1-418-656-2131 #4530 ||| || || |_______________________________________________| ______________________________________ |