Skip to content

Conex output implementation - #130

Open
Jorgecvb1 wants to merge 5 commits into
mainfrom
conex_output_refactor
Open

Jorgecvb1 wants to merge 5 commits into
mainfrom
conex_output_refactor

Conversation

@Jorgecvb1

Copy link
Copy Markdown

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

@Jorgecvb1
Jorgecvb1 requested a review from Areustle September 24, 2026 17:56
@Jorgecvb1 Jorgecvb1 self-assigned this Sep 24, 2026
@Jorgecvb1 Jorgecvb1 added the enhancement New feature or request label Sep 24, 2026
Jorgecvb1 and others added 4 commits September 24, 2026 19:59
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implementation of conex output with new refactoring

2 participants