# Unwanted portion removal and choosing best Gaussian fit

Dear All,

I am having two issues, I would like to write a macro to solve:

1. To remove initial unwanted area from a mass plot region 2 - 2.8.
2. I want to fit a Gaussian function, I tried this [0]exp(-0.5pow((x-[1])/[2],2)), but not so appropriate. I would
like to find the yield from the [0] value.

Thank you for all your help.

You could try to use the fit panel…

Hey Bellenot,

Thank you.

Could I use a macro instead of the fit panel?

Sure, but using the fit panel allows to first estimate the fit parameters in an interactive way…

wonderful. Thank you.

How about choosing a good fit function?

Same here. The fit panel has several pre-defined fit functions

1 Like