"setexpgrad, by Amadeu, N.S., 2006" "Copyright (c) 2006 Nader de Sousa Amadeu" "Permission is hereby granted, free of charge, to any person obtaining a copy" "of this software and associated documentation files (the Software), to deal" "in the Software without restriction, including without limitation the rights" "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell" "copies of the Software, and to permit persons to whom the Software is " "furnished to do so, subject to the following conditions: " "The above copyright notice and this permission notice shall be included in" "all copies or substantial portions of the Software. " "THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR" "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY," "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE" "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER " "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM," "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN" "THE SOFTWARE. " "----------------- README ------------------" "setexpgrad: sets values for a pulsed-field gradient experiment using" "the function expgrad.c, by Amadeu, N.S., 2006" "It is written in the MAGICAL II language for the Varian Vnmr(TM)" "software. To use it just place this file in $HOME/vnmrsys/maclib." "All gradient related variables of time are in microseconds" "---------- CREATING (, IF) NECESSARY(,) VARIABLES -----------------" exists('DAC_to_G','parameter'):$e if $e=0 then create('DAC_to_G','real') endif DAC_to_G=1 exists('our_mindelay','parameter'):$e if $e=1 then destroy('our_mindelay') endif create('our_mindelay','pulse') our_mindelay=20 exists('amp','parameter'):$e if $e=0 then create('amp','real') setlimit('amp',200,1,1) endif amp=50 exists('length','parameter'):$e if $e=1 then destroy('length') endif create('length','pulse') length=1000 exists('osi','parameter'):$e if $e=0 then create('osi','real') endif osi=0.24 exists('dr','parameter'):$e if $e=0 then create('dr','real') endif dr=2 exists('trunc_time','parameter'):$e if $e=0 then create('trunc_time','pulse') endif trunc_time=1000 "----------- ARRAYING GRADIENT ------------------" input('Enter the minimum gradient value in DAC unities: '):$amp_min input('Enter the maximum gradient value in DAC unities: '):$amp_max input('Enter the number of steps: '):$nsteps amp[1]=$amp_min $step=1 repeat amp[$step]=$amp_min + (($amp_max - $amp_min)/($nsteps-1))*($step-1) $step = $step + 1 until ($step >= $nsteps + 1 ) "---------- ADVISABLE PROCEDURES ----------------" il='y' time