diffsky 0.1.2__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- diffsky-0.2.0/.github/dependabot.yml +10 -0
- diffsky-0.1.2/.github/workflows/linting.yml → diffsky-0.2.0/.github/workflows/linting.yaml +6 -6
- diffsky-0.1.2/.github/workflows/monthly-warning-test.yml → diffsky-0.2.0/.github/workflows/monthly-warning-test.yaml +12 -6
- diffsky-0.1.2/.github/workflows/tests.yml → diffsky-0.2.0/.github/workflows/test_latest_releases.yaml +16 -9
- diffsky-0.2.0/.github/workflows/test_main_branch.yaml +91 -0
- diffsky-0.1.2/.github/workflows/tests_cron.yml → diffsky-0.2.0/.github/workflows/tests_cron.yaml +14 -7
- {diffsky-0.1.2 → diffsky-0.2.0}/.readthedocs.yml +1 -1
- {diffsky-0.1.2 → diffsky-0.2.0}/CHANGES.rst +5 -0
- {diffsky-0.1.2/diffsky.egg-info → diffsky-0.2.0}/PKG-INFO +6 -5
- diffsky-0.2.0/diffsky/_version.py +1 -0
- diffsky-0.2.0/diffsky/burstpop/diagnostics/plot_tburstpop.py +115 -0
- diffsky-0.2.0/diffsky/burstpop/diagnostics/tests/test_plot_tburstpop.py +16 -0
- diffsky-0.2.0/diffsky/burstpop/diffqburstpop_mono.py +107 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/burstpop/fburstpop.py +10 -0
- diffsky-0.2.0/diffsky/burstpop/fburstpop_mono.py +165 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/burstpop/freqburst_mono.py +19 -10
- diffsky-0.2.0/diffsky/burstpop/tests/test_diffqburstpop_mono.py +128 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/burstpop/tests/test_fburstpop.py +36 -3
- diffsky-0.2.0/diffsky/burstpop/tests/test_fburstpop_mono.py +200 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/burstpop/tests/test_freqburst_mono.py +46 -0
- diffsky-0.2.0/diffsky/cosmos_utils/cosmos_mstar_model.py +185 -0
- diffsky-0.2.0/diffsky/cosmos_utils/tests/test_cosmos_mstar_model.py +36 -0
- diffsky-0.2.0/diffsky/data_loaders/cosmos20_loader.py +106 -0
- diffsky-0.2.0/diffsky/data_loaders/hacc_core_utils.py +119 -0
- diffsky-0.2.0/diffsky/data_loaders/load_discovery_cores.py +395 -0
- diffsky-0.2.0/diffsky/data_loaders/load_hacc_cores.py +440 -0
- diffsky-0.2.0/diffsky/data_loaders/tests/test_cosmos_loader.py +80 -0
- diffsky-0.2.0/diffsky/data_loaders/tests/test_hacc_core_utils.py +60 -0
- diffsky-0.2.0/diffsky/data_loaders/tests/test_load_discovery_cores.py +23 -0
- diffsky-0.2.0/diffsky/data_loaders/tests/test_load_hacc_cores.py +49 -0
- diffsky-0.2.0/diffsky/data_loaders/tests/testing_data/cosmos20_shasum.dat +1 -0
- diffsky-0.2.0/diffsky/diagnostics/plot_delta_mag_burstiness.py +321 -0
- diffsky-0.2.0/diffsky/diagnostics/plot_diffstar_fq.py +121 -0
- diffsky-0.2.0/diffsky/diagnostics/tests/test_plot_delta_mag_burstiness.py +14 -0
- diffsky-0.2.0/diffsky/diagnostics/tests/test_plot_diffstar_fq.py +14 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/avpop_mono.py +16 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/tests/test_avpop_mono.py +33 -0
- diffsky-0.2.0/diffsky/dustpop/tests/test_tw_dustpop_mono.py +146 -0
- diffsky-0.2.0/diffsky/dustpop/tests/test_tw_dustpop_mono_noise.py +117 -0
- diffsky-0.2.0/diffsky/dustpop/tw_dustpop_mono.py +175 -0
- diffsky-0.2.0/diffsky/dustpop/tw_dustpop_mono_noise.py +133 -0
- diffsky-0.2.0/diffsky/experimental/phot_utils.py +67 -0
- diffsky-0.2.0/diffsky/experimental/precompute_ssp_phot.py +155 -0
- diffsky-0.2.0/diffsky/experimental/tests/test_precompute_ssp_phot.py +43 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/mc_diffmah_tpeak.py +111 -31
- diffsky-0.2.0/diffsky/mass_functions/tests/test_mc_diffmah_tpeak.py +95 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/upweighting/namedtuple_cat_utils.py +1 -1
- diffsky-0.2.0/diffsky/mass_functions/upweighting/tests/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/upweighting/tests/test_mc_gen_upweighting.py +3 -3
- diffsky-0.2.0/diffsky/mc_diffsky.py +244 -0
- diffsky-0.2.0/diffsky/sumstats/__init__.py +0 -0
- diffsky-0.2.0/diffsky/sumstats/tests/__init__.py +0 -0
- diffsky-0.2.0/diffsky/systematics/__init__.py +0 -0
- diffsky-0.2.0/diffsky/systematics/tests/__init__.py +0 -0
- diffsky-0.2.0/diffsky/tests/__init__.py +0 -0
- diffsky-0.2.0/diffsky/tests/test_mc_diffsky.py +55 -0
- diffsky-0.2.0/diffsky/tests/testing_data/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0/diffsky.egg-info}/PKG-INFO +6 -5
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky.egg-info/SOURCES.txt +46 -7
- diffsky-0.2.0/diffsky.egg-info/requires.txt +6 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/docs/source/demo_diffmahpop_t_peak.ipynb +8 -10
- {diffsky-0.1.2 → diffsky-0.2.0}/docs/source/rtd_environment.yaml +3 -3
- {diffsky-0.1.2 → diffsky-0.2.0}/pyproject.toml +1 -1
- diffsky-0.2.0/requirements.txt +6 -0
- diffsky-0.2.0/scripts/make_diffsky_lj_mock.py +492 -0
- diffsky-0.2.0/scripts/make_sfh_lj_mock.py +176 -0
- diffsky-0.1.2/diffsky/_version.py +0 -1
- diffsky-0.1.2/diffsky/mass_functions/mc_subhalo_catalog.py +0 -129
- diffsky-0.1.2/diffsky/mass_functions/tests/test_mc_diffmah_tpeak.py +0 -26
- diffsky-0.1.2/diffsky/mass_functions/tests/test_mc_subhalo_catalog.py +0 -21
- diffsky-0.1.2/diffsky.egg-info/requires.txt +0 -6
- diffsky-0.1.2/requirements.txt +0 -6
- {diffsky-0.1.2 → diffsky-0.2.0}/.coveragerc +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/.git_archival.txt +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/.gitattributes +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/.gitignore +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/LICENSE.rst +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/README.rst +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/burstpop/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/burstpop/diagnostics/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/burstpop/diagnostics/plot_fburstpop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/burstpop/diagnostics/tests/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/burstpop/diagnostics/tests/test_plot_fburstpop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/burstpop/diffburstpop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/burstpop/diffqburstpop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/burstpop/freqburst.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/burstpop/tburstpop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/burstpop/tests/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/burstpop/tests/test_diffburstpop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/burstpop/tests/test_diffqburstpop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/burstpop/tests/test_freqburst.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/burstpop/tests/test_tburstpop.py +0 -0
- {diffsky-0.1.2/diffsky/dustpop/diagnostics → diffsky-0.2.0/diffsky/cosmos_utils}/__init__.py +0 -0
- {diffsky-0.1.2/diffsky/dustpop/diagnostics → diffsky-0.2.0/diffsky/cosmos_utils}/tests/__init__.py +0 -0
- {diffsky-0.1.2/diffsky/dustpop/tests → diffsky-0.2.0/diffsky/data_loaders}/__init__.py +0 -0
- {diffsky-0.1.2/diffsky/experimental → diffsky-0.2.0/diffsky/data_loaders/tests}/__init__.py +0 -0
- {diffsky-0.1.2/diffsky/experimental/dspspop → diffsky-0.2.0/diffsky/data_loaders/tests/testing_data}/__init__.py +0 -0
- {diffsky-0.1.2/diffsky/experimental/dspspop/tests → diffsky-0.2.0/diffsky/diagnostics}/__init__.py +0 -0
- {diffsky-0.1.2/diffsky/experimental → diffsky-0.2.0/diffsky/diagnostics}/tests/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/diffndhist.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/avpop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/avpop_flex.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/deltapop.py +0 -0
- {diffsky-0.1.2/diffsky/mass_functions/fitting_utils → diffsky-0.2.0/diffsky/dustpop/diagnostics}/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/diagnostics/plot_avpop_flex.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/diagnostics/plot_funopop_simple.py +0 -0
- {diffsky-0.1.2/diffsky/mass_functions/fitting_utils → diffsky-0.2.0/diffsky/dustpop/diagnostics}/tests/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/diagnostics/tests/test_plot_avpop_flex.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/diagnostics/tests/test_plot_funopop_simple.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/funopop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/funopop_simple.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/funopop_ssfr.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/sbl18_dust.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/sbl18_dust_kernels.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/sbl18_dustpop.py +0 -0
- {diffsky-0.1.2/diffsky/mass_functions/io_utils → diffsky-0.2.0/diffsky/dustpop/tests}/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/tests/test_avpop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/tests/test_avpop_flex.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/tests/test_deltapop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/tests/test_funopop_model.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/tests/test_funopop_simple.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/tests/test_funopop_ssfr.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/tests/test_sbl18_dustpop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/tests/test_tw_dust_kernels.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/tests/test_tw_dustpop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/tests/test_tw_dustpop_new.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/tw_dust.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/tw_dust_kernels.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/tw_dustpop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/dustpop/tw_dustpop_new.py +0 -0
- {diffsky-0.1.2/diffsky/mass_functions/kernels → diffsky-0.2.0/diffsky/experimental}/__init__.py +0 -0
- {diffsky-0.1.2/diffsky/mass_functions/kernels/tests → diffsky-0.2.0/diffsky/experimental/dspspop}/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/experimental/dspspop/boris_dust.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/experimental/dspspop/burstshapepop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/experimental/dspspop/dust_deltapop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/experimental/dspspop/dustpop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/experimental/dspspop/lgavpop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/experimental/dspspop/lgfburstpop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/experimental/dspspop/nagaraj22_dust.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/experimental/dspspop/photpop.py +0 -0
- {diffsky-0.1.2/diffsky/mass_functions/smhm_kernels → diffsky-0.2.0/diffsky/experimental/dspspop/tests}/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/experimental/dspspop/tests/test_attavpop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/experimental/dspspop/tests/test_boris_dust.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/experimental/dspspop/tests/test_burstshapepop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/experimental/dspspop/tests/test_dustdeltapop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/experimental/dspspop/tests/test_lgfburstpop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/experimental/dspspop/tests/test_photpop.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/experimental/photometry_interpolation.py +0 -0
- {diffsky-0.1.2/diffsky/mass_functions/smhm_kernels → diffsky-0.2.0/diffsky/experimental}/tests/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/experimental/tests/test_photometry_interpolation.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/ccshmf_model.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/fitting_utils/README.rst +0 -0
- {diffsky-0.1.2/diffsky/mass_functions/tests → diffsky-0.2.0/diffsky/mass_functions/fitting_utils}/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/fitting_utils/fit_ccshmf.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/fitting_utils/fit_ccshmf_kernels.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/fitting_utils/fit_hmf_kernels.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/fitting_utils/fit_hmf_model.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/fitting_utils/fitting_helpers.py +0 -0
- {diffsky-0.1.2/diffsky/mass_functions/tests/testing_data → diffsky-0.2.0/diffsky/mass_functions/fitting_utils/tests}/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/fitting_utils/tests/test_fit_ccshmf.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/fitting_utils/tests/test_fit_ccshmf_kernels.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/fitting_utils/tests/test_fit_hmf_kernels.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/fitting_utils/tests/test_fit_hmf_model.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/hmf_model.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/io_utils/README.txt +0 -0
- {diffsky-0.1.2/diffsky/mass_functions/upweighting → diffsky-0.2.0/diffsky/mass_functions/io_utils}/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/io_utils/loader.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/io_utils/smdpl_helpers.py +0 -0
- {diffsky-0.1.2/diffsky/mass_functions/upweighting/tests → diffsky-0.2.0/diffsky/mass_functions/kernels}/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/kernels/ccshmf_kernels.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/kernels/hmf_kernels.py +0 -0
- {diffsky-0.1.2/diffsky/sumstats → diffsky-0.2.0/diffsky/mass_functions/kernels/tests}/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/kernels/tests/test_ccshmf_kernels.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/kernels/tests/test_hmf_kernels.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/mc_hosts.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/mc_subs.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/mc_tinfall.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/measure_ccshmf.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/measure_hmf.py +0 -0
- {diffsky-0.1.2/diffsky/sumstats/tests → diffsky-0.2.0/diffsky/mass_functions/smhm_kernels}/__init__.py +0 -0
- {diffsky-0.1.2/diffsky/systematics → diffsky-0.2.0/diffsky/mass_functions/smhm_kernels/tests}/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/smhm_kernels/tests/test_threeroll_smhm.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/smhm_kernels/threeroll_kernels.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/smhm_kernels/threeroll_smhm.py +0 -0
- {diffsky-0.1.2/diffsky/systematics → diffsky-0.2.0/diffsky/mass_functions}/tests/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/tests/test_ccshmf.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/tests/test_hmf_model.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/tests/test_mc_hosts.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/tests/test_mc_subs.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/tests/test_mc_tinfall.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/tests/test_measure_hmf.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/tests/testing_data/README.txt +0 -0
- {diffsky-0.1.2/diffsky/tests → diffsky-0.2.0/diffsky/mass_functions/tests/testing_data}/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_0.00_lgmhost_12.32.txt +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_0.00_lgmhost_13.00.txt +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_0.00_lgmhost_13.55.txt +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_0.00_lgmhost_14.08.txt +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_1.00_lgmhost_12.31.txt +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_1.00_lgmhost_12.99.txt +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_1.00_lgmhost_13.51.txt +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_1.00_lgmhost_14.05.txt +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/tests/testing_data/smdpl_hmf_cuml_redshift_0.05.txt +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/tests/testing_data/smdpl_hmf_cuml_redshift_1.00.txt +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/tests/testing_data/smdpl_hmf_cuml_redshift_2.14.txt +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/tests/testing_data/smdpl_hmf_cuml_redshift_3.95.txt +0 -0
- {diffsky-0.1.2/diffsky/tests/testing_data → diffsky-0.2.0/diffsky/mass_functions/upweighting}/__init__.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/upweighting/upweighting.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/mass_functions/utils.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/sbl18_photgrad.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/sumstats/diffndhist.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/sumstats/smhm.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/sumstats/tests/test_smhm.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/systematics/ssp_errors.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/systematics/tests/test_ssp_errors.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/tests/test_dependencies.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/tests/test_diffndhist.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/tests/test_diffsky_setup.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/tests/test_sbl18_photgrad.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/tests/test_tw_photgrad.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/tests/test_utils.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/tw_photgrad.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/tw_utils.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky/utils.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky.egg-info/dependency_links.txt +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/diffsky.egg-info/top_level.txt +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/docs/Makefile +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/docs/make.bat +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/docs/source/citation.rst +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/docs/source/conf.py +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/docs/source/demos.rst +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/docs/source/index.rst +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/docs/source/installation.rst +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/setup.cfg +0 -0
- {diffsky-0.1.2 → diffsky-0.2.0}/setup.py +0 -0
|
@@ -12,25 +12,25 @@ jobs:
|
|
|
12
12
|
runs-on: "ubuntu-latest"
|
|
13
13
|
|
|
14
14
|
steps:
|
|
15
|
-
- uses: actions/checkout@
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
16
|
|
|
17
|
-
- uses: conda-incubator/setup-miniconda@
|
|
17
|
+
- uses: conda-incubator/setup-miniconda@v3
|
|
18
18
|
with:
|
|
19
19
|
python-version: 3.11
|
|
20
20
|
channels: conda-forge,defaults
|
|
21
21
|
channel-priority: strict
|
|
22
22
|
show-channel-urls: true
|
|
23
23
|
miniforge-version: latest
|
|
24
|
-
miniforge-variant: Mambaforge
|
|
25
24
|
|
|
26
25
|
- name: configure conda and install code
|
|
27
26
|
shell: bash -l {0}
|
|
28
27
|
run: |
|
|
29
|
-
|
|
28
|
+
conda install --quiet \
|
|
30
29
|
--file=requirements.txt
|
|
31
30
|
python -m pip install --no-deps -e .
|
|
32
|
-
|
|
33
|
-
flake8
|
|
31
|
+
conda install -y -q \
|
|
32
|
+
flake8 \
|
|
33
|
+
flake8-pyproject
|
|
34
34
|
|
|
35
35
|
- name: lint
|
|
36
36
|
shell: bash -l {0}
|
|
@@ -12,28 +12,32 @@ jobs:
|
|
|
12
12
|
runs-on: "ubuntu-latest"
|
|
13
13
|
|
|
14
14
|
steps:
|
|
15
|
-
- uses: actions/checkout@
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
16
|
with:
|
|
17
17
|
fetch-depth: 0
|
|
18
18
|
|
|
19
|
-
- uses: conda-incubator/setup-miniconda@
|
|
19
|
+
- uses: conda-incubator/setup-miniconda@v3
|
|
20
20
|
with:
|
|
21
21
|
python-version: 3.11
|
|
22
22
|
channels: conda-forge,defaults
|
|
23
23
|
channel-priority: strict
|
|
24
24
|
show-channel-urls: true
|
|
25
25
|
miniforge-version: latest
|
|
26
|
-
|
|
27
|
-
use-mamba: true
|
|
26
|
+
|
|
28
27
|
|
|
29
28
|
- name: configure conda and install code
|
|
30
29
|
# Test against current main branch of all diff+ dependencies
|
|
31
30
|
shell: bash -l {0}
|
|
31
|
+
env:
|
|
32
|
+
GITHUB_TOKEN: ${{ secrets.CPAC_PRIVATE_REPO_TOKEN }}
|
|
33
|
+
GITHUB_USER: ${{ secrets.GH_USR_TESTING_TOKEN }}
|
|
34
|
+
|
|
35
|
+
# Test against current main branch of all diff+ dependencies
|
|
32
36
|
run: |
|
|
33
37
|
conda config --set always_yes yes
|
|
34
|
-
|
|
38
|
+
conda install --quiet \
|
|
35
39
|
--file=requirements.txt
|
|
36
|
-
|
|
40
|
+
conda install -y -q \
|
|
37
41
|
flake8 \
|
|
38
42
|
pytest \
|
|
39
43
|
pytest-xdist \
|
|
@@ -42,6 +46,7 @@ jobs:
|
|
|
42
46
|
setuptools \
|
|
43
47
|
"setuptools_scm>=7,<8" \
|
|
44
48
|
matplotlib \
|
|
49
|
+
astropy \
|
|
45
50
|
python-build
|
|
46
51
|
pip uninstall diffmah --yes
|
|
47
52
|
pip uninstall diffstar --yes
|
|
@@ -49,6 +54,7 @@ jobs:
|
|
|
49
54
|
pip install --no-deps git+https://github.com/ArgonneCPAC/diffmah.git
|
|
50
55
|
pip install --no-deps git+https://github.com/ArgonneCPAC/diffstar.git
|
|
51
56
|
pip install --no-deps git+https://github.com/ArgonneCPAC/dsps.git
|
|
57
|
+
pip install --no-deps git+https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/ArgonneCPAC/diffstarpop.git
|
|
52
58
|
python -m pip install --no-build-isolation --no-deps -e .
|
|
53
59
|
|
|
54
60
|
- name: test that no warnings are raised
|
|
@@ -8,32 +8,35 @@ on:
|
|
|
8
8
|
|
|
9
9
|
jobs:
|
|
10
10
|
tests:
|
|
11
|
-
name:
|
|
11
|
+
name: test-latest-diffstuff-releases
|
|
12
12
|
runs-on: "ubuntu-latest"
|
|
13
13
|
|
|
14
14
|
steps:
|
|
15
|
-
- uses: actions/checkout@
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
16
|
with:
|
|
17
17
|
fetch-depth: 0
|
|
18
18
|
|
|
19
|
-
- uses: conda-incubator/setup-miniconda@
|
|
19
|
+
- uses: conda-incubator/setup-miniconda@v3
|
|
20
20
|
with:
|
|
21
21
|
python-version: 3.11
|
|
22
22
|
channels: conda-forge,defaults
|
|
23
23
|
channel-priority: strict
|
|
24
24
|
show-channel-urls: true
|
|
25
25
|
miniforge-version: latest
|
|
26
|
-
miniforge-variant: Mambaforge
|
|
27
|
-
use-mamba: true
|
|
28
26
|
|
|
29
27
|
- name: configure conda and install code
|
|
30
|
-
# Test against
|
|
28
|
+
# Test against current main branch of all diff+ dependencies
|
|
31
29
|
shell: bash -l {0}
|
|
30
|
+
env:
|
|
31
|
+
GITHUB_TOKEN: ${{ secrets.CPAC_PRIVATE_REPO_TOKEN }}
|
|
32
|
+
GITHUB_USER: ${{ secrets.GH_USR_TESTING_TOKEN }}
|
|
33
|
+
|
|
34
|
+
# Test against conda-forge for all dependencies except use main branch for dsps
|
|
32
35
|
run: |
|
|
33
36
|
conda config --set always_yes yes
|
|
34
|
-
|
|
37
|
+
conda install --quiet \
|
|
35
38
|
--file=requirements.txt
|
|
36
|
-
|
|
39
|
+
conda install -y -q \
|
|
37
40
|
flake8 \
|
|
38
41
|
pytest \
|
|
39
42
|
pytest-xdist \
|
|
@@ -42,9 +45,11 @@ jobs:
|
|
|
42
45
|
setuptools \
|
|
43
46
|
"setuptools_scm>=7,<8" \
|
|
44
47
|
matplotlib \
|
|
48
|
+
astropy \
|
|
45
49
|
python-build
|
|
46
50
|
pip uninstall dsps --yes
|
|
47
51
|
pip install --no-deps git+https://github.com/ArgonneCPAC/dsps.git
|
|
52
|
+
pip install --no-deps git+https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/ArgonneCPAC/diffstarpop.git
|
|
48
53
|
python -m pip install --no-build-isolation --no-deps -e .
|
|
49
54
|
|
|
50
55
|
- name: test
|
|
@@ -53,7 +58,9 @@ jobs:
|
|
|
53
58
|
pytest -v diffsky --cov --cov-report=xml
|
|
54
59
|
|
|
55
60
|
- name: Upload coverage reports to Codecov
|
|
56
|
-
uses: codecov/codecov-action@
|
|
61
|
+
uses: codecov/codecov-action@v5
|
|
62
|
+
env:
|
|
63
|
+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
57
64
|
|
|
58
65
|
- name: test versions
|
|
59
66
|
shell: bash -el {0}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
name: test-main-branch-diffstuff
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request: null
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
tests:
|
|
11
|
+
name: test-main-branch-diffstuff
|
|
12
|
+
runs-on: "ubuntu-latest"
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 0
|
|
18
|
+
|
|
19
|
+
- uses: conda-incubator/setup-miniconda@v3
|
|
20
|
+
with:
|
|
21
|
+
python-version: 3.11
|
|
22
|
+
channels: conda-forge,defaults
|
|
23
|
+
channel-priority: strict
|
|
24
|
+
show-channel-urls: true
|
|
25
|
+
miniforge-version: latest
|
|
26
|
+
|
|
27
|
+
- name: configure conda and install code
|
|
28
|
+
# Test against current main branch of all diff+ dependencies
|
|
29
|
+
shell: bash -l {0}
|
|
30
|
+
env:
|
|
31
|
+
GITHUB_TOKEN: ${{ secrets.CPAC_PRIVATE_REPO_TOKEN }}
|
|
32
|
+
GITHUB_USER: ${{ secrets.GH_USR_TESTING_TOKEN }}
|
|
33
|
+
|
|
34
|
+
# Test against conda-forge for all dependencies except use main branch for dsps
|
|
35
|
+
run: |
|
|
36
|
+
conda config --set always_yes yes
|
|
37
|
+
conda install --quiet \
|
|
38
|
+
--file=requirements.txt
|
|
39
|
+
conda install -y -q \
|
|
40
|
+
flake8 \
|
|
41
|
+
pytest \
|
|
42
|
+
pytest-xdist \
|
|
43
|
+
pytest-cov \
|
|
44
|
+
pip \
|
|
45
|
+
setuptools \
|
|
46
|
+
"setuptools_scm>=7,<8" \
|
|
47
|
+
matplotlib \
|
|
48
|
+
astropy \
|
|
49
|
+
python-build
|
|
50
|
+
pip uninstall diffmah --yes
|
|
51
|
+
pip uninstall diffstar --yes
|
|
52
|
+
pip uninstall dsps --yes
|
|
53
|
+
pip install --no-deps git+https://github.com/ArgonneCPAC/diffmah.git
|
|
54
|
+
pip install --no-deps git+https://github.com/ArgonneCPAC/diffstar.git
|
|
55
|
+
pip install --no-deps git+https://github.com/ArgonneCPAC/dsps.git
|
|
56
|
+
pip install --no-deps git+https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/ArgonneCPAC/diffstarpop.git
|
|
57
|
+
python -m pip install --no-build-isolation --no-deps -e .
|
|
58
|
+
|
|
59
|
+
- name: test
|
|
60
|
+
shell: bash -l {0}
|
|
61
|
+
run: |
|
|
62
|
+
pytest -v diffsky --cov --cov-report=xml
|
|
63
|
+
|
|
64
|
+
- name: Upload coverage reports to Codecov
|
|
65
|
+
uses: codecov/codecov-action@v5
|
|
66
|
+
env:
|
|
67
|
+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
68
|
+
|
|
69
|
+
- name: test versions
|
|
70
|
+
shell: bash -el {0}
|
|
71
|
+
run: |
|
|
72
|
+
pip uninstall diffsky --yes
|
|
73
|
+
[[ $(python setup.py --version) != "0.0.0" ]] || exit 1
|
|
74
|
+
|
|
75
|
+
rm -rf dist/*
|
|
76
|
+
python setup.py sdist
|
|
77
|
+
pip install --no-deps --no-build-isolation dist/*.tar.gz
|
|
78
|
+
pushd ..
|
|
79
|
+
python -c "import diffsky; assert diffsky.__version__ != '0.0.0'"
|
|
80
|
+
popd
|
|
81
|
+
pip uninstall diffsky --yes
|
|
82
|
+
|
|
83
|
+
rm -rf dist/*
|
|
84
|
+
python -m build --sdist . --outdir dist
|
|
85
|
+
pip install --no-deps --no-build-isolation dist/*.tar.gz
|
|
86
|
+
pushd ..
|
|
87
|
+
python -c "import diffsky; assert diffsky.__version__ != '0.0.0'"
|
|
88
|
+
popd
|
|
89
|
+
pip uninstall diffsky --yes
|
|
90
|
+
|
|
91
|
+
python -m pip install -v --no-deps --no-build-isolation -e .
|
diffsky-0.1.2/.github/workflows/tests_cron.yml → diffsky-0.2.0/.github/workflows/tests_cron.yaml
RENAMED
|
@@ -16,28 +16,31 @@ jobs:
|
|
|
16
16
|
runs-on: "ubuntu-latest"
|
|
17
17
|
|
|
18
18
|
steps:
|
|
19
|
-
- uses: actions/checkout@
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
20
|
with:
|
|
21
21
|
fetch-depth: 0
|
|
22
22
|
|
|
23
|
-
- uses: conda-incubator/setup-miniconda@
|
|
23
|
+
- uses: conda-incubator/setup-miniconda@v3
|
|
24
24
|
with:
|
|
25
25
|
python-version: 3.11
|
|
26
26
|
channels: conda-forge,defaults
|
|
27
27
|
channel-priority: strict
|
|
28
28
|
show-channel-urls: true
|
|
29
29
|
miniforge-version: latest
|
|
30
|
-
miniforge-variant: Mambaforge
|
|
31
|
-
use-mamba: true
|
|
32
30
|
|
|
33
31
|
- name: configure conda and install code
|
|
34
32
|
# Test against current main branch of all diff+ dependencies
|
|
35
33
|
shell: bash -l {0}
|
|
34
|
+
env:
|
|
35
|
+
GITHUB_TOKEN: ${{ secrets.CPAC_PRIVATE_REPO_TOKEN }}
|
|
36
|
+
GITHUB_USER: ${{ secrets.GH_USR_TESTING_TOKEN }}
|
|
37
|
+
|
|
38
|
+
# Test against current main branch of all diff+ dependencies
|
|
36
39
|
run: |
|
|
37
40
|
conda config --set always_yes yes
|
|
38
|
-
|
|
41
|
+
conda install --quiet \
|
|
39
42
|
--file=requirements.txt
|
|
40
|
-
|
|
43
|
+
conda install -y -q \
|
|
41
44
|
flake8 \
|
|
42
45
|
pytest \
|
|
43
46
|
pytest-xdist \
|
|
@@ -46,6 +49,7 @@ jobs:
|
|
|
46
49
|
setuptools \
|
|
47
50
|
"setuptools_scm>=7,<8" \
|
|
48
51
|
matplotlib \
|
|
52
|
+
astropy \
|
|
49
53
|
python-build
|
|
50
54
|
pip uninstall diffmah --yes
|
|
51
55
|
pip uninstall diffstar --yes
|
|
@@ -53,6 +57,7 @@ jobs:
|
|
|
53
57
|
pip install --no-deps git+https://github.com/ArgonneCPAC/diffmah.git
|
|
54
58
|
pip install --no-deps git+https://github.com/ArgonneCPAC/diffstar.git
|
|
55
59
|
pip install --no-deps git+https://github.com/ArgonneCPAC/dsps.git
|
|
60
|
+
pip install --no-deps git+https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/ArgonneCPAC/diffstarpop.git
|
|
56
61
|
python -m pip install --no-build-isolation --no-deps -e .
|
|
57
62
|
|
|
58
63
|
- name: test
|
|
@@ -61,7 +66,9 @@ jobs:
|
|
|
61
66
|
pytest -v diffsky --cov --cov-report=xml
|
|
62
67
|
|
|
63
68
|
- name: Upload coverage reports to Codecov
|
|
64
|
-
uses: codecov/codecov-action@
|
|
69
|
+
uses: codecov/codecov-action@v5
|
|
70
|
+
env:
|
|
71
|
+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
65
72
|
|
|
66
73
|
- name: test versions
|
|
67
74
|
shell: bash -el {0}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: diffsky
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: Library for differentiable generation of synthetic skies
|
|
5
5
|
Author-email: Andrew Hearin <ahearin@anl.gov>
|
|
6
6
|
License: BSD 3-Clause License
|
|
@@ -40,10 +40,11 @@ Description-Content-Type: text/x-rst
|
|
|
40
40
|
License-File: LICENSE.rst
|
|
41
41
|
Requires-Dist: numpy
|
|
42
42
|
Requires-Dist: jax
|
|
43
|
-
Requires-Dist: diffmah>=0.
|
|
44
|
-
Requires-Dist: diffstar>=0.3.
|
|
45
|
-
Requires-Dist: dsps
|
|
43
|
+
Requires-Dist: diffmah>=0.7.0
|
|
44
|
+
Requires-Dist: diffstar>=0.3.3
|
|
45
|
+
Requires-Dist: dsps>=0.4.0
|
|
46
46
|
Requires-Dist: h5py
|
|
47
|
+
Dynamic: license-file
|
|
47
48
|
|
|
48
49
|
diffsky
|
|
49
50
|
============
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '0.2.0'
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"""
|
|
2
|
+
"""
|
|
3
|
+
|
|
4
|
+
import numpy as np
|
|
5
|
+
from dsps.sfh import diffburst
|
|
6
|
+
from matplotlib import lines as mlines
|
|
7
|
+
from matplotlib import pyplot as plt
|
|
8
|
+
|
|
9
|
+
from .. import tburstpop as tbp
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def make_tburstpop_comparison_plot(
|
|
13
|
+
params,
|
|
14
|
+
params2=tbp.DEFAULT_TBURSTPOP_PARAMS,
|
|
15
|
+
fname=None,
|
|
16
|
+
label1=r"${\rm new\ model}$",
|
|
17
|
+
label2=r"${\rm default\ model}$",
|
|
18
|
+
):
|
|
19
|
+
"""Make basic diagnostic plot of the model for Tburst
|
|
20
|
+
|
|
21
|
+
Parameters
|
|
22
|
+
----------
|
|
23
|
+
params : namedtuple
|
|
24
|
+
Instance of tburstpop.TburstPopParams
|
|
25
|
+
|
|
26
|
+
params2 : namedtuple, optional
|
|
27
|
+
Instance of tburstpop.TburstPopParams
|
|
28
|
+
Default is set by DEFAULT_TBURSTPOP_PARAMS
|
|
29
|
+
|
|
30
|
+
fname : string, optional
|
|
31
|
+
filename of the output figure
|
|
32
|
+
|
|
33
|
+
"""
|
|
34
|
+
lgyrarr = np.linspace(5, 9.05, 100)
|
|
35
|
+
|
|
36
|
+
logsmarr = np.array((9.0, 9.0, 12.0, 12.0))
|
|
37
|
+
logssfrarr = np.array((-7.0, -13.0, -7.0, -13.0))
|
|
38
|
+
lgyr_peak, lgyr_max = tbp.get_tburst_params_from_tburstpop_params(
|
|
39
|
+
tbp.DEFAULT_TBURSTPOP_PARAMS, logsmarr, logssfrarr
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
u_params = np.array(tbp.DEFAULT_TBURSTPOP_U_PARAMS) + np.random.uniform(
|
|
43
|
+
-1, 1, len(tbp.DEFAULT_TBURSTPOP_PARAMS)
|
|
44
|
+
)
|
|
45
|
+
u_params = tbp.DEFAULT_TBURSTPOP_U_PARAMS._make(u_params)
|
|
46
|
+
alt_params = tbp.get_bounded_tburstpop_params(u_params)
|
|
47
|
+
lgyr_peak2, lgyr_max2 = tbp.get_tburst_params_from_tburstpop_params(
|
|
48
|
+
alt_params, logsmarr, logssfrarr
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
fig, (ax, ax1) = plt.subplots(1, 2, figsize=(12, 5), sharex=True, sharey=True)
|
|
52
|
+
ax.loglog()
|
|
53
|
+
ax.set_xlim(8e4, 2e9)
|
|
54
|
+
ax.set_ylim(2e-7, 10.5)
|
|
55
|
+
xlabel = ax.set_xlabel(r"$\tau_{\rm age}\ {\rm [yr]}$")
|
|
56
|
+
xlabel = ax1.set_xlabel(r"$\tau_{\rm age}\ {\rm [yr]}$")
|
|
57
|
+
ylabel = ax.set_ylabel(r"${\rm PDF}$")
|
|
58
|
+
|
|
59
|
+
age_weights = diffburst._pureburst_age_weights_from_params(
|
|
60
|
+
lgyrarr, lgyr_peak[0], lgyr_max[0]
|
|
61
|
+
)
|
|
62
|
+
ax.plot(10**lgyrarr, age_weights, color="blue")
|
|
63
|
+
age_weights2 = diffburst._pureburst_age_weights_from_params(
|
|
64
|
+
lgyrarr, lgyr_peak2[0], lgyr_max2[0]
|
|
65
|
+
)
|
|
66
|
+
ax.plot(10**lgyrarr, age_weights2, "--", color="blue")
|
|
67
|
+
|
|
68
|
+
age_weights = diffburst._pureburst_age_weights_from_params(
|
|
69
|
+
lgyrarr, lgyr_peak[1], lgyr_max[1]
|
|
70
|
+
)
|
|
71
|
+
ax.plot(10**lgyrarr, age_weights, color="red")
|
|
72
|
+
age_weights2 = diffburst._pureburst_age_weights_from_params(
|
|
73
|
+
lgyrarr, lgyr_peak2[1], lgyr_max2[1]
|
|
74
|
+
)
|
|
75
|
+
ax.plot(10**lgyrarr, age_weights2, "--", color="red")
|
|
76
|
+
|
|
77
|
+
age_weights = diffburst._pureburst_age_weights_from_params(
|
|
78
|
+
lgyrarr, lgyr_peak[2], lgyr_max[2]
|
|
79
|
+
)
|
|
80
|
+
ax1.plot(10**lgyrarr, age_weights, color="blue")
|
|
81
|
+
age_weights2 = diffburst._pureburst_age_weights_from_params(
|
|
82
|
+
lgyrarr, lgyr_peak2[2], lgyr_max2[2]
|
|
83
|
+
)
|
|
84
|
+
ax1.plot(10**lgyrarr, age_weights2, "--", color="blue")
|
|
85
|
+
|
|
86
|
+
age_weights = diffburst._pureburst_age_weights_from_params(
|
|
87
|
+
lgyrarr, lgyr_peak[3], lgyr_max[3]
|
|
88
|
+
)
|
|
89
|
+
ax1.plot(10**lgyrarr, age_weights, color="red")
|
|
90
|
+
age_weights2 = diffburst._pureburst_age_weights_from_params(
|
|
91
|
+
lgyrarr, lgyr_peak2[3], lgyr_max2[3]
|
|
92
|
+
)
|
|
93
|
+
ax1.plot(10**lgyrarr, age_weights2, "--", color="red")
|
|
94
|
+
|
|
95
|
+
ax.set_title(r"$M_{\star}=10^9M_{\odot}$")
|
|
96
|
+
ax1.set_title(r"$M_{\star}=10^{12}M_{\odot}$")
|
|
97
|
+
|
|
98
|
+
red_line = mlines.Line2D([], [], ls="-", c="red", label=r"${\rm Q}$")
|
|
99
|
+
blue_line = mlines.Line2D([], [], ls="-", c="blue", label=r"${\rm SF}$")
|
|
100
|
+
solid_line = mlines.Line2D(
|
|
101
|
+
[], [], ls="-", c="gray", label=r"${\rm default\ model}$"
|
|
102
|
+
)
|
|
103
|
+
dashed_line = mlines.Line2D([], [], ls="--", c="gray", label=r"${\rm new\ model}$")
|
|
104
|
+
leg0 = ax.legend(handles=[red_line, blue_line], loc="upper left")
|
|
105
|
+
ax.add_artist(leg0)
|
|
106
|
+
ax.legend(handles=[solid_line, dashed_line], loc="upper right")
|
|
107
|
+
leg0 = ax1.legend(handles=[red_line, blue_line], loc="upper left")
|
|
108
|
+
ax1.add_artist(leg0)
|
|
109
|
+
ax1.legend(handles=[solid_line, dashed_line], loc="upper right")
|
|
110
|
+
|
|
111
|
+
if fname is not None:
|
|
112
|
+
fig.savefig(
|
|
113
|
+
fname, bbox_extra_artists=[xlabel, ylabel], bbox_inches="tight", dpi=200
|
|
114
|
+
)
|
|
115
|
+
return fig
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""
|
|
2
|
+
"""
|
|
3
|
+
|
|
4
|
+
import os
|
|
5
|
+
|
|
6
|
+
from ... import tburstpop as tbp
|
|
7
|
+
from ..plot_tburstpop import make_tburstpop_comparison_plot
|
|
8
|
+
|
|
9
|
+
_THIS_DRNAME = os.path.dirname(os.path.abspath(__file__))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def test_make_freqburst_comparison_plot():
|
|
13
|
+
fn = os.path.join(_THIS_DRNAME, "dummy.png")
|
|
14
|
+
make_tburstpop_comparison_plot(tbp.DEFAULT_TBURSTPOP_PARAMS, fname=fn)
|
|
15
|
+
assert os.path.isfile(fn)
|
|
16
|
+
os.remove(fn)
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
""" """
|
|
2
|
+
|
|
3
|
+
from collections import namedtuple
|
|
4
|
+
|
|
5
|
+
from dsps.sfh.diffburst import BurstParams, calc_bursty_age_weights
|
|
6
|
+
from jax import jit as jjit
|
|
7
|
+
from jax import numpy as jnp
|
|
8
|
+
|
|
9
|
+
from .fburstpop_mono import (
|
|
10
|
+
DEFAULT_FBURSTPOP_PARAMS,
|
|
11
|
+
ZEROBURST_FBURSTPOP_PARAMS,
|
|
12
|
+
get_bounded_fburstpop_params,
|
|
13
|
+
get_fburst_from_fburstpop_params,
|
|
14
|
+
get_unbounded_fburstpop_params,
|
|
15
|
+
)
|
|
16
|
+
from .freqburst_mono import (
|
|
17
|
+
DEFAULT_FREQBURST_PARAMS,
|
|
18
|
+
ZEROBURST_FREQBURST_PARAMS,
|
|
19
|
+
get_bounded_freqburst_params,
|
|
20
|
+
get_unbounded_freqburst_params,
|
|
21
|
+
)
|
|
22
|
+
from .tburstpop import (
|
|
23
|
+
DEFAULT_TBURSTPOP_PARAMS,
|
|
24
|
+
get_bounded_tburstpop_params,
|
|
25
|
+
get_tburst_params_from_tburstpop_params,
|
|
26
|
+
get_unbounded_tburstpop_params,
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
DiffburstPopParams = namedtuple(
|
|
30
|
+
"DiffburstPopParams", ["freqburst_params", "fburstpop_params", "tburstpop_params"]
|
|
31
|
+
)
|
|
32
|
+
DEFAULT_DIFFBURSTPOP_PARAMS = DiffburstPopParams(
|
|
33
|
+
DEFAULT_FREQBURST_PARAMS, DEFAULT_FBURSTPOP_PARAMS, DEFAULT_TBURSTPOP_PARAMS
|
|
34
|
+
)
|
|
35
|
+
_BURSTPOP_UPNAMES = [
|
|
36
|
+
key.replace("params", "u_params") for key in DEFAULT_DIFFBURSTPOP_PARAMS._fields
|
|
37
|
+
]
|
|
38
|
+
DiffburstPopUParams = namedtuple("DiffburstPopUParams", _BURSTPOP_UPNAMES)
|
|
39
|
+
|
|
40
|
+
ZERO_DIFFBURSTPOP_PARAMS = DiffburstPopParams(
|
|
41
|
+
ZEROBURST_FREQBURST_PARAMS, ZEROBURST_FBURSTPOP_PARAMS, DEFAULT_TBURSTPOP_PARAMS
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@jjit
|
|
46
|
+
def get_bounded_diffburstpop_params(u_params):
|
|
47
|
+
u_freqburst_params, u_fburstpop_params, u_tburstpop_params = u_params
|
|
48
|
+
bounded_freqburst_params = get_bounded_freqburst_params(u_freqburst_params)
|
|
49
|
+
bounded_tburstpop_params = get_bounded_tburstpop_params(u_tburstpop_params)
|
|
50
|
+
bounded_fburstpop_params = get_bounded_fburstpop_params(u_fburstpop_params)
|
|
51
|
+
diffburstpop_params = DiffburstPopParams(
|
|
52
|
+
bounded_freqburst_params, bounded_fburstpop_params, bounded_tburstpop_params
|
|
53
|
+
)
|
|
54
|
+
return diffburstpop_params
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
@jjit
|
|
58
|
+
def get_unbounded_diffburstpop_params(params):
|
|
59
|
+
freqburst_params, fburstpop_params, tburstpop_params = params
|
|
60
|
+
unbounded_freqburst_params = get_unbounded_freqburst_params(freqburst_params)
|
|
61
|
+
unbounded_fburstpop_params = get_unbounded_fburstpop_params(fburstpop_params)
|
|
62
|
+
unbounded_tburstpop_params = get_unbounded_tburstpop_params(tburstpop_params)
|
|
63
|
+
diffburstpop_u_params = DiffburstPopUParams(
|
|
64
|
+
unbounded_freqburst_params,
|
|
65
|
+
unbounded_fburstpop_params,
|
|
66
|
+
unbounded_tburstpop_params,
|
|
67
|
+
)
|
|
68
|
+
return diffburstpop_u_params
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
@jjit
|
|
72
|
+
def calc_bursty_age_weights_from_diffburstpop_params(
|
|
73
|
+
diffburstpop_params, logsm, logssfr, ssp_lg_age_gyr, smooth_age_weights
|
|
74
|
+
):
|
|
75
|
+
f_burst = get_fburst_from_fburstpop_params(
|
|
76
|
+
diffburstpop_params.fburstpop_params, logsm, logssfr
|
|
77
|
+
)
|
|
78
|
+
lgfburst = jnp.log10(f_burst)
|
|
79
|
+
|
|
80
|
+
tburst_params = get_tburst_params_from_tburstpop_params(
|
|
81
|
+
diffburstpop_params.tburstpop_params, logsm, logssfr
|
|
82
|
+
)
|
|
83
|
+
lgyr_peak, lgyr_max = tburst_params
|
|
84
|
+
burst_params = BurstParams(lgfburst, lgyr_peak, lgyr_max)
|
|
85
|
+
|
|
86
|
+
age_weights = calc_bursty_age_weights(
|
|
87
|
+
burst_params, smooth_age_weights, ssp_lg_age_gyr
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
return age_weights, burst_params
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def calc_bursty_age_weights_from_diffburstpop_u_params(
|
|
94
|
+
diffburstpop_u_params, logsm, logssfr, ssp_lg_age_gyr, smooth_age_weights
|
|
95
|
+
):
|
|
96
|
+
diffburstpop_params = get_bounded_diffburstpop_params(diffburstpop_u_params)
|
|
97
|
+
args = diffburstpop_params, logsm, logssfr, ssp_lg_age_gyr, smooth_age_weights
|
|
98
|
+
age_weights, burst_params = calc_bursty_age_weights_from_diffburstpop_params(*args)
|
|
99
|
+
return age_weights, burst_params
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
DEFAULT_DIFFBURSTPOP_U_PARAMS = DiffburstPopUParams(
|
|
103
|
+
*get_unbounded_diffburstpop_params(DEFAULT_DIFFBURSTPOP_PARAMS)
|
|
104
|
+
)
|
|
105
|
+
ZERO_DIFFBURSTPOP_U_PARAMS = get_unbounded_diffburstpop_params(
|
|
106
|
+
DEFAULT_DIFFBURSTPOP_PARAMS
|
|
107
|
+
)
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"""
|
|
3
3
|
|
|
4
4
|
from collections import OrderedDict, namedtuple
|
|
5
|
+
from copy import deepcopy
|
|
5
6
|
|
|
6
7
|
from jax import jit as jjit
|
|
7
8
|
from jax import numpy as jnp
|
|
@@ -47,6 +48,15 @@ FburstPopUParams = namedtuple("FburstPopUParams", _FBURSTPOP_UPNAMES)
|
|
|
47
48
|
DEFAULT_FBURSTPOP_PARAMS = FburstPopParams(**DEFAULT_FBURSTPOP_PDICT)
|
|
48
49
|
FBURSTPOP_PBOUNDS = FburstPopParams(**FBURSTPOP_BOUNDS_PDICT)
|
|
49
50
|
|
|
51
|
+
_EPS = 0.1
|
|
52
|
+
ZEROBURST_FBURSTPOP_PARAMS = deepcopy(DEFAULT_FBURSTPOP_PARAMS)
|
|
53
|
+
ZEROBURST_FBURSTPOP_PARAMS = ZEROBURST_FBURSTPOP_PARAMS._replace(
|
|
54
|
+
lgfburst_logsm_ylo_q=_LGFBURST_BOUNDS[0] + _EPS,
|
|
55
|
+
lgfburst_logsm_ylo_ms=_LGFBURST_BOUNDS[0] + _EPS,
|
|
56
|
+
lgfburst_logsm_yhi_q=_LGFBURST_BOUNDS[0] + _EPS,
|
|
57
|
+
lgfburst_logsm_yhi_ms=_LGFBURST_BOUNDS[0] + _EPS,
|
|
58
|
+
)
|
|
59
|
+
|
|
50
60
|
|
|
51
61
|
@jjit
|
|
52
62
|
def get_lgfburst_from_fburstpop_u_params(fburstpop_u_params, logsm, logssfr):
|