Repository navigation
Conversation
Adds CONEX-format output of the optical showers' longitudinal profiles (resolves #129), enabled by `nuspacesim run -c` or simulation.conex_output. * conex/format.py codifies the CONEX Header/Shower trees as fixed-shape NumPy structured dtypes. Every shower shares the fixed EAS node grid, so profile branches are fixed X[n_nodes] leaves -- no variable-length arrays. * conex/root_file.py writes those trees directly; no uproot/awkward dependency. Verified with ROOT 6.40 and uproot. * conex/writer.py maps profiles onto the format (Gaisser-Hillas fit, depths from ground, dE/dX) and provides ConexWriter. * compute() takes an on_shower_profile callable, forwarded through EAS and CphotAng as on_profile; it receives a fixed-shape ShowerProfile without changing any return value (serial and dask alike). No conditional branching in compute.py. lgE uses showerEnergy (the energy the profile was built with); geometry uses the beta the node grid was built with (clamped to >= 1 deg); showers whose maximum lies outside the visible window are skipped. Co-Authored-By: jorge <jcaracavalente@mines.edu> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the conex output functionality onto a .root file. Includes a flag -c and a variable in the .toml file that can be assigned as True to run nuSpaceSim with conex output. A GH fit is made to the profile to obtain the GH parameters (works directly with Greisen, parameterized GH or fluctuated GH). Events with decay altitude >20km and Xmax outside the atmosphere (RN max is the last element) are rejected and not saved as output. Resolves #129