Export data for Gaussian fits

Hi everybody,

I am fitting two overlapping peaks using a linear baseline.....Is there a way to export the raw data of the Gaussian curves? I mean in some kind of txt form in two columns presumably (wavenumber,counts).

Thanks
There are several ways; probably the simplest is to save a table in which the x-y data are shown, e.g.:

make/D/N=500 wGauss    //make some data
setscale x 0, 100, wGauss
wGauss= gauss(x, 50, 10)
edit wGauss.id                 // show x,y data in table
SaveTableCopy/T=2         //save the table, here as *.csv


another way would be to use wfprintf or save to create delimited files.
Thanks for this Charlie....However, i am not sure i described properly what i wanted to say.....If i plot the data originated from what you sent me represent a perfect gaussian.....Nevertheless, i want to extract the data in XY column of my gaussian fits on the raw spectra.....I attach an image below.....Essentially, i want to know each single data point on the blue curves (the gaussians). I hope i make my point clear and i apologize if i missed something from your previous post.
τίτλο.png
So if I understand correctly you are looking for the wave that contains the fit. It seems you are using the MultiPeakFit package.
If you double-click the blue curve on the graph, you'll get the Modify Trace Appearance window. Click and hold on the highlighted trace on the left side. In the bottom part of the window the path to the wave will appear. The wave will be named "fit_NameOfYourFittedWave" and it will be located (I think) in a subfolder of the Packages->MultiPeakFit2 folder (Make sure you always use the Data Browser).
That was very enlighting......Thanks very much for this. In principle, i wanted to extract the Gaussian shape (termed as ''Gauss'') when both peaks are present.....So i did the graph of ''fit_wave'' and Igor plotted how it looks. I could also retrieve the raw data by making the table of ''fit_wave'' in order to be able to plot them elsewhere. However, i also wanted to know the raw data of one individual Gaussian (termed as ''gaussian1''). What i did was to plot both of them and calculate the coefficients. Then, i fixed the values for one peak in order not to lose them and i also fixed the baseline. I deleted the other peak and i again used ''fit_wave'' and now it gave me the graph of how only one peak looks. See an example that i attach. Then i can do the same thing for the other peak (termed as ''gaussian2'') and that way i guess what i did is that i split the complex ''Gauss'' into its constituents, ''gaussian1'' and ''gaussian2''.....There is one point though.....When i extract the raw data into tables, i have 94x2 elements for the ''Gauss'', 94x2 for ''gaussian1'' and 77x2 for ''gaussian2''. I am not sure why i have less elements for ''gaussian2'', maybe its just the way that decomposition is done in Igor Pro. The only problem is that i wanted to add the two individual gaussians (''gaussian1''+''gaussian2'') in order to verify that i get the general ''Gauss'', but i can not do it in Matlab because the matrices for ''gaussian1'' and ''gaussian2'' are not of the same length. Am i missing something or doing something wrong in the process of etxtracting the individual gaussian? Or maybe Igor just does it like that.
Konstantinos Chatzipanagis wrote:
When i extract the raw data into tables, i have 94x2 elements for the ''Gauss'', 94x2 for ''gaussian1'' and 77x2 for ''gaussian2''. I am not sure why i have less elements for ''gaussian2'', maybe its just the way that decomposition is done in Igor Pro. The only problem is that i wanted to add the two individual gaussians (''gaussian1''+''gaussian2'') in order to verify that i get the general ''Gauss'', but i can not do it in Matlab because the matrices for ''gaussian1'' and ''gaussian2'' are not of the same length. Am i missing something or doing something wrong in the process of etxtracting the individual gaussian? Or maybe Igor just does it like that.


My guess is that "Fit Curve Points" (under Options on the Multi-Peak fit panel) is set to "Auto", which is why you end up with different lengths. Just a side note: you are not looking at a e.g.94x2 array but at a scaled 1D wave. This an important difference. Have a look at:

DisplayHelpTopic "The Waveform Model of Data"

Konstantinos Chatzipanagis wrote:
The only problem is that i wanted to add the two individual gaussians (''gaussian1''+''gaussian2'') in order to verify that i get the general ''Gauss'', but i can not do it in Matlab because the matrices for ''gaussian1'' and ''gaussian2'' are not of the same length.


Why not just adding them up in Igor?
I got rid of the ''auto'' and i told the software to fit 94 points (same number as for gaussian2) and it seems to work.....Now the x intervals are the same as well.....Now, in terms of what you said about the scaling.....I am not sure i am completely following.....Could you please expand a bit on what you meant by the fact that i am not looking at a matri of 94x2 but a 1D wave?