Difference between revisions of "Tutorial for Relaxation dispersion analysis r1rho fixed time recorded on varian as sequential spectra"
Line 47: | Line 47: | ||
cd .. | cd .. | ||
end | end | ||
+ | </source> | ||
+ | |||
+ | == Extract the spectra settings from Varian procpar file == | ||
+ | Now we want to make a settings file we can read in relax. | ||
+ | |||
+ | <source lang="bash"> | ||
+ | set FIDS=`cat fid_files.ls` | ||
+ | set OUT=$PWD/exp_parameters.txt | ||
+ | |||
+ | echo "# DIRN I deltadof2 dpwr2slock ncyc ss sfrq" > $OUT | ||
+ | foreach I (`seq 1 ${#FIDS}`) | ||
+ | set FID=${FIDS[$I]}; set DIRN=`dirname $FID` | ||
+ | cd $DIRN | ||
+ | set deltadof2=`awk '/^deltadof2 /{f=1;next}f{print $2;exit}' procpar` | ||
+ | set dpwr2slock=`awk '/^dpwr2slock /{f=1;next}f{print $2;exit}' procpar` | ||
+ | set ncyc=`awk '/^ncyc /{f=1;next}f{print $2;exit}' procpar` | ||
+ | set ss=`awk '/^ss /{f=1;next}f{print $2;exit}' procpar` | ||
+ | set sfrq=`awk '/^sfrq /{f=1;next}f{print $2;exit}' procpar` | ||
+ | echo "$DIRN $I $deltadof2 $dpwr2slock $ncyc $ss $sfrq" >> $OUT | ||
+ | cd .. | ||
+ | end | ||
+ | |||
+ | cat $OUT | ||
</source> | </source> |
Revision as of 11:38, 16 September 2013
Contents
Intro
This tutorial presently cover the relax_disp branch.
This branch is under development, for testing it out, you need to use the source code. See Installation_linux#Checking_out_a_relax_branch.
This tutorial is based on the analysis of R1rho data, analysed in a master thesis.
The spectra is not recorded interleaved, but as a series of spectra with experimental changes.
Preparation
You want to make a working dir, with different folders
peak_lists
spectrometer_data
scripts
You can create the folders by
mkdir peak_lists spectrometer_data scripts
In the folder peak_lists should contain SPARKY list in SPARKY list format.
In the folder scripts we put scripts which help us processing the files.
In the folder spectrometer_data should be a directory containing directories with all experiments where each directory contain files: fid and procpar as the output from recording on Varian.
Establish file-overview
Make file with paths to fid files
We make a file list of filepaths to fid files.
ls -v -d -1 */fid > fid_files.ls
cat fid_files.ls
Do something in each directory
With the fid_files.ls, we can do something in each directory.
For example do a list files in each direcory.
set FIDS=`cat fid_files.ls`
foreach I (`seq 1 ${#FIDS}`)
set FID=${FIDS[$I]}; set DIRN=`dirname $FID`
cd $DIRN
ls
cd ..
end
Extract the spectra settings from Varian procpar file
Now we want to make a settings file we can read in relax.
set FIDS=`cat fid_files.ls`
set OUT=$PWD/exp_parameters.txt
echo "# DIRN I deltadof2 dpwr2slock ncyc ss sfrq" > $OUT
foreach I (`seq 1 ${#FIDS}`)
set FID=${FIDS[$I]}; set DIRN=`dirname $FID`
cd $DIRN
set deltadof2=`awk '/^deltadof2 /{f=1;next}f{print $2;exit}' procpar`
set dpwr2slock=`awk '/^dpwr2slock /{f=1;next}f{print $2;exit}' procpar`
set ncyc=`awk '/^ncyc /{f=1;next}f{print $2;exit}' procpar`
set ss=`awk '/^ss /{f=1;next}f{print $2;exit}' procpar`
set sfrq=`awk '/^sfrq /{f=1;next}f{print $2;exit}' procpar`
echo "$DIRN $I $deltadof2 $dpwr2slock $ncyc $ss $sfrq" >> $OUT
cd ..
end
cat $OUT