Skip to content

CRAMS update after the 2-population CR spectra modelling work - #8

Open
nj-vs-vh wants to merge 23 commits into
carmeloevoli:cramsmcmcfrom
nj-vs-vh:crams2knees
Open

CRAMS update after the 2-population CR spectra modelling work#8
nj-vs-vh wants to merge 23 commits into
carmeloevoli:cramsmcmcfrom
nj-vs-vh:crams2knees

Conversation

@nj-vs-vh

@nj-vs-vh nj-vs-vh commented Aug 25, 2026

Copy link
Copy Markdown

Main changes:

  • Full Python interface to CRAMS. It is generated with SWIG and is wrapped into a custom Python module. It cuts down on evaluation time ~50% w.r.t. the current subprocess & file I/O method in mcmc. The installation is currently only manual, but a pip install crams is achievable in a reasonable amount of time.
  • Cosmetic changes to the C++ side to accomodate the new interface. Mainly it's around the Runner object that now encapsulates the logic previously found in main.cpp.
  • Physics changes to CRAMS to support the knees project:
    • Cross-sections (both inelastic and fragmentation) are extrapolated logarithmically to high energies to support calcualtion above 10 TeV. They are mostly flat or slowly varying, so the extrapolation should not introduce large errors.
    • Source spectra now support features, currently SBPL and erfc cutoff are implemented.
  • Tests are updated where the implementation has minor changes. All existing entrypoints and workflows are preserved, no breaking changes introduced.

UPD:

  • source spectra can have multiple features; the ones currently implemented are break and erfc cutoff parametrized with population variance of Rmax, more to be added

@nj-vs-vh nj-vs-vh changed the title CRAMS complex update from the 2-population CR spectra model work CRAMS update after the 2-population CR spectra modelling work Sep 2, 2026
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.

1 participant