Loading ...
Sorry, an error occurred while loading the content.

Problems with script for making Pseudo 3D

Expand Messages
  • nkjvcjs
    We took a series of 2D spectra for a t1 relaxation on a Bruker Avance 800. Each one has its own directory. I am trying to write a script that will open,
    Message 1 of 2 , Oct 30, 2008
    • 0 Attachment
      We took a series of 2D spectra for a t1 relaxation on a Bruker Avance
      800. Each one has its own directory.

      I am trying to write a script that will open, convert, process and
      make them into a pseudo 3D experiment. I realize I can process and
      name them by hand, but I will be doing several, and would really like
      a script that will do it.

      I am having problems making it increment the file it reads in, but
      also, knowing that it is reading in the same file each time,
      there is still an exponential decay when going through the planes? Why?

      Any suggestions for fixing it?

      Here is the script:
      BEGIN SCRIPT:

      #!/bin/csh

      #

      if (!(-d ft)) then
      mkdir ft
      endif \


      set tauList = (0.01 0.01 0.05 0.1 0.2 0.4 0.8 1.2) \
      set cList = (10 24 11 12 13 14 15 16) \

      set i = 1 \

      foreach tau ($tauList)
      set cList[$i] = 1 \

      set inName = ('10/ser' '24/ser' '11/ser' '12/ser' '13/ser' '14/ser'
      '15/ser' '16/ser') \

      bruk2pipe -in $inName -bad 0.0 -noaswap -AMX -decim 16 -dspfvs 12
      -grpdly -1 \
      -xN 2048 -yN 256 \
      -xT 1024 -yT 128 \
      -xMODE DQD -yMODE Echo-AntiEcho \
      -xSW 9615.385 -ySW 2579.979 \
      -xOBS 800.134 -yOBS 81.086 \
      -xCAR 4.773 -yCAR 118.093 \
      -xLAB HN -yLAB 15N \
      -ndim 2 -aq2D States \
      -out ./test.fid -verb -ov \

      nmrPipe -in test.fid \
      | nmrPipe -fn POLY -time \
      | nmrPipe -fn SP -off 0.35 -end 0.98 -pow 2 -c 0.5 \
      | nmrPipe -fn ZF -auto \
      | nmrPipe -fn FT -auto \
      | nmrPipe -fn PS -p0 -9.60 -p1 0.00 -di -verb \
      | nmrPipe -fn EXT -x1 5.0ppm -xn 10ppm -sw \
      | nmrPipe -fn POLY -auto -ord 1 \
      | nmrPipe -fn TP \
      | nmrPipe -fn SP -off 0.35 -end 0.98 -pow 1 -c 1.0 \
      | nmrPipe -fn LP \
      | nmrPipe -fn ZF -auto \
      | nmrPipe -fn FT -auto \
      | nmrPipe -fn PS -p0 89.00 -p1 0.00 -di -verb \
      -ov -out test.ft2 \

      set outName = `printf ft/relax%03d.ft2 $i` \

      echo $outName $tau \

      nmrPipe -in test.ft2 \
      | nmrPipe -fn COADD -axis Y -cList $cList \
      -ov -out $outName \

      sethdr $outName -tau $tau \

      set cList[$i] = 0
      @ i++
      end \


      series.com ft/*

      END SCRIPT

      The output I get is:
      BEGIN OUTPUT

      Warning from bruk2pipe:
      Arguments 3 to 9 may be unknown or unused:
      ' 24/ser 11/ser 12/ser 13/ser 14/ser 15/ser 16/ser '

      Bruker AMX --> NMRPipe Conversion.
      Input File: 10/ser
      Output Macro: /cprog/nmrpipe/nmrtxt/bruk_ranceY.M
      2D Sizes: (2048 Real+Imag)(256 Real+Imag)
      Byte Swap Mode: ON

      Slice 256 of 256
      PS 256 of 256
      PS 853 of 853
      ft/relax001.ft2 0.01
      Warning from bruk2pipe:
      Arguments 3 to 9 may be unknown or unused:
      ' 24/ser 11/ser 12/ser 13/ser 14/ser 15/ser 16/ser '

      Bruker AMX --> NMRPipe Conversion.
      Input File: 10/ser
      Output Macro: /cprog/nmrpipe/nmrtxt/bruk_ranceY.M
      2D Sizes: (2048 Real+Imag)(256 Real+Imag)
      Byte Swap Mode: ON

      Slice 256 of 256
      PS 256 of 256
      PS 853 of 853
      ft/relax002.ft2 0.01
      Warning from bruk2pipe:
      Arguments 3 to 9 may be unknown or unused:
      ' 24/ser 11/ser 12/ser 13/ser 14/ser 15/ser 16/ser '

      Bruker AMX --> NMRPipe Conversion.
      Input File: 10/ser
      Output Macro: /cprog/nmrpipe/nmrtxt/bruk_ranceY.M
      2D Sizes: (2048 Real+Imag)(256 Real+Imag)
      Byte Swap Mode: ON

      Slice 256 of 256
      PS 256 of 256
      PS 853 of 853
      ft/relax003.ft2 0.05
      Warning from bruk2pipe:
      Arguments 3 to 9 may be unknown or unused:
      ' 24/ser 11/ser 12/ser 13/ser 14/ser 15/ser 16/ser '

      Bruker AMX --> NMRPipe Conversion.
      Input File: 10/ser
      Output Macro: /cprog/nmrpipe/nmrtxt/bruk_ranceY.M
      2D Sizes: (2048 Real+Imag)(256 Real+Imag)
      Byte Swap Mode: ON

      Slice 256 of 256
      PS 256 of 256
      PS 853 of 853
      ft/relax004.ft2 0.1
      Warning from bruk2pipe:
      Arguments 3 to 9 may be unknown or unused:
      ' 24/ser 11/ser 12/ser 13/ser 14/ser 15/ser 16/ser '

      Bruker AMX --> NMRPipe Conversion.
      Input File: 10/ser
      Output Macro: /cprog/nmrpipe/nmrtxt/bruk_ranceY.M
      2D Sizes: (2048 Real+Imag)(256 Real+Imag)
      Byte Swap Mode: ON

      Slice 256 of 256
      PS 256 of 256
      PS 853 of 853
      ft/relax005.ft2 0.2
      Warning from bruk2pipe:
      Arguments 3 to 9 may be unknown or unused:
      ' 24/ser 11/ser 12/ser 13/ser 14/ser 15/ser 16/ser '

      Bruker AMX --> NMRPipe Conversion.
      Input File: 10/ser
      Output Macro: /cprog/nmrpipe/nmrtxt/bruk_ranceY.M
      2D Sizes: (2048 Real+Imag)(256 Real+Imag)
      Byte Swap Mode: ON

      Slice 256 of 256
      PS 256 of 256
      PS 853 of 853
      ft/relax006.ft2 0.4
      Warning from bruk2pipe:
      Arguments 3 to 9 may be unknown or unused:
      ' 24/ser 11/ser 12/ser 13/ser 14/ser 15/ser 16/ser '

      Bruker AMX --> NMRPipe Conversion.
      Input File: 10/ser
      Output Macro: /cprog/nmrpipe/nmrtxt/bruk_ranceY.M
      2D Sizes: (2048 Real+Imag)(256 Real+Imag)
      Byte Swap Mode: ON

      Slice 256 of 256
      PS 256 of 256
      PS 853 of 853
      ft/relax007.ft2 0.8
      Warning from bruk2pipe:
      Arguments 3 to 9 may be unknown or unused:
      ' 24/ser 11/ser 12/ser 13/ser 14/ser 15/ser 16/ser '

      Bruker AMX --> NMRPipe Conversion.
      Input File: 10/ser
      Output Macro: /cprog/nmrpipe/nmrtxt/bruk_ranceY.M
      2D Sizes: (2048 Real+Imag)(256 Real+Imag)
      Byte Swap Mode: ON

      Slice 256 of 256
      PS 256 of 256
      PS 853 of 853
      ft/relax008.ft2 1.2

      END OUTPUT


      Thanks,

      Nicole
    • Frank Delaglio
      Your version of the script seems to mix two cases, one where each tau value is in a seperate experiment, and the other where all tau values are interleaved in
      Message 2 of 2 , Oct 31, 2008
      • 0 Attachment
        Your version of the script seems to mix two cases, one where
        each tau value is in a seperate experiment, and the other where
        all tau values are interleaved in one experiment. These interleaved
        version would be seperated by COADD ... but, in your case, this is not
        needed, your version is not a single-experiment version.

        The script below would be executed in a directory such as "relax"
        which is at the same level as the bruker directories.

        Once the script is finished, there would be a directory ft/ which
        contained the pseudo-3D result. You could do a 2D peak pick on the
        first plane, and then analyze the whole series with something like:

        autoFit.tcl -series -specName ft/relax%03d.ft2 -in tab relax.tab

        showEvolve.tcl

        I also changed the processing, by removing LP, and putting auto
        baseline correction after both FTs have been performed.


        --- proc.com:
        #!/bin/csh

        if (!(-d ft)) then
        mkdir ft
        endif

        set tauList = (0.01 0.01 0.05 0.1 0.2 0.4 0.8 1.2)
        set dirList = (10 24 11 12 13 14 15 16)

        set i = 1

        foreach tau ($tauList)
        set outName = `printf ft/relax%03d.ft2 $i`

        bruk2pipe -in ../$dirList[i]/ser -tau $tauList[$i] \
        -bad 0.0 -noaswap -AMX -decim 16 -dspfvs 12 -grpdly -1 \
        -xN 2048 -yN 256 \
        -xT 1024 -yT 128 \
        -xMODE DQD -yMODE Echo-AntiEcho \
        -xSW 9615.385 -ySW 2579.979 \
        -xOBS 800.134 -yOBS 81.086 \
        -xCAR 4.773 -yCAR 118.093 \
        -xLAB HN -yLAB 15N \
        -ndim 2 -aq2D States \
        -out ./test.fid -verb -ov \

        nmrPipe -in test.fid \
        | nmrPipe -fn POLY -time \
        | nmrPipe -fn SP -off 0.35 -end 0.98 -pow 2 -c 0.5 \
        | nmrPipe -fn ZF -auto \
        | nmrPipe -fn FT -auto \
        | nmrPipe -fn PS -p0 -9.60 -p1 0.00 -di -verb \
        | nmrPipe -fn EXT -x1 5.0ppm -xn 10ppm -sw \
        | nmrPipe -fn TP \
        | nmrPipe -fn SP -off 0.35 -end 0.98 -pow 1 -c 1.0 \
        | nmrPipe -fn ZF -auto \
        | nmrPipe -fn FT -auto \
        | nmrPipe -fn PS -p0 89.00 -p1 0.00 -di -verb \
        | nmrPipe -fn TP \
        | nmrPipe -fn POLY -auto \
        -ov -out $outName

        @ i++
        end

        series.com ft/*

        Quoting nkjvcjs <nefreed@...>:

        > We took a series of 2D spectra for a t1 relaxation on a Bruker Avance
        > 800. Each one has its own directory.
        >
        > I am trying to write a script that will open, convert, process and
        > make them into a pseudo 3D experiment. I realize I can process and
        > name them by hand, but I will be doing several, and would really like
        > a script that will do it.
        >
        > I am having problems making it increment the file it reads in, but
        > also, knowing that it is reading in the same file each time,
        > there is still an exponential decay when going through the planes? Why?
        >
        > Any suggestions for fixing it?
        >
        > Here is the script:
        > BEGIN SCRIPT:
        >
        > #!/bin/csh
        >
        > #
        >
        > if (!(-d ft)) then
        > mkdir ft
        > endif \
        >
        >
        > set tauList = (0.01 0.01 0.05 0.1 0.2 0.4 0.8 1.2) \
        > set cList = (10 24 11 12 13 14 15 16) \
        >
        > set i = 1 \
        >
        > foreach tau ($tauList)
        > set cList[$i] = 1 \
        >
        > set inName = ('10/ser' '24/ser' '11/ser' '12/ser' '13/ser' '14/ser'
        > '15/ser' '16/ser') \
        >
        > bruk2pipe -in $inName -bad 0.0 -noaswap -AMX -decim 16 -dspfvs 12
        > -grpdly -1 \
        > -xN 2048 -yN 256 \
        > -xT 1024 -yT 128 \
        > -xMODE DQD -yMODE Echo-AntiEcho \
        > -xSW 9615.385 -ySW 2579.979 \
        > -xOBS 800.134 -yOBS 81.086 \
        > -xCAR 4.773 -yCAR 118.093 \
        > -xLAB HN -yLAB 15N \
        > -ndim 2 -aq2D States \
        > -out ./test.fid -verb -ov \
        >
        > nmrPipe -in test.fid \
        > | nmrPipe -fn POLY -time \
        > | nmrPipe -fn SP -off 0.35 -end 0.98 -pow 2 -c 0.5 \
        > | nmrPipe -fn ZF -auto \
        > | nmrPipe -fn FT -auto \
        > | nmrPipe -fn PS -p0 -9.60 -p1 0.00 -di -verb \
        > | nmrPipe -fn EXT -x1 5.0ppm -xn 10ppm -sw \
        > | nmrPipe -fn POLY -auto -ord 1 \
        > | nmrPipe -fn TP \
        > | nmrPipe -fn SP -off 0.35 -end 0.98 -pow 1 -c 1.0 \
        > | nmrPipe -fn LP \
        > | nmrPipe -fn ZF -auto \
        > | nmrPipe -fn FT -auto \
        > | nmrPipe -fn PS -p0 89.00 -p1 0.00 -di -verb \
        > -ov -out test.ft2 \
        >
        > set outName = `printf ft/relax%03d.ft2 $i` \
        >
        > echo $outName $tau \
        >
        > nmrPipe -in test.ft2 \
        > | nmrPipe -fn COADD -axis Y -cList $cList \
        > -ov -out $outName \
        >
        > sethdr $outName -tau $tau \
        >
        > set cList[$i] = 0
        > @ i++
        > end \
        >
        >
        > series.com ft/*
        >
        > END SCRIPT
        >
        > The output I get is:
        > BEGIN OUTPUT
        >
        > Warning from bruk2pipe:
        > Arguments 3 to 9 may be unknown or unused:
        > ' 24/ser 11/ser 12/ser 13/ser 14/ser 15/ser 16/ser '
        >
        > Bruker AMX --> NMRPipe Conversion.
        > Input File: 10/ser
        > Output Macro: /cprog/nmrpipe/nmrtxt/bruk_ranceY.M
        > 2D Sizes: (2048 Real+Imag)(256 Real+Imag)
        > Byte Swap Mode: ON
        >
        > Slice 256 of 256
        > PS 256 of 256
        > PS 853 of 853
        > ft/relax001.ft2 0.01
        > Warning from bruk2pipe:
        > Arguments 3 to 9 may be unknown or unused:
        > ' 24/ser 11/ser 12/ser 13/ser 14/ser 15/ser 16/ser '
        >
        > Bruker AMX --> NMRPipe Conversion.
        > Input File: 10/ser
        > Output Macro: /cprog/nmrpipe/nmrtxt/bruk_ranceY.M
        > 2D Sizes: (2048 Real+Imag)(256 Real+Imag)
        > Byte Swap Mode: ON
        >
        > Slice 256 of 256
        > PS 256 of 256
        > PS 853 of 853
        > ft/relax002.ft2 0.01
        > Warning from bruk2pipe:
        > Arguments 3 to 9 may be unknown or unused:
        > ' 24/ser 11/ser 12/ser 13/ser 14/ser 15/ser 16/ser '
        >
        > Bruker AMX --> NMRPipe Conversion.
        > Input File: 10/ser
        > Output Macro: /cprog/nmrpipe/nmrtxt/bruk_ranceY.M
        > 2D Sizes: (2048 Real+Imag)(256 Real+Imag)
        > Byte Swap Mode: ON
        >
        > Slice 256 of 256
        > PS 256 of 256
        > PS 853 of 853
        > ft/relax003.ft2 0.05
        > Warning from bruk2pipe:
        > Arguments 3 to 9 may be unknown or unused:
        > ' 24/ser 11/ser 12/ser 13/ser 14/ser 15/ser 16/ser '
        >
        > Bruker AMX --> NMRPipe Conversion.
        > Input File: 10/ser
        > Output Macro: /cprog/nmrpipe/nmrtxt/bruk_ranceY.M
        > 2D Sizes: (2048 Real+Imag)(256 Real+Imag)
        > Byte Swap Mode: ON
        >
        > Slice 256 of 256
        > PS 256 of 256
        > PS 853 of 853
        > ft/relax004.ft2 0.1
        > Warning from bruk2pipe:
        > Arguments 3 to 9 may be unknown or unused:
        > ' 24/ser 11/ser 12/ser 13/ser 14/ser 15/ser 16/ser '
        >
        > Bruker AMX --> NMRPipe Conversion.
        > Input File: 10/ser
        > Output Macro: /cprog/nmrpipe/nmrtxt/bruk_ranceY.M
        > 2D Sizes: (2048 Real+Imag)(256 Real+Imag)
        > Byte Swap Mode: ON
        >
        > Slice 256 of 256
        > PS 256 of 256
        > PS 853 of 853
        > ft/relax005.ft2 0.2
        > Warning from bruk2pipe:
        > Arguments 3 to 9 may be unknown or unused:
        > ' 24/ser 11/ser 12/ser 13/ser 14/ser 15/ser 16/ser '
        >
        > Bruker AMX --> NMRPipe Conversion.
        > Input File: 10/ser
        > Output Macro: /cprog/nmrpipe/nmrtxt/bruk_ranceY.M
        > 2D Sizes: (2048 Real+Imag)(256 Real+Imag)
        > Byte Swap Mode: ON
        >
        > Slice 256 of 256
        > PS 256 of 256
        > PS 853 of 853
        > ft/relax006.ft2 0.4
        > Warning from bruk2pipe:
        > Arguments 3 to 9 may be unknown or unused:
        > ' 24/ser 11/ser 12/ser 13/ser 14/ser 15/ser 16/ser '
        >
        > Bruker AMX --> NMRPipe Conversion.
        > Input File: 10/ser
        > Output Macro: /cprog/nmrpipe/nmrtxt/bruk_ranceY.M
        > 2D Sizes: (2048 Real+Imag)(256 Real+Imag)
        > Byte Swap Mode: ON
        >
        > Slice 256 of 256
        > PS 256 of 256
        > PS 853 of 853
        > ft/relax007.ft2 0.8
        > Warning from bruk2pipe:
        > Arguments 3 to 9 may be unknown or unused:
        > ' 24/ser 11/ser 12/ser 13/ser 14/ser 15/ser 16/ser '
        >
        > Bruker AMX --> NMRPipe Conversion.
        > Input File: 10/ser
        > Output Macro: /cprog/nmrpipe/nmrtxt/bruk_ranceY.M
        > 2D Sizes: (2048 Real+Imag)(256 Real+Imag)
        > Byte Swap Mode: ON
        >
        > Slice 256 of 256
        > PS 256 of 256
        > PS 853 of 853
        > ft/relax008.ft2 1.2
        >
        > END OUTPUT
        >
        >
        > Thanks,
        >
        > Nicole
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.