Skip to content

ECPL cutoff parameter corrections#346

Open
samanthalwong wants to merge 1 commit intoVERITAS-Observatory:mainfrom
samanthalwong:main
Open

ECPL cutoff parameter corrections#346
samanthalwong wants to merge 1 commit intoVERITAS-Observatory:mainfrom
samanthalwong:main

Conversation

@samanthalwong
Copy link
Copy Markdown

Cutoff parameter for exponential cutoff power law (spectral model 1) needs to be in units of 1/TeV for correct behaviour. Previous implementation (in units of TeV) caused the fit to converge with a very steep cutoff.

@GernotMaier GernotMaier self-requested a review March 27, 2026 16:30
Copy link
Copy Markdown
Member

@GernotMaier GernotMaier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not entirely sure what to do:

  • both implementation are correct and can be find in literature
  • I can see that that the multiplication instead of division (also that the cut off parameter for power laws is 0 and not infinity) is numerically more stable

I think we have used the currently implemented version in publications, so I hesitate to overwrite it. Would it make sense to add this as a new fSpectralFitFunction definition?

@samanthalwong
Copy link
Copy Markdown
Author

I agree that these two forms should be equivalent - I just changed the division to multiplication to reflect the choice of initial parameter. When I run this with division and small parameter 2 (p2 = 0.1 TeV-1) it converges to even smaller p2 = 0.07 TeV-1. However, when the initial parameter is p[2] = 10 TeV, the fit converges to an appropriate value, regardless of whether or not the function is a multiplication or division by Ecut.

I'm happy to restore the functional form back to the default, but it seems that the initial value of p2 needs to be in units of TeV for proper convergence with the way the fit is currently run.

@GernotMaier
Copy link
Copy Markdown
Member

I understand this - but I remember also getting reasonable fits with this function in the past. So changing the meaning of the parameter will break backwards compatibility. If we simply copy your updates into a new function definition, then we should both be happy?

@samanthalwong
Copy link
Copy Markdown
Author

I don't mind copying it over or even just leaving it as-is but changing the initial parameter (not sure if this makes sense though), but I'm wondering why the current functional form worked in previous versions but not anymore? Unless it was only used in cases where the cutoff was near 100 GeV?

@GernotMaier
Copy link
Copy Markdown
Member

I still don't understand - what is the difference between /10 and *0.1?

I've tried the current implementation and it works fine for me on a single Crab run with reasonable fit values of E_cut at multiple TeVs.

Is it possible that you have to give the correct start values for whatever you look at?

Note that the current implementation is consistent with what can be found in literature. I found 6 VERITAS paper with this definition (in total 18 fits of power law with exponential cutoff using the division). None is using the multiplication.

@samanthalwong
Copy link
Copy Markdown
Author

No, there shouldn't be a difference between the two, which is why I'm confused that there is. For both functional forms, I'm able to get convergence when p2 = 10 and not when p2 = 0.1 - i.e., for the division, it will take the starting parameter 10 and then find the best fit value at 0.1, but this does not work with 0.1 -> 10.

If it's not reproducible on your end, is this just pointing to a system-specific issue with my minuit or maybe even the random seed? I'm also trying this on the Crab (~100 runs), so there's nothing out of the ordinary that I'm doing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants