diffsky 0.1.1__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.1/.github/workflows/linting.yml → diffsky-0.2.0/.github/workflows/linting.yaml +7 -7
- diffsky-0.2.0/.github/workflows/monthly-warning-test.yaml +64 -0
- diffsky-0.1.1/.github/workflows/tests.yml → diffsky-0.2.0/.github/workflows/test_latest_releases.yaml +21 -10
- diffsky-0.2.0/.github/workflows/test_main_branch.yaml +91 -0
- diffsky-0.2.0/.github/workflows/tests_cron.yaml +95 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/.readthedocs.yml +1 -1
- diffsky-0.2.0/CHANGES.rst +18 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/PKG-INFO +8 -7
- {diffsky-0.1.1 → diffsky-0.2.0}/README.rst +1 -1
- {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/__init__.py +2 -0
- diffsky-0.2.0/diffsky/_version.py +1 -0
- diffsky-0.2.0/diffsky/burstpop/__init__.py +11 -0
- diffsky-0.2.0/diffsky/burstpop/diagnostics/plot_fburstpop.py +60 -0
- diffsky-0.2.0/diffsky/burstpop/diagnostics/plot_tburstpop.py +115 -0
- diffsky-0.2.0/diffsky/burstpop/diagnostics/tests/test_plot_fburstpop.py +15 -0
- diffsky-0.2.0/diffsky/burstpop/diagnostics/tests/test_plot_tburstpop.py +16 -0
- diffsky-0.2.0/diffsky/burstpop/diffburstpop.py +87 -0
- diffsky-0.2.0/diffsky/burstpop/diffqburstpop.py +97 -0
- diffsky-0.2.0/diffsky/burstpop/diffqburstpop_mono.py +107 -0
- diffsky-0.2.0/diffsky/burstpop/fburstpop.py +149 -0
- diffsky-0.2.0/diffsky/burstpop/fburstpop_mono.py +165 -0
- diffsky-0.2.0/diffsky/burstpop/freqburst.py +141 -0
- diffsky-0.2.0/diffsky/burstpop/freqburst_mono.py +165 -0
- diffsky-0.2.0/diffsky/burstpop/tburstpop.py +172 -0
- diffsky-0.2.0/diffsky/burstpop/tests/test_diffburstpop.py +116 -0
- diffsky-0.2.0/diffsky/burstpop/tests/test_diffqburstpop.py +129 -0
- diffsky-0.2.0/diffsky/burstpop/tests/test_diffqburstpop_mono.py +128 -0
- diffsky-0.2.0/diffsky/burstpop/tests/test_fburstpop.py +147 -0
- diffsky-0.2.0/diffsky/burstpop/tests/test_fburstpop_mono.py +200 -0
- diffsky-0.2.0/diffsky/burstpop/tests/test_freqburst.py +121 -0
- diffsky-0.2.0/diffsky/burstpop/tests/test_freqburst_mono.py +208 -0
- diffsky-0.2.0/diffsky/burstpop/tests/test_tburstpop.py +268 -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/__init__.py +0 -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/__init__.py +0 -0
- diffsky-0.2.0/diffsky/data_loaders/tests/testing_data/cosmos20_shasum.dat +1 -0
- diffsky-0.2.0/diffsky/diagnostics/__init__.py +0 -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/__init__.py +0 -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.2.0/diffsky/dustpop/__init__.py +3 -0
- diffsky-0.2.0/diffsky/dustpop/avpop.py +128 -0
- diffsky-0.2.0/diffsky/dustpop/avpop_flex.py +248 -0
- diffsky-0.2.0/diffsky/dustpop/avpop_mono.py +226 -0
- diffsky-0.2.0/diffsky/dustpop/deltapop.py +130 -0
- diffsky-0.2.0/diffsky/dustpop/diagnostics/__init__.py +0 -0
- diffsky-0.2.0/diffsky/dustpop/diagnostics/plot_avpop_flex.py +175 -0
- diffsky-0.2.0/diffsky/dustpop/diagnostics/plot_funopop_simple.py +60 -0
- diffsky-0.2.0/diffsky/dustpop/diagnostics/tests/__init__.py +0 -0
- diffsky-0.2.0/diffsky/dustpop/diagnostics/tests/test_plot_avpop_flex.py +18 -0
- diffsky-0.2.0/diffsky/dustpop/diagnostics/tests/test_plot_funopop_simple.py +15 -0
- diffsky-0.2.0/diffsky/dustpop/funopop.py +298 -0
- diffsky-0.2.0/diffsky/dustpop/funopop_simple.py +147 -0
- diffsky-0.2.0/diffsky/dustpop/funopop_ssfr.py +101 -0
- diffsky-0.2.0/diffsky/dustpop/sbl18_dust.py +33 -0
- diffsky-0.2.0/diffsky/dustpop/sbl18_dust_kernels.py +121 -0
- diffsky-0.2.0/diffsky/dustpop/sbl18_dustpop.py +174 -0
- diffsky-0.2.0/diffsky/dustpop/tests/__init__.py +0 -0
- diffsky-0.2.0/diffsky/dustpop/tests/test_avpop.py +115 -0
- diffsky-0.2.0/diffsky/dustpop/tests/test_avpop_flex.py +162 -0
- diffsky-0.2.0/diffsky/dustpop/tests/test_avpop_mono.py +279 -0
- diffsky-0.2.0/diffsky/dustpop/tests/test_deltapop.py +112 -0
- diffsky-0.2.0/diffsky/dustpop/tests/test_funopop_model.py +130 -0
- diffsky-0.2.0/diffsky/dustpop/tests/test_funopop_simple.py +104 -0
- diffsky-0.2.0/diffsky/dustpop/tests/test_funopop_ssfr.py +103 -0
- diffsky-0.2.0/diffsky/dustpop/tests/test_sbl18_dustpop.py +37 -0
- diffsky-0.2.0/diffsky/dustpop/tests/test_tw_dust_kernels.py +17 -0
- diffsky-0.2.0/diffsky/dustpop/tests/test_tw_dustpop.py +37 -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/tests/test_tw_dustpop_new.py +143 -0
- diffsky-0.2.0/diffsky/dustpop/tw_dust.py +33 -0
- diffsky-0.2.0/diffsky/dustpop/tw_dust_kernels.py +141 -0
- diffsky-0.2.0/diffsky/dustpop/tw_dustpop.py +174 -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/dustpop/tw_dustpop_new.py +174 -0
- diffsky-0.2.0/diffsky/experimental/__init__.py +0 -0
- diffsky-0.2.0/diffsky/experimental/dspspop/__init__.py +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/burstshapepop.py +11 -10
- {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/dust_deltapop.py +3 -6
- {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/dustpop.py +5 -3
- {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/lgavpop.py +3 -7
- {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/lgfburstpop.py +3 -6
- {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/photpop.py +8 -4
- diffsky-0.2.0/diffsky/experimental/dspspop/tests/__init__.py +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/tests/test_burstshapepop.py +18 -11
- 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/__init__.py +0 -0
- diffsky-0.2.0/diffsky/experimental/tests/test_precompute_ssp_phot.py +43 -0
- diffsky-0.2.0/diffsky/mass_functions/__init__.py +6 -0
- diffsky-0.2.0/diffsky/mass_functions/ccshmf_model.py +97 -0
- diffsky-0.2.0/diffsky/mass_functions/fitting_utils/README.rst +1 -0
- diffsky-0.2.0/diffsky/mass_functions/fitting_utils/__init__.py +0 -0
- diffsky-0.2.0/diffsky/mass_functions/fitting_utils/fit_ccshmf.py +53 -0
- diffsky-0.2.0/diffsky/mass_functions/fitting_utils/fit_ccshmf_kernels.py +45 -0
- diffsky-0.2.0/diffsky/mass_functions/fitting_utils/fit_hmf_kernels.py +44 -0
- diffsky-0.2.0/diffsky/mass_functions/fitting_utils/fit_hmf_model.py +51 -0
- diffsky-0.2.0/diffsky/mass_functions/fitting_utils/fitting_helpers.py +182 -0
- diffsky-0.2.0/diffsky/mass_functions/fitting_utils/tests/__init__.py +0 -0
- diffsky-0.2.0/diffsky/mass_functions/fitting_utils/tests/test_fit_ccshmf.py +57 -0
- diffsky-0.2.0/diffsky/mass_functions/fitting_utils/tests/test_fit_ccshmf_kernels.py +28 -0
- diffsky-0.2.0/diffsky/mass_functions/fitting_utils/tests/test_fit_hmf_kernels.py +28 -0
- diffsky-0.2.0/diffsky/mass_functions/fitting_utils/tests/test_fit_hmf_model.py +84 -0
- diffsky-0.2.0/diffsky/mass_functions/hmf_model.py +146 -0
- diffsky-0.2.0/diffsky/mass_functions/io_utils/README.txt +2 -0
- diffsky-0.2.0/diffsky/mass_functions/io_utils/__init__.py +0 -0
- diffsky-0.2.0/diffsky/mass_functions/io_utils/loader.py +33 -0
- diffsky-0.2.0/diffsky/mass_functions/io_utils/smdpl_helpers.py +38 -0
- diffsky-0.2.0/diffsky/mass_functions/kernels/__init__.py +0 -0
- diffsky-0.2.0/diffsky/mass_functions/kernels/ccshmf_kernels.py +44 -0
- diffsky-0.2.0/diffsky/mass_functions/kernels/hmf_kernels.py +42 -0
- diffsky-0.2.0/diffsky/mass_functions/kernels/tests/__init__.py +0 -0
- diffsky-0.2.0/diffsky/mass_functions/kernels/tests/test_ccshmf_kernels.py +12 -0
- diffsky-0.2.0/diffsky/mass_functions/kernels/tests/test_hmf_kernels.py +12 -0
- diffsky-0.2.0/diffsky/mass_functions/mc_diffmah_tpeak.py +272 -0
- diffsky-0.2.0/diffsky/mass_functions/mc_hosts.py +79 -0
- diffsky-0.2.0/diffsky/mass_functions/mc_subs.py +104 -0
- diffsky-0.2.0/diffsky/mass_functions/mc_tinfall.py +65 -0
- diffsky-0.2.0/diffsky/mass_functions/measure_ccshmf.py +63 -0
- diffsky-0.2.0/diffsky/mass_functions/measure_hmf.py +22 -0
- diffsky-0.2.0/diffsky/mass_functions/smhm_kernels/__init__.py +0 -0
- diffsky-0.2.0/diffsky/mass_functions/smhm_kernels/tests/__init__.py +0 -0
- diffsky-0.2.0/diffsky/mass_functions/smhm_kernels/tests/test_threeroll_smhm.py +112 -0
- diffsky-0.2.0/diffsky/mass_functions/smhm_kernels/threeroll_kernels.py +102 -0
- diffsky-0.2.0/diffsky/mass_functions/smhm_kernels/threeroll_smhm.py +77 -0
- diffsky-0.2.0/diffsky/mass_functions/tests/__init__.py +0 -0
- diffsky-0.2.0/diffsky/mass_functions/tests/test_ccshmf.py +92 -0
- diffsky-0.2.0/diffsky/mass_functions/tests/test_hmf_model.py +74 -0
- diffsky-0.2.0/diffsky/mass_functions/tests/test_mc_diffmah_tpeak.py +95 -0
- diffsky-0.2.0/diffsky/mass_functions/tests/test_mc_hosts.py +41 -0
- diffsky-0.2.0/diffsky/mass_functions/tests/test_mc_subs.py +130 -0
- diffsky-0.2.0/diffsky/mass_functions/tests/test_mc_tinfall.py +56 -0
- diffsky-0.2.0/diffsky/mass_functions/tests/test_measure_hmf.py +32 -0
- diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/README.txt +2 -0
- diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/__init__.py +0 -0
- diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_0.00_lgmhost_12.32.txt +50 -0
- diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_0.00_lgmhost_13.00.txt +50 -0
- diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_0.00_lgmhost_13.55.txt +50 -0
- diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_0.00_lgmhost_14.08.txt +50 -0
- diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_1.00_lgmhost_12.31.txt +50 -0
- diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_1.00_lgmhost_12.99.txt +50 -0
- diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_1.00_lgmhost_13.51.txt +50 -0
- diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_1.00_lgmhost_14.05.txt +50 -0
- diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_hmf_cuml_redshift_0.05.txt +48 -0
- diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_hmf_cuml_redshift_1.00.txt +47 -0
- diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_hmf_cuml_redshift_2.14.txt +44 -0
- diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_hmf_cuml_redshift_3.95.txt +45 -0
- diffsky-0.2.0/diffsky/mass_functions/upweighting/__init__.py +0 -0
- diffsky-0.2.0/diffsky/mass_functions/upweighting/namedtuple_cat_utils.py +40 -0
- diffsky-0.2.0/diffsky/mass_functions/upweighting/tests/__init__.py +0 -0
- diffsky-0.2.0/diffsky/mass_functions/upweighting/tests/test_mc_gen_upweighting.py +203 -0
- diffsky-0.2.0/diffsky/mass_functions/upweighting/upweighting.py +56 -0
- diffsky-0.2.0/diffsky/mass_functions/utils.py +29 -0
- diffsky-0.2.0/diffsky/mc_diffsky.py +244 -0
- diffsky-0.2.0/diffsky/sbl18_photgrad.py +282 -0
- diffsky-0.2.0/diffsky/sumstats/__init__.py +0 -0
- diffsky-0.2.0/diffsky/sumstats/diffndhist.py +168 -0
- diffsky-0.2.0/diffsky/sumstats/smhm.py +43 -0
- diffsky-0.2.0/diffsky/sumstats/tests/__init__.py +0 -0
- diffsky-0.2.0/diffsky/sumstats/tests/test_smhm.py +19 -0
- diffsky-0.2.0/diffsky/systematics/__init__.py +0 -0
- diffsky-0.2.0/diffsky/systematics/ssp_errors.py +110 -0
- diffsky-0.2.0/diffsky/systematics/tests/__init__.py +0 -0
- diffsky-0.2.0/diffsky/systematics/tests/test_ssp_errors.py +108 -0
- diffsky-0.2.0/diffsky/tests/__init__.py +0 -0
- diffsky-0.2.0/diffsky/tests/test_dependencies.py +9 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/tests/test_diffsky_setup.py +1 -1
- diffsky-0.2.0/diffsky/tests/test_mc_diffsky.py +55 -0
- diffsky-0.2.0/diffsky/tests/test_sbl18_photgrad.py +31 -0
- diffsky-0.2.0/diffsky/tests/test_tw_photgrad.py +205 -0
- diffsky-0.2.0/diffsky/tests/test_utils.py +26 -0
- diffsky-0.2.0/diffsky/tests/testing_data/__init__.py +0 -0
- diffsky-0.2.0/diffsky/tw_photgrad.py +258 -0
- diffsky-0.2.0/diffsky/tw_utils.py +145 -0
- diffsky-0.2.0/diffsky/utils.py +69 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/diffsky.egg-info/PKG-INFO +8 -7
- diffsky-0.2.0/diffsky.egg-info/SOURCES.txt +230 -0
- diffsky-0.2.0/diffsky.egg-info/requires.txt +6 -0
- diffsky-0.2.0/docs/source/demo_diffmahpop_t_peak.ipynb +167 -0
- diffsky-0.2.0/docs/source/demos.rst +8 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/docs/source/index.rst +1 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/docs/source/installation.rst +1 -1
- {diffsky-0.1.1 → diffsky-0.2.0}/docs/source/rtd_environment.yaml +5 -5
- {diffsky-0.1.1 → diffsky-0.2.0}/pyproject.toml +8 -6
- 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.1/CHANGES.rst +0 -8
- diffsky-0.1.1/diffsky/_version.py +0 -1
- diffsky-0.1.1/diffsky/tests/test_utils.py +0 -13
- diffsky-0.1.1/diffsky/utils.py +0 -16
- diffsky-0.1.1/diffsky.egg-info/SOURCES.txt +0 -55
- diffsky-0.1.1/diffsky.egg-info/requires.txt +0 -6
- diffsky-0.1.1/requirements.txt +0 -6
- {diffsky-0.1.1 → diffsky-0.2.0}/.coveragerc +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/.git_archival.txt +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/.gitattributes +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/.gitignore +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/LICENSE.rst +0 -0
- {diffsky-0.1.1/diffsky/experimental → diffsky-0.2.0/diffsky/burstpop/diagnostics}/__init__.py +0 -0
- {diffsky-0.1.1/diffsky/experimental/dspspop → diffsky-0.2.0/diffsky/burstpop/diagnostics/tests}/__init__.py +0 -0
- {diffsky-0.1.1/diffsky/experimental/dspspop → diffsky-0.2.0/diffsky/burstpop}/tests/__init__.py +0 -0
- {diffsky-0.1.1/diffsky/experimental/tests → diffsky-0.2.0/diffsky/cosmos_utils}/__init__.py +0 -0
- {diffsky-0.1.1/diffsky → diffsky-0.2.0/diffsky/cosmos_utils}/tests/__init__.py +0 -0
- {diffsky-0.1.1/diffsky/tests/testing_data → diffsky-0.2.0/diffsky/data_loaders}/__init__.py +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/diffndhist.py +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/boris_dust.py +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/nagaraj22_dust.py +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/tests/test_attavpop.py +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/tests/test_boris_dust.py +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/tests/test_dustdeltapop.py +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/tests/test_lgfburstpop.py +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/tests/test_photpop.py +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/photometry_interpolation.py +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/tests/test_photometry_interpolation.py +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/tests/test_diffndhist.py +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/diffsky.egg-info/dependency_links.txt +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/diffsky.egg-info/top_level.txt +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/docs/Makefile +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/docs/make.bat +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/docs/source/citation.rst +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/docs/source/conf.py +0 -0
- {diffsky-0.1.1 → diffsky-0.2.0}/setup.cfg +0 -0
- {diffsky-0.1.1 → 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
|
-
python-version: 3.
|
|
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}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name: Test for Warnings
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch: null
|
|
5
|
+
schedule:
|
|
6
|
+
# Runs "First of every month at 3:15am Central"
|
|
7
|
+
- cron: '15 8 1 * *'
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
tests:
|
|
11
|
+
name: tests
|
|
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
|
+
|
|
28
|
+
- name: configure conda and install code
|
|
29
|
+
# Test against current main branch of all diff+ dependencies
|
|
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
|
|
36
|
+
run: |
|
|
37
|
+
conda config --set always_yes yes
|
|
38
|
+
conda install --quiet \
|
|
39
|
+
--file=requirements.txt
|
|
40
|
+
conda install -y -q \
|
|
41
|
+
flake8 \
|
|
42
|
+
pytest \
|
|
43
|
+
pytest-xdist \
|
|
44
|
+
pytest-cov \
|
|
45
|
+
pip \
|
|
46
|
+
setuptools \
|
|
47
|
+
"setuptools_scm>=7,<8" \
|
|
48
|
+
matplotlib \
|
|
49
|
+
astropy \
|
|
50
|
+
python-build
|
|
51
|
+
pip uninstall diffmah --yes
|
|
52
|
+
pip uninstall diffstar --yes
|
|
53
|
+
pip uninstall dsps --yes
|
|
54
|
+
pip install --no-deps git+https://github.com/ArgonneCPAC/diffmah.git
|
|
55
|
+
pip install --no-deps git+https://github.com/ArgonneCPAC/diffstar.git
|
|
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
|
|
58
|
+
python -m pip install --no-build-isolation --no-deps -e .
|
|
59
|
+
|
|
60
|
+
- name: test that no warnings are raised
|
|
61
|
+
shell: bash -l {0}
|
|
62
|
+
run: |
|
|
63
|
+
export PYTHONWARNINGS=error
|
|
64
|
+
pytest -v diffsky --cov --cov-report=xml
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: test-latest-diffstuff-releases
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
@@ -8,31 +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
|
-
python-version: 3.
|
|
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
|
|
28
|
+
# Test against current main branch of all diff+ dependencies
|
|
30
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
|
|
31
35
|
run: |
|
|
32
36
|
conda config --set always_yes yes
|
|
33
|
-
|
|
37
|
+
conda install --quiet \
|
|
34
38
|
--file=requirements.txt
|
|
35
|
-
|
|
39
|
+
conda install -y -q \
|
|
36
40
|
flake8 \
|
|
37
41
|
pytest \
|
|
38
42
|
pytest-xdist \
|
|
@@ -40,7 +44,12 @@ jobs:
|
|
|
40
44
|
pip \
|
|
41
45
|
setuptools \
|
|
42
46
|
"setuptools_scm>=7,<8" \
|
|
47
|
+
matplotlib \
|
|
48
|
+
astropy \
|
|
43
49
|
python-build
|
|
50
|
+
pip uninstall dsps --yes
|
|
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
|
|
44
53
|
python -m pip install --no-build-isolation --no-deps -e .
|
|
45
54
|
|
|
46
55
|
- name: test
|
|
@@ -49,7 +58,9 @@ jobs:
|
|
|
49
58
|
pytest -v diffsky --cov --cov-report=xml
|
|
50
59
|
|
|
51
60
|
- name: Upload coverage reports to Codecov
|
|
52
|
-
uses: codecov/codecov-action@
|
|
61
|
+
uses: codecov/codecov-action@v5
|
|
62
|
+
env:
|
|
63
|
+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
53
64
|
|
|
54
65
|
- name: test versions
|
|
55
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 .
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
name: test-main-branch-diffstuff
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch: null
|
|
5
|
+
schedule:
|
|
6
|
+
# Runs "every Monday & Thursday at 3:05am Central"
|
|
7
|
+
- cron: '5 8 * * 1,4'
|
|
8
|
+
push:
|
|
9
|
+
branches:
|
|
10
|
+
- main
|
|
11
|
+
pull_request: null
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
tests:
|
|
15
|
+
name: tests
|
|
16
|
+
runs-on: "ubuntu-latest"
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
with:
|
|
21
|
+
fetch-depth: 0
|
|
22
|
+
|
|
23
|
+
- uses: conda-incubator/setup-miniconda@v3
|
|
24
|
+
with:
|
|
25
|
+
python-version: 3.11
|
|
26
|
+
channels: conda-forge,defaults
|
|
27
|
+
channel-priority: strict
|
|
28
|
+
show-channel-urls: true
|
|
29
|
+
miniforge-version: latest
|
|
30
|
+
|
|
31
|
+
- name: configure conda and install code
|
|
32
|
+
# Test against current main branch of all diff+ dependencies
|
|
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
|
|
39
|
+
run: |
|
|
40
|
+
conda config --set always_yes yes
|
|
41
|
+
conda install --quiet \
|
|
42
|
+
--file=requirements.txt
|
|
43
|
+
conda install -y -q \
|
|
44
|
+
flake8 \
|
|
45
|
+
pytest \
|
|
46
|
+
pytest-xdist \
|
|
47
|
+
pytest-cov \
|
|
48
|
+
pip \
|
|
49
|
+
setuptools \
|
|
50
|
+
"setuptools_scm>=7,<8" \
|
|
51
|
+
matplotlib \
|
|
52
|
+
astropy \
|
|
53
|
+
python-build
|
|
54
|
+
pip uninstall diffmah --yes
|
|
55
|
+
pip uninstall diffstar --yes
|
|
56
|
+
pip uninstall dsps --yes
|
|
57
|
+
pip install --no-deps git+https://github.com/ArgonneCPAC/diffmah.git
|
|
58
|
+
pip install --no-deps git+https://github.com/ArgonneCPAC/diffstar.git
|
|
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
|
|
61
|
+
python -m pip install --no-build-isolation --no-deps -e .
|
|
62
|
+
|
|
63
|
+
- name: test
|
|
64
|
+
shell: bash -l {0}
|
|
65
|
+
run: |
|
|
66
|
+
pytest -v diffsky --cov --cov-report=xml
|
|
67
|
+
|
|
68
|
+
- name: Upload coverage reports to Codecov
|
|
69
|
+
uses: codecov/codecov-action@v5
|
|
70
|
+
env:
|
|
71
|
+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
72
|
+
|
|
73
|
+
- name: test versions
|
|
74
|
+
shell: bash -el {0}
|
|
75
|
+
run: |
|
|
76
|
+
pip uninstall diffsky --yes
|
|
77
|
+
[[ $(python setup.py --version) != "0.0.0" ]] || exit 1
|
|
78
|
+
|
|
79
|
+
rm -rf dist/*
|
|
80
|
+
python setup.py sdist
|
|
81
|
+
pip install --no-deps --no-build-isolation dist/*.tar.gz
|
|
82
|
+
pushd ..
|
|
83
|
+
python -c "import diffsky; assert diffsky.__version__ != '0.0.0'"
|
|
84
|
+
popd
|
|
85
|
+
pip uninstall diffsky --yes
|
|
86
|
+
|
|
87
|
+
rm -rf dist/*
|
|
88
|
+
python -m build --sdist . --outdir dist
|
|
89
|
+
pip install --no-deps --no-build-isolation dist/*.tar.gz
|
|
90
|
+
pushd ..
|
|
91
|
+
python -c "import diffsky; assert diffsky.__version__ != '0.0.0'"
|
|
92
|
+
popd
|
|
93
|
+
pip uninstall diffsky --yes
|
|
94
|
+
|
|
95
|
+
python -m pip install -v --no-deps --no-build-isolation -e .
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
0.2.0 (2025-03-24)
|
|
2
|
+
-------------------
|
|
3
|
+
- Update population-level photometry models of dust and burstiness
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
0.1.2 (2024-10-25)
|
|
7
|
+
-------------------
|
|
8
|
+
- Update calls to diffmah v0.6.1 and diffstar v0.3.2
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
0.1.1 (2023-10-04)
|
|
12
|
+
-------------------
|
|
13
|
+
- Update calls to dsps v0.3.4
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
0.1.0 (2023-10-03)
|
|
17
|
+
-------------------
|
|
18
|
+
- First release. Compatible with diffstar v0.2.1 and dsps v0.3.3.
|
|
@@ -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
|
|
@@ -35,15 +35,16 @@ License: BSD 3-Clause License
|
|
|
35
35
|
|
|
36
36
|
Project-URL: home, https://github.com/ArgonneCPAC/diffsky
|
|
37
37
|
Classifier: Programming Language :: Python :: 3
|
|
38
|
-
Requires-Python: >=3.
|
|
38
|
+
Requires-Python: >=3.11
|
|
39
39
|
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.7.0
|
|
44
|
+
Requires-Dist: diffstar>=0.3.3
|
|
45
|
+
Requires-Dist: dsps>=0.4.0
|
|
43
46
|
Requires-Dist: h5py
|
|
44
|
-
|
|
45
|
-
Requires-Dist: diffstar
|
|
46
|
-
Requires-Dist: dsps
|
|
47
|
+
Dynamic: license-file
|
|
47
48
|
|
|
48
49
|
diffsky
|
|
49
50
|
============
|
|
@@ -69,7 +70,7 @@ Conda environment
|
|
|
69
70
|
~~~~~~~~~~~~~~~~~
|
|
70
71
|
For a typical development environment in conda-forge::
|
|
71
72
|
|
|
72
|
-
$ conda create -c conda-forge -n diffsky_env python=3.
|
|
73
|
+
$ conda create -c conda-forge -n diffsky_env python=3.11 numpy jax pytest ipython jupyter matplotlib scipy h5py diffmah diffstar dsps diffsky
|
|
73
74
|
|
|
74
75
|
|
|
75
76
|
Documentation
|
|
@@ -22,7 +22,7 @@ Conda environment
|
|
|
22
22
|
~~~~~~~~~~~~~~~~~
|
|
23
23
|
For a typical development environment in conda-forge::
|
|
24
24
|
|
|
25
|
-
$ conda create -c conda-forge -n diffsky_env python=3.
|
|
25
|
+
$ conda create -c conda-forge -n diffsky_env python=3.11 numpy jax pytest ipython jupyter matplotlib scipy h5py diffmah diffstar dsps diffsky
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
Documentation
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '0.2.0'
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"""
|
|
2
|
+
"""
|
|
3
|
+
|
|
4
|
+
import numpy as np
|
|
5
|
+
from matplotlib import pyplot as plt
|
|
6
|
+
|
|
7
|
+
from ..fburstpop import DEFAULT_FBURSTPOP_PARAMS, get_lgfburst_from_fburstpop_params
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def make_fburstpop_comparison_plot(
|
|
11
|
+
params,
|
|
12
|
+
params2=DEFAULT_FBURSTPOP_PARAMS,
|
|
13
|
+
fname=None,
|
|
14
|
+
label1=r"${\rm new\ model}$",
|
|
15
|
+
label2=r"${\rm default\ model}$",
|
|
16
|
+
):
|
|
17
|
+
"""Make basic diagnostic plot of the model for Fburst
|
|
18
|
+
|
|
19
|
+
Parameters
|
|
20
|
+
----------
|
|
21
|
+
params : namedtuple
|
|
22
|
+
Instance of fburstpop.FburstPopParams
|
|
23
|
+
|
|
24
|
+
params2 : namedtuple, optional
|
|
25
|
+
Instance of fburstpop.FburstPopParams
|
|
26
|
+
Default is set by DEFAULT_FBURSTPOP_PARAMS
|
|
27
|
+
|
|
28
|
+
fname : string, optional
|
|
29
|
+
filename of the output figure
|
|
30
|
+
|
|
31
|
+
"""
|
|
32
|
+
nsm, nsfr = 250, 250
|
|
33
|
+
logsm_grid = np.linspace(7, 12, nsm)
|
|
34
|
+
logssfr_grid = np.linspace(-13, -8, nsfr)
|
|
35
|
+
|
|
36
|
+
X, Y = np.meshgrid(logsm_grid, logssfr_grid)
|
|
37
|
+
|
|
38
|
+
Z = get_lgfburst_from_fburstpop_params(params, X, Y)
|
|
39
|
+
Z2 = get_lgfburst_from_fburstpop_params(params2, X, Y)
|
|
40
|
+
|
|
41
|
+
fig, axes = plt.subplots(1, 2, figsize=(10, 4))
|
|
42
|
+
(ax0, ax1) = axes
|
|
43
|
+
|
|
44
|
+
pcm0 = ax0.pcolor(X, Y, Z, cmap="coolwarm_r", vmin=-4.5, vmax=-2.1)
|
|
45
|
+
fig.colorbar(pcm0, ax=ax0)
|
|
46
|
+
|
|
47
|
+
pcm1 = ax1.pcolor(X, Y, Z2, cmap="coolwarm_r", vmin=-4.5, vmax=-2.1)
|
|
48
|
+
fig.colorbar(pcm1, ax=ax1, label=r"${\rm lgFburst}$")
|
|
49
|
+
for ax in axes:
|
|
50
|
+
xlabel = ax.set_xlabel(r"$\log_{10}M_{\star}/M_{\odot}$")
|
|
51
|
+
ylabel = ax0.set_ylabel(r"${\rm \log_{10}sSFR}$")
|
|
52
|
+
|
|
53
|
+
ax0.set_title(label1)
|
|
54
|
+
ax1.set_title(label2)
|
|
55
|
+
|
|
56
|
+
if fname is not None:
|
|
57
|
+
fig.savefig(
|
|
58
|
+
fname, bbox_extra_artists=[xlabel, ylabel], bbox_inches="tight", dpi=200
|
|
59
|
+
)
|
|
60
|
+
return fig
|
|
@@ -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,15 @@
|
|
|
1
|
+
"""
|
|
2
|
+
"""
|
|
3
|
+
|
|
4
|
+
import os
|
|
5
|
+
|
|
6
|
+
from ..plot_fburstpop import DEFAULT_FBURSTPOP_PARAMS, make_fburstpop_comparison_plot
|
|
7
|
+
|
|
8
|
+
_THIS_DRNAME = os.path.dirname(os.path.abspath(__file__))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def test_make_freqburst_comparison_plot():
|
|
12
|
+
fn = os.path.join(_THIS_DRNAME, "dummy.png")
|
|
13
|
+
make_fburstpop_comparison_plot(DEFAULT_FBURSTPOP_PARAMS, fname=fn)
|
|
14
|
+
assert os.path.isfile(fn)
|
|
15
|
+
os.remove(fn)
|
|
@@ -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)
|