diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7bf86f03fb0d762f48174d710b757637e7fde617..f049ddc719c18f74bb25476d3d944ea1829fd113 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -461,5 +461,6 @@ python-examples: - cd ${CI_PROJECT_DIR}/python/examples - python3 particle_distribution.py --input-dir $EXAMPLE_SHOWER_DIR - python3 shower_profile.py --input-dir $EXAMPLE_SHOWER_DIR + - python3 first_interactions.py --input-dir $EXAMPLE_SHOWER_DIR - export EXAMPLE_RADIO_SHOWER_DIR=${CI_PROJECT_DIR}/build/build_examples/example_outputs/radio_em_shower_outputs - python3 radio_emission.py --input-dir $EXAMPLE_RADIO_SHOWER_DIR diff --git a/python/corsika/io/outputs/interaction.py b/python/corsika/io/outputs/interaction.py index 21a1b1d54650066d2d3e664238e8dc3f6286d154..956d1d75bfbdf5b8874fc73d018f56e561e427f6 100644 --- a/python/corsika/io/outputs/interaction.py +++ b/python/corsika/io/outputs/interaction.py @@ -36,9 +36,6 @@ class FirstInteraction(Particle): """ Particle.__init__(self, prop_dict) - # need to define for momentum prop - self.px = self.py = self.pz = None - def __repr__(self) -> str: """ Return a string representation of this class. diff --git a/python/corsika/io/outputs/primary.py b/python/corsika/io/outputs/primary.py index d0105f1a0f9285a17e0d6d2acfe5afd56a044ce7..d5ee863cef4b8e7340b78605ce6c57872387f67b 100644 --- a/python/corsika/io/outputs/primary.py +++ b/python/corsika/io/outputs/primary.py @@ -34,6 +34,7 @@ class Particle(object): # need to define for position/direction functions self.x = self.y = self.z = None self.nx = self.ny = self.nz = None + self.px = self.py = self.pz = None # wrap the files of the dictionary so that there is a property # assigned to each value, i.e. print(my_primary.pdg) diff --git a/python/examples/first_interactions.py b/python/examples/first_interactions.py index d86d8d70dd7cbe21adad95ac6eed4d71b8dfa97a..25476eb80f7b5b1dbc1c453ce82c65579a9e3278 100644 --- a/python/examples/first_interactions.py +++ b/python/examples/first_interactions.py @@ -54,7 +54,6 @@ for ish, sh_id in enumerate(shower_ids): daughters = interactions[interactions["shower"] == sh_id] mother = projectiles[ish] - norm = np.sqrt(sum(np.array(mother.momentum) ** 2)) # total momentum print("Plotting shower", sh_id) print(mother)