Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Min / Max in PL index for Galactic spectrum correction #64

Closed
sfegan opened this issue Apr 11, 2024 · 2 comments
Closed

Min / Max in PL index for Galactic spectrum correction #64

sfegan opened this issue Apr 11, 2024 · 2 comments
Assignees

Comments

@sfegan
Copy link

sfegan commented Apr 11, 2024

galactic_spectrum=Spectrum(model='PowerLaw',Prefactor=1,Index=0,Scale=100,Prefactor_free=True,

The PL model that corrects the Galactic diffuse model is created with an index of zero (as it should be), but it has limits on the index of [0,10] .. which means that the index can never allow harder spectra than zero. I would suggest the appropriate limits should be [-1,1] or something like that, to allow the correction to swing both positive and negative from the nominal value.

physicsranger added a commit that referenced this issue Apr 11, 2024
Quick fix to adjust the scale, min, and max of the PowerLaw spectrum potentially modifying the Galacitc Diffuse component.  Addresses issue #64
@physicsranger physicsranger self-assigned this Apr 11, 2024
@physicsranger
Copy link
Owner

Good catch! Looking at XML files produced from my older version, I did have the min and max matched what you suggested, but in my move to the new code I forgot to ensure that this was done the same way. I've pushed a change and will upload it to PyPI soon and create a new release tag. (I just have to sort out my PyPI password to verify my email).

@physicsranger
Copy link
Owner

This has been implemented in the latest release (v1.10.10). The release has been created on GitHub and uploaded to PyPI, available via:

python3 -m pip install --upgrade LATSourceModel

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

No branches or pull requests

2 participants