Dear Aimee and others with similar task,
In short the LUA code is off the top of my head:
-- gets table of fitted lines/functions
dataset_index = 0
functions = F:get_components(dataset_index)
-- open file for output (change path)
filename
=
"/Users/jasper/repos/fityk-libs-spectra-script/Examples/387nm_Mo_example/Output.txt"
file = io.open(filename, "a")
io.output(file)
-- iterate over lines, probably could also use #functions instead of
nr_of_lines
nr_of_lines = 2
for
line_index
= 1, nr_of_lines, 1 do
-- Reads the variable. Other variables can be accessed by writing their name instead of "height", e.g. "area"
height = functions[line_index]:get_param_value("height")
-- Writes to output file. First fitted line needs special approach
io.write("\t" .. height)
end
-- wrap things up, close file
io.write("\n")
io.close(file)
Cheers!
Jasper