i like this post (click again to cancel)
0
i dont like this post (click again to cancel) remove favorite mark from this question (click again to restore mark)

Hi As a newbie in the NMR world I hope you guys can help me out with a simple Q: I have 104 1D spectra I would like to transform into ascii_spec.txt via the commands: convbin2asc and txt:x;pdata,1 Do I have to do this 104 times or can this be done in one hit by?? Cheers Michael

asked Aug 19 '14 at 05:35

Michael's gravatar image

Michael
1


2 Answers:
i like this answer (click again to cancel)
0
i dont like this answer (click again to cancel)

Not too difficult to do... the following code snippet shows the sort of thing but you would need to change it for your file names and locations:

char myfname[30],mycmd[120];
int i;
for (i=0;i<104;i++)
{
    sprintf(myfname,"SPEC%d",i);
    DATASET(myfname,10,1,"f:/data/chemist/nmr","") 
    SETCURDATA
    EFP
    APK
    ABS
    XCMD("sendgui .all")
    sprintf(mycmd,"sendgui totxt f:/temp/%s.txt",myfname);
    XCMD(mycmd);    
}
QUIT

Note that this is designed for Topspin 3.x where the "User" is no longer valid. If using earlier versions of Topspin, the "DATASET" line should reflect your "disk" and "user":

DATASET(myfname,10,1,"f:/","chemist")
link

answered Sep 10 '14 at 03:36

John%20Hollerton's gravatar image

John Hollerton
96

i like this answer (click again to cancel)
0
i dont like this answer (click again to cancel)

Hi Michael, it is possible to do it by writing proper macro in python, but frankly it's faster to do it manually than making a new macro that will be used only once. Regards, Arkadiusz

link

answered Aug 20 '14 at 00:28

Arkadiusz%20Leniak's gravatar image

Arkadiusz Leniak
238

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a good answer, for discussions, please use comments and please do remember to vote (login to vote)
toggle preview

powered by CNPROG