URL:
<http://gna.org/support/?3064>
Summary: Wish for a GUI user function: nmrpipe -> create
NMRPipe-format Peak Table from SPARKY assigment.
Project: relax
Submitted by: tlinnet
Submitted on: Fri 02 Aug 2013 04:41:05 PM GMT
Category: None
Priority: 5 - Normal
Severity: 3 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Operating System: None
_______________________________________________________
Details:
Input: A SPARKY output file with X and Y in PPM
Input frqX, frqY from OBS MHz
Input sizeX, sizeY from DATA SIZE
Input origX, origY from ORIG Hz
Input swX, swY from SW Hz
-------------------------------------------------------------------
[tlinnet@tomat ft2_data]$ showhdr test.ft2
FILE: test.ft2 DIM: 2 QUAD: Real 2DMODE: States
BYTES: 527360 PRED: 527360 MIN: 0 MAX: 0 VALID: 0
ORDER: 2 1 PIPE: 0 PLANES: 1 513x256x1 Not Transposed
X-Axis Y-Axis
DATA SIZE: 513 256
APOD SIZE: 160 128
SW Hz: 2504.882812 1400.020996
OBS MHz: 499.862000 50.655998
ORIG Hz: 2996.960938 5300.190918
DOMAIN: Freq Freq
MODE: Real Real
NAME: H1 N15
--------------------------------------------------------
This is in perl:
$stepX=$swX/$frqX/$sizeX;
$highX=($origX+$swX)/$frqX;
$stepY=$swY/$frqY/$sizeY;
$highY=($origY+$swY)/$frqY;
$i=1;
print "VARS INDEX X_AXIS Y_AXIS X_PPM Y_PPM VOL ASS\n";
print "FORMAT %5d %9.3f %9.3f %8.3f %8.3f %+e %s\n\n";
open IN, "$sparkyList" or die "Cannot open $sparkyList for read";
while (<IN>){
@process = split (/\s+/, $_);
if ($process[0] eq ""){splice (@process, 0, 1)};
if ($process[0] ne "Assignment" && $process[0] ne ""){
$ptsX=($highX-$process[2])/$stepX;
$ptsY=($highY-$process[1])/$stepY;
printf "%5d %9.3f %9.3f %8.3f %8.3f %+e
%s\n",$i,$ptsX,$ptsY,$process[2],$process[1],700000,$process[0];
$i++;
};
};
close (IN);
_______________________________________________________
Reply to this item at:
<http://gna.org/support/?3064>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-devel mailing list
[email protected]
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