Skip to content

Commit

Permalink
current working status
Browse files Browse the repository at this point in the history
  • Loading branch information
santiagocasas committed Dec 1, 2024
1 parent c7af4ed commit 7559e34
Show file tree
Hide file tree
Showing 8 changed files with 4,680 additions and 956 deletions.
2 changes: 2 additions & 0 deletions cosmicfishpie/configs/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ def init(
),
)
settings.setdefault("specs_dir", settings["specs_dir_default"])
settings.setdefault("external_data_dir", os.path.join(os.path.dirname(os.path.realpath(__file__)),
"external_data"))
settings.setdefault("survey_name", surveyName)
settings.setdefault("survey_specs", "ISTF-Optimistic")
settings.setdefault("survey_name_photo", "Euclid-Photometric-ISTF-Pessimistic")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
specifications:
'z_bins_GCph': [0.2, 0.39, 0.5, 0.65, 0.83, 1.03, 2.50]
'z_bins_WL': [0.2, 0.44, 0.69, 0.91, 1.18, 1.51, 2.50]
'zm': 0.9
'ngamma': 1.5
'ngal_sqarmin_GCph': 10.13
'ngal_sqarmin_WL': 35.88
photo_z_params:
'fout': 0.1
'co': 1
'cb': 1
'sigma_o': 0.05
'sigma_b': 0.05
'zo': 0.1
'zb': 0.0
'area_survey_GCph': 2500
'lmax_GCph': 750
'lmin_GCph': 10
'ellipt_error': 0.3
'area_survey_WL': 2500
'lmax_WL': 3000
'lmin_WL': 10
'kmax': 30.
'vary_ph_bias': 0.06
'vary_IA_pars': 0.035
ph_bias_model: 'binned'
ph_bias_parametrization:
binned:
keystr: 'b'
generate_bias_keys: true
binned_constant:
keystr: 'b'
generate_bias_keys: true
sqrt:
b0: 1.0
flagship:
A: 1.0
B: 2.5
C: 2.8
D: 1.6
IA_params:
IA_model: 'eNLA'
AIA: 1.72
betaIA: 2.17
etaIA: -0.41
4 changes: 2 additions & 2 deletions cosmicfishpie/cosmology/nuisance.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def __init__(
self.specs = self.config.specs
self.settings = self.config.settings
self.specsdir = self.settings["specs_dir"]
self.extdir = self.settings["external_data_dir"]
self.surveyname = self.specs["survey_name"]
if "GCsp" in self.observables or "IM" in self.observables:
self.sp_zbins = self.gcsp_zbins()
Expand Down Expand Up @@ -220,9 +221,8 @@ def luminosity_ratio(self):
"""
try:
# Lumratio file for IA
lum = np.loadtxt(os.path.join(self.specsdir, "lumratio_file.dat"))
lum = np.loadtxt(os.path.join(self.extdir, "lumratio_file.dat"))
lumratio = interp1d(lum[:, 0], lum[:, 1], kind="linear")
logger.info("Successfully loaded luminosity ratio file")
except (FileNotFoundError, OSError) as e:
logger.warning(f"Could not load luminosity ratio file: {e}. Using default value of 1.0")

Expand Down
3,773 changes: 3,773 additions & 0 deletions notebooks/Cosmology-Calculator-Symbolic-CF-Tests.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 7559e34

Please sign in to comment.