nmma 0.2.0__tar.gz → 0.2.2__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 (335) hide show
  1. {nmma-0.2.0 → nmma-0.2.2}/.github/workflows/build-deploy-container.yml +1 -1
  2. nmma-0.2.2/.github/workflows/continous_integration.yml +154 -0
  3. nmma-0.2.2/.github/workflows/dependency-installation.yml +85 -0
  4. {nmma-0.2.0 → nmma-0.2.2}/.github/workflows/deploy-github-pages.yml +3 -0
  5. nmma-0.2.2/.github/workflows/rst-linter.yml +22 -0
  6. {nmma-0.2.0 → nmma-0.2.2}/PKG-INFO +35 -7
  7. {nmma-0.2.0 → nmma-0.2.2}/README.md +20 -1
  8. {nmma-0.2.0 → nmma-0.2.2}/api/Dockerfile +7 -6
  9. {nmma-0.2.0 → nmma-0.2.2}/api/environment.yml +2 -0
  10. nmma-0.2.2/doc/.doctor-rst.yaml +5 -0
  11. nmma-0.2.2/doc/changelog.rst +8 -0
  12. {nmma-0.2.0 → nmma-0.2.2}/doc/conf.py +3 -1
  13. {nmma-0.2.0 → nmma-0.2.2}/doc/fitting.md +21 -0
  14. {nmma-0.2.0 → nmma-0.2.2}/doc/index.rst +38 -0
  15. {nmma-0.2.0 → nmma-0.2.2}/doc/joint_inference.md +23 -6
  16. nmma-0.2.2/doc/lfi_analysis.md +38 -0
  17. {nmma-0.2.0 → nmma-0.2.2}/doc/models.md +1 -1
  18. nmma-0.2.2/doc/observing-scenarios-light-curves.md +73 -0
  19. nmma-0.2.2/doc/systematics.rst +87 -0
  20. {nmma-0.2.0 → nmma-0.2.2}/doc/training.md +6 -0
  21. {nmma-0.2.0 → nmma-0.2.2}/doc_requirements.txt +1 -0
  22. nmma-0.2.2/example_files/multi_config_analysis/config.yaml +75 -0
  23. nmma-0.2.2/example_files/multi_config_analysis/injection.json +31 -0
  24. nmma-0.2.2/example_files/sim_events/bns_O4_injections.dat +2001 -0
  25. nmma-0.2.2/ml_requirements.txt +3 -0
  26. nmma-0.2.2/nmma/__init__.py +1 -0
  27. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/analysis.py +608 -68
  28. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/analysis_lbol.py +7 -0
  29. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/gwem_resampling_utils.py +7 -6
  30. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/injection.py +57 -11
  31. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/io.py +38 -22
  32. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/likelihood.py +93 -12
  33. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/model.py +107 -104
  34. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/model_parameters.py +3 -32
  35. nmma-0.2.2/nmma/em/multi_config_analysis.py +107 -0
  36. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/prior.py +86 -5
  37. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/svdmodel_benchmark.py +37 -6
  38. nmma-0.2.2/nmma/em/systematics.py +190 -0
  39. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/training.py +2 -1
  40. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/utils.py +15 -7
  41. nmma-0.2.2/nmma/em/validate_lightcurve.py +103 -0
  42. {nmma-0.2.0 → nmma-0.2.2}/nmma/joint/conversion.py +33 -25
  43. nmma-0.2.2/nmma/joint/maximum_mass_constraint.py +130 -0
  44. nmma-0.2.2/nmma/joint/maximum_mass_constraint_utils.py +192 -0
  45. nmma-0.2.2/nmma/mlmodel/dataprocessing.py +413 -0
  46. nmma-0.2.2/nmma/mlmodel/embedding.py +284 -0
  47. nmma-0.2.2/nmma/mlmodel/frozen-flow-weights.pth +0 -0
  48. nmma-0.2.2/nmma/mlmodel/inference.py +55 -0
  49. nmma-0.2.2/nmma/mlmodel/normalizingflows.py +132 -0
  50. nmma-0.2.2/nmma/mlmodel/resnet.py +468 -0
  51. nmma-0.2.2/nmma/mlmodel/similarity_embedding_weights.pth +0 -0
  52. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/analysis.py +43 -6
  53. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/analysis_lbol.py +5 -1
  54. nmma-0.2.2/nmma/tests/data/GW+KN+GRB_posterior +7508 -0
  55. nmma-0.2.2/nmma/tests/data/Ka2017_injection.json +28 -0
  56. nmma-0.2.2/nmma/tests/data/eos_macro/1.dat +85 -0
  57. nmma-0.2.2/nmma/tests/data/eos_macro/10.dat +80 -0
  58. nmma-0.2.2/nmma/tests/data/eos_macro/2.dat +80 -0
  59. nmma-0.2.2/nmma/tests/data/eos_macro/3.dat +83 -0
  60. nmma-0.2.2/nmma/tests/data/eos_macro/4.dat +86 -0
  61. nmma-0.2.2/nmma/tests/data/eos_macro/5.dat +88 -0
  62. nmma-0.2.2/nmma/tests/data/eos_macro/6.dat +82 -0
  63. nmma-0.2.2/nmma/tests/data/eos_macro/7.dat +86 -0
  64. nmma-0.2.2/nmma/tests/data/eos_macro/8.dat +77 -0
  65. nmma-0.2.2/nmma/tests/data/eos_macro/9.dat +82 -0
  66. nmma-0.2.2/nmma/tests/data/eos_micro/1.dat +225 -0
  67. nmma-0.2.2/nmma/tests/data/eos_micro/10.dat +225 -0
  68. nmma-0.2.2/nmma/tests/data/eos_micro/2.dat +225 -0
  69. nmma-0.2.2/nmma/tests/data/eos_micro/3.dat +225 -0
  70. nmma-0.2.2/nmma/tests/data/eos_micro/4.dat +225 -0
  71. nmma-0.2.2/nmma/tests/data/eos_micro/5.dat +225 -0
  72. nmma-0.2.2/nmma/tests/data/eos_micro/6.dat +225 -0
  73. nmma-0.2.2/nmma/tests/data/eos_micro/7.dat +225 -0
  74. nmma-0.2.2/nmma/tests/data/eos_micro/8.dat +225 -0
  75. nmma-0.2.2/nmma/tests/data/eos_micro/9.dat +225 -0
  76. nmma-0.2.2/nmma/tests/data/multi_config_analysis/config.yaml +35 -0
  77. nmma-0.2.2/nmma/tests/data/multi_config_analysis/injection.json +31 -0
  78. nmma-0.2.2/nmma/tests/data/systematics_with_time.yaml +14 -0
  79. nmma-0.2.2/nmma/tests/data/systematics_without_time.yaml +14 -0
  80. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/injections.py +29 -0
  81. nmma-0.2.2/nmma/tests/maximum_mass.py +31 -0
  82. nmma-0.2.2/nmma/tests/multi_config_analysis.py +30 -0
  83. nmma-0.2.2/nmma/tests/systematics.py +203 -0
  84. {nmma-0.2.0 → nmma-0.2.2}/nmma/utils/gitlab.py +30 -9
  85. {nmma-0.2.0 → nmma-0.2.2}/nmma/utils/models.py +33 -9
  86. {nmma-0.2.0 → nmma-0.2.2}/nmma.egg-info/PKG-INFO +35 -7
  87. {nmma-0.2.0 → nmma-0.2.2}/nmma.egg-info/SOURCES.txt +60 -0
  88. {nmma-0.2.0 → nmma-0.2.2}/nmma.egg-info/entry_points.txt +4 -0
  89. {nmma-0.2.0 → nmma-0.2.2}/nmma.egg-info/requires.txt +16 -4
  90. nmma-0.2.2/nmma.egg-info/top_level.txt +2 -0
  91. nmma-0.2.2/priors/Me2017.prior +6 -0
  92. nmma-0.2.2/priors/Piro2021.prior +5 -0
  93. nmma-0.2.2/priors/maximum_mass_resampling.prior +4 -0
  94. {nmma-0.2.0 → nmma-0.2.2}/priors/sncosmo-generic.prior +1 -1
  95. nmma-0.2.2/priors/systematics.yaml +19 -0
  96. {nmma-0.2.0 → nmma-0.2.2}/pyproject.toml +12 -3
  97. {nmma-0.2.0 → nmma-0.2.2}/requirements.txt +1 -4
  98. nmma-0.2.2/sampler_requirements.txt +1 -0
  99. nmma-0.2.2/sklearn_requirements.txt +1 -0
  100. nmma-0.2.2/slurm.sub +19 -0
  101. nmma-0.2.2/tf_requirements.txt +1 -0
  102. {nmma-0.2.0 → nmma-0.2.2}/tools/analysis_slurm.py +1 -1
  103. nmma-0.2.2/tools/plot_svdmodel_benchmarks.py +91 -0
  104. {nmma-0.2.0 → nmma-0.2.2}/tools/tf_training_calls.sh +13 -1
  105. nmma-0.2.0/.github/workflows/continous_integration.yml +0 -97
  106. nmma-0.2.0/nmma/__init__.py +0 -1
  107. nmma-0.2.0/nmma.egg-info/top_level.txt +0 -1
  108. nmma-0.2.0/priors/Piro2021.prior +0 -5
  109. {nmma-0.2.0 → nmma-0.2.2}/.flake8 +0 -0
  110. {nmma-0.2.0 → nmma-0.2.2}/.gitattributes +0 -0
  111. {nmma-0.2.0 → nmma-0.2.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  112. {nmma-0.2.0 → nmma-0.2.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  113. {nmma-0.2.0 → nmma-0.2.2}/.github/workflows/delete-branch-cache.yml +0 -0
  114. {nmma-0.2.0 → nmma-0.2.2}/.github/workflows/publish-to-anaconda.yml +0 -0
  115. {nmma-0.2.0 → nmma-0.2.2}/.github/workflows/publish-to-pypi.yml +0 -0
  116. {nmma-0.2.0 → nmma-0.2.2}/.gitignore +0 -0
  117. {nmma-0.2.0 → nmma-0.2.2}/.pep8speaks.yml +0 -0
  118. {nmma-0.2.0 → nmma-0.2.2}/.pre-commit-config.yaml +0 -0
  119. {nmma-0.2.0 → nmma-0.2.2}/CITATION.cff +0 -0
  120. {nmma-0.2.0 → nmma-0.2.2}/Dockerfile +0 -0
  121. {nmma-0.2.0 → nmma-0.2.2}/LICENSE +0 -0
  122. {nmma-0.2.0 → nmma-0.2.2}/MANIFEST.in +0 -0
  123. {nmma-0.2.0 → nmma-0.2.2}/api/app.py +0 -0
  124. {nmma-0.2.0 → nmma-0.2.2}/api/log.py +0 -0
  125. {nmma-0.2.0 → nmma-0.2.2}/assets/a3d3.png +0 -0
  126. {nmma-0.2.0 → nmma-0.2.2}/assets/erc.png +0 -0
  127. {nmma-0.2.0 → nmma-0.2.2}/assets/nsf.png +0 -0
  128. {nmma-0.2.0 → nmma-0.2.2}/doc/Cluster_Resources.md +0 -0
  129. {nmma-0.2.0 → nmma-0.2.2}/doc/GW-EM-resampling.md +0 -0
  130. {nmma-0.2.0 → nmma-0.2.2}/doc/Makefile +0 -0
  131. {nmma-0.2.0 → nmma-0.2.2}/doc/_static/.nmma-docs.css.un~ +0 -0
  132. {nmma-0.2.0 → nmma-0.2.2}/doc/_static/favicon-light.png +0 -0
  133. {nmma-0.2.0 → nmma-0.2.2}/doc/_static/light-logo.svg +0 -0
  134. {nmma-0.2.0 → nmma-0.2.2}/doc/_static/nmma-docs.css +0 -0
  135. {nmma-0.2.0 → nmma-0.2.2}/doc/_static/nmma-docs.css~ +0 -0
  136. {nmma-0.2.0 → nmma-0.2.2}/doc/combined_analysis.md +0 -0
  137. {nmma-0.2.0 → nmma-0.2.2}/doc/contributing.md +0 -0
  138. {nmma-0.2.0 → nmma-0.2.2}/doc/data_inj_obs.md +0 -0
  139. {nmma-0.2.0 → nmma-0.2.2}/doc/gw_inference.md +0 -0
  140. {nmma-0.2.0 → nmma-0.2.2}/doc/gwemopt_light_curves_detection.md +0 -0
  141. {nmma-0.2.0 → nmma-0.2.2}/doc/images/Corner_narrow_Bulla.png +0 -0
  142. {nmma-0.2.0 → nmma-0.2.2}/doc/images/ZTF21abjvfbc_corner.png +0 -0
  143. {nmma-0.2.0 → nmma-0.2.2}/doc/images/ZTF21abjvfbc_lightcurves.png +0 -0
  144. {nmma-0.2.0 → nmma-0.2.2}/doc/images/ZTF_corner.png +0 -0
  145. {nmma-0.2.0 → nmma-0.2.2}/doc/images/ZTF_lightcurves.png +0 -0
  146. {nmma-0.2.0 → nmma-0.2.2}/doc/images/corner_samples.png +0 -0
  147. {nmma-0.2.0 → nmma-0.2.2}/doc/images/dark-logo.svg +0 -0
  148. {nmma-0.2.0 → nmma-0.2.2}/doc/images/injection_corner.png +0 -0
  149. {nmma-0.2.0 → nmma-0.2.2}/doc/images/injection_lightcurves.png +0 -0
  150. {nmma-0.2.0 → nmma-0.2.2}/doc/images/light-logo.svg +0 -0
  151. {nmma-0.2.0 → nmma-0.2.2}/doc/images/training_lightcurves.png +0 -0
  152. {nmma-0.2.0 → nmma-0.2.2}/doc/quick-start-guide.rst +0 -0
  153. {nmma-0.2.0 → nmma-0.2.2}/docker-compose.yml +0 -0
  154. {nmma-0.2.0 → nmma-0.2.2}/example_files/NICER/J0030_3spot_RM.txt +0 -0
  155. {nmma-0.2.0 → nmma-0.2.2}/example_files/NICER/NICER+XMM_J0740_RM.txt +0 -0
  156. {nmma-0.2.0 → nmma-0.2.2}/example_files/NICER/NICER_x_XMM_J0740_XPSI_STU_NSX_FIH_radius_mass.txt +0 -0
  157. {nmma-0.2.0 → nmma-0.2.2}/example_files/candidate_data/ZTF20abwysqy.dat +0 -0
  158. {nmma-0.2.0 → nmma-0.2.2}/example_files/candidate_data/ZTF21abdequz.dat +0 -0
  159. {nmma-0.2.0 → nmma-0.2.2}/example_files/candidate_data/ZTF21abdhqle.dat +0 -0
  160. {nmma-0.2.0 → nmma-0.2.2}/example_files/candidate_data/ZTF21abdpqpq.dat +0 -0
  161. {nmma-0.2.0 → nmma-0.2.2}/example_files/candidate_data/ZTF21abinaiu.dat +0 -0
  162. {nmma-0.2.0 → nmma-0.2.2}/example_files/candidate_data/ZTF21abisoui.dat +0 -0
  163. {nmma-0.2.0 → nmma-0.2.2}/example_files/candidate_data/ZTF21abitmou.dat +0 -0
  164. {nmma-0.2.0 → nmma-0.2.2}/example_files/candidate_data/ZTF21abivhns.dat +0 -0
  165. {nmma-0.2.0 → nmma-0.2.2}/example_files/candidate_data/ZTF21abjpkvy.dat +0 -0
  166. {nmma-0.2.0 → nmma-0.2.2}/example_files/candidate_data/ZTF21abjrhzz.dat +0 -0
  167. {nmma-0.2.0 → nmma-0.2.2}/example_files/candidate_data/ZTF21abjrmes.dat +0 -0
  168. {nmma-0.2.0 → nmma-0.2.2}/example_files/candidate_data/ZTF21abjtdua.dat +0 -0
  169. {nmma-0.2.0 → nmma-0.2.2}/example_files/candidate_data/ZTF21abjvfbc.dat +0 -0
  170. {nmma-0.2.0 → nmma-0.2.2}/example_files/candidate_data/ZTF23aaxeacr.dat +0 -0
  171. {nmma-0.2.0 → nmma-0.2.2}/example_files/eos/ALF2.dat +0 -0
  172. {nmma-0.2.0 → nmma-0.2.2}/example_files/lbol/ztf23bqun/23bqun_bbdata.csv +0 -0
  173. {nmma-0.2.0 → nmma-0.2.2}/example_files/lbol/ztf23bqun/Arnett_modified.priors +0 -0
  174. {nmma-0.2.0 → nmma-0.2.2}/example_files/lbol/ztf23bqun/lbol_test_corner.png +0 -0
  175. {nmma-0.2.0 → nmma-0.2.2}/example_files/lbol/ztf23bqun/lbol_test_lightcurves.png +0 -0
  176. {nmma-0.2.0 → nmma-0.2.2}/example_files/lbol/ztf23bqun/run.sh +0 -0
  177. {nmma-0.2.0 → nmma-0.2.2}/example_files/lightcurves/AT2017gfo.dat +0 -0
  178. {nmma-0.2.0 → nmma-0.2.2}/example_files/lightcurves/AT2017gfo_GRB170817A_reduced.dat +0 -0
  179. {nmma-0.2.0 → nmma-0.2.2}/example_files/lightcurves/AT2017gfo_reduced.dat +0 -0
  180. {nmma-0.2.0 → nmma-0.2.2}/example_files/lightcurves/GRB211211A.txt +0 -0
  181. {nmma-0.2.0 → nmma-0.2.2}/example_files/prior/GW170817_AT2017gfo.prior +0 -0
  182. {nmma-0.2.0 → nmma-0.2.2}/example_files/prior/GW170817_AT2017gfo_GRB170817A.prior +0 -0
  183. {nmma-0.2.0 → nmma-0.2.2}/example_files/prior/ZTF_Bu2019lm.prior +0 -0
  184. {nmma-0.2.0 → nmma-0.2.2}/example_files/sim_events/injections.dat +0 -0
  185. {nmma-0.2.0 → nmma-0.2.2}/example_files/tools/gwem_resampling/GRB211211A_NSBH_posterior_samples.dat +0 -0
  186. {nmma-0.2.0 → nmma-0.2.2}/example_files/tools/gwem_resampling/GRB211211A_posterior_samples.dat +0 -0
  187. {nmma-0.2.0 → nmma-0.2.2}/example_files/tools/gwem_resampling/GWsamples.dat +0 -0
  188. {nmma-0.2.0 → nmma-0.2.2}/example_files/tools/gwem_resampling/GWsamples_NSBH.dat +0 -0
  189. {nmma-0.2.0 → nmma-0.2.2}/example_files/tools/gwem_resampling/gwsamples_generation.py +0 -0
  190. {nmma-0.2.0 → nmma-0.2.2}/example_files/tools/gwem_resampling/posterior_probability.txt +0 -0
  191. {nmma-0.2.0 → nmma-0.2.2}/example_files/yaml/doc_example.yaml +0 -0
  192. {nmma-0.2.0 → nmma-0.2.2}/example_files/zenodo/gw_posteriors.txt +0 -0
  193. {nmma-0.2.0 → nmma-0.2.2}/grb_requirements.txt +0 -0
  194. {nmma-0.2.0 → nmma-0.2.2}/nmma/__pycache__/__init__.cpython-37.pyc +0 -0
  195. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/__init__.py +0 -0
  196. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/__pycache__/__init__.cpython-37.pyc +0 -0
  197. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/__pycache__/likelihood.cpython-37.pyc +0 -0
  198. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/__pycache__/model.cpython-37.pyc +0 -0
  199. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/__pycache__/utils.cpython-37.pyc +0 -0
  200. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/analysis_condor.py +0 -0
  201. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/combine_EOS.py +0 -0
  202. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/create_injection_condor.py +0 -0
  203. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/create_injection_slurm.py +0 -0
  204. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/create_lightcurves.py +0 -0
  205. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/create_lightcurves_condor.py +0 -0
  206. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/create_lightcurves_slurm.py +0 -0
  207. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/create_svdmodel.py +0 -0
  208. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/data/ZTF_revisit_kde_i.joblib +0 -0
  209. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/data/ZTF_revisit_kde_public.joblib +0 -0
  210. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/data/ZTF_sampling_public.pkl +0 -0
  211. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/data/ZTF_uncer_params.pkl +0 -0
  212. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/data/__init__.py +0 -0
  213. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/data/__pycache__/__init__.cpython-38.pyc +0 -0
  214. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/data/lims_ToO_180_g.joblib +0 -0
  215. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/data/lims_ToO_180_r.joblib +0 -0
  216. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/data/lims_ToO_300_g.joblib +0 -0
  217. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/data/lims_ToO_300_r.joblib +0 -0
  218. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/data/lims_i.joblib +0 -0
  219. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/data/lims_public_g.joblib +0 -0
  220. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/data/lims_public_r.joblib +0 -0
  221. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/data/sampling_ToO_180.pkl +0 -0
  222. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/data/sampling_ToO_300.pkl +0 -0
  223. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/detect_lightcurves.py +0 -0
  224. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/gwem_Hubble_estimate.py +0 -0
  225. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/gwem_resampling.py +0 -0
  226. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/gwem_resampling_condor.py +0 -0
  227. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/gwsamples_creation.py +0 -0
  228. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/injection_summary.py +0 -0
  229. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/lightcurve_marginalization.py +0 -0
  230. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/manual.py +0 -0
  231. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/model_lbol.py +0 -0
  232. {nmma-0.2.0 → nmma-0.2.2}/nmma/em/utils_lbol.py +0 -0
  233. {nmma-0.2.0 → nmma-0.2.2}/nmma/eos/__init__.py +0 -0
  234. {nmma-0.2.0 → nmma-0.2.2}/nmma/eos/__pycache__/__init__.cpython-37.pyc +0 -0
  235. {nmma-0.2.0 → nmma-0.2.2}/nmma/eos/__pycache__/eos.cpython-37.pyc +0 -0
  236. {nmma-0.2.0 → nmma-0.2.2}/nmma/eos/__pycache__/tov.cpython-37.pyc +0 -0
  237. {nmma-0.2.0 → nmma-0.2.2}/nmma/eos/__pycache__/utils.cpython-37.pyc +0 -0
  238. {nmma-0.2.0 → nmma-0.2.2}/nmma/eos/create_injection.py +0 -0
  239. {nmma-0.2.0 → nmma-0.2.2}/nmma/eos/eos.py +0 -0
  240. {nmma-0.2.0 → nmma-0.2.2}/nmma/eos/tov.py +0 -0
  241. {nmma-0.2.0 → nmma-0.2.2}/nmma/eos/utils.py +0 -0
  242. {nmma-0.2.0 → nmma-0.2.2}/nmma/gw/likelihood.py +0 -0
  243. {nmma-0.2.0 → nmma-0.2.2}/nmma/joint/__init__.py +0 -0
  244. {nmma-0.2.0 → nmma-0.2.2}/nmma/joint/__pycache__/__init__.cpython-37.pyc +0 -0
  245. {nmma-0.2.0 → nmma-0.2.2}/nmma/joint/__pycache__/constraints.cpython-37.pyc +0 -0
  246. {nmma-0.2.0 → nmma-0.2.2}/nmma/joint/__pycache__/conversion.cpython-37.pyc +0 -0
  247. {nmma-0.2.0 → nmma-0.2.2}/nmma/joint/__pycache__/likelihood.cpython-37.pyc +0 -0
  248. {nmma-0.2.0 → nmma-0.2.2}/nmma/joint/constraints.py +0 -0
  249. {nmma-0.2.0 → nmma-0.2.2}/nmma/joint/likelihood.py +0 -0
  250. {nmma-0.2.0 → nmma-0.2.2}/nmma/pbilby/analysis/__init__.py +0 -0
  251. {nmma-0.2.0 → nmma-0.2.2}/nmma/pbilby/analysis/analysis_run.py +0 -0
  252. {nmma-0.2.0 → nmma-0.2.2}/nmma/pbilby/analysis/likelihood.py +0 -0
  253. {nmma-0.2.0 → nmma-0.2.2}/nmma/pbilby/analysis/main.py +0 -0
  254. {nmma-0.2.0 → nmma-0.2.2}/nmma/pbilby/generation.py +0 -0
  255. {nmma-0.2.0 → nmma-0.2.2}/nmma/pbilby/parser/__init__.py +0 -0
  256. {nmma-0.2.0 → nmma-0.2.2}/nmma/pbilby/parser/analysis.py +0 -0
  257. {nmma-0.2.0 → nmma-0.2.2}/nmma/pbilby/parser/generation.py +0 -0
  258. {nmma-0.2.0 → nmma-0.2.2}/nmma/pbilby/parser/shared.py +0 -0
  259. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/__init__.py +0 -0
  260. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/Bu2019lm_injection.json +0 -0
  261. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/Bu2019nsbh/ztfr.joblib +0 -0
  262. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/Bu2019nsbh.joblib +0 -0
  263. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/Bu2019nsbh_tf/ztfr.h5 +0 -0
  264. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/Me2017_injection.json +0 -0
  265. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/TrPi2018_pinned_parameters.prior +0 -0
  266. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/ZTF23aaxeacr_partial.csv +0 -0
  267. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.001_mejwind0.010_phi45_45.6.dat +0 -0
  268. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.001_mejwind0.030_phi45_45.6.dat +0 -0
  269. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.001_mejwind0.050_phi45_45.6.dat +0 -0
  270. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.001_mejwind0.070_phi45_45.6.dat +0 -0
  271. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.001_mejwind0.090_phi45_45.6.dat +0 -0
  272. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.001_mejwind0.110_phi45_45.6.dat +0 -0
  273. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.001_mejwind0.130_phi45_45.6.dat +0 -0
  274. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.005_mejwind0.010_phi45_45.6.dat +0 -0
  275. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.005_mejwind0.030_phi45_45.6.dat +0 -0
  276. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.005_mejwind0.050_phi45_45.6.dat +0 -0
  277. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.005_mejwind0.070_phi45_45.6.dat +0 -0
  278. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.005_mejwind0.090_phi45_45.6.dat +0 -0
  279. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.005_mejwind0.110_phi45_45.6.dat +0 -0
  280. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.005_mejwind0.130_phi45_45.6.dat +0 -0
  281. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.010_mejwind0.010_phi45_45.6.dat +0 -0
  282. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.010_mejwind0.030_phi45_45.6.dat +0 -0
  283. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.010_mejwind0.050_phi45_45.6.dat +0 -0
  284. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.010_mejwind0.070_phi45_45.6.dat +0 -0
  285. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.010_mejwind0.090_phi45_45.6.dat +0 -0
  286. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.010_mejwind0.110_phi45_45.6.dat +0 -0
  287. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.010_mejwind0.130_phi45_45.6.dat +0 -0
  288. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.020_mejwind0.010_phi45_45.6.dat +0 -0
  289. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.020_mejwind0.030_phi45_45.6.dat +0 -0
  290. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.020_mejwind0.050_phi45_45.6.dat +0 -0
  291. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.020_mejwind0.070_phi45_45.6.dat +0 -0
  292. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.020_mejwind0.090_phi45_45.6.dat +0 -0
  293. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.020_mejwind0.110_phi45_45.6.dat +0 -0
  294. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/bulla/nsns_nph1.0e+06_mejdyn0.020_mejwind0.130_phi45_45.6.dat +0 -0
  295. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/data/lowmass_collapsar_updated.h5 +0 -0
  296. {nmma-0.2.0/priors → nmma-0.2.2/nmma/tests/data/multi_config_analysis}/Me2017.prior +0 -0
  297. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/models.py +0 -0
  298. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/tools.py +0 -0
  299. {nmma-0.2.0 → nmma-0.2.2}/nmma/tests/training.py +0 -0
  300. {nmma-0.2.0 → nmma-0.2.2}/nmma/utils/__init__.py +0 -0
  301. {nmma-0.2.0 → nmma-0.2.2}/nmma/utils/models_tools.py +0 -0
  302. {nmma-0.2.0 → nmma-0.2.2}/nmma.egg-info/dependency_links.txt +0 -0
  303. {nmma-0.2.0 → nmma-0.2.2}/priors/AnBa2022.prior +0 -0
  304. {nmma-0.2.0 → nmma-0.2.2}/priors/AnBa2022_sparse.prior +0 -0
  305. {nmma-0.2.0 → nmma-0.2.2}/priors/Bu2019lm.prior +0 -0
  306. {nmma-0.2.0 → nmma-0.2.2}/priors/Bu2019lm_TrPi2018GRB211211A.prior +0 -0
  307. {nmma-0.2.0 → nmma-0.2.2}/priors/Bu2019nsbh.prior +0 -0
  308. {nmma-0.2.0 → nmma-0.2.2}/priors/Bu2019nsbh_TrPi2018_GRB211211A.prior +0 -0
  309. {nmma-0.2.0 → nmma-0.2.2}/priors/Bu2022Ye.prior +0 -0
  310. {nmma-0.2.0 → nmma-0.2.2}/priors/Bu2023Ye.prior +0 -0
  311. {nmma-0.2.0 → nmma-0.2.2}/priors/GWBNS.prior +0 -0
  312. {nmma-0.2.0 → nmma-0.2.2}/priors/GWNSBH.prior +0 -0
  313. {nmma-0.2.0 → nmma-0.2.2}/priors/Ka2017.prior +0 -0
  314. {nmma-0.2.0 → nmma-0.2.2}/priors/LANL2022.prior +0 -0
  315. {nmma-0.2.0 → nmma-0.2.2}/priors/Sr2023.prior +0 -0
  316. {nmma-0.2.0 → nmma-0.2.2}/priors/TrPi2018.prior +0 -0
  317. {nmma-0.2.0 → nmma-0.2.2}/priors/TrPi2018_onaxis.prior +0 -0
  318. {nmma-0.2.0 → nmma-0.2.2}/priors/ZTF_lgrb.prior +0 -0
  319. {nmma-0.2.0 → nmma-0.2.2}/priors/ZTF_sgrb.prior +0 -0
  320. {nmma-0.2.0 → nmma-0.2.2}/priors/injec_alspin.prior +0 -0
  321. {nmma-0.2.0 → nmma-0.2.2}/priors/salt2.prior +0 -0
  322. {nmma-0.2.0 → nmma-0.2.2}/priors/sncosmo-generic_TrPi2018.prior +0 -0
  323. {nmma-0.2.0 → nmma-0.2.2}/production_requirements.txt +0 -0
  324. {nmma-0.2.0 → nmma-0.2.2}/setup.cfg +0 -0
  325. {nmma-0.2.0 → nmma-0.2.2}/tools/__init__.py +0 -0
  326. {nmma-0.2.0 → nmma-0.2.2}/tools/convert_skyportal_lcs.py +0 -0
  327. {nmma-0.2.0 → nmma-0.2.2}/tools/corner_plot.py +0 -0
  328. {nmma-0.2.0 → nmma-0.2.2}/tools/make_lcs.py +0 -0
  329. {nmma-0.2.0 → nmma-0.2.2}/tools/make_lcs_LANL.py +0 -0
  330. {nmma-0.2.0 → nmma-0.2.2}/tools/make_lcs_hdf5.py +0 -0
  331. {nmma-0.2.0 → nmma-0.2.2}/tools/make_lcs_kasen.py +0 -0
  332. {nmma-0.2.0 → nmma-0.2.2}/tools/resample_grid.py +0 -0
  333. {nmma-0.2.0 → nmma-0.2.2}/tutorials/README.md +0 -0
  334. {nmma-0.2.0 → nmma-0.2.2}/tutorials/tutorial-KN-models-training.ipynb +0 -0
  335. {nmma-0.2.0 → nmma-0.2.2}/tutorials/tutorial-lightcurve_simulation.ipynb +0 -0
@@ -42,7 +42,7 @@ jobs:
42
42
 
43
43
  - name: Build and push
44
44
  id: build
45
- uses: docker/build-push-action@v4
45
+ uses: docker/build-push-action@v5
46
46
  with:
47
47
  context: .
48
48
  file: ./api/Dockerfile
@@ -0,0 +1,154 @@
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-14)" >> $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 python3-mpi4py
123
+
124
+ - name: Install Python dependencies
125
+ run: |
126
+ python -m pip install --upgrade git+https://github.com/bitranox/wrapt_timeout_decorator.git
127
+ python -m pip install pytest pytest-cov flake8 pytest-aiohttp sqlparse freezegun PyJWT joblib coveralls
128
+ python -m pip install -r ml_requirements.txt -r grb_requirements.txt -r tf_requirements.txt -r sklearn_requirements.txt
129
+ python -m pip install .
130
+ git clone https://github.com/JohannesBuchner/MultiNest && cd MultiNest/build && rm -rf * && cmake .. && make && cd ../..
131
+ pwd
132
+
133
+ - name: Export Libraries
134
+ run: |
135
+ echo "LD_LIBRARY_PATH=$HOME/work/nmma/nmma/MultiNest/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
136
+ echo "DYLD_LIBRARY_PATH=$HOME/work/nmma/nmma/MultiNest/lib:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV
137
+
138
+ - name: Lint with flake8
139
+ run: |
140
+ # stop the build if there are Python syntax errors or undefined names
141
+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude docs
142
+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
143
+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude docs,versioneer.py,nmma/_version.py,nmma/tests,nmma/*/__init__.py
144
+
145
+ - name: Test with pytest
146
+ run: |
147
+ python -m coverage run --source nmma -m pytest nmma/tests/*.py
148
+
149
+ - name: Run Coveralls
150
+ if: ${{ success() }}
151
+ run: |
152
+ coveralls --service=github
153
+ env:
154
+ 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
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]'
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]'
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]'
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]'
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]'
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]'
85
+ python -c "import nmma, ultranest; print(f'Successfully imported {nmma.__name__}, {ultranest.__name__}')"
@@ -39,6 +39,8 @@ jobs:
39
39
  python -m pip install .[doc]
40
40
 
41
41
  - name: Make dependencies
42
+ env:
43
+ SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ secrets.SPHINX_GITHUB_CHANGELOG_TOKEN }}
42
44
  run: |
43
45
  cd doc && make html; cd ../
44
46
  touch doc/_build/html/.nojekyll
@@ -51,3 +53,4 @@ jobs:
51
53
  build_dir: doc/_build/html/
52
54
  env:
53
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/'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nmma
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: A nuclear physics multi-messenger Bayesian inference library
5
5
  Author-email: "Peter Tsun Ho Pang, Michael Coughlin, Tim Dietrich, Ingo Tews" <nuclear_multimessenger_astronomy@googlegroups.com>
6
6
  License: GPLv3
@@ -12,6 +12,7 @@ Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3.9
13
13
  Classifier: Programming Language :: Python :: 3.10
14
14
  Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
15
16
  Classifier: Intended Audience :: Science/Research
16
17
  Classifier: Intended Audience :: End Users/Desktop
17
18
  Classifier: Intended Audience :: Developers
@@ -23,7 +24,7 @@ Classifier: Operating System :: POSIX
23
24
  Classifier: Operating System :: Unix
24
25
  Classifier: Operating System :: MacOS
25
26
  Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
26
- Requires-Python: <3.12,>=3.9
27
+ Requires-Python: <3.13,>=3.9
27
28
  Description-Content-Type: text/markdown
28
29
  License-File: LICENSE
29
30
  Requires-Dist: future
@@ -34,16 +35,13 @@ Requires-Dist: numpy>=1.9
34
35
  Requires-Dist: matplotlib<3.8,>=2.0
35
36
  Requires-Dist: scipy>=1.10
36
37
  Requires-Dist: pandas<2.0,>=1.3.4
37
- Requires-Dist: astropy>=4.3.1
38
- Requires-Dist: scikit-learn<1.2,>=1.0.2
38
+ Requires-Dist: astropy>=5.3.4
39
39
  Requires-Dist: pymultinest
40
40
  Requires-Dist: sncosmo
41
41
  Requires-Dist: dust_extinction
42
42
  Requires-Dist: arviz
43
43
  Requires-Dist: p_tqdm
44
- Requires-Dist: ultranest
45
44
  Requires-Dist: tornado
46
- Requires-Dist: tensorflow
47
45
  Requires-Dist: notebook
48
46
  Requires-Dist: ligo.skymap
49
47
  Requires-Dist: healpy
@@ -60,6 +58,7 @@ Requires-Dist: linkify; extra == "doc"
60
58
  Requires-Dist: myst-parser; extra == "doc"
61
59
  Requires-Dist: sphinx-book-theme; extra == "doc"
62
60
  Requires-Dist: sphinx_copybutton; extra == "doc"
61
+ Requires-Dist: sphinx-github-changelog; extra == "doc"
63
62
  Provides-Extra: grb
64
63
  Requires-Dist: afterglowpy>=0.7.3; extra == "grb"
65
64
  Requires-Dist: wrapt_timeout_decorator; extra == "grb"
@@ -67,6 +66,16 @@ Provides-Extra: production
67
66
  Requires-Dist: parallel_bilby>=2.0.2; extra == "production"
68
67
  Requires-Dist: nestcheck; extra == "production"
69
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"
70
79
 
71
80
  <p align="center">
72
81
  <picture>
@@ -84,17 +93,24 @@ Requires-Dist: mpi4py; extra == "production"
84
93
  </div>
85
94
 
86
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)
87
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)
88
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)
89
102
  [![PyPI version](https://badge.fury.io/py/nmma.svg)](https://badge.fury.io/py/nmma)
90
103
  [![Python version](https://img.shields.io/pypi/pyversions/nmma.svg)](https://badge.fury.io/py/nmma)
91
104
 
92
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
+
93
110
  Read our official documentation: [NMMA Documentation](https://nuclear-multimessenger-astronomy.github.io/nmma/)
94
111
 
95
112
  Check out our contribution guide: [For contributors](https://nuclear-multimessenger-astronomy.github.io/nmma/contributing.html)
96
113
 
97
-
98
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)
99
115
 
100
116
 
@@ -117,6 +133,18 @@ When utilizing this code for a publication, kindly make a reference to the packa
117
133
  url={https://doi.org/10.1038/s41467-023-43932-6}
118
134
  }
119
135
  ```
136
+ If you are using the systematics error, please also cite the paper [A data-driven approach for modeling the temporal and spectral evolution of kilonova systematic uncertainties](https://arxiv.org/abs/2410.21978). The BibTeX entry for the paper is:
137
+ ```bibtex
138
+ @article{Jhawar:2024ezm,
139
+ author = "Jhawar, Sahil and Wouters, Thibeau and Pang, Peter T. H. and Bulla, Mattia and Coughlin, Michael W. and Dietrich, Tim",
140
+ title = "{A data-driven approach for modeling the temporal and spectral evolution of kilonova systematic uncertainties}",
141
+ eprint = "2410.21978",
142
+ archivePrefix = "arXiv",
143
+ primaryClass = "astro-ph.HE",
144
+ month = "10",
145
+ year = "2024"
146
+ }
147
+ ```
120
148
 
121
149
  ### Acknowledgments
122
150
  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.
@@ -14,17 +14,24 @@
14
14
  </div>
15
15
 
16
16
 
17
+ [![GitHub Repo stars](https://img.shields.io/github/stars/nuclear-multimessenger-astronomy/nmma?style=flat)](https://github.com/nuclear-multimessenger-astronomy/nmma/stargazers)
18
+ [![GitHub forks](https://img.shields.io/github/forks/nuclear-multimessenger-astronomy/nmma?style=flat&color=%2365c563)](https://github.com/nuclear-multimessenger-astronomy/nmma/forks)
19
+ [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/nmma?label=conda%20downloads)](https://anaconda.org/conda-forge/nmma)
20
+ [![PyPI - Downloads](https://img.shields.io/pypi/dm/nmma?label=PyPI%20downloads)](https://badge.fury.io/py/nmma)
17
21
  [![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)
18
22
  [![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)
19
23
  [![PyPI version](https://badge.fury.io/py/nmma.svg)](https://badge.fury.io/py/nmma)
20
24
  [![Python version](https://img.shields.io/pypi/pyversions/nmma.svg)](https://badge.fury.io/py/nmma)
21
25
 
22
26
 
27
+
28
+
29
+ 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)
30
+
23
31
  Read our official documentation: [NMMA Documentation](https://nuclear-multimessenger-astronomy.github.io/nmma/)
24
32
 
25
33
  Check out our contribution guide: [For contributors](https://nuclear-multimessenger-astronomy.github.io/nmma/contributing.html)
26
34
 
27
-
28
35
  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)
29
36
 
30
37
 
@@ -47,6 +54,18 @@ When utilizing this code for a publication, kindly make a reference to the packa
47
54
  url={https://doi.org/10.1038/s41467-023-43932-6}
48
55
  }
49
56
  ```
57
+ If you are using the systematics error, please also cite the paper [A data-driven approach for modeling the temporal and spectral evolution of kilonova systematic uncertainties](https://arxiv.org/abs/2410.21978). The BibTeX entry for the paper is:
58
+ ```bibtex
59
+ @article{Jhawar:2024ezm,
60
+ author = "Jhawar, Sahil and Wouters, Thibeau and Pang, Peter T. H. and Bulla, Mattia and Coughlin, Michael W. and Dietrich, Tim",
61
+ title = "{A data-driven approach for modeling the temporal and spectral evolution of kilonova systematic uncertainties}",
62
+ eprint = "2410.21978",
63
+ archivePrefix = "arXiv",
64
+ primaryClass = "astro-ph.HE",
65
+ month = "10",
66
+ year = "2024"
67
+ }
68
+ ```
50
69
 
51
70
  ### Acknowledgments
52
71
  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.
@@ -5,12 +5,13 @@ RUN apt update && apt install gcc -y && apt clean
5
5
  COPY api/environment.yml .
6
6
  COPY requirements.txt .
7
7
 
8
- RUN mamba env create -f environment.yml && conda clean -afy && \
9
- find -name '__pycache__' -type d -exec rm -rf '{}' '+' && \
10
- rm -rf /opt/conda/envs/nmma/lib/python3.9/site-packages/pip && \
11
- rm -rf /opt/conda/envs/nmma/lib/python3.9/i{dlelib, ensurepip} && \
12
- rm -rf /opt/conda/envs/nmma/lib{a,t,l,u}san.so && \
13
- find -name '*.a' -delete
8
+ RUN mamba env create -f environment.yml
9
+ RUN conda clean -afy
10
+ RUN find -name '__pycache__' -type d -exec rm -rf '{}' '+'
11
+ RUN rm -rf /opt/conda/envs/nmma/lib/python3.9/site-packages/pip
12
+ RUN rm -rf /opt/conda/envs/nmma/lib/python3.9/i{dlelib, ensurepip}
13
+ RUN rm -rf /opt/conda/envs/nmma/lib{a,t,l,u}san.so
14
+ RUN find -name '*.a' -delete
14
15
 
15
16
  FROM gcr.io/distroless/base-debian10
16
17
 
@@ -6,6 +6,8 @@ channels:
6
6
  dependencies:
7
7
  - python=3.9.*
8
8
  - numpy
9
+ - numcodecs
10
+ - h5py
9
11
  - mpi4py
10
12
 
11
13
  - pip:
@@ -0,0 +1,5 @@
1
+ rules:
2
+ blank_line_after_directive: ~
3
+ exclude_rule_for_file:
4
+ - path: changelog.rst
5
+ rule_name: blank_line_after_directive
@@ -0,0 +1,8 @@
1
+ Changelog
2
+ -----------
3
+
4
+
5
+ .. changelog::
6
+ :github: https://github.com/nuclear-multimessenger-astronomy/nmma/releases/
7
+ :pypi: https://pypi.org/project/nmma/
8
+ :changelog-url: https://nuclear-multimessenger-astronomy.github.io/nmma/changelog.html
@@ -5,7 +5,7 @@ sys.path.insert(0, os.path.abspath(".."))
5
5
 
6
6
  import nmma
7
7
 
8
- extensions = ["myst_parser", "sphinx_copybutton"]
8
+ extensions = ["myst_parser", "sphinx_copybutton","sphinx_github_changelog"]
9
9
  myst_enable_extensions = [
10
10
  "amsmath",
11
11
  "colon_fence",
@@ -29,6 +29,8 @@ mathjax_config = {
29
29
  },
30
30
  }
31
31
 
32
+ sphinx_github_changelog_token = os.getenv("SPHINX_GITHUB_CHANGELOG_TOKEN")
33
+
32
34
 
33
35
  templates_path = ["_templates"]
34
36
 
@@ -4,6 +4,27 @@ Given a light curve from an optical survey telescope (and potential follow-up),
4
4
 
5
5
  In many cases, the lightcurve predicted by each set of parameters is **extremely high-dimensional**, given the number of measurements made. Our goal for this example is to to determine the best-fit model parameters for an object based on its observed lightcurve.
6
6
 
7
+ ### Filters
8
+ Often you will see that lightcurve may contain data from SDSS, for example `sdssr`, `sdssg`, `sdssr`, etc. Since the current SVD models are only trained for `sdssu` filter, it is advised that the following filter names should be changed to that of Pan-STARRS1 in the lightcurve data file.
9
+
10
+ :::{table}
11
+ :width: 50%
12
+ :align: center
13
+
14
+ | SDSS | Pan-STARRS1 |
15
+ |:-----:|:-----------:|
16
+ | sdssg | ps1__g |
17
+ | sdssr | ps1__r |
18
+ | sdssi | ps1__i |
19
+ | sdssz | ps1__z |
20
+ :::
21
+
22
+ And corresponding to this, the filter flag should be `--filter ps1__g,ps1__r,ps__i,ps1__z`
23
+
24
+ :::{note}
25
+ The same is applicable for LSST filters.
26
+ :::
27
+
7
28
  ### Example fit to simulated data
8
29
 
9
30
  Following the quick start, we assume that an injection file has been made generated and made available. For example, there are a number of extra parameters available to modify the light curve sampling, including:
@@ -208,6 +208,7 @@ requirements.txt file which are necessary for NMMA:
208
208
  If everything has gone smoothly, all of these above mentioned "pip install something" commands will show that the requirements have already been satisfied. Otherwise, these will cover the dependencies if not covered by ``pip install .``. Also, if running ``pip install .`` shows something on the lines of "cannot cythonize without cython", do:
209
209
 
210
210
  .. code::
211
+
211
212
  conda install -c anaconda cython==0.29.24
212
213
  pip install
213
214
 
@@ -409,6 +410,39 @@ and follow the instructions above.
409
410
  module load gcc/9.2.0
410
411
  module load openmpi/4.1.1
411
412
 
413
+ Internetless Clusters
414
+ ^^^^^^^^^^^^^^^^^^^^^
415
+
416
+ Some cluster resources may not have access to the internet or could block some forms of data transfer. This will cause some difficulties with certain packages and will require some fixes to how NMMA interacts with them and changes to how you call some commands in NMMA. This can also affect how you install NMMA on the cluster. Because the cluster is in some way restricted, it may be that the `conda install nmma -c conda-forge` or the `pip install nmma` commands don't work. Thus to install NMMA, you will need to install from the source. To begin, you will want to copy the NMMA repository from your local to the cluster using an `scp` or `rsync` commmand because likely the git commands will fail. Once NMMA is downloaded to the cluster, navigate to the main directory and run
417
+
418
+ .. code::
419
+
420
+ pip install -r requirements.txt
421
+ pip install .
422
+
423
+ and check that the installation was successful by running the first check for NMMA given above. After installation, the next most likely difference is how NMMA uses the trained kilonova models during any form of EM analysis. When running any analysis that requires the use of the trained grid of models you will need to add the `--local-only` flag to the analysis command. For example,
424
+
425
+ .. code::
426
+
427
+ lightcurve-analysis \
428
+ --model LANLTP2 \
429
+ --svd-path svdmodels/ \
430
+ --filters ztfg,ztfi,ztfr \
431
+ --ztf-sampling \
432
+ --ztf-uncertainties \
433
+ --ztf-ToO 180 \
434
+ --local-only \
435
+ --interpolation-type tensorflow \
436
+ --outdir outdir/TP2_ztf \
437
+ --label TP2_ztf \
438
+ --prior priors/LANL2022.prior \
439
+ --tmin 0. \
440
+ --tmax 14 \
441
+ --dt 0.1 \
442
+ --error-budget 1 \
443
+ --nlive 1024 \
444
+
445
+
412
446
  Matplotlib fonts
413
447
  ^^^^^^^^^^^^^^^^
414
448
 
@@ -451,13 +485,17 @@ User Guide
451
485
  models
452
486
  training
453
487
  data_inj_obs
488
+ systematics
454
489
  fitting
490
+ lfi_analysis
455
491
  gw_inference
456
492
  joint_inference
457
493
  GW-EM-resampling
458
494
  combined_analysis
459
495
  Cluster_Resources
460
496
  contributing
497
+ changelog
498
+
461
499
 
462
500
  .. Indices and tables
463
501
  .. ==================
@@ -4,11 +4,11 @@ A joint inference on gravitational-wave and electromagnetic signals requires NMM
4
4
 
5
5
  In order to run a multi-messenger inference, we need to follow to main steps:
6
6
 
7
- nmma_generation config.ini
7
+ nmma-generation config.ini
8
8
 
9
9
  Perform the analysis or parameter estimation using:
10
10
 
11
- nmma_analysis --data-dump <name_of_analysis>_data_dump.pickle
11
+ nmma-analysis --data-dump <name_of_analysis>_data_dump.pickle
12
12
 
13
13
  First of all, we set up the `config.ini` file and provide all required data and information.
14
14
 
@@ -120,13 +120,13 @@ In order to prepare the joint inference, a `config.ini` file is required which s
120
120
 
121
121
  The joint inference generation can be performed by running:
122
122
 
123
- nmma_gw_generation config.ini
123
+ nmma-generation config.ini
124
124
 
125
- This will generate a `GW170817-AT2017gfo-GRB170817A_data_dump.pickle` file under `outdir/data/` which need to be provided for the joint inference function `nmma_analysis`.
125
+ This will generate a `GW170817-AT2017gfo-GRB170817A_data_dump.pickle` file under `outdir/data/` which need to be provided for the joint inference function `nmma-analysis`.
126
126
 
127
127
  **Running the analysis**
128
128
 
129
- As detailed above, running the analysis with the command `nmma_analysis --data-dump outidr/data/GW170817-AT2017gfo-GRB170817A_data_dump.pickle` requires computational resources on a larger cluster. Below we show an example script for job submission called `jointinf.pbs` on a German cluster:
129
+ As detailed above, running the analysis with the command `nmma-analysis --data-dump outidr/data/GW170817-AT2017gfo-GRB170817A_data_dump.pickle` requires computational resources on a larger cluster. Below we show an example script for job submission called `jointinf.pbs` on a German cluster:
130
130
 
131
131
  #!/bin/bash
132
132
  #PBS -N <name of simulation>
@@ -146,6 +146,23 @@ As detailed above, running the analysis with the command `nmma_analysis --data-d
146
146
  export MPI_LAUNCH_TIMEOUT=240
147
147
 
148
148
  cd $PBS_O_WORKDIR
149
- mpirun -np 512 omplace -c 0-127:st=4 nmma_analysis --data-dump <absolute path to folder>/outdir/data/GW170817-AT2017gfo-GRB170817A_data_dump.pickle --nlive 1024 --nact 10 --maxmcmc 10000 --sampling-seed 20210213 --no-plot --outdir <absolute path to outdir/result folder>
149
+ mpirun -np 512 omplace -c 0-127:st=4 nmma-analysis --data-dump <absolute path to folder>/outdir/data/GW170817-AT2017gfo-GRB170817A_data_dump.pickle --nlive 1024 --nact 10 --maxmcmc 10000 --sampling-seed 20210213 --no-plot --outdir <absolute path to outdir/result folder>
150
150
 
151
151
  Note that settings might differ from cluster to cluster and also the installation of NMMA might be changed (conda vs. python installation).
152
+
153
+
154
+ **Maximum mass constraint from a joint analysis**
155
+
156
+ From a joint posterior of GW and lightcurve data from a BNS, one can derive an upper limit on the TOV mass, if one assumes that the remnant collapsed to a black hole. The idea is to determine the posterior distribution on the remnant's mass from the posterior distribution of the individual neutron star masses $m_1$, $m_2$ and the ejecta and compare this to the TOV mass of EOSs.
157
+
158
+ This can be done via the command
159
+
160
+ maximum-mass-constraint --outdir <path to folder> --joint-posterior <path to the file with samples from GW+EM analysis> --prior <path to a bilby prior file> --eos-path-macro <path to macroscopic EOS> --eos-path-micro <path to microscopic EOS> [--use-M-Kepler]
161
+
162
+ The last flag determines whether the remnant mass is compared against the TOV mass or the maximum mass limit for a rotating NS (Kepler limit). The latter is less conservative. The joint posterior should contain the parameters chirp mass, eta_star, log10_mdisk, log10_mej_dyn as named columns. Here, eta_star is $η* = \ln(0.25-η)$ from the symmetric mass ratio $η$. The macroscopic EOS curves must have the central pressure p0 in MeV/fm³ of each NS mass as last column.
163
+
164
+ If --use-M-Kepler is set, the prior file needs to contain two additional fiducial paramters for the quasi-universal relations:
165
+
166
+ ratio_R = Gaussian(name = "R", mu = 1.255, sigma = 0.024)
167
+ delta = Uniform(name="delta", minimum = -0.0125, maximum = 0.0125)
168
+