Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
ceeb124
combine SFR_Z_fraction and star_formation_rate into a single function…
maxbriel Mar 14, 2025
9f511d9
add correct select_one_met in function
maxbriel Mar 14, 2025
e5fa266
move SFH into separate classes with abstract inheritance
maxbriel Mar 14, 2025
592cf8c
Move SFH to classes (with abstract treatments) + Add Chruslinska+21 S…
maxbriel Mar 17, 2025
99191fb
fix fSFR. Now sums correctly to 1 at each redshift.
maxbriel Mar 17, 2025
4e353d1
add fSFR unit tests
maxbriel Mar 17, 2025
9be686b
add additional basic tests
maxbriel Mar 17, 2025
5b3a35c
fix double naming of SFR
maxbriel Mar 17, 2025
2203658
add tests for new SFRs
maxbriel Mar 17, 2025
5755de0
remove old SFH code; not used anywhere
maxbriel Mar 17, 2025
2f22d61
move std_log_metallicity_history
maxbriel Mar 20, 2025
74c6290
add dosctring for abstract class
maxbriel Mar 20, 2025
11707ef
add docstrings
maxbriel Mar 20, 2025
37fbe17
rename variables
maxbriel Mar 20, 2025
f55e813
add more doc strings
maxbriel Mar 20, 2025
ba64f50
add even more docs
maxbriel Mar 20, 2025
55b65cc
more doc strings
maxbriel Mar 20, 2025
4a274d5
add checks for required parameters in MadauBase
maxbriel Mar 20, 2025
d5f88e2
docstrings:
maxbriel Mar 20, 2025
3712cf2
change name of SFR_per_met_per_z function
maxbriel Mar 20, 2025
1d06d9f
alter unit tests to adapt to previous changes
maxbriel Mar 20, 2025
b715580
change ' to
maxbriel Mar 20, 2025
5f9bde8
cleanup line lengths
maxbriel Mar 20, 2025
fe7d95f
change output fSFR and _call__ dosctring to ndarray
maxbriel Mar 20, 2025
32779c1
add check for model parameters required
maxbriel Mar 20, 2025
7009186
restructure + integrate only between Z_min and Z_max + add option nor…
maxbriel Mar 21, 2025
c52c761
Z_max check
maxbriel Mar 21, 2025
92b2525
update the SFH to use Z_min and Z_max and normalise. Move the splitti…
maxbriel Mar 21, 2025
6671365
fix name typo
maxbriel Mar 21, 2025
a629c04
remove Z_max requirement for Chruslinska
maxbriel Mar 21, 2025
38b2936
implement Matthias comments
maxbriel Mar 26, 2025
865be99
change to rates.MODEL
maxbriel Mar 26, 2025
32f1bc7
change comment
maxbriel Mar 26, 2025
8590a9e
add test for get_SFR_per_met_at_z
maxbriel Mar 26, 2025
95c32ae
make sure to test branches
maxbriel Mar 26, 2025
9f66591
add SFH tests
maxbriel Mar 26, 2025
b1622d6
add space
maxbriel Mar 26, 2025
465453e
remove duplicate lines in IllustrisTNG class
maxbriel Apr 1, 2025
f0bd4fc
move ConcreteSFH into a fixture
maxbriel Apr 1, 2025
acf51b5
Merge branch 'development' into max_newSFH
maxbriel Apr 1, 2025
4a8c215
Add support for Zmin and Zmax inside bins and inside the same bin.
maxbriel Apr 16, 2025
81e2882
add doc string + remove select_one_met
maxbriel Apr 29, 2025
6509cf9
replace MODEL with SFH_MODEL
maxbriel Apr 29, 2025
8c68489
change DEFAULT_MODEL to DEFAULT_SFH_MODEL
maxbriel Apr 29, 2025
cbef687
add to default Zmin,Zmax=None + normalise=True
maxbriel Apr 29, 2025
ee1c8d2
update docstrings:
maxbriel Apr 29, 2025
89eaaf5
clean up star_formation_history file
maxbriel Apr 29, 2025
a4e726a
update unit tests + implement comments
maxbriel Apr 29, 2025
9d1f522
update call method test
maxbriel Apr 29, 2025
a61f649
add std_log_metallicity_dist integer support
maxbriel Apr 29, 2025
9e6d24e
make explicit regex expression
maxbriel Apr 29, 2025
46da66b
update unit tests & implement remainder of comments Matthias
maxbriel Apr 29, 2025
613833e
cleanup
maxbriel Apr 29, 2025
a6de570
warning cleanup
maxbriel Apr 29, 2025
2f570e1
add SFHModelWarning + add sort check
maxbriel May 2, 2025
70d6588
change to sphinx reference style
maxbriel May 2, 2025
0cf1b05
add reference
maxbriel May 2, 2025
b736b51
add check for None output in error
maxbriel May 2, 2025
adc7f56
add unit test for unsorted Metalicity bins
maxbriel May 2, 2025
3c82c0d
suggested change
maxbriel May 2, 2025
510a958
add new warning class to test
maxbriel May 2, 2025
b9d91a3
Update posydon/unit_tests/popsyn/test_star_formation_history.py
maxbriel May 8, 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
8 changes: 7 additions & 1 deletion .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,10 @@ jobs:
export PATH_TO_POSYDON=./
export PATH_TO_POSYDON_DATA=./posydon/unit_tests/_data/
export MESA_DIR=./
python -m pytest posydon/unit_tests/ --cov=posydon.config --cov=posydon.utils --cov=posydon.grids --cov-branch --cov-report term-missing --cov-fail-under=100
python -m pytest posydon/unit_tests/ --cov=posydon.utils \
--cov=posydon.config \
--cov=posydon.grids \
--cov=posydon.popsyn.star_formation_history \
--cov-branch \
--cov-report term-missing \
--cov-fail-under=100
8 changes: 4 additions & 4 deletions posydon/popsyn/rate_calculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
from astropy import units as u


DEFAULT_MODEL = {
DEFAULT_SFH_MODEL = {
"delta_t": 100, # Myr
"SFR": "IllustrisTNG",
"sigma_SFR": None,
"Z_max": 1.0,
"select_one_met": False,
"Z_max": None, # Zsun
"Z_min": None, # Zsun
"normalise": True, # normalise the SFR to 1
"dlogZ": None, # e.g, [np.log10(0.0142/2),np.log10(0.0142*2)]
"Zsun": Zsun,
}
Expand Down Expand Up @@ -150,7 +151,6 @@ def get_redshift_from_cosmic_time(t_cosm):
return trained_tz_interp(t_cosm)



def get_redshift_bin_edges(delta_t):
"""Compute the redshift bin edges.

Expand Down
Loading