Skip to content

Implement template-fitting class#267

Open
torresramiro350 wants to merge 83 commits into
threeML:devfrom
torresramiro350:master
Open

Implement template-fitting class#267
torresramiro350 wants to merge 83 commits into
threeML:devfrom
torresramiro350:master

Conversation

@torresramiro350

@torresramiro350 torresramiro350 commented Apr 22, 2026

Copy link
Copy Markdown

Introduce spatial_model.py that implements a 3D template-fitting class, which adopts TemplateModel module and Galprop. This module was used in the paper: A. Albert et al (HAWC Collaboration) 2024.

A unit test is included in test_3D_template.py

torresramiro350 and others added 30 commits May 22, 2022 15:32
@codecov

codecov Bot commented Apr 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.25337% with 51 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.17%. Comparing base (e4311bb) to head (76c0b09).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #267      +/-   ##
==========================================
+ Coverage   79.79%   80.17%   +0.37%     
==========================================
  Files          47       48       +1     
  Lines        5958     6314     +356     
==========================================
+ Hits         4754     5062     +308     
- Misses       1204     1252      +48     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@PreisTo

PreisTo commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

That's really cool @torresramiro350! Can you change the target branch of the PR to dev and merge threeML:dev into your branch?

@torresramiro350 torresramiro350 changed the base branch from master to dev April 27, 2026 05:22
@torresramiro350

Copy link
Copy Markdown
Author

@PreisTo Hi, sure, I've switched the target branch to be dev.

@torresramiro350 torresramiro350 marked this pull request as ready for review April 27, 2026 05:58

@PreisTo PreisTo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice work :)
Maybe you can recycle some of the functions and classes you redefine from template_model.py. Would make it more easier to maintain in the long run

Comment thread astromodels/functions/spatial_model.py Outdated
Comment thread astromodels/functions/spatial_model.py Outdated
Comment thread astromodels/functions/spatial_model.py Outdated
I also added an attribute that differentiates between the two template
models. This should be a cleaner approach.
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