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.

AddDataCurve(GraphNo = 1, DatasetNo = 1, ShowLine = 1, ShowSymbol = 1,<br />

ShowError = 0, nSymbolSize = 1, nSymbolShape = 0, SymbolOpen = 1);<br />

#----------------------------------------------------------------------------<br />

# adds the corresponding chi-square term<br />

AddChiSqTerm(DatasetNo = 1, ModelNo = 1, Weight = 1.0);<br />

#----------------------------------------------------------------------------<br />

# wait until all the graphs are redrawn<br />

Wait();<br />

#----------------------------------------------------------------------------<br />

# performs the <strong>fit</strong>ting (maximum 10 iterations)<br />

Fit(NumIters = 10);<br />

#----------------------------------------------------------------------------<br />

# suspends the execution, allows the user <strong>to</strong> verify, that the <strong>fit</strong> is OK<br />

Suspend();<br />

#----------------------------------------------------------------------------<br />

# saves the new model parameters under a unique name<br />

SaveModel(ModelNo = 1, File = "MOD_%1.RFM");<br />

#----------------------------------------------------------------------------<br />

# export the model reflecitivity and conductivity curves<br />

ExportModelCurve(File = "RF_%1.DAT", ModelNo = 1, Quantity = "R",<br />

Xmin = 1E-4, Xmax = 1E6, XPts = 1000, XGrid = 2);<br />

ExportModelCurve(File = "S1_%1.DAT", ModelNo = 1, Quantity = "S1",<br />

Xmin = 0.995e-4, Xmax = 1.005e-4, XPts =3, XGrid = 1);<br />

#----------------------------------------------------------------------------<br />

# deletes the experimental reflectivity curve<br />

DeleteDataCurve(GraphNo = 1, DatasetNo = 1);<br />

#----------------------------------------------------------------------------<br />

#deletes the chi-square term<br />

DeleteChiSqTerm(DatasetNo = 1, ModelNo = 1);<br />

#----------------------------------------------------------------------------<br />

#unloads the dataset<br />

UnloadDataset(DatasetNo = 1);<br />

#------------------------------------------------------------------------------------<br />

# the end of the cycle loop<br />

EndLoop();<br />

#------------------------------------------------------------------------------------<br />

# deletes the model curve<br />

DeleteModelCurve(GraphNo = 1, ModelNo = 1, Quantity = "R");<br />

DeleteModelCurve(GraphNo = 2, ModelNo = 1, Quantity = "S1");<br />

#------------------------------------------------------------------------------------<br />

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

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

Saved successfully!

Ooh no, something went wrong!