I feel like this should be a lot more straight-forward than it is... I have some 1D data that I can plot ([data available here](https://drive.google.com/uc?export=download&id=0B-No0nABM5N8YnJEWDZLRDdwYXc)), and I want to fit a Gaussian to the peak such that I can extract a mean and standard deviation. There is a baseline background that you can see, and an obvious peak. I don't care if the peak really matches a different distribution, I just want to fit a Gaussian.

So... I've tried:

```
data = Import["MyData.txt","Table"];
data = data[[All,1]];
h=DistributionFitTest[data, Automatic, "HypothesisTestData"];
h["FittedDistribution"]
h["TestDataTable"]
Show[Histogram[data, Automatic, "PDF"], Plot[PDF[h["FittedDistribution"], x], {x, Min[g46Nqin], Max[g46Nqin]}, PlotStyle -> Thick, 

```

PlotRange -> Full]]

Which yields: `NormalDistribution[46.4739, 4.56424]`

[![enter image description here](https://i.stack.imgur.com/6AFAu.png)](https://i.stack.imgur.com/6AFAu.png)

This is obviously not a great fit. The peak is a little to the right, and the standard deviation is much tighter than shown.

So I tried making my own fit which includes the baseline:

```
nlm = NonlinearModelFit[data, {(\[CapitalAlpha]/(\[Sigma] Sqrt[2 Pi])) Exp[-(((x - \[Mu])/\[Sigma])^2)/2] + \[CapitalBeta], \[Mu] > 30, \[Sigma] > 0}, {{\[Sigma], 3.}, {\[Mu], 46}, \[CapitalAlpha], \[CapitalBeta]}, x]
Show[Show[Histogram[data, Automatic, "PDF"], Plot[nlm[x], {x, Min[data], Max[data]}]]]

```

And this just returns absolute crap. I've toyed with methods, starting parameter guesses, constraints, etc... Nothing helps.

Any options or assistance with this is highly valued! Thank you!