Coverage for src/galsbi/citations.py: 100%
30 statements
« prev ^ index » next coverage.py v7.17.2, created at 2026-11-09 18:05 +0000
« prev ^ index » next coverage.py v7.17.2, created at 2026-11-09 18:05 +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_FISCHBACHER26,
14 CITE_GALSBI,
15 CITE_MOSER24,
16 CITE_PROMAGE,
17 CITE_SHAM_OT,
18 CITE_TORTORELLI25,
19 CITE_UFIG,
20)
23def cite_abc_posterior(name):
24 """
25 Prints the citation for the model with the given name.
27 :param name: model name for which to print the citation
28 """
29 if name == "Moser+24":
30 bib_entry = CITE_MOSER24
31 elif name == "Fischbacher+24":
32 bib_entry = CITE_FISCHBACHER24
33 elif name == "Tortorelli+25":
34 bib_entry = CITE_TORTORELLI25
35 elif name == "Fischbacher+26":
36 bib_entry = CITE_FISCHBACHER26
37 else:
38 raise ValueError(
39 f"Model {name} not found, only the following"
40 f" models are available: [{ALL_MODELS}]"
41 )
42 print("(PAPER model)")
43 print(bib_entry)
46def cite_galsbi_release():
47 """
48 Prints the citation for the galsbi release.
49 """
50 print("(PAPERS GalSBI release)")
51 print(CITE_FISCHBACHER24)
52 print(CITE_TORTORELLI25)
55def cite_code_release(mode):
56 """
57 Prints the citation for the code release.
59 :param mode: mode of the model
60 """
61 print("(PAPERS code release)")
62 print(CITE_GALSBI)
63 if not (mode == "intrinsic" or mode == "emu"):
64 if (mode == "config_file") or (mode is None):
65 print("If you use ufig plugins in your configuration, please also cite:")
66 print(CITE_UFIG)
69def cite_magnitude_emulator_release():
70 """
71 Prints the citation for the ProMage magnitude emulator release.
72 """
73 print("(PAPERS magnitude emulator release)")
74 print(CITE_PROMAGE)
77def cite_sham_ot():
78 """
79 Prints the citation of SHAM-OT.
80 """
81 print("Positions were assigned using")
82 print(CITE_SHAM_OT)