Skip to content

Commit

Permalink
adopt changes in corsika-primary
Browse files Browse the repository at this point in the history
  • Loading branch information
relleums committed Feb 26, 2024
1 parent db8bc5d commit ae06853
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
16 changes: 9 additions & 7 deletions airshower_template_generator/production.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import numpy as np
import corsika_primary as cpw
import spherical_coordinates
import tempfile
import os
import io
Expand Down Expand Up @@ -116,8 +117,8 @@ def make_corsika_steering_card(
primary = {
"particle_id": f8(particle["corsika_particle_id"]),
"energy_GeV": f8(energy),
"zenith_rad": f8(0.0),
"azimuth_rad": f8(0.0),
"theta_rad": f8(0.0),
"phi_rad": f8(0.0),
"depth_g_per_cm2": f8(0.0),
}
primaries.append(primary)
Expand Down Expand Up @@ -306,15 +307,16 @@ def run_job(job):

view = cherenkov_bunches[meets, :]

MOMENTUM_TO_POINTING = -1.0
(
cer_cpara,
cer_cperp,
) = projection.project_light_field_onto_source_image(
cer_cx_rad=MOMENTUM_TO_POINTING
* view[:, cpw.I.BUNCH.UX_1],
cer_cy_rad=MOMENTUM_TO_POINTING
* view[:, cpw.I.BUNCH.VY_1],
cer_cx_rad=spherical_coordinates.corsika.ux_to_cx(
ux=view[:, cpw.I.BUNCH.UX_1]
),
cer_cy_rad=spherical_coordinates.corsika.vy_to_cy(
vy=view[:, cpw.I.BUNCH.VY_1]
),
cer_x_m=xy_supports[azi][rad][probe][0],
cer_y_m=xy_supports[azi][rad][probe][1],
primary_cx_rad=0.0,
Expand Down
2 changes: 1 addition & 1 deletion airshower_template_generator/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.7"
__version__ = "0.3.8"
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
install_requires=[
"json_utils_sebastian-achim-mueller",
"binning_utils_sebastian-achim-mueller",
"corsika_primary>=2.3.0",
"spherical_coordinates>=0.1.1",
"corsika_primary>=2.4.4",
"atmospheric_cherenkov_response_cherenkov-plenoscope-project",
"sebastians_matplotlib_addons",
"rename_after_writing",
Expand Down

0 comments on commit ae06853

Please sign in to comment.