Skip to content

Commit

Permalink
Shortname (#12)
Browse files Browse the repository at this point in the history
* add common shortnames for cosmic ray fluxes

* bump version
  • Loading branch information
The-Ludwig authored Dec 4, 2023
1 parent a2f277d commit d84a4a4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/fluxcomp/cosmic_ray_fluxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ class GlobalFitGST(CosmicRayFlux):
for z, a in [(1, 1), (2, 4), (6, 12), (14, 28), (26, 54)]
]

SHORTNAME = "GST"

def __init__(self) -> None:
super().__init__(GlobalFitGST.ValidPDGIDs)
self.aij = {}
Expand Down Expand Up @@ -123,11 +125,15 @@ def _flux(self, id: PDGID, E: ArrayLike, **kwargs: Any) -> ArrayLike:


class H3a(HillasGaisser):
SHORTNAME = "H3a"

def __init__(self) -> None:
super().__init__([1.7, 1.7, 1.14, 1.14, 1.14], 1.4, 2e9)


class H4a(HillasGaisser):
SHORTNAME = "H4a"

def __init__(self) -> None:
super().__init__([200, 0, 0, 0, 0], 1.6, 60e9)

Expand Down Expand Up @@ -192,6 +198,7 @@ def _flux(self, id: PDGID, E: ArrayLike, **kwargs: Any) -> ArrayLike:

class TIG(BrokenPowerLaw):
REFERENCE = "https://doi.org/10.1103/PhysRevD.54.4385"
SHORTNAME = "TIG"

def __init__(self) -> None:
proton_pdgid: PDGID = literals.proton
Expand All @@ -206,6 +213,7 @@ def __init__(self) -> None:

class TIGCutoff(BrokenPowerLaw):
REFERENCE = "https://doi.org/10.1103/PhysRevD.54.4385"
SHORTNAME = "TIG-CO"

def __init__(self) -> None:
proton_pdgid: PDGID = literals.proton
Expand All @@ -220,6 +228,7 @@ def __init__(self) -> None:

class GlobalSplineFit(CosmicRayFlux):
REFERENCE = "https://doi.org/10.48550/arXiv.1711.11432"
SHORTNAME = "GSF"

z_to_a: ClassVar = {
1: 1,
Expand Down
2 changes: 1 addition & 1 deletion src/fluxcomp/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.1.3"
__version__ = "0.1.4"

LOGO_TEMPLATE = r"""
####################################
Expand Down

0 comments on commit d84a4a4

Please sign in to comment.