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.
Files changed (238) hide show
  1. diffsky-0.2.0/.github/dependabot.yml +10 -0
  2. diffsky-0.1.1/.github/workflows/linting.yml → diffsky-0.2.0/.github/workflows/linting.yaml +7 -7
  3. diffsky-0.2.0/.github/workflows/monthly-warning-test.yaml +64 -0
  4. diffsky-0.1.1/.github/workflows/tests.yml → diffsky-0.2.0/.github/workflows/test_latest_releases.yaml +21 -10
  5. diffsky-0.2.0/.github/workflows/test_main_branch.yaml +91 -0
  6. diffsky-0.2.0/.github/workflows/tests_cron.yaml +95 -0
  7. {diffsky-0.1.1 → diffsky-0.2.0}/.readthedocs.yml +1 -1
  8. diffsky-0.2.0/CHANGES.rst +18 -0
  9. {diffsky-0.1.1 → diffsky-0.2.0}/PKG-INFO +8 -7
  10. {diffsky-0.1.1 → diffsky-0.2.0}/README.rst +1 -1
  11. {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/__init__.py +2 -0
  12. diffsky-0.2.0/diffsky/_version.py +1 -0
  13. diffsky-0.2.0/diffsky/burstpop/__init__.py +11 -0
  14. diffsky-0.2.0/diffsky/burstpop/diagnostics/plot_fburstpop.py +60 -0
  15. diffsky-0.2.0/diffsky/burstpop/diagnostics/plot_tburstpop.py +115 -0
  16. diffsky-0.2.0/diffsky/burstpop/diagnostics/tests/test_plot_fburstpop.py +15 -0
  17. diffsky-0.2.0/diffsky/burstpop/diagnostics/tests/test_plot_tburstpop.py +16 -0
  18. diffsky-0.2.0/diffsky/burstpop/diffburstpop.py +87 -0
  19. diffsky-0.2.0/diffsky/burstpop/diffqburstpop.py +97 -0
  20. diffsky-0.2.0/diffsky/burstpop/diffqburstpop_mono.py +107 -0
  21. diffsky-0.2.0/diffsky/burstpop/fburstpop.py +149 -0
  22. diffsky-0.2.0/diffsky/burstpop/fburstpop_mono.py +165 -0
  23. diffsky-0.2.0/diffsky/burstpop/freqburst.py +141 -0
  24. diffsky-0.2.0/diffsky/burstpop/freqburst_mono.py +165 -0
  25. diffsky-0.2.0/diffsky/burstpop/tburstpop.py +172 -0
  26. diffsky-0.2.0/diffsky/burstpop/tests/test_diffburstpop.py +116 -0
  27. diffsky-0.2.0/diffsky/burstpop/tests/test_diffqburstpop.py +129 -0
  28. diffsky-0.2.0/diffsky/burstpop/tests/test_diffqburstpop_mono.py +128 -0
  29. diffsky-0.2.0/diffsky/burstpop/tests/test_fburstpop.py +147 -0
  30. diffsky-0.2.0/diffsky/burstpop/tests/test_fburstpop_mono.py +200 -0
  31. diffsky-0.2.0/diffsky/burstpop/tests/test_freqburst.py +121 -0
  32. diffsky-0.2.0/diffsky/burstpop/tests/test_freqburst_mono.py +208 -0
  33. diffsky-0.2.0/diffsky/burstpop/tests/test_tburstpop.py +268 -0
  34. diffsky-0.2.0/diffsky/cosmos_utils/cosmos_mstar_model.py +185 -0
  35. diffsky-0.2.0/diffsky/cosmos_utils/tests/test_cosmos_mstar_model.py +36 -0
  36. diffsky-0.2.0/diffsky/data_loaders/cosmos20_loader.py +106 -0
  37. diffsky-0.2.0/diffsky/data_loaders/hacc_core_utils.py +119 -0
  38. diffsky-0.2.0/diffsky/data_loaders/load_discovery_cores.py +395 -0
  39. diffsky-0.2.0/diffsky/data_loaders/load_hacc_cores.py +440 -0
  40. diffsky-0.2.0/diffsky/data_loaders/tests/__init__.py +0 -0
  41. diffsky-0.2.0/diffsky/data_loaders/tests/test_cosmos_loader.py +80 -0
  42. diffsky-0.2.0/diffsky/data_loaders/tests/test_hacc_core_utils.py +60 -0
  43. diffsky-0.2.0/diffsky/data_loaders/tests/test_load_discovery_cores.py +23 -0
  44. diffsky-0.2.0/diffsky/data_loaders/tests/test_load_hacc_cores.py +49 -0
  45. diffsky-0.2.0/diffsky/data_loaders/tests/testing_data/__init__.py +0 -0
  46. diffsky-0.2.0/diffsky/data_loaders/tests/testing_data/cosmos20_shasum.dat +1 -0
  47. diffsky-0.2.0/diffsky/diagnostics/__init__.py +0 -0
  48. diffsky-0.2.0/diffsky/diagnostics/plot_delta_mag_burstiness.py +321 -0
  49. diffsky-0.2.0/diffsky/diagnostics/plot_diffstar_fq.py +121 -0
  50. diffsky-0.2.0/diffsky/diagnostics/tests/__init__.py +0 -0
  51. diffsky-0.2.0/diffsky/diagnostics/tests/test_plot_delta_mag_burstiness.py +14 -0
  52. diffsky-0.2.0/diffsky/diagnostics/tests/test_plot_diffstar_fq.py +14 -0
  53. diffsky-0.2.0/diffsky/dustpop/__init__.py +3 -0
  54. diffsky-0.2.0/diffsky/dustpop/avpop.py +128 -0
  55. diffsky-0.2.0/diffsky/dustpop/avpop_flex.py +248 -0
  56. diffsky-0.2.0/diffsky/dustpop/avpop_mono.py +226 -0
  57. diffsky-0.2.0/diffsky/dustpop/deltapop.py +130 -0
  58. diffsky-0.2.0/diffsky/dustpop/diagnostics/__init__.py +0 -0
  59. diffsky-0.2.0/diffsky/dustpop/diagnostics/plot_avpop_flex.py +175 -0
  60. diffsky-0.2.0/diffsky/dustpop/diagnostics/plot_funopop_simple.py +60 -0
  61. diffsky-0.2.0/diffsky/dustpop/diagnostics/tests/__init__.py +0 -0
  62. diffsky-0.2.0/diffsky/dustpop/diagnostics/tests/test_plot_avpop_flex.py +18 -0
  63. diffsky-0.2.0/diffsky/dustpop/diagnostics/tests/test_plot_funopop_simple.py +15 -0
  64. diffsky-0.2.0/diffsky/dustpop/funopop.py +298 -0
  65. diffsky-0.2.0/diffsky/dustpop/funopop_simple.py +147 -0
  66. diffsky-0.2.0/diffsky/dustpop/funopop_ssfr.py +101 -0
  67. diffsky-0.2.0/diffsky/dustpop/sbl18_dust.py +33 -0
  68. diffsky-0.2.0/diffsky/dustpop/sbl18_dust_kernels.py +121 -0
  69. diffsky-0.2.0/diffsky/dustpop/sbl18_dustpop.py +174 -0
  70. diffsky-0.2.0/diffsky/dustpop/tests/__init__.py +0 -0
  71. diffsky-0.2.0/diffsky/dustpop/tests/test_avpop.py +115 -0
  72. diffsky-0.2.0/diffsky/dustpop/tests/test_avpop_flex.py +162 -0
  73. diffsky-0.2.0/diffsky/dustpop/tests/test_avpop_mono.py +279 -0
  74. diffsky-0.2.0/diffsky/dustpop/tests/test_deltapop.py +112 -0
  75. diffsky-0.2.0/diffsky/dustpop/tests/test_funopop_model.py +130 -0
  76. diffsky-0.2.0/diffsky/dustpop/tests/test_funopop_simple.py +104 -0
  77. diffsky-0.2.0/diffsky/dustpop/tests/test_funopop_ssfr.py +103 -0
  78. diffsky-0.2.0/diffsky/dustpop/tests/test_sbl18_dustpop.py +37 -0
  79. diffsky-0.2.0/diffsky/dustpop/tests/test_tw_dust_kernels.py +17 -0
  80. diffsky-0.2.0/diffsky/dustpop/tests/test_tw_dustpop.py +37 -0
  81. diffsky-0.2.0/diffsky/dustpop/tests/test_tw_dustpop_mono.py +146 -0
  82. diffsky-0.2.0/diffsky/dustpop/tests/test_tw_dustpop_mono_noise.py +117 -0
  83. diffsky-0.2.0/diffsky/dustpop/tests/test_tw_dustpop_new.py +143 -0
  84. diffsky-0.2.0/diffsky/dustpop/tw_dust.py +33 -0
  85. diffsky-0.2.0/diffsky/dustpop/tw_dust_kernels.py +141 -0
  86. diffsky-0.2.0/diffsky/dustpop/tw_dustpop.py +174 -0
  87. diffsky-0.2.0/diffsky/dustpop/tw_dustpop_mono.py +175 -0
  88. diffsky-0.2.0/diffsky/dustpop/tw_dustpop_mono_noise.py +133 -0
  89. diffsky-0.2.0/diffsky/dustpop/tw_dustpop_new.py +174 -0
  90. diffsky-0.2.0/diffsky/experimental/__init__.py +0 -0
  91. diffsky-0.2.0/diffsky/experimental/dspspop/__init__.py +0 -0
  92. {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/burstshapepop.py +11 -10
  93. {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/dust_deltapop.py +3 -6
  94. {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/dustpop.py +5 -3
  95. {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/lgavpop.py +3 -7
  96. {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/lgfburstpop.py +3 -6
  97. {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/photpop.py +8 -4
  98. diffsky-0.2.0/diffsky/experimental/dspspop/tests/__init__.py +0 -0
  99. {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/tests/test_burstshapepop.py +18 -11
  100. diffsky-0.2.0/diffsky/experimental/phot_utils.py +67 -0
  101. diffsky-0.2.0/diffsky/experimental/precompute_ssp_phot.py +155 -0
  102. diffsky-0.2.0/diffsky/experimental/tests/__init__.py +0 -0
  103. diffsky-0.2.0/diffsky/experimental/tests/test_precompute_ssp_phot.py +43 -0
  104. diffsky-0.2.0/diffsky/mass_functions/__init__.py +6 -0
  105. diffsky-0.2.0/diffsky/mass_functions/ccshmf_model.py +97 -0
  106. diffsky-0.2.0/diffsky/mass_functions/fitting_utils/README.rst +1 -0
  107. diffsky-0.2.0/diffsky/mass_functions/fitting_utils/__init__.py +0 -0
  108. diffsky-0.2.0/diffsky/mass_functions/fitting_utils/fit_ccshmf.py +53 -0
  109. diffsky-0.2.0/diffsky/mass_functions/fitting_utils/fit_ccshmf_kernels.py +45 -0
  110. diffsky-0.2.0/diffsky/mass_functions/fitting_utils/fit_hmf_kernels.py +44 -0
  111. diffsky-0.2.0/diffsky/mass_functions/fitting_utils/fit_hmf_model.py +51 -0
  112. diffsky-0.2.0/diffsky/mass_functions/fitting_utils/fitting_helpers.py +182 -0
  113. diffsky-0.2.0/diffsky/mass_functions/fitting_utils/tests/__init__.py +0 -0
  114. diffsky-0.2.0/diffsky/mass_functions/fitting_utils/tests/test_fit_ccshmf.py +57 -0
  115. diffsky-0.2.0/diffsky/mass_functions/fitting_utils/tests/test_fit_ccshmf_kernels.py +28 -0
  116. diffsky-0.2.0/diffsky/mass_functions/fitting_utils/tests/test_fit_hmf_kernels.py +28 -0
  117. diffsky-0.2.0/diffsky/mass_functions/fitting_utils/tests/test_fit_hmf_model.py +84 -0
  118. diffsky-0.2.0/diffsky/mass_functions/hmf_model.py +146 -0
  119. diffsky-0.2.0/diffsky/mass_functions/io_utils/README.txt +2 -0
  120. diffsky-0.2.0/diffsky/mass_functions/io_utils/__init__.py +0 -0
  121. diffsky-0.2.0/diffsky/mass_functions/io_utils/loader.py +33 -0
  122. diffsky-0.2.0/diffsky/mass_functions/io_utils/smdpl_helpers.py +38 -0
  123. diffsky-0.2.0/diffsky/mass_functions/kernels/__init__.py +0 -0
  124. diffsky-0.2.0/diffsky/mass_functions/kernels/ccshmf_kernels.py +44 -0
  125. diffsky-0.2.0/diffsky/mass_functions/kernels/hmf_kernels.py +42 -0
  126. diffsky-0.2.0/diffsky/mass_functions/kernels/tests/__init__.py +0 -0
  127. diffsky-0.2.0/diffsky/mass_functions/kernels/tests/test_ccshmf_kernels.py +12 -0
  128. diffsky-0.2.0/diffsky/mass_functions/kernels/tests/test_hmf_kernels.py +12 -0
  129. diffsky-0.2.0/diffsky/mass_functions/mc_diffmah_tpeak.py +272 -0
  130. diffsky-0.2.0/diffsky/mass_functions/mc_hosts.py +79 -0
  131. diffsky-0.2.0/diffsky/mass_functions/mc_subs.py +104 -0
  132. diffsky-0.2.0/diffsky/mass_functions/mc_tinfall.py +65 -0
  133. diffsky-0.2.0/diffsky/mass_functions/measure_ccshmf.py +63 -0
  134. diffsky-0.2.0/diffsky/mass_functions/measure_hmf.py +22 -0
  135. diffsky-0.2.0/diffsky/mass_functions/smhm_kernels/__init__.py +0 -0
  136. diffsky-0.2.0/diffsky/mass_functions/smhm_kernels/tests/__init__.py +0 -0
  137. diffsky-0.2.0/diffsky/mass_functions/smhm_kernels/tests/test_threeroll_smhm.py +112 -0
  138. diffsky-0.2.0/diffsky/mass_functions/smhm_kernels/threeroll_kernels.py +102 -0
  139. diffsky-0.2.0/diffsky/mass_functions/smhm_kernels/threeroll_smhm.py +77 -0
  140. diffsky-0.2.0/diffsky/mass_functions/tests/__init__.py +0 -0
  141. diffsky-0.2.0/diffsky/mass_functions/tests/test_ccshmf.py +92 -0
  142. diffsky-0.2.0/diffsky/mass_functions/tests/test_hmf_model.py +74 -0
  143. diffsky-0.2.0/diffsky/mass_functions/tests/test_mc_diffmah_tpeak.py +95 -0
  144. diffsky-0.2.0/diffsky/mass_functions/tests/test_mc_hosts.py +41 -0
  145. diffsky-0.2.0/diffsky/mass_functions/tests/test_mc_subs.py +130 -0
  146. diffsky-0.2.0/diffsky/mass_functions/tests/test_mc_tinfall.py +56 -0
  147. diffsky-0.2.0/diffsky/mass_functions/tests/test_measure_hmf.py +32 -0
  148. diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/README.txt +2 -0
  149. diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/__init__.py +0 -0
  150. diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_0.00_lgmhost_12.32.txt +50 -0
  151. diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_0.00_lgmhost_13.00.txt +50 -0
  152. diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_0.00_lgmhost_13.55.txt +50 -0
  153. diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_0.00_lgmhost_14.08.txt +50 -0
  154. diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_1.00_lgmhost_12.31.txt +50 -0
  155. diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_1.00_lgmhost_12.99.txt +50 -0
  156. diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_1.00_lgmhost_13.51.txt +50 -0
  157. diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_cshmf_cuml_redshift_1.00_lgmhost_14.05.txt +50 -0
  158. diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_hmf_cuml_redshift_0.05.txt +48 -0
  159. diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_hmf_cuml_redshift_1.00.txt +47 -0
  160. diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_hmf_cuml_redshift_2.14.txt +44 -0
  161. diffsky-0.2.0/diffsky/mass_functions/tests/testing_data/smdpl_hmf_cuml_redshift_3.95.txt +45 -0
  162. diffsky-0.2.0/diffsky/mass_functions/upweighting/__init__.py +0 -0
  163. diffsky-0.2.0/diffsky/mass_functions/upweighting/namedtuple_cat_utils.py +40 -0
  164. diffsky-0.2.0/diffsky/mass_functions/upweighting/tests/__init__.py +0 -0
  165. diffsky-0.2.0/diffsky/mass_functions/upweighting/tests/test_mc_gen_upweighting.py +203 -0
  166. diffsky-0.2.0/diffsky/mass_functions/upweighting/upweighting.py +56 -0
  167. diffsky-0.2.0/diffsky/mass_functions/utils.py +29 -0
  168. diffsky-0.2.0/diffsky/mc_diffsky.py +244 -0
  169. diffsky-0.2.0/diffsky/sbl18_photgrad.py +282 -0
  170. diffsky-0.2.0/diffsky/sumstats/__init__.py +0 -0
  171. diffsky-0.2.0/diffsky/sumstats/diffndhist.py +168 -0
  172. diffsky-0.2.0/diffsky/sumstats/smhm.py +43 -0
  173. diffsky-0.2.0/diffsky/sumstats/tests/__init__.py +0 -0
  174. diffsky-0.2.0/diffsky/sumstats/tests/test_smhm.py +19 -0
  175. diffsky-0.2.0/diffsky/systematics/__init__.py +0 -0
  176. diffsky-0.2.0/diffsky/systematics/ssp_errors.py +110 -0
  177. diffsky-0.2.0/diffsky/systematics/tests/__init__.py +0 -0
  178. diffsky-0.2.0/diffsky/systematics/tests/test_ssp_errors.py +108 -0
  179. diffsky-0.2.0/diffsky/tests/__init__.py +0 -0
  180. diffsky-0.2.0/diffsky/tests/test_dependencies.py +9 -0
  181. {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/tests/test_diffsky_setup.py +1 -1
  182. diffsky-0.2.0/diffsky/tests/test_mc_diffsky.py +55 -0
  183. diffsky-0.2.0/diffsky/tests/test_sbl18_photgrad.py +31 -0
  184. diffsky-0.2.0/diffsky/tests/test_tw_photgrad.py +205 -0
  185. diffsky-0.2.0/diffsky/tests/test_utils.py +26 -0
  186. diffsky-0.2.0/diffsky/tests/testing_data/__init__.py +0 -0
  187. diffsky-0.2.0/diffsky/tw_photgrad.py +258 -0
  188. diffsky-0.2.0/diffsky/tw_utils.py +145 -0
  189. diffsky-0.2.0/diffsky/utils.py +69 -0
  190. {diffsky-0.1.1 → diffsky-0.2.0}/diffsky.egg-info/PKG-INFO +8 -7
  191. diffsky-0.2.0/diffsky.egg-info/SOURCES.txt +230 -0
  192. diffsky-0.2.0/diffsky.egg-info/requires.txt +6 -0
  193. diffsky-0.2.0/docs/source/demo_diffmahpop_t_peak.ipynb +167 -0
  194. diffsky-0.2.0/docs/source/demos.rst +8 -0
  195. {diffsky-0.1.1 → diffsky-0.2.0}/docs/source/index.rst +1 -0
  196. {diffsky-0.1.1 → diffsky-0.2.0}/docs/source/installation.rst +1 -1
  197. {diffsky-0.1.1 → diffsky-0.2.0}/docs/source/rtd_environment.yaml +5 -5
  198. {diffsky-0.1.1 → diffsky-0.2.0}/pyproject.toml +8 -6
  199. diffsky-0.2.0/requirements.txt +6 -0
  200. diffsky-0.2.0/scripts/make_diffsky_lj_mock.py +492 -0
  201. diffsky-0.2.0/scripts/make_sfh_lj_mock.py +176 -0
  202. diffsky-0.1.1/CHANGES.rst +0 -8
  203. diffsky-0.1.1/diffsky/_version.py +0 -1
  204. diffsky-0.1.1/diffsky/tests/test_utils.py +0 -13
  205. diffsky-0.1.1/diffsky/utils.py +0 -16
  206. diffsky-0.1.1/diffsky.egg-info/SOURCES.txt +0 -55
  207. diffsky-0.1.1/diffsky.egg-info/requires.txt +0 -6
  208. diffsky-0.1.1/requirements.txt +0 -6
  209. {diffsky-0.1.1 → diffsky-0.2.0}/.coveragerc +0 -0
  210. {diffsky-0.1.1 → diffsky-0.2.0}/.git_archival.txt +0 -0
  211. {diffsky-0.1.1 → diffsky-0.2.0}/.gitattributes +0 -0
  212. {diffsky-0.1.1 → diffsky-0.2.0}/.gitignore +0 -0
  213. {diffsky-0.1.1 → diffsky-0.2.0}/LICENSE.rst +0 -0
  214. {diffsky-0.1.1/diffsky/experimental → diffsky-0.2.0/diffsky/burstpop/diagnostics}/__init__.py +0 -0
  215. {diffsky-0.1.1/diffsky/experimental/dspspop → diffsky-0.2.0/diffsky/burstpop/diagnostics/tests}/__init__.py +0 -0
  216. {diffsky-0.1.1/diffsky/experimental/dspspop → diffsky-0.2.0/diffsky/burstpop}/tests/__init__.py +0 -0
  217. {diffsky-0.1.1/diffsky/experimental/tests → diffsky-0.2.0/diffsky/cosmos_utils}/__init__.py +0 -0
  218. {diffsky-0.1.1/diffsky → diffsky-0.2.0/diffsky/cosmos_utils}/tests/__init__.py +0 -0
  219. {diffsky-0.1.1/diffsky/tests/testing_data → diffsky-0.2.0/diffsky/data_loaders}/__init__.py +0 -0
  220. {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/diffndhist.py +0 -0
  221. {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/boris_dust.py +0 -0
  222. {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/nagaraj22_dust.py +0 -0
  223. {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/tests/test_attavpop.py +0 -0
  224. {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/tests/test_boris_dust.py +0 -0
  225. {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/tests/test_dustdeltapop.py +0 -0
  226. {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/tests/test_lgfburstpop.py +0 -0
  227. {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/dspspop/tests/test_photpop.py +0 -0
  228. {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/photometry_interpolation.py +0 -0
  229. {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/experimental/tests/test_photometry_interpolation.py +0 -0
  230. {diffsky-0.1.1 → diffsky-0.2.0}/diffsky/tests/test_diffndhist.py +0 -0
  231. {diffsky-0.1.1 → diffsky-0.2.0}/diffsky.egg-info/dependency_links.txt +0 -0
  232. {diffsky-0.1.1 → diffsky-0.2.0}/diffsky.egg-info/top_level.txt +0 -0
  233. {diffsky-0.1.1 → diffsky-0.2.0}/docs/Makefile +0 -0
  234. {diffsky-0.1.1 → diffsky-0.2.0}/docs/make.bat +0 -0
  235. {diffsky-0.1.1 → diffsky-0.2.0}/docs/source/citation.rst +0 -0
  236. {diffsky-0.1.1 → diffsky-0.2.0}/docs/source/conf.py +0 -0
  237. {diffsky-0.1.1 → diffsky-0.2.0}/setup.cfg +0 -0
  238. {diffsky-0.1.1 → diffsky-0.2.0}/setup.py +0 -0
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "monthly"
7
+ groups:
8
+ github-actions:
9
+ patterns:
10
+ - '*'
@@ -12,25 +12,25 @@ jobs:
12
12
  runs-on: "ubuntu-latest"
13
13
 
14
14
  steps:
15
- - uses: actions/checkout@v2
15
+ - uses: actions/checkout@v4
16
16
 
17
- - uses: conda-incubator/setup-miniconda@v2
17
+ - uses: conda-incubator/setup-miniconda@v3
18
18
  with:
19
- python-version: 3.9
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
- mamba install --quiet \
28
+ conda install --quiet \
30
29
  --file=requirements.txt
31
30
  python -m pip install --no-deps -e .
32
- mamba install -y -q \
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: tests
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: tests
11
+ name: test-latest-diffstuff-releases
12
12
  runs-on: "ubuntu-latest"
13
13
 
14
14
  steps:
15
- - uses: actions/checkout@v2
15
+ - uses: actions/checkout@v4
16
16
  with:
17
17
  fetch-depth: 0
18
18
 
19
- - uses: conda-incubator/setup-miniconda@v2
19
+ - uses: conda-incubator/setup-miniconda@v3
20
20
  with:
21
- python-version: 3.9
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
- mamba install --quiet \
37
+ conda install --quiet \
34
38
  --file=requirements.txt
35
- mamba install -y -q \
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@v3
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 .
@@ -6,7 +6,7 @@ sphinx:
6
6
  build:
7
7
  os: "ubuntu-22.04"
8
8
  tools:
9
- python: "mambaforge-22.9"
9
+ python: "miniconda-latest"
10
10
 
11
11
  conda:
12
12
  environment: docs/source/rtd_environment.yaml
@@ -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
1
+ Metadata-Version: 2.4
2
2
  Name: diffsky
3
- Version: 0.1.1
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.9
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
- Requires-Dist: diffmah
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.9 numpy jax pytest ipython jupyter matplotlib scipy h5py diffmah diffstar dsps diffsky
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.9 numpy jax pytest ipython jupyter matplotlib scipy h5py diffmah diffstar dsps diffsky
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
@@ -1,5 +1,7 @@
1
1
  """
2
2
  """
3
+
3
4
  # flake8: noqa
4
5
 
5
6
  from ._version import __version__
7
+ from .mass_functions.mc_diffmah_tpeak import mc_subhalos
@@ -0,0 +1 @@
1
+ __version__ = '0.2.0'
@@ -0,0 +1,11 @@
1
+ """
2
+ """
3
+ # flake8: noqa
4
+
5
+ from .diffburstpop import (
6
+ DEFAULT_DIFFBURSTPOP_PARAMS,
7
+ DEFAULT_DIFFBURSTPOP_U_PARAMS,
8
+ calc_bursty_age_weights_from_diffburstpop_params,
9
+ get_bounded_diffburstpop_params,
10
+ get_unbounded_diffburstpop_params,
11
+ )
@@ -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)