Skip to content

Commit

Permalink
Update Simulation config to default Cherenkov light engine to 'Greisen'
Browse files Browse the repository at this point in the history
- Set 'Greisen' as the default value for the cherenkov_light_engine field in the Simulation class.
- Added validation to replace 'Default' with 'Greisen' when parsing input configurations.
  • Loading branch information
Areustle committed Aug 21, 2024
1 parent 509b159 commit 6297375
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/nuspacesim/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,16 @@ def serialize_rad(self, x: float) -> str:
angle_from_limb: float = np.radians(7)
""" Angle From Limb. Default (Radians). """
cherenkov_light_engine: Literal[
"Default", "Greisen", "Gaisser-Hillas"
] = "Default" # "CHASM", "EASCherSim"
"Greisen", "Gaisser-Hillas", "Default"
] = "Greisen" # "CHASM", "EASCherSim"
"""Cherenkov Light Engine model: Default = 'Greisen'"""

@field_validator("cherenkov_light_engine", mode="before")
@classmethod
def validate_cherenkov_light_engine(cls, value: str) -> str:
if value == "Default":
return "Greisen"
return value

ionosphere: Optional[Ionosphere] = Ionosphere()
tau_shower: NuPyPropShower = NuPyPropShower()
Expand Down

0 comments on commit 6297375

Please sign in to comment.