grd349 / PBjam

A repo for our peak baggin code and tips on jam
MIT License
17 stars 6 forks source link

Added boost to prior to prevent large line width scenario. #188

Closed grd349 closed 4 years ago

grd349 commented 4 years ago

Two things:

@darthoctopus found an example of the line width becoming large when it shouldn't. I added an additional penalty in the likelihood of asy_peakbag. This fixed the particular example - I will need to run some other things to check I haven't ruined everything else.

@nielsenmb - Some of the functions in the plotting code are not indented when I was expecting them to be. I indented plot_start and now it works for me. Could you look at this decide if it should all be indented?

Before merge:

G

nielsenmb commented 4 years ago

The unindented functions are functions I haven't adapted to work across all the fitting classes (or at least throw some informative errors).

The plot_start one seems redundant to me though, since it's meant to plot the start condition for peakbag, which is the output plot from asy_peakbag right? Likewise the plot_start for asy_peakbag would be the output plot from KDE.

grd349 commented 4 years ago

@nielsenmb & I chatted about the form of the penalty for the large line widths.

I think the summary of our discussion is that a penalty of the form ...

if (linewidth > start_linewidth.mean + start_linewidth.std3): ld += N(mu = linewidth, std = ~5%, observed = start_linewidth.mean + start_linewidth.std3)

or something similar. I'll look at implementing this.