Coverage for src / galsbi / citations.py: 100%
27 statements
« prev ^ index » next coverage.py v7.13.2, created at 2026-01-30 16:27 +0000
« prev ^ index » next coverage.py v7.13.2, created at 2026-01-30 16:27 +0000
1# Copyright (C) 2024 ETH Zurich
2# Institute for Particle Physics and Astrophysics
3# Author: Silvan Fischbacher
4# created: Wed Aug 07 2024
6# Copyright (C) 2025 LMU Munich
7# Main contributor: Luca Tortorelli
8# updated: Apr 2025
10from .models import (
11 ALL_MODELS,
12 CITE_FISCHBACHER24,
13 CITE_GALSBI,
14 CITE_MOSER24,
15 CITE_PROMAGE,
16 CITE_TORTORELLI25,
17 CITE_UFIG,
18)
21def cite_abc_posterior(name):
22 """
23 Prints the citation for the model with the given name.
25 :param name: model name for which to print the citation
26 """
27 if name == "Moser+24":
28 bib_entry = CITE_MOSER24
29 elif name == "Fischbacher+24":
30 bib_entry = CITE_FISCHBACHER24
31 elif name == "Tortorelli+25":
32 bib_entry = CITE_TORTORELLI25
33 print("(Magnitude emulator model)")
34 print(CITE_PROMAGE)
35 else:
36 raise ValueError(
37 f"Model {name} not found, only the following"
38 f" models are available: [{ALL_MODELS}]"
39 )
40 print("(PAPER model)")
41 print(bib_entry)
44def cite_galsbi_release():
45 """
46 Prints the citation for the galsbi release.
47 """
48 print("(PAPERS GalSBI release)")
49 print(CITE_FISCHBACHER24)
50 print(CITE_TORTORELLI25)
53def cite_code_release(mode):
54 """
55 Prints the citation for the code release.
57 :param mode: mode of the model
58 """
59 print("(PAPERS code release)")
60 print(CITE_GALSBI)
61 if not (mode == "intrinsic" or mode == "emu"):
62 if (mode == "config_file") or (mode is None):
63 print("If you use ufig plugins in your configuration, please also cite:")
64 print(CITE_UFIG)
67def cite_magnitude_emulator_release():
68 """
69 Prints the citation for the ProMage magnitude emulator release.
71 :param mode: mode of the model
72 """
73 print("(PAPERS magnitude emulator release)")
74 print(CITE_PROMAGE)