nmma 0.1.3__tar.gz → 0.2.1__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 (328) hide show
  1. {nmma-0.1.3 → nmma-0.2.1}/.gitattributes +2 -1
  2. {nmma-0.1.3 → nmma-0.2.1}/.github/workflows/build-deploy-container.yml +37 -35
  3. nmma-0.2.1/.github/workflows/continous_integration.yml +153 -0
  4. nmma-0.2.1/.github/workflows/dependency-installation.yml +85 -0
  5. {nmma-0.1.3 → nmma-0.2.1}/.github/workflows/deploy-github-pages.yml +4 -2
  6. nmma-0.2.1/.github/workflows/rst-linter.yml +22 -0
  7. nmma-0.2.1/CITATION.cff +54 -0
  8. nmma-0.2.1/Dockerfile +58 -0
  9. nmma-0.2.1/PKG-INFO +148 -0
  10. nmma-0.2.1/README.md +69 -0
  11. {nmma-0.1.3 → nmma-0.2.1}/api/Dockerfile +7 -6
  12. {nmma-0.1.3 → nmma-0.2.1}/api/environment.yml +2 -0
  13. nmma-0.2.1/assets/a3d3.png +0 -0
  14. nmma-0.2.1/assets/erc.png +0 -0
  15. nmma-0.2.1/assets/nsf.png +0 -0
  16. nmma-0.2.1/doc/.doctor-rst.yaml +5 -0
  17. nmma-0.2.1/doc/changelog.rst +8 -0
  18. {nmma-0.1.3 → nmma-0.2.1}/doc/conf.py +3 -1
  19. {nmma-0.1.3 → nmma-0.2.1}/doc/contributing.md +2 -1
  20. {nmma-0.1.3 → nmma-0.2.1}/doc/data_inj_obs.md +9 -0
  21. {nmma-0.1.3 → nmma-0.2.1}/doc/fitting.md +21 -0
  22. {nmma-0.1.3 → nmma-0.2.1}/doc/gw_inference.md +2 -2
  23. {nmma-0.1.3 → nmma-0.2.1}/doc/index.rst +52 -20
  24. {nmma-0.1.3 → nmma-0.2.1}/doc/joint_inference.md +23 -6
  25. nmma-0.2.1/doc/lfi_analysis.md +38 -0
  26. {nmma-0.1.3 → nmma-0.2.1}/doc/models.md +2 -2
  27. nmma-0.2.1/doc/observing-scenarios-light-curves.md +73 -0
  28. {nmma-0.1.3 → nmma-0.2.1}/doc/training.md +12 -1
  29. {nmma-0.1.3 → nmma-0.2.1}/doc_requirements.txt +2 -1
  30. nmma-0.2.1/example_files/lbol/ztf23bqun/23bqun_bbdata.csv +12 -0
  31. nmma-0.2.1/example_files/lbol/ztf23bqun/Arnett_modified.priors +4 -0
  32. nmma-0.2.1/example_files/lbol/ztf23bqun/lbol_test_corner.png +0 -0
  33. nmma-0.2.1/example_files/lbol/ztf23bqun/lbol_test_lightcurves.png +0 -0
  34. nmma-0.2.1/example_files/lbol/ztf23bqun/run.sh +17 -0
  35. nmma-0.2.1/example_files/sim_events/bns_O4_injections.dat +2001 -0
  36. nmma-0.2.1/ml_requirements.txt +3 -0
  37. nmma-0.2.1/nmma/__init__.py +1 -0
  38. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/analysis.py +631 -72
  39. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/analysis_condor.py +2 -2
  40. nmma-0.2.1/nmma/em/analysis_lbol.py +421 -0
  41. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/create_injection_condor.py +1 -1
  42. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/create_lightcurves.py +20 -11
  43. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/create_lightcurves_condor.py +4 -2
  44. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/create_svdmodel.py +2 -2
  45. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/detect_lightcurves.py +28 -18
  46. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/gwem_resampling_utils.py +7 -6
  47. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/injection.py +57 -11
  48. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/io.py +38 -22
  49. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/lightcurve_marginalization.py +15 -8
  50. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/likelihood.py +135 -0
  51. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/manual.py +2 -2
  52. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/model.py +143 -159
  53. nmma-0.2.1/nmma/em/model_lbol.py +71 -0
  54. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/model_parameters.py +127 -1
  55. nmma-0.2.1/nmma/em/prior.py +267 -0
  56. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/svdmodel_benchmark.py +113 -46
  57. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/training.py +20 -26
  58. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/utils.py +81 -16
  59. nmma-0.2.1/nmma/em/utils_lbol.py +72 -0
  60. nmma-0.2.1/nmma/em/validate_lightcurve.py +103 -0
  61. {nmma-0.1.3 → nmma-0.2.1}/nmma/eos/create_injection.py +7 -4
  62. {nmma-0.1.3 → nmma-0.2.1}/nmma/joint/conversion.py +14 -9
  63. {nmma-0.1.3 → nmma-0.2.1}/nmma/joint/likelihood.py +114 -40
  64. nmma-0.2.1/nmma/joint/maximum_mass_constraint.py +130 -0
  65. nmma-0.2.1/nmma/joint/maximum_mass_constraint_utils.py +192 -0
  66. nmma-0.2.1/nmma/mlmodel/dataprocessing.py +413 -0
  67. nmma-0.2.1/nmma/mlmodel/embedding.py +284 -0
  68. nmma-0.2.1/nmma/mlmodel/frozen-flow-weights.pth +0 -0
  69. nmma-0.2.1/nmma/mlmodel/inference.py +55 -0
  70. nmma-0.2.1/nmma/mlmodel/normalizingflows.py +132 -0
  71. nmma-0.2.1/nmma/mlmodel/resnet.py +468 -0
  72. nmma-0.2.1/nmma/mlmodel/similarity_embedding_weights.pth +0 -0
  73. {nmma-0.1.3 → nmma-0.2.1}/nmma/pbilby/analysis/likelihood.py +16 -25
  74. {nmma-0.1.3 → nmma-0.2.1}/nmma/pbilby/generation.py +24 -25
  75. {nmma-0.1.3 → nmma-0.2.1}/nmma/pbilby/parser/shared.py +17 -8
  76. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/analysis.py +32 -11
  77. nmma-0.2.1/nmma/tests/analysis_lbol.py +55 -0
  78. nmma-0.2.1/nmma/tests/data/Bu2019nsbh/ztfr.joblib +0 -0
  79. nmma-0.2.1/nmma/tests/data/Bu2019nsbh.joblib +0 -0
  80. nmma-0.2.1/nmma/tests/data/Bu2019nsbh_tf/ztfr.h5 +0 -0
  81. nmma-0.2.1/nmma/tests/data/GW+KN+GRB_posterior +7508 -0
  82. nmma-0.2.1/nmma/tests/data/Ka2017_injection.json +28 -0
  83. nmma-0.2.1/nmma/tests/data/ZTF23aaxeacr_partial.csv +6 -0
  84. nmma-0.2.1/nmma/tests/data/eos_macro/1.dat +85 -0
  85. nmma-0.2.1/nmma/tests/data/eos_macro/10.dat +80 -0
  86. nmma-0.2.1/nmma/tests/data/eos_macro/2.dat +80 -0
  87. nmma-0.2.1/nmma/tests/data/eos_macro/3.dat +83 -0
  88. nmma-0.2.1/nmma/tests/data/eos_macro/4.dat +86 -0
  89. nmma-0.2.1/nmma/tests/data/eos_macro/5.dat +88 -0
  90. nmma-0.2.1/nmma/tests/data/eos_macro/6.dat +82 -0
  91. nmma-0.2.1/nmma/tests/data/eos_macro/7.dat +86 -0
  92. nmma-0.2.1/nmma/tests/data/eos_macro/8.dat +77 -0
  93. nmma-0.2.1/nmma/tests/data/eos_macro/9.dat +82 -0
  94. nmma-0.2.1/nmma/tests/data/eos_micro/1.dat +225 -0
  95. nmma-0.2.1/nmma/tests/data/eos_micro/10.dat +225 -0
  96. nmma-0.2.1/nmma/tests/data/eos_micro/2.dat +225 -0
  97. nmma-0.2.1/nmma/tests/data/eos_micro/3.dat +225 -0
  98. nmma-0.2.1/nmma/tests/data/eos_micro/4.dat +225 -0
  99. nmma-0.2.1/nmma/tests/data/eos_micro/5.dat +225 -0
  100. nmma-0.2.1/nmma/tests/data/eos_micro/6.dat +225 -0
  101. nmma-0.2.1/nmma/tests/data/eos_micro/7.dat +225 -0
  102. nmma-0.2.1/nmma/tests/data/eos_micro/8.dat +225 -0
  103. nmma-0.2.1/nmma/tests/data/eos_micro/9.dat +225 -0
  104. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/injections.py +29 -0
  105. nmma-0.2.1/nmma/tests/maximum_mass.py +31 -0
  106. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/models.py +2 -13
  107. nmma-0.2.1/nmma/tests/tools.py +50 -0
  108. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/training.py +17 -1
  109. {nmma-0.1.3 → nmma-0.2.1}/nmma/utils/gitlab.py +33 -16
  110. {nmma-0.1.3 → nmma-0.2.1}/nmma/utils/models.py +40 -22
  111. {nmma-0.1.3 → nmma-0.2.1}/nmma/utils/models_tools.py +4 -6
  112. nmma-0.2.1/nmma.egg-info/PKG-INFO +148 -0
  113. {nmma-0.1.3 → nmma-0.2.1}/nmma.egg-info/SOURCES.txt +69 -1
  114. {nmma-0.1.3 → nmma-0.2.1}/nmma.egg-info/entry_points.txt +6 -0
  115. {nmma-0.1.3 → nmma-0.2.1}/nmma.egg-info/requires.txt +19 -5
  116. nmma-0.2.1/nmma.egg-info/top_level.txt +2 -0
  117. nmma-0.2.1/priors/Bu2023Ye.prior +9 -0
  118. nmma-0.2.1/priors/Piro2021.prior +5 -0
  119. nmma-0.2.1/priors/maximum_mass_resampling.prior +4 -0
  120. {nmma-0.1.3 → nmma-0.2.1}/priors/sncosmo-generic.prior +1 -1
  121. {nmma-0.1.3 → nmma-0.2.1}/pyproject.toml +25 -16
  122. {nmma-0.1.3 → nmma-0.2.1}/requirements.txt +3 -4
  123. nmma-0.2.1/sampler_requirements.txt +1 -0
  124. nmma-0.2.1/sklearn_requirements.txt +1 -0
  125. nmma-0.2.1/slurm.sub +19 -0
  126. nmma-0.2.1/tf_requirements.txt +1 -0
  127. nmma-0.2.1/tools/__init__.py +0 -0
  128. {nmma-0.1.3 → nmma-0.2.1}/tools/analysis_slurm.py +1 -1
  129. nmma-0.2.1/tools/convert_skyportal_lcs.py +57 -0
  130. {nmma-0.1.3 → nmma-0.2.1}/tools/corner_plot.py +122 -73
  131. {nmma-0.1.3 → nmma-0.2.1}/tools/make_lcs.py +9 -3
  132. {nmma-0.1.3 → nmma-0.2.1}/tools/make_lcs_LANL.py +8 -2
  133. {nmma-0.1.3 → nmma-0.2.1}/tools/make_lcs_hdf5.py +8 -2
  134. {nmma-0.1.3 → nmma-0.2.1}/tools/make_lcs_kasen.py +8 -2
  135. nmma-0.2.1/tools/plot_svdmodel_benchmarks.py +91 -0
  136. {nmma-0.1.3 → nmma-0.2.1}/tools/resample_grid.py +8 -2
  137. nmma-0.2.1/tools/tf_training_calls.sh +52 -0
  138. nmma-0.1.3/.github/workflows/continous_integration.yml +0 -131
  139. nmma-0.1.3/PKG-INFO +0 -98
  140. nmma-0.1.3/README.md +0 -34
  141. nmma-0.1.3/nmma/__init__.py +0 -1
  142. nmma-0.1.3/nmma/em/prior.py +0 -121
  143. nmma-0.1.3/nmma/tests/tools.py +0 -24
  144. nmma-0.1.3/nmma/utils/zenodo.py +0 -249
  145. nmma-0.1.3/nmma.egg-info/PKG-INFO +0 -98
  146. nmma-0.1.3/nmma.egg-info/top_level.txt +0 -1
  147. nmma-0.1.3/priors/Piro2021.prior +0 -5
  148. {nmma-0.1.3 → nmma-0.2.1}/.flake8 +0 -0
  149. {nmma-0.1.3 → nmma-0.2.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  150. {nmma-0.1.3 → nmma-0.2.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  151. {nmma-0.1.3 → nmma-0.2.1}/.github/workflows/delete-branch-cache.yml +0 -0
  152. {nmma-0.1.3 → nmma-0.2.1}/.github/workflows/publish-to-anaconda.yml +0 -0
  153. {nmma-0.1.3 → nmma-0.2.1}/.github/workflows/publish-to-pypi.yml +0 -0
  154. {nmma-0.1.3 → nmma-0.2.1}/.gitignore +0 -0
  155. {nmma-0.1.3 → nmma-0.2.1}/.pep8speaks.yml +0 -0
  156. {nmma-0.1.3 → nmma-0.2.1}/.pre-commit-config.yaml +0 -0
  157. {nmma-0.1.3 → nmma-0.2.1}/LICENSE +0 -0
  158. {nmma-0.1.3 → nmma-0.2.1}/MANIFEST.in +0 -0
  159. {nmma-0.1.3 → nmma-0.2.1}/api/app.py +0 -0
  160. {nmma-0.1.3 → nmma-0.2.1}/api/log.py +0 -0
  161. {nmma-0.1.3 → nmma-0.2.1}/doc/Cluster_Resources.md +0 -0
  162. {nmma-0.1.3 → nmma-0.2.1}/doc/GW-EM-resampling.md +0 -0
  163. {nmma-0.1.3 → nmma-0.2.1}/doc/Makefile +0 -0
  164. {nmma-0.1.3 → nmma-0.2.1}/doc/_static/.nmma-docs.css.un~ +0 -0
  165. {nmma-0.1.3 → nmma-0.2.1}/doc/_static/favicon-light.png +0 -0
  166. {nmma-0.1.3 → nmma-0.2.1}/doc/_static/light-logo.svg +0 -0
  167. {nmma-0.1.3 → nmma-0.2.1}/doc/_static/nmma-docs.css +0 -0
  168. {nmma-0.1.3 → nmma-0.2.1}/doc/_static/nmma-docs.css~ +0 -0
  169. {nmma-0.1.3 → nmma-0.2.1}/doc/combined_analysis.md +0 -0
  170. {nmma-0.1.3 → nmma-0.2.1}/doc/gwemopt_light_curves_detection.md +0 -0
  171. {nmma-0.1.3 → nmma-0.2.1}/doc/images/Corner_narrow_Bulla.png +0 -0
  172. {nmma-0.1.3 → nmma-0.2.1}/doc/images/ZTF21abjvfbc_corner.png +0 -0
  173. {nmma-0.1.3 → nmma-0.2.1}/doc/images/ZTF21abjvfbc_lightcurves.png +0 -0
  174. {nmma-0.1.3 → nmma-0.2.1}/doc/images/ZTF_corner.png +0 -0
  175. {nmma-0.1.3 → nmma-0.2.1}/doc/images/ZTF_lightcurves.png +0 -0
  176. {nmma-0.1.3 → nmma-0.2.1}/doc/images/corner_samples.png +0 -0
  177. {nmma-0.1.3 → nmma-0.2.1}/doc/images/dark-logo.svg +0 -0
  178. {nmma-0.1.3 → nmma-0.2.1}/doc/images/injection_corner.png +0 -0
  179. {nmma-0.1.3 → nmma-0.2.1}/doc/images/injection_lightcurves.png +0 -0
  180. {nmma-0.1.3 → nmma-0.2.1}/doc/images/light-logo.svg +0 -0
  181. {nmma-0.1.3 → nmma-0.2.1}/doc/images/training_lightcurves.png +0 -0
  182. {nmma-0.1.3 → nmma-0.2.1}/doc/quick-start-guide.rst +0 -0
  183. {nmma-0.1.3 → nmma-0.2.1}/docker-compose.yml +0 -0
  184. {nmma-0.1.3 → nmma-0.2.1}/example_files/NICER/J0030_3spot_RM.txt +0 -0
  185. {nmma-0.1.3 → nmma-0.2.1}/example_files/NICER/NICER+XMM_J0740_RM.txt +0 -0
  186. {nmma-0.1.3 → nmma-0.2.1}/example_files/NICER/NICER_x_XMM_J0740_XPSI_STU_NSX_FIH_radius_mass.txt +0 -0
  187. {nmma-0.1.3 → nmma-0.2.1}/example_files/candidate_data/ZTF20abwysqy.dat +0 -0
  188. {nmma-0.1.3 → nmma-0.2.1}/example_files/candidate_data/ZTF21abdequz.dat +0 -0
  189. {nmma-0.1.3 → nmma-0.2.1}/example_files/candidate_data/ZTF21abdhqle.dat +0 -0
  190. {nmma-0.1.3 → nmma-0.2.1}/example_files/candidate_data/ZTF21abdpqpq.dat +0 -0
  191. {nmma-0.1.3 → nmma-0.2.1}/example_files/candidate_data/ZTF21abinaiu.dat +0 -0
  192. {nmma-0.1.3 → nmma-0.2.1}/example_files/candidate_data/ZTF21abisoui.dat +0 -0
  193. {nmma-0.1.3 → nmma-0.2.1}/example_files/candidate_data/ZTF21abitmou.dat +0 -0
  194. {nmma-0.1.3 → nmma-0.2.1}/example_files/candidate_data/ZTF21abivhns.dat +0 -0
  195. {nmma-0.1.3 → nmma-0.2.1}/example_files/candidate_data/ZTF21abjpkvy.dat +0 -0
  196. {nmma-0.1.3 → nmma-0.2.1}/example_files/candidate_data/ZTF21abjrhzz.dat +0 -0
  197. {nmma-0.1.3 → nmma-0.2.1}/example_files/candidate_data/ZTF21abjrmes.dat +0 -0
  198. {nmma-0.1.3 → nmma-0.2.1}/example_files/candidate_data/ZTF21abjtdua.dat +0 -0
  199. {nmma-0.1.3 → nmma-0.2.1}/example_files/candidate_data/ZTF21abjvfbc.dat +0 -0
  200. {nmma-0.1.3 → nmma-0.2.1}/example_files/candidate_data/ZTF23aaxeacr.dat +0 -0
  201. {nmma-0.1.3 → nmma-0.2.1}/example_files/eos/ALF2.dat +0 -0
  202. {nmma-0.1.3 → nmma-0.2.1}/example_files/lightcurves/AT2017gfo.dat +0 -0
  203. {nmma-0.1.3 → nmma-0.2.1}/example_files/lightcurves/AT2017gfo_GRB170817A_reduced.dat +0 -0
  204. {nmma-0.1.3 → nmma-0.2.1}/example_files/lightcurves/AT2017gfo_reduced.dat +0 -0
  205. {nmma-0.1.3 → nmma-0.2.1}/example_files/lightcurves/GRB211211A.txt +0 -0
  206. {nmma-0.1.3 → nmma-0.2.1}/example_files/prior/GW170817_AT2017gfo.prior +0 -0
  207. {nmma-0.1.3 → nmma-0.2.1}/example_files/prior/GW170817_AT2017gfo_GRB170817A.prior +0 -0
  208. {nmma-0.1.3 → nmma-0.2.1}/example_files/prior/ZTF_Bu2019lm.prior +0 -0
  209. {nmma-0.1.3 → nmma-0.2.1}/example_files/sim_events/injections.dat +0 -0
  210. {nmma-0.1.3 → nmma-0.2.1}/example_files/tools/gwem_resampling/GRB211211A_NSBH_posterior_samples.dat +0 -0
  211. {nmma-0.1.3 → nmma-0.2.1}/example_files/tools/gwem_resampling/GRB211211A_posterior_samples.dat +0 -0
  212. {nmma-0.1.3 → nmma-0.2.1}/example_files/tools/gwem_resampling/GWsamples.dat +0 -0
  213. {nmma-0.1.3 → nmma-0.2.1}/example_files/tools/gwem_resampling/GWsamples_NSBH.dat +0 -0
  214. {nmma-0.1.3 → nmma-0.2.1}/example_files/tools/gwem_resampling/gwsamples_generation.py +0 -0
  215. {nmma-0.1.3 → nmma-0.2.1}/example_files/tools/gwem_resampling/posterior_probability.txt +0 -0
  216. {nmma-0.1.3 → nmma-0.2.1}/example_files/yaml/doc_example.yaml +0 -0
  217. {nmma-0.1.3 → nmma-0.2.1}/example_files/zenodo/gw_posteriors.txt +0 -0
  218. {nmma-0.1.3 → nmma-0.2.1}/grb_requirements.txt +0 -0
  219. {nmma-0.1.3 → nmma-0.2.1}/nmma/__pycache__/__init__.cpython-37.pyc +0 -0
  220. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/__init__.py +0 -0
  221. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/__pycache__/__init__.cpython-37.pyc +0 -0
  222. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/__pycache__/likelihood.cpython-37.pyc +0 -0
  223. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/__pycache__/model.cpython-37.pyc +0 -0
  224. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/__pycache__/utils.cpython-37.pyc +0 -0
  225. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/combine_EOS.py +0 -0
  226. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/create_injection_slurm.py +0 -0
  227. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/create_lightcurves_slurm.py +0 -0
  228. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/data/ZTF_revisit_kde_i.joblib +0 -0
  229. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/data/ZTF_revisit_kde_public.joblib +0 -0
  230. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/data/ZTF_sampling_public.pkl +0 -0
  231. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/data/ZTF_uncer_params.pkl +0 -0
  232. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/data/__init__.py +0 -0
  233. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/data/__pycache__/__init__.cpython-38.pyc +0 -0
  234. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/data/lims_ToO_180_g.joblib +0 -0
  235. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/data/lims_ToO_180_r.joblib +0 -0
  236. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/data/lims_ToO_300_g.joblib +0 -0
  237. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/data/lims_ToO_300_r.joblib +0 -0
  238. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/data/lims_i.joblib +0 -0
  239. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/data/lims_public_g.joblib +0 -0
  240. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/data/lims_public_r.joblib +0 -0
  241. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/data/sampling_ToO_180.pkl +0 -0
  242. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/data/sampling_ToO_300.pkl +0 -0
  243. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/gwem_Hubble_estimate.py +0 -0
  244. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/gwem_resampling.py +0 -0
  245. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/gwem_resampling_condor.py +0 -0
  246. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/gwsamples_creation.py +0 -0
  247. {nmma-0.1.3 → nmma-0.2.1}/nmma/em/injection_summary.py +0 -0
  248. {nmma-0.1.3 → nmma-0.2.1}/nmma/eos/__init__.py +0 -0
  249. {nmma-0.1.3 → nmma-0.2.1}/nmma/eos/__pycache__/__init__.cpython-37.pyc +0 -0
  250. {nmma-0.1.3 → nmma-0.2.1}/nmma/eos/__pycache__/eos.cpython-37.pyc +0 -0
  251. {nmma-0.1.3 → nmma-0.2.1}/nmma/eos/__pycache__/tov.cpython-37.pyc +0 -0
  252. {nmma-0.1.3 → nmma-0.2.1}/nmma/eos/__pycache__/utils.cpython-37.pyc +0 -0
  253. {nmma-0.1.3 → nmma-0.2.1}/nmma/eos/eos.py +0 -0
  254. {nmma-0.1.3 → nmma-0.2.1}/nmma/eos/tov.py +0 -0
  255. {nmma-0.1.3 → nmma-0.2.1}/nmma/eos/utils.py +0 -0
  256. {nmma-0.1.3 → nmma-0.2.1}/nmma/gw/likelihood.py +0 -0
  257. {nmma-0.1.3 → nmma-0.2.1}/nmma/joint/__init__.py +0 -0
  258. {nmma-0.1.3 → nmma-0.2.1}/nmma/joint/__pycache__/__init__.cpython-37.pyc +0 -0
  259. {nmma-0.1.3 → nmma-0.2.1}/nmma/joint/__pycache__/constraints.cpython-37.pyc +0 -0
  260. {nmma-0.1.3 → nmma-0.2.1}/nmma/joint/__pycache__/conversion.cpython-37.pyc +0 -0
  261. {nmma-0.1.3 → nmma-0.2.1}/nmma/joint/__pycache__/likelihood.cpython-37.pyc +0 -0
  262. {nmma-0.1.3 → nmma-0.2.1}/nmma/joint/constraints.py +0 -0
  263. {nmma-0.1.3 → nmma-0.2.1}/nmma/pbilby/analysis/__init__.py +0 -0
  264. {nmma-0.1.3 → nmma-0.2.1}/nmma/pbilby/analysis/analysis_run.py +0 -0
  265. {nmma-0.1.3 → nmma-0.2.1}/nmma/pbilby/analysis/main.py +0 -0
  266. {nmma-0.1.3 → nmma-0.2.1}/nmma/pbilby/parser/__init__.py +0 -0
  267. {nmma-0.1.3 → nmma-0.2.1}/nmma/pbilby/parser/analysis.py +0 -0
  268. {nmma-0.1.3 → nmma-0.2.1}/nmma/pbilby/parser/generation.py +0 -0
  269. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/__init__.py +0 -0
  270. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/Bu2019lm_injection.json +0 -0
  271. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/Me2017_injection.json +0 -0
  272. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/TrPi2018_pinned_parameters.prior +0 -0
  273. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.001_mejwind0.010_phi45_45.6.dat +0 -0
  274. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.001_mejwind0.030_phi45_45.6.dat +0 -0
  275. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.001_mejwind0.050_phi45_45.6.dat +0 -0
  276. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.001_mejwind0.070_phi45_45.6.dat +0 -0
  277. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.001_mejwind0.090_phi45_45.6.dat +0 -0
  278. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.001_mejwind0.110_phi45_45.6.dat +0 -0
  279. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.001_mejwind0.130_phi45_45.6.dat +0 -0
  280. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.005_mejwind0.010_phi45_45.6.dat +0 -0
  281. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.005_mejwind0.030_phi45_45.6.dat +0 -0
  282. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.005_mejwind0.050_phi45_45.6.dat +0 -0
  283. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.005_mejwind0.070_phi45_45.6.dat +0 -0
  284. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.005_mejwind0.090_phi45_45.6.dat +0 -0
  285. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.005_mejwind0.110_phi45_45.6.dat +0 -0
  286. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.005_mejwind0.130_phi45_45.6.dat +0 -0
  287. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.010_mejwind0.010_phi45_45.6.dat +0 -0
  288. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.010_mejwind0.030_phi45_45.6.dat +0 -0
  289. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.010_mejwind0.050_phi45_45.6.dat +0 -0
  290. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.010_mejwind0.070_phi45_45.6.dat +0 -0
  291. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.010_mejwind0.090_phi45_45.6.dat +0 -0
  292. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.010_mejwind0.110_phi45_45.6.dat +0 -0
  293. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.010_mejwind0.130_phi45_45.6.dat +0 -0
  294. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.020_mejwind0.010_phi45_45.6.dat +0 -0
  295. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.020_mejwind0.030_phi45_45.6.dat +0 -0
  296. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.020_mejwind0.050_phi45_45.6.dat +0 -0
  297. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.020_mejwind0.070_phi45_45.6.dat +0 -0
  298. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.020_mejwind0.090_phi45_45.6.dat +0 -0
  299. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.020_mejwind0.110_phi45_45.6.dat +0 -0
  300. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.020_mejwind0.130_phi45_45.6.dat +0 -0
  301. {nmma-0.1.3 → nmma-0.2.1}/nmma/tests/data/lowmass_collapsar_updated.h5 +0 -0
  302. {nmma-0.1.3 → nmma-0.2.1}/nmma/utils/__init__.py +0 -0
  303. {nmma-0.1.3 → nmma-0.2.1}/nmma.egg-info/dependency_links.txt +0 -0
  304. {nmma-0.1.3 → nmma-0.2.1}/priors/AnBa2022.prior +0 -0
  305. {nmma-0.1.3 → nmma-0.2.1}/priors/AnBa2022_sparse.prior +0 -0
  306. {nmma-0.1.3 → nmma-0.2.1}/priors/Bu2019lm.prior +0 -0
  307. {nmma-0.1.3 → nmma-0.2.1}/priors/Bu2019lm_TrPi2018GRB211211A.prior +0 -0
  308. {nmma-0.1.3 → nmma-0.2.1}/priors/Bu2019nsbh.prior +0 -0
  309. {nmma-0.1.3 → nmma-0.2.1}/priors/Bu2019nsbh_TrPi2018_GRB211211A.prior +0 -0
  310. {nmma-0.1.3 → nmma-0.2.1}/priors/Bu2022Ye.prior +0 -0
  311. {nmma-0.1.3 → nmma-0.2.1}/priors/GWBNS.prior +0 -0
  312. {nmma-0.1.3 → nmma-0.2.1}/priors/GWNSBH.prior +0 -0
  313. {nmma-0.1.3 → nmma-0.2.1}/priors/Ka2017.prior +0 -0
  314. {nmma-0.1.3 → nmma-0.2.1}/priors/LANL2022.prior +0 -0
  315. {nmma-0.1.3 → nmma-0.2.1}/priors/Me2017.prior +0 -0
  316. {nmma-0.1.3 → nmma-0.2.1}/priors/Sr2023.prior +0 -0
  317. {nmma-0.1.3 → nmma-0.2.1}/priors/TrPi2018.prior +0 -0
  318. {nmma-0.1.3 → nmma-0.2.1}/priors/TrPi2018_onaxis.prior +0 -0
  319. {nmma-0.1.3 → nmma-0.2.1}/priors/ZTF_lgrb.prior +0 -0
  320. {nmma-0.1.3 → nmma-0.2.1}/priors/ZTF_sgrb.prior +0 -0
  321. {nmma-0.1.3 → nmma-0.2.1}/priors/injec_alspin.prior +0 -0
  322. {nmma-0.1.3 → nmma-0.2.1}/priors/salt2.prior +0 -0
  323. {nmma-0.1.3 → nmma-0.2.1}/priors/sncosmo-generic_TrPi2018.prior +0 -0
  324. {nmma-0.1.3 → nmma-0.2.1}/production_requirements.txt +0 -0
  325. {nmma-0.1.3 → nmma-0.2.1}/setup.cfg +0 -0
  326. {nmma-0.1.3 → nmma-0.2.1}/tutorials/README.md +0 -0
  327. {nmma-0.1.3 → nmma-0.2.1}/tutorials/tutorial-KN-models-training.ipynb +0 -0
  328. {nmma-0.1.3 → nmma-0.2.1}/tutorials/tutorial-lightcurve_simulation.ipynb +0 -0
@@ -20,7 +20,7 @@
20
20
 
21
21
  # not sure about .prior files or .json files
22
22
 
23
- # image files
23
+ # image files
24
24
  *.png binary
25
25
  *.jpg binary
26
26
  *.gif binary
@@ -28,6 +28,7 @@
28
28
  *.pdf binary
29
29
 
30
30
  # binary files
31
+ *.joblib binary
31
32
  *.pkl binary
32
33
  *.pickle binary
33
34
  *.h5 binary
@@ -8,6 +8,7 @@ env:
8
8
 
9
9
  jobs:
10
10
  build:
11
+ if: github.repository_owner == 'nuclear-multimessenger-astronomy'
11
12
  runs-on: ubuntu-latest
12
13
 
13
14
  strategy:
@@ -41,7 +42,7 @@ jobs:
41
42
 
42
43
  - name: Build and push
43
44
  id: build
44
- uses: docker/build-push-action@v4
45
+ uses: docker/build-push-action@v5
45
46
  with:
46
47
  context: .
47
48
  file: ./api/Dockerfile
@@ -64,37 +65,38 @@ jobs:
64
65
  retention-days: 1
65
66
 
66
67
  merge:
67
- runs-on: ubuntu-latest
68
- needs:
69
- - build
70
- steps:
71
- - name: Download digests
72
- uses: actions/download-artifact@v3
73
- with:
74
- name: digests
75
- path: /tmp/digests
76
-
77
- - name: Docker meta
78
- id: meta
79
- uses: docker/metadata-action@v4
80
- with:
81
- images: ${{ env.REGISTRY_IMAGE }}
82
-
83
- - name: Set up Docker Buildx
84
- uses: docker/setup-buildx-action@v2
85
-
86
- - name: Login to Docker Hub
87
- uses: docker/login-action@v2
88
- with:
89
- username: ${{ secrets.DOCKER_HUB_USERNAME }}
90
- password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
91
-
92
- - name: Create manifest list and push
93
- working-directory: /tmp/digests
94
- run: |
95
- docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
96
- $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
97
- -
98
- name: Inspect image
99
- run: |
100
- docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
68
+ if: github.repository_owner == 'nuclear-multimessenger-astronomy'
69
+ runs-on: ubuntu-latest
70
+ needs:
71
+ - build
72
+ steps:
73
+ - name: Download digests
74
+ uses: actions/download-artifact@v3
75
+ with:
76
+ name: digests
77
+ path: /tmp/digests
78
+
79
+ - name: Docker meta
80
+ id: meta
81
+ uses: docker/metadata-action@v4
82
+ with:
83
+ images: ${{ env.REGISTRY_IMAGE }}
84
+
85
+ - name: Set up Docker Buildx
86
+ uses: docker/setup-buildx-action@v2
87
+
88
+ - name: Login to Docker Hub
89
+ uses: docker/login-action@v2
90
+ with:
91
+ username: ${{ secrets.DOCKER_HUB_USERNAME }}
92
+ password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
93
+
94
+ - name: Create manifest list and push
95
+ working-directory: /tmp/digests
96
+ run: |
97
+ docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
98
+ $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
99
+ -
100
+ name: Inspect image
101
+ run: |
102
+ docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
@@ -0,0 +1,153 @@
1
+ name: Unit Test nmma
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ paths-ignore:
7
+ - "doc/**"
8
+ pull_request:
9
+ branches: [main]
10
+ paths-ignore:
11
+ - "doc/**"
12
+ workflow_dispatch:
13
+
14
+ jobs:
15
+ build:
16
+ runs-on: ${{ matrix.os }}
17
+ defaults:
18
+ run:
19
+ shell: bash -el {0}
20
+ strategy:
21
+ fail-fast: false
22
+ matrix:
23
+ os: ["ubuntu-latest", "macos-latest"]
24
+ python-version: ["3.9", "3.10", "3.11", "3.12"]
25
+
26
+ steps:
27
+ - name: Checkout branch being tested
28
+ uses: actions/checkout@v4
29
+
30
+ - name: Set up Python with Conda ${{ matrix.python-version }}
31
+ uses: conda-incubator/setup-miniconda@v3
32
+ with:
33
+ python-version: ${{ matrix.python-version }}
34
+ architecture: ${{ matrix.os == 'macos-latest' && 'arm64' || 'x86_64' }}
35
+ miniforge-version: latest
36
+ use-mamba: true
37
+ mamba-version: "*"
38
+ activate-environment: nmma_env
39
+
40
+ - name: Restore SVD models from cache
41
+ uses: actions/cache@v4
42
+ with:
43
+ path: svdmodels
44
+ key: svdmodels-${{ hashFiles('**/LICENSE') }}
45
+ restore-keys: svdmodels-
46
+ save-always: true
47
+
48
+ - name: Get pip cache dir
49
+ id: pip-cache
50
+ run: |
51
+ python -m pip install --upgrade pip setuptools wheel
52
+ echo "::set-output name=dir::$(pip cache dir)"
53
+
54
+ - name: pip cache
55
+ uses: actions/cache@v4
56
+ with:
57
+ path: ${{ steps.pip-cache.outputs.dir }}
58
+ key: ${{ runner.os }}-pip-2-${{ hashFiles('**/pyproject.toml', '**/requirements.txt') }}
59
+ restore-keys: |
60
+ ${{ runner.os }}-pip-2-
61
+ save-always: true
62
+
63
+ - name: Update Homebrew
64
+ if: matrix.os == 'macos-latest'
65
+ run: |
66
+ brew update --preinstall
67
+
68
+ - name: Configure Homebrew cache
69
+ if: matrix.os == 'macos-latest'
70
+ uses: actions/cache@v4
71
+ with:
72
+ path: |
73
+ ~/Library/Caches/Homebrew/openmpi--*
74
+ ~/Library/Caches/Homebrew/downloads/*--openmpi-*
75
+ ~/Library/Caches/Homebrew/hdf5--*
76
+ ~/Library/Caches/Homebrew/downloads/*--hdf5-*
77
+ ~/Library/Caches/Homebrew/gcc--*
78
+ ~/Library/Caches/Homebrew/downloads/*--gcc-*
79
+ ~/Library/Caches/Homebrew/openblas--*
80
+ ~/Library/Caches/Homebrew/downloads/*--openblas-*
81
+ ~/Library/Caches/Homebrew/lapack--*
82
+ ~/Library/Caches/Homebrew/downloads/*--lapack-*
83
+ ~/Library/Caches/Homebrew/basictex--*
84
+ ~/Library/Caches/Homebrew/downloads/*--basictex-*
85
+ ~/Library/Caches/Homebrew/cmake--*
86
+ ~/Library/Caches/Homebrew/downloads/*--cmake-*
87
+
88
+ key: brew-${{ hashFiles('**/pyproject.toml') }}
89
+ restore-keys: brew-
90
+ save-always: true
91
+
92
+ - name: Install Homebrew dependencies
93
+ if: matrix.os == 'macos-latest'
94
+ run: |
95
+ env HOMEBREW_NO_AUTO_UPDATE=1 brew install openmpi hdf5 gcc openblas lapack basictex cmake
96
+ eval "$(/usr/libexec/path_helper)"
97
+ sudo tlmgr update --self
98
+ sudo tlmgr install collection-latex
99
+ sudo tlmgr install collection-fontsrecommended
100
+ sudo tlmgr install dvipng
101
+ sudo tlmgr install cm-super
102
+ sudo tlmgr install type1cm
103
+ - name: Install Linux Dependencies
104
+ if: matrix.os == 'ubuntu-latest'
105
+ uses: awalsh128/cache-apt-pkgs-action@latest
106
+ with:
107
+ packages: openmpi-bin libopenmpi-dev gfortran build-essential libblas3 libblas-dev liblapack3 liblapack-dev libatlas-base-dev texlive texlive-latex-extra texlive-fonts-recommended dvipng cm-super
108
+ execute_install_scripts: true
109
+
110
+ - name: Install dependencies (macOS)
111
+ if: matrix.os == 'macos-latest'
112
+ run: |
113
+ conda install -c conda-forge pyfftw c-compiler ligo-segments python-ligo-lw
114
+ echo "FC=$(which gfortran-11)" >> $GITHUB_ENV
115
+ echo "CC=$(which gcc)" >> $GITHUB_ENV
116
+ echo "CXX=$(which g++)" >> $GITHUB_ENV
117
+
118
+ - name: Install dependencies (Ubuntu)
119
+ if: matrix.os == 'ubuntu-latest'
120
+ run: |
121
+ sudo apt-get update
122
+ sudo apt-get install -y texlive texlive-latex-extra texlive-fonts-recommended dvipng cm-super
123
+ - name: Install Python dependencies
124
+ run: |
125
+ python -m pip install --upgrade git+https://github.com/bitranox/wrapt_timeout_decorator.git
126
+ python -m pip install pytest pytest-cov flake8 pytest-aiohttp sqlparse freezegun PyJWT joblib coveralls
127
+ python -m pip install -r ml_requirements.txt -r grb_requirements.txt -r tf_requirements.txt -r sklearn_requirements.txt
128
+ python -m pip install .
129
+ git clone https://github.com/JohannesBuchner/MultiNest && cd MultiNest/build && rm -rf * && cmake .. && make && cd ../..
130
+ pwd
131
+
132
+ - name: Export Libraries
133
+ run: |
134
+ echo "LD_LIBRARY_PATH=$HOME/work/nmma/nmma/MultiNest/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
135
+ echo "DYLD_LIBRARY_PATH=$HOME/work/nmma/nmma/MultiNest/lib:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV
136
+
137
+ - name: Lint with flake8
138
+ run: |
139
+ # stop the build if there are Python syntax errors or undefined names
140
+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude docs
141
+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
142
+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude docs,versioneer.py,nmma/_version.py,nmma/tests,nmma/*/__init__.py
143
+
144
+ - name: Test with pytest
145
+ run: |
146
+ python -m coverage run --source nmma -m pytest nmma/tests/*.py
147
+
148
+ - name: Run Coveralls
149
+ if: ${{ success() }}
150
+ run: |
151
+ coveralls --service=github
152
+ env:
153
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,85 @@
1
+ name: Check NMMA dependencies installation
2
+ on:
3
+ push:
4
+ branches: [main]
5
+ paths: ["*_requirements.txt", "pyproject.toml"]
6
+ pull_request:
7
+ branches: [main]
8
+ paths: ["*_requirements.txt", "pyproject.toml"]
9
+ workflow_dispatch:
10
+
11
+ jobs:
12
+ build:
13
+ runs-on: ${{ matrix.os }}
14
+ defaults:
15
+ run:
16
+ shell: bash -el {0}
17
+ strategy:
18
+ fail-fast: false
19
+ matrix:
20
+ os: ["ubuntu-latest", "macos-latest"]
21
+ python-version: ["3.9", "3.10", "3.11", "3.12"]
22
+
23
+ steps:
24
+ - name: Checkout branch being tested
25
+ uses: actions/checkout@v4
26
+
27
+ - name: Set up Python with Conda ${{ matrix.python-version }}
28
+ uses: conda-incubator/setup-miniconda@v3
29
+ with:
30
+ python-version: ${{ matrix.python-version }}
31
+ architecture: ${{ matrix.os == 'macos-latest' && 'arm64' || 'x86_64' }}
32
+ miniforge-version: latest
33
+ use-mamba: true
34
+ mamba-version: "*"
35
+ activate-environment: nmma_env
36
+
37
+ - name: Install linux packages
38
+ if: matrix.os == 'ubuntu-latest'
39
+ run: |
40
+ sudo apt-get update
41
+ sudo apt-get install -y openmpi-bin libopenmpi-dev
42
+
43
+ - name: Install Homebrew packages
44
+ if: matrix.os == 'macos-latest'
45
+ run: |
46
+ brew install openmpi hdf5
47
+ conda install ligo-segments python-ligo-lw
48
+
49
+ - name: Install NMMA (base)
50
+ run: |
51
+ python -m pip install 'nmma @ git+https://github.com/sahiljhawar/nmma.git@dependencies'
52
+
53
+ - name: Verify base NMMA installation
54
+ run: |
55
+ python -c "import nmma; print(f'NMMA version: {nmma.__version__}')"
56
+
57
+ - name: Install and verify NMMA [grb]
58
+ run: |
59
+ python -m pip install 'nmma[grb] @ git+https://github.com/sahiljhawar/nmma.git@dependencies'
60
+ python -c "import nmma, afterglowpy; print(f'Successfully imported {nmma.__name__}, {afterglowpy.__name__}')"
61
+
62
+ - name: Install and verify NMMA [production]
63
+ run: |
64
+ python -m pip install 'nmma[production] @ git+https://github.com/sahiljhawar/nmma.git@dependencies'
65
+ python -c "import nmma, parallel_bilby, nestcheck, mpi4py; print(f'Successfully imported {nmma.__name__}, {parallel_bilby.__name__}, {nestcheck.__name__}, {mpi4py.__name__}')"
66
+
67
+ - name: Install and verify NMMA [neuralnet]
68
+ run: |
69
+ python -m pip install 'nmma[neuralnet] @ git+https://github.com/sahiljhawar/nmma.git@dependencies'
70
+ python -c "import nmma, torch, nflows, torchvision; print(f'Successfully imported {nmma.__name__}, {torch.__name__}, {nflows.__name__}, {torchvision.__name__}')"
71
+
72
+ - name: Install and verify NMMA [tf]
73
+ run: |
74
+ python -m pip install 'nmma[tf] @ git+https://github.com/sahiljhawar/nmma.git@dependencies'
75
+ python -c "import nmma, tensorflow; print(f'Successfully imported {nmma.__name__}, {tensorflow.__name__}')"
76
+
77
+ - name: Install and verify NMMA [sklearn]
78
+ run: |
79
+ python -m pip install 'nmma[sklearn] @ git+https://github.com/sahiljhawar/nmma.git@dependencies'
80
+ python -c "import nmma, sklearn; print(f'Successfully imported {nmma.__name__}, {sklearn.__name__}')"
81
+
82
+ - name: Install and verify NMMA [sampler]
83
+ run: |
84
+ python -m pip install 'nmma[sampler] @ git+https://github.com/sahiljhawar/nmma.git@dependencies'
85
+ python -c "import nmma, ultranest; print(f'Successfully imported {nmma.__name__}, {ultranest.__name__}')"
@@ -6,7 +6,6 @@ on:
6
6
 
7
7
  jobs:
8
8
  build:
9
-
10
9
  runs-on: ubuntu-latest
11
10
  strategy:
12
11
  fail-fast: false
@@ -40,15 +39,18 @@ jobs:
40
39
  python -m pip install .[doc]
41
40
 
42
41
  - name: Make dependencies
42
+ env:
43
+ SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ secrets.SPHINX_GITHUB_CHANGELOG_TOKEN }}
43
44
  run: |
44
45
  cd doc && make html; cd ../
45
46
  touch doc/_build/html/.nojekyll
46
47
 
47
48
  - name: Deploy to GitHub Pages
48
- if: success()
49
+ if: success() && github.repository_owner == 'nuclear-multimessenger-astronomy'
49
50
  uses: crazy-max/ghaction-github-pages@v2
50
51
  with:
51
52
  target_branch: gh-pages
52
53
  build_dir: doc/_build/html/
53
54
  env:
54
55
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56
+ SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ secrets.SPHINX_GITHUB_CHANGELOG_TOKEN }}
@@ -0,0 +1,22 @@
1
+ name: Lint rst
2
+
3
+ on:
4
+ push:
5
+ paths: ['**/**.rst']
6
+ pull_request:
7
+ paths: ['**/**.rst']
8
+
9
+ jobs:
10
+ doctor-rst:
11
+ name: DOCtor-RST
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: "Checkout code"
15
+ uses: actions/checkout@v4
16
+
17
+ - name: DOCtor-RST
18
+ uses: docker://oskarstark/doctor-rst
19
+ with:
20
+ args: --short --error-format=github
21
+ env:
22
+ DOCS_DIR: 'doc/'
@@ -0,0 +1,54 @@
1
+ cff-version: 1.2.0
2
+ title: "NMMA"
3
+ abstract: "An updated nuclear-physics and multi-messenger astrophysics framework for binary neutron star mergers"
4
+ message: "If you use this code, please cite this repository along with the paper"
5
+ repository-code: "https://github.com/nuclear-multimessenger-astronomy/nmma"
6
+ url: "https://gitlab.com/Theodlz/nmma-models"
7
+ license: "GPL-3.0"
8
+ authors:
9
+ - given-names: "Peter"
10
+ name-particle: "T. H."
11
+ family-names: "Pang"
12
+ - given-names: "Tim"
13
+ family-names: "Dietrich"
14
+ - given-names: "Michael"
15
+ family-names: "Coughlin"
16
+ name-particle: "W."
17
+ - given-names: "Mattia"
18
+ family-names: "Bulla"
19
+ - given-names: "Ingo"
20
+ family-names: "Tews"
21
+ - given-names: "Mouza"
22
+ family-names: "Almualla"
23
+ - given-names: "Tyler"
24
+ family-names: "Barna"
25
+ - given-names: "Weizmann"
26
+ family-names: "Kiendrebeogo"
27
+ - given-names: "Nina"
28
+ family-names: "Kunert"
29
+ - given-names: "Gargi"
30
+ family-names: "Mansingh"
31
+ - given-names: "Brandon"
32
+ family-names: "Reed"
33
+ - given-names: "Niharika"
34
+ family-names: "Sravan"
35
+ - given-names: "Andrew"
36
+ family-names: "Toivonen"
37
+ - given-names: "Sarah"
38
+ family-names: "Antier"
39
+ - given-names: "Robert"
40
+ family-names: "VandenBerg"
41
+ name-particle: "O."
42
+ - given-names: "Jack"
43
+ family-names: "Heinzel"
44
+ - given-names: "Vsevolod"
45
+ family-names: "Nedora"
46
+ - given-names: "Pouyan"
47
+ family-names: "Salehi"
48
+ - given-names: "Ritwik"
49
+ family-names: "Sharma"
50
+ - given-names: "Rahul"
51
+ family-names: "Somasundaram"
52
+ - given-names: "Chris"
53
+ name-particle: "Van Den"
54
+ family-names: "Broeck"
nmma-0.2.1/Dockerfile ADDED
@@ -0,0 +1,58 @@
1
+ # Use official Ubuntu 22.04 image as base
2
+ FROM ubuntu:22.04
3
+
4
+ # Update the repository for package indexes
5
+ RUN apt-get update
6
+
7
+ # Install dependencies
8
+ RUN apt-get install -y \
9
+ python3 \
10
+ git \
11
+ python3-pip \
12
+ && apt-get clean \
13
+ && rm -rf /var/lib/apt/lists/*
14
+
15
+ # Set work directory
16
+ WORKDIR /work
17
+
18
+ # Clone the Git repository
19
+ RUN git clone https://github.com/nuclear-multimessenger-astronomy/nmma/
20
+
21
+ # Set the working directory to the cloned repository
22
+ WORKDIR /work/nmma
23
+
24
+ RUN apt-get update
25
+ RUN apt-get install -y libopenmpi-dev openmpi-bin openmpi-doc
26
+ RUN apt install -y python3-mpi4py
27
+ #install dependencies
28
+ RUN pip3 install numpy
29
+ RUN pip3 install -r /work/nmma/doc_requirements.txt -r /work/nmma/grb_requirements.txt -r /work/nmma/production_requirements.txt -r /work/nmma/requirements.txt
30
+
31
+ # Clone and build Multinest
32
+ RUN git clone https://github.com/JohannesBuchner/MultiNest
33
+
34
+ WORKDIR /work/nmma/MultiNest
35
+
36
+ RUN apt-get install -y \
37
+ cmake \
38
+ liblapacke-dev \
39
+ liblapack-dev \
40
+ libblas-dev
41
+
42
+ RUN cd build && cmake .. && make
43
+
44
+ # Set environment variable
45
+ ENV LD_LIBRARY_PATH=/work/nmma/MultiNest/lib:$LD_LIBRARY_PATH
46
+
47
+ # Clone and install PyMultiNest
48
+ RUN git clone https://github.com/JohannesBuchner/PyMultiNest/ /work/nmma/PyMultiNest
49
+ WORKDIR /work/nmma/PyMultiNest
50
+ RUN python3 setup.py install --user
51
+
52
+ # Add the executable path to the enviromental variable PATH
53
+ ENV PATH=$PATH:$HOME/.local/bin/
54
+
55
+ RUN pip3 install nmma
56
+ RUN pip3 install --upgrade Flask Jinja2
57
+
58
+ CMD ["bash"]
nmma-0.2.1/PKG-INFO ADDED
@@ -0,0 +1,148 @@
1
+ Metadata-Version: 2.1
2
+ Name: nmma
3
+ Version: 0.2.1
4
+ Summary: A nuclear physics multi-messenger Bayesian inference library
5
+ Author-email: "Peter Tsun Ho Pang, Michael Coughlin, Tim Dietrich, Ingo Tews" <nuclear_multimessenger_astronomy@googlegroups.com>
6
+ License: GPLv3
7
+ Project-URL: Homepage, https://github.com/nuclear-multimessenger-astronomy/nmma
8
+ Project-URL: Documentation, https://nuclear-multimessenger-astronomy.github.io/nmma/
9
+ Project-URL: Download, https://pypi.org/project/nmma/#files
10
+ Project-URL: Tracker, https://github.com/nuclear-multimessenger-astronomy/nmma/issues
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Intended Audience :: Science/Research
17
+ Classifier: Intended Audience :: End Users/Desktop
18
+ Classifier: Intended Audience :: Developers
19
+ Classifier: Natural Language :: English
20
+ Classifier: Topic :: Scientific/Engineering
21
+ Classifier: Topic :: Scientific/Engineering :: Astronomy
22
+ Classifier: Topic :: Scientific/Engineering :: Physics
23
+ Classifier: Operating System :: POSIX
24
+ Classifier: Operating System :: Unix
25
+ Classifier: Operating System :: MacOS
26
+ Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
27
+ Requires-Python: <3.13,>=3.9
28
+ Description-Content-Type: text/markdown
29
+ License-File: LICENSE
30
+ Requires-Dist: future
31
+ Requires-Dist: bilby>=2.1.1
32
+ Requires-Dist: bilby_pipe>=1.1.0
33
+ Requires-Dist: colorcet
34
+ Requires-Dist: numpy>=1.9
35
+ Requires-Dist: matplotlib<3.8,>=2.0
36
+ Requires-Dist: scipy>=1.10
37
+ Requires-Dist: pandas<2.0,>=1.3.4
38
+ Requires-Dist: astropy>=4.3.1
39
+ Requires-Dist: pymultinest
40
+ Requires-Dist: sncosmo
41
+ Requires-Dist: dust_extinction
42
+ Requires-Dist: arviz
43
+ Requires-Dist: p_tqdm
44
+ Requires-Dist: tornado
45
+ Requires-Dist: notebook
46
+ Requires-Dist: ligo.skymap
47
+ Requires-Dist: healpy
48
+ Provides-Extra: doc
49
+ Requires-Dist: sphinx>=5.0; extra == "doc"
50
+ Requires-Dist: sphinx_math_dollar; extra == "doc"
51
+ Requires-Dist: recommonmark; extra == "doc"
52
+ Requires-Dist: numpydoc; extra == "doc"
53
+ Requires-Dist: sphinx-rtd-theme; extra == "doc"
54
+ Requires-Dist: notedown; extra == "doc"
55
+ Requires-Dist: jsx-lexer; extra == "doc"
56
+ Requires-Dist: linkify-it-py; extra == "doc"
57
+ Requires-Dist: linkify; extra == "doc"
58
+ Requires-Dist: myst-parser; extra == "doc"
59
+ Requires-Dist: sphinx-book-theme; extra == "doc"
60
+ Requires-Dist: sphinx_copybutton; extra == "doc"
61
+ Requires-Dist: sphinx-github-changelog; extra == "doc"
62
+ Provides-Extra: grb
63
+ Requires-Dist: afterglowpy>=0.7.3; extra == "grb"
64
+ Requires-Dist: wrapt_timeout_decorator; extra == "grb"
65
+ Provides-Extra: production
66
+ Requires-Dist: parallel_bilby>=2.0.2; extra == "production"
67
+ Requires-Dist: nestcheck; extra == "production"
68
+ Requires-Dist: mpi4py; extra == "production"
69
+ Provides-Extra: neuralnet
70
+ Requires-Dist: torch; extra == "neuralnet"
71
+ Requires-Dist: nflows; extra == "neuralnet"
72
+ Requires-Dist: torchvision; extra == "neuralnet"
73
+ Provides-Extra: sklearn
74
+ Requires-Dist: scikit-learn>=1.0.2; extra == "sklearn"
75
+ Provides-Extra: tf
76
+ Requires-Dist: tensorflow; extra == "tf"
77
+ Provides-Extra: sampler
78
+ Requires-Dist: ultranest; extra == "sampler"
79
+
80
+ <p align="center">
81
+ <picture>
82
+ <source media="(prefers-color-scheme: dark)" width="600px" height="300px" srcset="https://github.com/nuclear-multimessenger-astronomy/nmma/blob/main/doc/images/dark-logo.svg">
83
+ <source media="(prefers-color-scheme: light)" width="600px" height="300px" srcset="https://github.com/nuclear-multimessenger-astronomy/nmma/blob/main/doc/images/light-logo.svg">
84
+ <img alt="NMMA">
85
+ </picture>
86
+ </p>
87
+
88
+
89
+ <div align="center">
90
+ <h1>NMMA</h1>
91
+ <h2>a pythonic library for probing nuclear physics and cosmology with multimessenger analysis</h2>
92
+ <br/><br/>
93
+ </div>
94
+
95
+
96
+ [![GitHub Repo stars](https://img.shields.io/github/stars/nuclear-multimessenger-astronomy/nmma?style=flat)](https://github.com/nuclear-multimessenger-astronomy/nmma/stargazers)
97
+ [![GitHub forks](https://img.shields.io/github/forks/nuclear-multimessenger-astronomy/nmma?style=flat&color=%2365c563)](https://github.com/nuclear-multimessenger-astronomy/nmma/forks)
98
+ [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/nmma?label=conda%20downloads)](https://anaconda.org/conda-forge/nmma)
99
+ [![PyPI - Downloads](https://img.shields.io/pypi/dm/nmma?label=PyPI%20downloads)](https://badge.fury.io/py/nmma)
100
+ [![Coverage Status](https://coveralls.io/repos/github/nuclear-multimessenger-astronomy/nmma/badge.svg?branch=main)](https://coveralls.io/github/nuclear-multimessenger-astronomy/nmma?branch=main)
101
+ [![CI](https://github.com/nuclear-multimessenger-astronomy/nmma/actions/workflows/continous_integration.yml/badge.svg)](https://github.com/nuclear-multimessenger-astronomy/nmma/actions/workflows/continous_integration.yml)
102
+ [![PyPI version](https://badge.fury.io/py/nmma.svg)](https://badge.fury.io/py/nmma)
103
+ [![Python version](https://img.shields.io/pypi/pyversions/nmma.svg)](https://badge.fury.io/py/nmma)
104
+
105
+
106
+
107
+
108
+ Citations to the NMMA code: [Citation record](https://inspirehep.net/literature?sort=mostrecent&size=250&page=1&q=refersto%3Arecid%3A2083145&ui-citation-summary=true)
109
+
110
+ Read our official documentation: [NMMA Documentation](https://nuclear-multimessenger-astronomy.github.io/nmma/)
111
+
112
+ Check out our contribution guide: [For contributors](https://nuclear-multimessenger-astronomy.github.io/nmma/contributing.html)
113
+
114
+ A tutorial on how to produce simulations of lightcurves is given here [tutorial-lightcurve_simulation.ipynb](https://github.com/nuclear-multimessenger-astronomy/nmma/blob/main/tutorials/tutorial-lightcurve_simulation.ipynb)
115
+
116
+
117
+ ### Citing NMMA
118
+
119
+ When utilizing this code for a publication, kindly make a reference to the package by its name, NMMA, and a citation to the companion paper [An updated nuclear-physics and multi-messenger astrophysics framework for binary neutron star mergers](https://www.nature.com/articles/s41467-023-43932-6). The BibTeX entry for the paper is:
120
+ ```bibtex
121
+ @article{Pang:2022rzc,
122
+ title={An updated nuclear-physics and multi-messenger astrophysics framework for binary neutron star mergers},
123
+ author={Peter T. H. Pang and Tim Dietrich and Michael W. Coughlin and Mattia Bulla and Ingo Tews and Mouza Almualla and Tyler Barna and Weizmann Kiendrebeogo and Nina Kunert and Gargi Mansingh and Brandon Reed and Niharika Sravan and Andrew Toivonen and Sarah Antier and Robert O. VandenBerg and Jack Heinzel and Vsevolod Nedora and Pouyan Salehi and Ritwik Sharma and Rahul Somasundaram and Chris Van Den Broeck},
124
+ journal={Nature Communications},
125
+ year={2023},
126
+ month={Dec},
127
+ day={20},
128
+ volume={14},
129
+ number={1},
130
+ pages={8352},
131
+ issn={2041-1723},
132
+ doi={10.1038/s41467-023-43932-6},
133
+ url={https://doi.org/10.1038/s41467-023-43932-6}
134
+ }
135
+ ```
136
+
137
+ ### Acknowledgments
138
+ If you benefited from participating in our community, we ask that you please acknowledge the Nuclear Multi-Messenger Astronomy collaboration, and particular individuals who helped you, in any publications.
139
+ Please use the following text for this acknowledgment:
140
+ > We acknowledge the Nuclear Multi-Messenger Astronomy collective as an open community of multi-domain experts and collaborators. This community and \<names of individuals\>, in particular, were important for the development of this project.
141
+
142
+ ### Funding
143
+ We gratefully acknowledge previous and current support from the U.S. National Science Foundation (NSF) Harnessing the Data Revolution (HDR) Institute for <a href="https://a3d3.ai">Accelerating AI Algorithms for Data Driven Discovery (A3D3)</a> under Cooperative Agreement No. <a href="https://www.nsf.gov/awardsearch/showAward?AWD_ID=2117997">PHY-2117997</a> and the European Research Council (ERC) under the European Union's Starting Grant (Grant No. <a href="https://doi.org/10.3030/101076369">101076369</a>).
144
+
145
+ <p align="center">
146
+ <img src="https://github.com/nuclear-multimessenger-astronomy/nmma/blob/main/assets/a3d3.png" alt="A3D3" width="200"/>
147
+ <img src="https://github.com/nuclear-multimessenger-astronomy/nmma/blob/main/assets/nsf.png" alt="NSF" width="200"/>
148
+ <img src="https://github.com/nuclear-multimessenger-astronomy/nmma/blob/main/assets/erc.png" alt="ERC" width="200"/>