12.08.2013 Views

software to fit optical spectra - Quantum Materials Group

software to fit optical spectra - Quantum Materials Group

software to fit optical spectra - Quantum Materials Group

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

should be in the direc<strong>to</strong>ry “D:\REFFIT” and the macro file “MACRO1.RFS” should be in the<br />

currently selected direc<strong>to</strong>ry.<br />

There are several ways <strong>to</strong> launch the RefFIT program with a script name. The most<br />

universal one (though not the most handy) is <strong>to</strong> create a batch file, called, e.g.,<br />

“MACRO1.BAT”, which contains only one command line “D:\REFFIT\REFFIT.EXE<br />

MACRO1.RFS”. It can be done using the same edi<strong>to</strong>r program, like Notepad (Figure 4-21).<br />

The execution of “MACRO1.BAT” (e.g., by clicking on it in the Windows Explorer) will have<br />

the desired effect.<br />

Figure 4-21 The batch file <strong>to</strong> start macro “MACRO1.RFS”.<br />

Scripts can be called more comfortably by just double-clicking on the icons of their files.<br />

For that one should associate the file extension “RFS” with the executable “REFFIT.EXE”. It<br />

can be done, for instance, in the standard Windows Explorer program by clicking on a macro<br />

file with the right mouse but<strong>to</strong>n, selecting item “Open With”→”Choose program” and then<br />

specifying the actual path <strong>to</strong> “REFFIT.EXE”.<br />

4.11.2. Macro syntax<br />

The RefFIT macro syntax is extremely simple. Macro scripts consist of commands,<br />

separated by semicolon “;”. It is a good idea (although not imperative) <strong>to</strong> write each command<br />

on a separate line. Commands correspond <strong>to</strong> actions done by the mouse or the keyboard in the<br />

application windows.<br />

The command syntax is as follows: “CommandName(Par1 = Value1, Par2 = Value2,<br />

…);” The CommandName identifies the command. “Par1”, “Par2” etc. are the names of<br />

parameters; “Value1”, “Value2” etc. are their values. The parameters should be separated by<br />

commas “,”. The set of parameters depends, of course, on the command. In some cases certain<br />

parameters might be omitted. Even if no parameters are set in the command, the command<br />

name must be followed by empty brackets “()”. The sequence of parameters in brackets does<br />

not matter.<br />

The parameters can be of integer, double or text type. The integer parameter value can be<br />

any integer number, e.g., 10. The double parameter value can be any double (floating point)<br />

number, e.g., 1.23E-4. The text parameter value should be a text string, enclosed in parentheses<br />

“…”, e.g., “CONDUCTIVITY”.<br />

Any command preceded by the “#” character is ignored by the macro interpreter. This<br />

can be used <strong>to</strong> put text comments in<strong>to</strong> the macro, or temporarily ‘comment out’ some<br />

commands.<br />

Guide <strong>to</strong> RefFIT Page 80

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!