Programs of General Interest

beep:
just make a beep to signal attention
export A=23.5-7/2.6e-23*%B%
program for windows to allow for simple math operations. Linux users can use some linux syntax such as
export A= $(echo 23.5-7/2.6e-23*$B | bc -l )
.
gauss fwhm stp min max:
calculate a gaussian, output goes to console (stdout), the formula for a gaussian is: $\sigma={\rm fwhm}/\sqrt{8*log(2)}$, ${\rm gauss}(x)=\frac{exp(-x^2/2 \sigma^2)}{\sqrt{2*\pi}\sigma}$
gauss2d fwhm1 fwhm2 theta stpx minx maxx stpy miny maxy:
calculate a 2 dimensional gaussian, output goes to console (stdout), the formula for a two dimensional gaussian is: $\sigma={\rm fwhm}/\sqrt{8*log(2)}$, ${\rm gauss}(x,y)=\frac{exp(-u_1^2/2 \sigma_1^2)}{\sqrt{2*\pi}\sigma_1}\frac{exp(-u_2^2/2 \sigma_2^2)}{\sqrt{2*\pi}\sigma_2}$ with $u_1=x cos(\theta)-ysin(\theta)$ and $u_2=y cos(\theta)+xsin(\theta)$, $\theta$ is the rotation angle in degree.
lorentz fwhm stp min max:
calculate a lorentzian, output goes to console (stdout)the formula for a Lorentz curve is: ${\rm lorentz}(x)=\frac{1.0}{\pi{\rm fwhm}(1.0+x^2/fwhm^2)}$
mctest batchfile:
is a program to test a script. It will execute the script test.bat line by line and stop with an error message if an error occurs. For testing goto directory demo and look out for testing batch files named test*.bat, use such a file to test mcphase, e.g.: mctest test_ndcu2_mcphasit.bat. The batch may contain linux and windows-shell specific commands (e.g. copy or cp) and accepts both.
plotbook *.ps:
program plotbook to arrange many (single side) ps-images to one booklet (needs: latex, pstops,ghostscript, perl)
script2html [-latex][options] calc1.bat calc2.bat ...
This program creates a html file from scripts containing just the text in the scripts.
 input: calc1.bat, calc2.bat ...    scripts (bat files)
                                   (must be located in the current directory)
 output: stdout      ...........   html file created from the scripts
                                   (use ">" to pipe into file)

In order to create a latex output use script2html -latex.

 options: -fromline 3 ..........  only part of the file is html coded starting at line 3
          -toline   10 .........  only part of the file is html coded (until line 10)

 Many html commands such as <h1> HEADER </h1> can be used in
 script commments to structure the text. Latex formulas are accepted by enclosing it 
 in brackets  \( \) for inline or \[ \] for equations  , e.g.  \(e^{ipi}+1=0\) 
 Some abbreviations are acceptable: 
  \( ... \)      --> € ... €
  <ol><li>         --> /§
  </li><li>        --> §
  <li></ol>        --> §/

 Other useful html commands are:
 REM <h1> A Header </h1>
 REM <h2> A smaller header </2>
 REM <img src="figure.jpg">
 REM <figure> <figcaption> This graph shows ... 
 REM </figcaption> <img src="figure.jpg"> </figure>

  example:

 script2html calc.bat notes.txt > calc.bat.html

 [creates the html file calc.bat.html from files calc.bat and notes.txt]
setvariable varname value *.*:
sets a variable in a file, e.g. setvariable T 20 Co.sipf replaces T=15 by T=20 in file Co.sipf.
substitute [option] oldtext newtext *.*:
replaces every instance of oldtext with newtext in file(s) *.*. Option -f substitutes only the first occurence, -n 13 substitutes only the 13th occurence of the oldtext.