Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
db35cd5
Test data generator with magnitude selection
AlexHls Feb 7, 2025
1e8214e
Fix normalization
AlexHls Feb 9, 2025
e06f163
Update plot
AlexHls Feb 9, 2025
3603109
Remove unneeded import
AlexHls Feb 10, 2025
29f657d
Adjust plot range
AlexHls Feb 10, 2025
a2481be
Fix testdata generation
AlexHls Feb 12, 2025
13d2864
Add hubble diagramm
AlexHls Feb 12, 2025
d0eb92e
Add Hubble-free selection effect model
AlexHls Feb 12, 2025
5d054a1
Add test data normalization option
AlexHls Feb 12, 2025
13c9147
Add nominal m_cut parameter
AlexHls Feb 14, 2025
a451ede
Initial refactor structure
AlexHls Feb 14, 2025
c49b652
Refactor classic h0 free scm
AlexHls Feb 16, 2025
c2ddf40
Refactor nh h0 free scm
AlexHls Feb 16, 2025
5c84638
Refactor classic nh h0 free scm
AlexHls Feb 16, 2025
dc738d8
Refactor classic nh h0 scm
AlexHls Feb 16, 2025
181b9ed
Refactor classic nh h0 scm
AlexHls Feb 16, 2025
ff784e3
Refactor simple h0 scm
AlexHls Feb 16, 2025
7c33df8
Refactor simple h0 scm
AlexHls Feb 16, 2025
0edfa0a
Refactor h0 scm
AlexHls Feb 16, 2025
5b2e9e7
Refactor classic h0 scm
AlexHls Feb 16, 2025
ffa5804
Add selection effect models to hubble scm
AlexHls Feb 16, 2025
9a324d5
Fix priors
AlexHls Feb 16, 2025
d72f7f3
Update bootstrap for new model system
AlexHls Feb 16, 2025
5963fa2
Minor fixes for hubble scm
AlexHls Feb 17, 2025
6ad41d7
Some fixes for hubbe scm test data
AlexHls Feb 18, 2025
8f79106
Fix selection effect model for hubble scm
AlexHls Feb 19, 2025
0e85c0f
Fix systematic uncertainties
AlexHls Feb 19, 2025
ebd13bb
Add z_pv file support
AlexHls Feb 23, 2025
1a21a0a
Add selection values to data collection
AlexHls Feb 23, 2025
de7cc9f
Minor fix
AlexHls Feb 23, 2025
525a361
Remove selection effects model from calibs
AlexHls Feb 26, 2025
9310139
Update pv uncertainty
AlexHls Feb 26, 2025
cb8884e
Add option to not store chains
AlexHls Feb 27, 2025
d352b67
Add interactive plot mode
AlexHls Mar 14, 2025
749be7b
Minor fixes
AlexHls Mar 19, 2025
fdb5b66
Fix units
AlexHls Mar 21, 2025
6f9fef8
Remove TkAgg import
AlexHls Mar 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ sccala-dev
build
_build
src/sccala_sniip.egg-info

src/sccala/scmlib/models/*
!src/sccala/scmlib/models/*.*

10 changes: 3 additions & 7 deletions src/sccala/asynphot/aks_correction.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ def get_sn_phot(photometry_file):
)
data.sort_values(by=["mjd"])
tels = data["telescope"].unique().tolist()
assert (
len(tels) == 1
), "More than one telescope found. Please correct each telescope separately."
assert len(tels) == 1, (
"More than one telescope found. Please correct each telescope separately."
)

phot_data = data.pivot_table(
index=["mjd"], columns=["band"], values=["mag", "emag"]
Expand Down Expand Up @@ -267,10 +267,6 @@ def aks_correction(
aks_corr_phot, aks_corr_phot_err
"""

try:
matplotlib.use("TkAgg")
except ImportError:
pass
# SN data
a_v, z_hel, mjd_explo = get_sn_info(snname, modelpath=modelpath)

Expand Down
21 changes: 21 additions & 0 deletions src/sccala/collect_scm_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ def main(args):
rho = args.rho
rho_calib = args.rho_calib
error_mode = args.error_mode
m_cut_nom = args.m_cut_nom
sig_cut_nom = args.sig_cut_nom
pv_red_file = args.pv_red_file

df = sl.load_data(
sne_list,
Expand All @@ -43,6 +46,9 @@ def main(args):
rho=rho,
rho_calib=rho_calib,
error_mode=error_mode,
m_cut_nom=m_cut_nom,
sig_cut_nom=sig_cut_nom,
pv_red_file=pv_red_file,
)

return df
Expand Down Expand Up @@ -140,6 +146,21 @@ def cli():
default="mean",
choices=["mean", "max", "min"],
)
parser.add_argument(
"--m_cut_nom",
help="Nominal value of the magnitude cut. Used for the full sample.",
default=18.5,
)
parser.add_argument(
"--sig_cut_nom",
help="Nominal value of the magnitude cut uncertainty. Used for the full sample.",
default=0.5,
)
parser.add_argument(
"-p",
"--pv_red_file",
help="Path to the file containing redshifts corrected for peculiar velocities.",
)

args = parser.parse_args()

Expand Down
Loading