lalsuite 7.26.2.dev20251206__cp312-cp312-manylinux_2_28_x86_64.whl

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 (733) hide show
  1. lal/__init__.py +145 -0
  2. lal/_lal.cpython-312-x86_64-linux-gnu.so +0 -0
  3. lal/_lal_swig.py +12 -0
  4. lal/antenna.py +1200 -0
  5. lal/git_version.py +64 -0
  6. lal/gpstime.py +233 -0
  7. lal/iterutils.py +408 -0
  8. lal/pipeline.py +3139 -0
  9. lal/rate.py +2455 -0
  10. lal/series.py +244 -0
  11. lal/utils/__init__.py +29 -0
  12. lal/utils/cache.py +379 -0
  13. lal/utils/series.py +277 -0
  14. lalapps/__init__.py +26 -0
  15. lalapps/bin/lal_cache +0 -0
  16. lalapps/bin/lal_fftw_wisdom +0 -0
  17. lalapps/bin/lal_fftwf_wisdom +0 -0
  18. lalapps/bin/lal_simd_detect +0 -0
  19. lalapps/bin/lal_tconvert +0 -0
  20. lalapps/bin/lal_version +0 -0
  21. lalapps/bin/lalapps_ComputeAntennaPattern +16 -0
  22. lalapps/bin/lalapps_ComputeFstatBenchmark +16 -0
  23. lalapps/bin/lalapps_ComputeFstatLatticeCount +16 -0
  24. lalapps/bin/lalapps_ComputeFstatMCUpperLimit +16 -0
  25. lalapps/bin/lalapps_ComputeFstatistic_v2 +16 -0
  26. lalapps/bin/lalapps_ComputePSD +16 -0
  27. lalapps/bin/lalapps_CopySFTs +16 -0
  28. lalapps/bin/lalapps_DistanceVsMass +0 -0
  29. lalapps/bin/lalapps_DriveHoughMulti +16 -0
  30. lalapps/bin/lalapps_FstatMetric_v2 +16 -0
  31. lalapps/bin/lalapps_HierarchSearchGCT +16 -0
  32. lalapps/bin/lalapps_HierarchicalSearch +16 -0
  33. lalapps/bin/lalapps_MakeSFTDAG +16 -0
  34. lalapps/bin/lalapps_MakeSFTs +16 -0
  35. lalapps/bin/lalapps_Makefakedata_v4 +16 -0
  36. lalapps/bin/lalapps_Makefakedata_v5 +16 -0
  37. lalapps/bin/lalapps_PredictFstat +16 -0
  38. lalapps/bin/lalapps_PrintDetectorState +16 -0
  39. lalapps/bin/lalapps_SFTclean +16 -0
  40. lalapps/bin/lalapps_SFTvalidate +16 -0
  41. lalapps/bin/lalapps_StringAddFrame +0 -0
  42. lalapps/bin/lalapps_StringSearch +0 -0
  43. lalapps/bin/lalapps_Weave +16 -0
  44. lalapps/bin/lalapps_WeaveCompare +16 -0
  45. lalapps/bin/lalapps_WeaveConcat +16 -0
  46. lalapps/bin/lalapps_WeaveSetup +16 -0
  47. lalapps/bin/lalapps_WriteSFTsfromSFDBs +16 -0
  48. lalapps/bin/lalapps_animate +0 -0
  49. lalapps/bin/lalapps_binj +0 -0
  50. lalapps/bin/lalapps_blindinj +0 -0
  51. lalapps/bin/lalapps_cache +16 -0
  52. lalapps/bin/lalapps_calfacs +0 -0
  53. lalapps/bin/lalapps_cbc_stochasticbank +0 -0
  54. lalapps/bin/lalapps_chirplen +0 -0
  55. lalapps/bin/lalapps_coh_PTF_inspiral +0 -0
  56. lalapps/bin/lalapps_coinj +0 -0
  57. lalapps/bin/lalapps_combine_crosscorr_toplists +16 -0
  58. lalapps/bin/lalapps_compareFstats +16 -0
  59. lalapps/bin/lalapps_compareSFTs +16 -0
  60. lalapps/bin/lalapps_create_time_correction_ephemeris +16 -0
  61. lalapps/bin/lalapps_dumpSFT +16 -0
  62. lalapps/bin/lalapps_effdist +0 -0
  63. lalapps/bin/lalapps_exc_resp +0 -0
  64. lalapps/bin/lalapps_fftw_wisdom +16 -0
  65. lalapps/bin/lalapps_fftwf_wisdom +16 -0
  66. lalapps/bin/lalapps_fits_header_getval +16 -0
  67. lalapps/bin/lalapps_fits_header_list +16 -0
  68. lalapps/bin/lalapps_fits_overview +16 -0
  69. lalapps/bin/lalapps_fits_table_list +16 -0
  70. lalapps/bin/lalapps_fr_ninja +0 -0
  71. lalapps/bin/lalapps_frextr +0 -0
  72. lalapps/bin/lalapps_frinfo +0 -0
  73. lalapps/bin/lalapps_frjoin +0 -0
  74. lalapps/bin/lalapps_frread +0 -0
  75. lalapps/bin/lalapps_frview +0 -0
  76. lalapps/bin/lalapps_gwf2xml +0 -0
  77. lalapps/bin/lalapps_heterodyne_pulsar +16 -0
  78. lalapps/bin/lalapps_inspawgfile +0 -0
  79. lalapps/bin/lalapps_inspfrinj +0 -0
  80. lalapps/bin/lalapps_inspinj +0 -0
  81. lalapps/bin/lalapps_inspiralDistance +0 -0
  82. lalapps/bin/lalapps_knope +16 -0
  83. lalapps/bin/lalapps_knope_automation_script +16 -0
  84. lalapps/bin/lalapps_knope_collate_results +16 -0
  85. lalapps/bin/lalapps_knope_result_page +16 -0
  86. lalapps/bin/lalapps_makeblindinj +85 -0
  87. lalapps/bin/lalapps_makeblindinj_himass +67 -0
  88. lalapps/bin/lalapps_ninja +0 -0
  89. lalapps/bin/lalapps_path2cache +16 -0
  90. lalapps/bin/lalapps_power +0 -0
  91. lalapps/bin/lalapps_pulsar_crosscorr_v2 +16 -0
  92. lalapps/bin/lalapps_pulsar_frequency_evolution +16 -0
  93. lalapps/bin/lalapps_pulsar_parameter_estimation_nested +16 -0
  94. lalapps/bin/lalapps_random_bank +0 -0
  95. lalapps/bin/lalapps_randombank +0 -0
  96. lalapps/bin/lalapps_run_pulsar_crosscorr_v2 +16 -0
  97. lalapps/bin/lalapps_searchsum2cache +16 -0
  98. lalapps/bin/lalapps_spec_avg +16 -0
  99. lalapps/bin/lalapps_spec_avg_long +16 -0
  100. lalapps/bin/lalapps_spec_coherence +16 -0
  101. lalapps/bin/lalapps_spininj +0 -0
  102. lalapps/bin/lalapps_splitSFTs +16 -0
  103. lalapps/bin/lalapps_splitbank +0 -0
  104. lalapps/bin/lalapps_ssbtodetector +16 -0
  105. lalapps/bin/lalapps_synthesizeBstatMC +16 -0
  106. lalapps/bin/lalapps_synthesizeLVStats +16 -0
  107. lalapps/bin/lalapps_synthesizeTransientStats +16 -0
  108. lalapps/bin/lalapps_tconvert +16 -0
  109. lalapps/bin/lalapps_tmpltbank +0 -0
  110. lalapps/bin/lalapps_version +0 -0
  111. lalapps/bin/lalapps_xtefitstoframe +0 -0
  112. lalapps/bin/lalburst_version +0 -0
  113. lalapps/bin/lalfr-cat +0 -0
  114. lalapps/bin/lalfr-cksum +0 -0
  115. lalapps/bin/lalfr-cut +0 -0
  116. lalapps/bin/lalfr-dump +0 -0
  117. lalapps/bin/lalfr-fmt +0 -0
  118. lalapps/bin/lalfr-paste +0 -0
  119. lalapps/bin/lalfr-print +0 -0
  120. lalapps/bin/lalfr-split +0 -0
  121. lalapps/bin/lalfr-stat +0 -0
  122. lalapps/bin/lalfr-stream +0 -0
  123. lalapps/bin/lalfr-vis +0 -0
  124. lalapps/bin/lalframe_version +0 -0
  125. lalapps/bin/lalinference_bench +0 -0
  126. lalapps/bin/lalinference_burst +0 -0
  127. lalapps/bin/lalinference_datadump +0 -0
  128. lalapps/bin/lalinference_injectedlike +0 -0
  129. lalapps/bin/lalinference_mpi_wrapper +59 -0
  130. lalapps/bin/lalinference_nest +0 -0
  131. lalapps/bin/lalinference_version +0 -0
  132. lalapps/bin/lalinspiral_version +0 -0
  133. lalapps/bin/lalmetaio_version +0 -0
  134. lalapps/bin/lalpulsar_ComputeAntennaPattern +0 -0
  135. lalapps/bin/lalpulsar_ComputeFstatBenchmark +0 -0
  136. lalapps/bin/lalpulsar_ComputeFstatLatticeCount +0 -0
  137. lalapps/bin/lalpulsar_ComputeFstatMCUpperLimit +0 -0
  138. lalapps/bin/lalpulsar_ComputeFstatistic_v2 +0 -0
  139. lalapps/bin/lalpulsar_ComputePSD +0 -0
  140. lalapps/bin/lalpulsar_DriveHoughMulti +0 -0
  141. lalapps/bin/lalpulsar_FstatMetric_v2 +0 -0
  142. lalapps/bin/lalpulsar_HierarchSearchGCT +0 -0
  143. lalapps/bin/lalpulsar_HierarchicalSearch +0 -0
  144. lalapps/bin/lalpulsar_MakeSFTs +0 -0
  145. lalapps/bin/lalpulsar_Makefakedata_v4 +0 -0
  146. lalapps/bin/lalpulsar_Makefakedata_v5 +0 -0
  147. lalapps/bin/lalpulsar_PredictFstat +0 -0
  148. lalapps/bin/lalpulsar_PrintDetectorState +0 -0
  149. lalapps/bin/lalpulsar_SFTclean +0 -0
  150. lalapps/bin/lalpulsar_SFTvalidate +0 -0
  151. lalapps/bin/lalpulsar_Weave +0 -0
  152. lalapps/bin/lalpulsar_WeaveCompare +0 -0
  153. lalapps/bin/lalpulsar_WeaveConcat +0 -0
  154. lalapps/bin/lalpulsar_WeaveSetup +0 -0
  155. lalapps/bin/lalpulsar_WriteSFTsfromSFDBs +0 -0
  156. lalapps/bin/lalpulsar_compareFstats +0 -0
  157. lalapps/bin/lalpulsar_compareSFTs +0 -0
  158. lalapps/bin/lalpulsar_create_time_correction_ephemeris +0 -0
  159. lalapps/bin/lalpulsar_crosscorr_v2 +0 -0
  160. lalapps/bin/lalpulsar_dumpSFT +0 -0
  161. lalapps/bin/lalpulsar_fits_header_getval +0 -0
  162. lalapps/bin/lalpulsar_fits_header_list +0 -0
  163. lalapps/bin/lalpulsar_fits_overview +0 -0
  164. lalapps/bin/lalpulsar_fits_table_list +0 -0
  165. lalapps/bin/lalpulsar_frequency_evolution +0 -0
  166. lalapps/bin/lalpulsar_heterodyne +0 -0
  167. lalapps/bin/lalpulsar_parameter_estimation_nested +0 -0
  168. lalapps/bin/lalpulsar_spec_avg +0 -0
  169. lalapps/bin/lalpulsar_spec_avg_long +0 -0
  170. lalapps/bin/lalpulsar_spec_coherence +0 -0
  171. lalapps/bin/lalpulsar_splitSFTs +0 -0
  172. lalapps/bin/lalpulsar_ssbtodetector +0 -0
  173. lalapps/bin/lalpulsar_synthesizeBstatMC +0 -0
  174. lalapps/bin/lalpulsar_synthesizeLVStats +0 -0
  175. lalapps/bin/lalpulsar_synthesizeTransientStats +0 -0
  176. lalapps/bin/lalpulsar_version +0 -0
  177. lalapps/bin/lalsim-bh-qnmode +0 -0
  178. lalapps/bin/lalsim-bh-ringdown +0 -0
  179. lalapps/bin/lalsim-bh-sphwf +0 -0
  180. lalapps/bin/lalsim-burst +0 -0
  181. lalapps/bin/lalsim-detector-noise +0 -0
  182. lalapps/bin/lalsim-detector-strain +0 -0
  183. lalapps/bin/lalsim-inject +0 -0
  184. lalapps/bin/lalsim-inspiral +0 -0
  185. lalapps/bin/lalsim-ns-eos-table +0 -0
  186. lalapps/bin/lalsim-ns-mass-radius +0 -0
  187. lalapps/bin/lalsim-ns-params +0 -0
  188. lalapps/bin/lalsim-sgwb +0 -0
  189. lalapps/bin/lalsim-unicorn +0 -0
  190. lalapps/bin/lalsimulation_version +0 -0
  191. lalapps/cosmicstring.py +691 -0
  192. lalapps/data/BNSMasses.dat +65022 -0
  193. lalapps/data/CorrelationMatrix.csv +15 -0
  194. lalapps/data/LALSimNeutronStarEOS_ABHT_QMC_RMF1_META.dat +1882 -0
  195. lalapps/data/LALSimNeutronStarEOS_ABHT_QMC_RMF2_META.dat +1939 -0
  196. lalapps/data/LALSimNeutronStarEOS_ABHT_QMC_RMF3_META.dat +1784 -0
  197. lalapps/data/LALSimNeutronStarEOS_ABHT_QMC_RMF4_META.dat +2074 -0
  198. lalapps/data/LALSimNeutronStarEOS_ALF1.dat +435 -0
  199. lalapps/data/LALSimNeutronStarEOS_ALF2.dat +453 -0
  200. lalapps/data/LALSimNeutronStarEOS_ALF3.dat +441 -0
  201. lalapps/data/LALSimNeutronStarEOS_ALF4.dat +441 -0
  202. lalapps/data/LALSimNeutronStarEOS_AP1.dat +212 -0
  203. lalapps/data/LALSimNeutronStarEOS_AP2.dat +212 -0
  204. lalapps/data/LALSimNeutronStarEOS_AP3.dat +212 -0
  205. lalapps/data/LALSimNeutronStarEOS_AP4.dat +210 -0
  206. lalapps/data/LALSimNeutronStarEOS_APR.dat +500 -0
  207. lalapps/data/LALSimNeutronStarEOS_APR4_EPP.dat +1447 -0
  208. lalapps/data/LALSimNeutronStarEOS_BBB2.dat +84 -0
  209. lalapps/data/LALSimNeutronStarEOS_BGN1H1.dat +123 -0
  210. lalapps/data/LALSimNeutronStarEOS_BHF_BBB2.dat +499 -0
  211. lalapps/data/LALSimNeutronStarEOS_BL_CHIRAL_META.dat +1534 -0
  212. lalapps/data/LALSimNeutronStarEOS_BPAL12.dat +61 -0
  213. lalapps/data/LALSimNeutronStarEOS_BSK19.dat +310 -0
  214. lalapps/data/LALSimNeutronStarEOS_BSK20.dat +310 -0
  215. lalapps/data/LALSimNeutronStarEOS_BSK21.dat +310 -0
  216. lalapps/data/LALSimNeutronStarEOS_ENG.dat +108 -0
  217. lalapps/data/LALSimNeutronStarEOS_FPS.dat +129 -0
  218. lalapps/data/LALSimNeutronStarEOS_GMSR_BSK14_BSK24.dat +1010 -0
  219. lalapps/data/LALSimNeutronStarEOS_GMSR_DHSL59_BSK24.dat +1009 -0
  220. lalapps/data/LALSimNeutronStarEOS_GMSR_DHSL69_BSK24.dat +1009 -0
  221. lalapps/data/LALSimNeutronStarEOS_GMSR_F0_BSK24.dat +1010 -0
  222. lalapps/data/LALSimNeutronStarEOS_GMSR_H1_BSK24.dat +1009 -0
  223. lalapps/data/LALSimNeutronStarEOS_GMSR_H2_BSK24.dat +1010 -0
  224. lalapps/data/LALSimNeutronStarEOS_GMSR_H3_BSK24.dat +1010 -0
  225. lalapps/data/LALSimNeutronStarEOS_GMSR_H4_BSK24.dat +1010 -0
  226. lalapps/data/LALSimNeutronStarEOS_GMSR_H5_BSK24.dat +1009 -0
  227. lalapps/data/LALSimNeutronStarEOS_GMSR_LN55_BSK24.dat +1010 -0
  228. lalapps/data/LALSimNeutronStarEOS_GMSR_SLY5_BSK24.dat +1010 -0
  229. lalapps/data/LALSimNeutronStarEOS_GNH3.dat +71 -0
  230. lalapps/data/LALSimNeutronStarEOS_GPPVA_DD2_BSK24.dat +1009 -0
  231. lalapps/data/LALSimNeutronStarEOS_GPPVA_DDME2_BSK24.dat +1010 -0
  232. lalapps/data/LALSimNeutronStarEOS_GPPVA_FSU2H_BSK24.dat +1009 -0
  233. lalapps/data/LALSimNeutronStarEOS_GPPVA_FSU2_BSK24.dat +1010 -0
  234. lalapps/data/LALSimNeutronStarEOS_GPPVA_NL3WRL55_BSK24.dat +1010 -0
  235. lalapps/data/LALSimNeutronStarEOS_GS1.dat +136 -0
  236. lalapps/data/LALSimNeutronStarEOS_GS2.dat +100 -0
  237. lalapps/data/LALSimNeutronStarEOS_H1.dat +114 -0
  238. lalapps/data/LALSimNeutronStarEOS_H2.dat +114 -0
  239. lalapps/data/LALSimNeutronStarEOS_H3.dat +98 -0
  240. lalapps/data/LALSimNeutronStarEOS_H4.dat +664 -0
  241. lalapps/data/LALSimNeutronStarEOS_H5.dat +703 -0
  242. lalapps/data/LALSimNeutronStarEOS_H6.dat +509 -0
  243. lalapps/data/LALSimNeutronStarEOS_H7.dat +703 -0
  244. lalapps/data/LALSimNeutronStarEOS_HQC18.dat +388 -0
  245. lalapps/data/LALSimNeutronStarEOS_KDE0V.dat +500 -0
  246. lalapps/data/LALSimNeutronStarEOS_KDE0V1.dat +500 -0
  247. lalapps/data/LALSimNeutronStarEOS_KDE0V1_BSK24.dat +1388 -0
  248. lalapps/data/LALSimNeutronStarEOS_KDE0V_BSK24.dat +1398 -0
  249. lalapps/data/LALSimNeutronStarEOS_MPA1.dat +102 -0
  250. lalapps/data/LALSimNeutronStarEOS_MS1.dat +122 -0
  251. lalapps/data/LALSimNeutronStarEOS_MS1B.dat +126 -0
  252. lalapps/data/LALSimNeutronStarEOS_MS1B_PP.dat +1447 -0
  253. lalapps/data/LALSimNeutronStarEOS_MS1_PP.dat +1447 -0
  254. lalapps/data/LALSimNeutronStarEOS_MS2.dat +48 -0
  255. lalapps/data/LALSimNeutronStarEOS_PAL6.dat +148 -0
  256. lalapps/data/LALSimNeutronStarEOS_PCL2.dat +134 -0
  257. lalapps/data/LALSimNeutronStarEOS_PCP_BSK24_BSK24.dat +1010 -0
  258. lalapps/data/LALSimNeutronStarEOS_PS.dat +165 -0
  259. lalapps/data/LALSimNeutronStarEOS_QMC700.dat +117 -0
  260. lalapps/data/LALSimNeutronStarEOS_RG_SLY4_BSK24.dat +1010 -0
  261. lalapps/data/LALSimNeutronStarEOS_RS.dat +500 -0
  262. lalapps/data/LALSimNeutronStarEOS_RS_BSK24.dat +1356 -0
  263. lalapps/data/LALSimNeutronStarEOS_SK255.dat +500 -0
  264. lalapps/data/LALSimNeutronStarEOS_SK255_BSK24.dat +1066 -0
  265. lalapps/data/LALSimNeutronStarEOS_SK272.dat +500 -0
  266. lalapps/data/LALSimNeutronStarEOS_SKA.dat +500 -0
  267. lalapps/data/LALSimNeutronStarEOS_SKA_BSK24.dat +1433 -0
  268. lalapps/data/LALSimNeutronStarEOS_SKB.dat +500 -0
  269. lalapps/data/LALSimNeutronStarEOS_SKB_BSK24.dat +1373 -0
  270. lalapps/data/LALSimNeutronStarEOS_SKI2.dat +500 -0
  271. lalapps/data/LALSimNeutronStarEOS_SKI2_BSK24.dat +1348 -0
  272. lalapps/data/LALSimNeutronStarEOS_SKI3.dat +500 -0
  273. lalapps/data/LALSimNeutronStarEOS_SKI3_BSK24.dat +1355 -0
  274. lalapps/data/LALSimNeutronStarEOS_SKI4.dat +497 -0
  275. lalapps/data/LALSimNeutronStarEOS_SKI4_BSK24.dat +1348 -0
  276. lalapps/data/LALSimNeutronStarEOS_SKI5.dat +500 -0
  277. lalapps/data/LALSimNeutronStarEOS_SKI6.dat +500 -0
  278. lalapps/data/LALSimNeutronStarEOS_SKI6_BSK24.dat +1358 -0
  279. lalapps/data/LALSimNeutronStarEOS_SKMP.dat +498 -0
  280. lalapps/data/LALSimNeutronStarEOS_SKOP.dat +500 -0
  281. lalapps/data/LALSimNeutronStarEOS_SKOP_BSK24.dat +1373 -0
  282. lalapps/data/LALSimNeutronStarEOS_SLY.dat +99 -0
  283. lalapps/data/LALSimNeutronStarEOS_SLY2.dat +500 -0
  284. lalapps/data/LALSimNeutronStarEOS_SLY230A.dat +500 -0
  285. lalapps/data/LALSimNeutronStarEOS_SLY230A_BSK24.dat +1116 -0
  286. lalapps/data/LALSimNeutronStarEOS_SLY2_BSK24.dat +1106 -0
  287. lalapps/data/LALSimNeutronStarEOS_SLY4.dat +100 -0
  288. lalapps/data/LALSimNeutronStarEOS_SLY9.dat +498 -0
  289. lalapps/data/LALSimNeutronStarEOS_SLY9_BSK24.dat +1083 -0
  290. lalapps/data/LALSimNeutronStarEOS_SQM1.dat +176 -0
  291. lalapps/data/LALSimNeutronStarEOS_SQM2.dat +180 -0
  292. lalapps/data/LALSimNeutronStarEOS_SQM3.dat +176 -0
  293. lalapps/data/LALSimNeutronStarEOS_WFF1.dat +109 -0
  294. lalapps/data/LALSimNeutronStarEOS_WFF2.dat +109 -0
  295. lalapps/data/LALSimNeutronStarEOS_WFF3.dat +107 -0
  296. lalapps/data/LALSimNeutronStarEOS_XMLSLZ_DDLZ1_BSK24.dat +1227 -0
  297. lalapps/data/LALSimNeutronStarEOS_XMLSLZ_DDME2_BSK24.dat +1272 -0
  298. lalapps/data/LALSimNeutronStarEOS_XMLSLZ_DDMEX_BSK24.dat +1280 -0
  299. lalapps/data/LALSimNeutronStarEOS_XMLSLZ_GM1_BSK24.dat +1288 -0
  300. lalapps/data/LALSimNeutronStarEOS_XMLSLZ_MTVTC_BSK24.dat +1288 -0
  301. lalapps/data/LALSimNeutronStarEOS_XMLSLZ_NL3_BSK24.dat +1230 -0
  302. lalapps/data/LALSimNeutronStarEOS_XMLSLZ_PKDD_BSK24.dat +1288 -0
  303. lalapps/data/LALSimNeutronStarEOS_XMLSLZ_TM1_BSK24.dat +1288 -0
  304. lalapps/data/LALSimNeutronStarEOS_XMLSLZ_TW99_BSK24.dat +1288 -0
  305. lalapps/data/LIGO-P1200087-v18-AdV_BNS_OPTIMIZED.txt +3000 -0
  306. lalapps/data/LIGO-P1200087-v18-AdV_DESIGN.txt +3000 -0
  307. lalapps/data/LIGO-P1200087-v18-AdV_EARLY_HIGH.txt +3000 -0
  308. lalapps/data/LIGO-P1200087-v18-AdV_EARLY_LOW.txt +3000 -0
  309. lalapps/data/LIGO-P1200087-v18-AdV_LATE_HIGH.txt +3000 -0
  310. lalapps/data/LIGO-P1200087-v18-AdV_LATE_LOW.txt +3000 -0
  311. lalapps/data/LIGO-P1200087-v18-AdV_MID_HIGH.txt +3000 -0
  312. lalapps/data/LIGO-P1200087-v18-AdV_MID_LOW.txt +3000 -0
  313. lalapps/data/LIGO-P1200087-v18-aLIGO_BNS_OPTIMIZED.txt +3000 -0
  314. lalapps/data/LIGO-P1200087-v18-aLIGO_DESIGN.txt +3000 -0
  315. lalapps/data/LIGO-P1200087-v18-aLIGO_EARLY_HIGH.txt +3000 -0
  316. lalapps/data/LIGO-P1200087-v18-aLIGO_EARLY_LOW.txt +3000 -0
  317. lalapps/data/LIGO-P1200087-v18-aLIGO_LATE_HIGH.txt +3000 -0
  318. lalapps/data/LIGO-P1200087-v18-aLIGO_LATE_LOW.txt +3000 -0
  319. lalapps/data/LIGO-P1200087-v18-aLIGO_MID_HIGH.txt +3000 -0
  320. lalapps/data/LIGO-P1200087-v18-aLIGO_MID_LOW.txt +3000 -0
  321. lalapps/data/LIGO-P1600143-v18-CE.txt +3000 -0
  322. lalapps/data/LIGO-P1600143-v18-CE_Pessimistic.txt +3000 -0
  323. lalapps/data/LIGO-P1600143-v18-CE_Wideband.txt +3000 -0
  324. lalapps/data/LIGO-P1600143-v18-ET_D.txt +3000 -0
  325. lalapps/data/LIGO-T0900288-v3-BHBH_20deg.txt +3000 -0
  326. lalapps/data/LIGO-T0900288-v3-High_Freq.txt +3000 -0
  327. lalapps/data/LIGO-T0900288-v3-NO_SRM.txt +3000 -0
  328. lalapps/data/LIGO-T0900288-v3-NSNS_Opt.txt +3000 -0
  329. lalapps/data/LIGO-T0900288-v3-ZERO_DET_high_P.txt +3000 -0
  330. lalapps/data/LIGO-T0900288-v3-ZERO_DET_low_P.txt +3000 -0
  331. lalapps/data/LIGO-T1600593-v1-KAGRA_Design.txt +4000 -0
  332. lalapps/data/LIGO-T1600593-v1-KAGRA_Early.txt +4000 -0
  333. lalapps/data/LIGO-T1600593-v1-KAGRA_Late.txt +4000 -0
  334. lalapps/data/LIGO-T1600593-v1-KAGRA_Mid.txt +4000 -0
  335. lalapps/data/LIGO-T1600593-v1-KAGRA_Opening.txt +4000 -0
  336. lalapps/data/LIGO-T1800042-v5-aLIGO_APLUS.txt +3000 -0
  337. lalapps/data/LIGO-T1800044-v5-aLIGO_DESIGN.txt +3000 -0
  338. lalapps/data/LIGO-T1800545-v1-AdV_O3low.txt +3000 -0
  339. lalapps/data/LIGO-T1800545-v1-AdV_O4.txt +3000 -0
  340. lalapps/data/LIGO-T1800545-v1-AdV_O4intermediate.txt +3000 -0
  341. lalapps/data/LIGO-T1800545-v1-KAGRA_128Mpc.txt +1000 -0
  342. lalapps/data/LIGO-T1800545-v1-KAGRA_25Mpc.txt +1000 -0
  343. lalapps/data/LIGO-T1800545-v1-KAGRA_80Mpc.txt +1000 -0
  344. lalapps/data/LIGO-T1800545-v1-aLIGO_140Mpc.txt +1000 -0
  345. lalapps/data/LIGO-T1800545-v1-aLIGO_175Mpc.txt +2792 -0
  346. lalapps/data/LIGO-T1800545-v1-aLIGO_O3low.txt +2792 -0
  347. lalapps/data/bimodalMeans.csv +3 -0
  348. lalapps/data/config_tiger_example.ini +150 -0
  349. lalapps/data/fiducialBBH.xml +67 -0
  350. lalapps/data/fiducialBNS.xml +67 -0
  351. lalapps/data/inspsrcs100Mpc.errors +38735 -0
  352. lalapps/data/lalinference_pipe_example.ini +573 -0
  353. lalapps/data/lib_pipe_example.ini +303 -0
  354. lalapps/data/power_pipe.ini +129 -0
  355. lalapps/data/unimodalMeans.csv +2 -0
  356. lalapps/git_version.py +64 -0
  357. lalburst/SimBurstUtils.py +324 -0
  358. lalburst/SnglBurstUtils.py +367 -0
  359. lalburst/__init__.py +7 -0
  360. lalburst/_lalburst.cpython-312-x86_64-linux-gnu.so +0 -0
  361. lalburst/_lalburst_swig.py +16 -0
  362. lalburst/binjfind.py +824 -0
  363. lalburst/bucluster.py +409 -0
  364. lalburst/burca.py +315 -0
  365. lalburst/burca_tailor.py +349 -0
  366. lalburst/cafe.py +579 -0
  367. lalburst/calc_likelihood.py +145 -0
  368. lalburst/cs_gamma.cpython-312-x86_64-linux-gnu.so +0 -0
  369. lalburst/date.py +118 -0
  370. lalburst/git_version.py +64 -0
  371. lalburst/offsetvector.py +278 -0
  372. lalburst/packing.py +170 -0
  373. lalburst/power.py +1457 -0
  374. lalburst/snglcluster.py +136 -0
  375. lalburst/snglcoinc.py +2637 -0
  376. lalburst/stringutils.py +607 -0
  377. lalburst/timeslides.py +236 -0
  378. lalframe/__init__.py +7 -0
  379. lalframe/_lalframe.cpython-312-x86_64-linux-gnu.so +0 -0
  380. lalframe/_lalframe_swig.py +14 -0
  381. lalframe/frread.py +324 -0
  382. lalframe/git_version.py +64 -0
  383. lalframe/utils/__init__.py +25 -0
  384. lalframe/utils/frtools.py +61 -0
  385. lalinference/__init__.py +7 -0
  386. lalinference/_bayespputils.cpython-312-x86_64-linux-gnu.so +0 -0
  387. lalinference/_lalinference.cpython-312-x86_64-linux-gnu.so +0 -0
  388. lalinference/_lalinference_swig.py +19 -0
  389. lalinference/bayespputils.py +7479 -0
  390. lalinference/bayestar/__init__.py +2 -0
  391. lalinference/bayestar/deprecation.py +72 -0
  392. lalinference/git_version.py +64 -0
  393. lalinference/imrtgr/__init__.py +0 -0
  394. lalinference/imrtgr/imrtgrutils.py +168 -0
  395. lalinference/imrtgr/nrutils.py +1366 -0
  396. lalinference/imrtgr/pneqns.py +250 -0
  397. lalinference/io/__init__.py +31 -0
  398. lalinference/io/hdf5.py +365 -0
  399. lalinference/lalinference_pipe_utils.py +3617 -0
  400. lalinference/nest2pos.py +151 -0
  401. lalinference/plot/__init__.py +34 -0
  402. lalinference/plot/spindisk.py +104 -0
  403. lalinference/tiger/__init__.py +0 -0
  404. lalinference/tiger/make_injtimes.py +634 -0
  405. lalinference/tiger/omegascans_dag.py +691 -0
  406. lalinference/tiger/postproc.py +1338 -0
  407. lalinference/wrapper.py +231 -0
  408. lalinspiral/__init__.py +7 -0
  409. lalinspiral/_lalinspiral.cpython-312-x86_64-linux-gnu.so +0 -0
  410. lalinspiral/_lalinspiral_swig.py +18 -0
  411. lalinspiral/_thinca.cpython-312-x86_64-linux-gnu.so +0 -0
  412. lalinspiral/git_version.py +64 -0
  413. lalinspiral/inspinjfind.py +485 -0
  414. lalinspiral/thinca.py +509 -0
  415. lalmetaio/__init__.py +7 -0
  416. lalmetaio/_lalmetaio.cpython-312-x86_64-linux-gnu.so +0 -0
  417. lalmetaio/_lalmetaio_swig.py +14 -0
  418. lalmetaio/git_version.py +64 -0
  419. lalpulsar/NstarTools.py +259 -0
  420. lalpulsar/PulsarParametersWrapper.py +938 -0
  421. lalpulsar/__init__.py +7 -0
  422. lalpulsar/_lalpulsar.cpython-312-x86_64-linux-gnu.so +0 -0
  423. lalpulsar/_lalpulsar_swig.py +17 -0
  424. lalpulsar/git_version.py +64 -0
  425. lalpulsar/knope_utils.py +6497 -0
  426. lalpulsar/lineFileParser.py +264 -0
  427. lalpulsar/metric_utils.py +78 -0
  428. lalpulsar/piecewise_model/__init__.py +7 -0
  429. lalpulsar/piecewise_model/basis_functions.py +156 -0
  430. lalpulsar/piecewise_model/class_definitions.py +323 -0
  431. lalpulsar/piecewise_model/errors.py +37 -0
  432. lalpulsar/piecewise_model/estimating_knots.py +833 -0
  433. lalpulsar/piecewise_model/gte_and_other_methods.py +189 -0
  434. lalpulsar/piecewise_model/mols_for_gte.py +269 -0
  435. lalpulsar/piecewise_model/pw_fstat.py +813 -0
  436. lalpulsar/piecewise_model/pw_model_simulations.py +156 -0
  437. lalpulsar/piecewise_model/sampling_methods.py +186 -0
  438. lalpulsar/piecewise_model/semicoherent_metric_methods.py +375 -0
  439. lalpulsar/piecewise_model/tbank_estimates.py +293 -0
  440. lalpulsar/public_sft_directory.py +82 -0
  441. lalpulsar/pulsarhtmlutils.py +1395 -0
  442. lalpulsar/pulsarpputils.py +3638 -0
  443. lalpulsar/simulateCW.py +602 -0
  444. lalpulsar/simulateHeterodynedCW.py +591 -0
  445. lalsimulation/__init__.py +7 -0
  446. lalsimulation/_lalsimulation.cpython-312-x86_64-linux-gnu.so +0 -0
  447. lalsimulation/_lalsimulation_swig.py +14 -0
  448. lalsimulation/git_version.py +64 -0
  449. lalsimulation/gwsignal/__init__.py +9 -0
  450. lalsimulation/gwsignal/core/__init__.py +2 -0
  451. lalsimulation/gwsignal/core/conditioning_subroutines.py +196 -0
  452. lalsimulation/gwsignal/core/errors.py +136 -0
  453. lalsimulation/gwsignal/core/gw.py +206 -0
  454. lalsimulation/gwsignal/core/parameter_conventions.py +122 -0
  455. lalsimulation/gwsignal/core/utils.py +329 -0
  456. lalsimulation/gwsignal/core/waveform.py +725 -0
  457. lalsimulation/gwsignal/core/waveform_conditioning.py +455 -0
  458. lalsimulation/gwsignal/models/__init__.py +29 -0
  459. lalsimulation/gwsignal/models/pyseobnr_model.py +452 -0
  460. lalsimulation/nrfits/NRSur3dq8Remnant.py +92 -0
  461. lalsimulation/nrfits/NRSur7dq4Remnant.py +469 -0
  462. lalsimulation/nrfits/__init__.py +1 -0
  463. lalsimulation/nrfits/eval_fits.py +364 -0
  464. lalsimulation/nrfits/nrfits.py +78 -0
  465. lalsimulation/nrfits/pn_spin_evolution_wrapper.py +92 -0
  466. lalsimulation/nrfits/quaternion_utils.py +74 -0
  467. lalsimulation/tilts_at_infinity/__init__.py +2 -0
  468. lalsimulation/tilts_at_infinity/calc_tilts_prec_avg_regularized.py +1424 -0
  469. lalsimulation/tilts_at_infinity/hybrid_spin_evolution.py +461 -0
  470. lalsimulation/tilts_at_infinity/tilts_at_infinity_utils.py +167 -0
  471. lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesBurstPPAnalysis +305 -0
  472. lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesBurstPostProc +1364 -0
  473. lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesCombinePTMCMCh5s +100 -0
  474. lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesCombinePosteriors +235 -0
  475. lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesCompPos +1121 -0
  476. lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesDIEvidence +68 -0
  477. lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesGraceDBinfo +182 -0
  478. lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesMCMC2pos +314 -0
  479. lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesPPAnalysis +322 -0
  480. lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesPlotSpinDisk +42 -0
  481. lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesPosToSimBurst +227 -0
  482. lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesPosToSimInspiral +307 -0
  483. lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesPostProc +1345 -0
  484. lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesThermoInt +107 -0
  485. lalsuite-7.26.2.dev20251206.data/scripts/imrtgr_imr_consistency_test +796 -0
  486. lalsuite-7.26.2.dev20251206.data/scripts/lal_cache +6 -0
  487. lalsuite-7.26.2.dev20251206.data/scripts/lal_fftw_wisdom +6 -0
  488. lalsuite-7.26.2.dev20251206.data/scripts/lal_fftwf_wisdom +6 -0
  489. lalsuite-7.26.2.dev20251206.data/scripts/lal_path2cache +148 -0
  490. lalsuite-7.26.2.dev20251206.data/scripts/lal_searchsum2cache +172 -0
  491. lalsuite-7.26.2.dev20251206.data/scripts/lal_simd_detect +6 -0
  492. lalsuite-7.26.2.dev20251206.data/scripts/lal_tconvert +6 -0
  493. lalsuite-7.26.2.dev20251206.data/scripts/lal_version +6 -0
  494. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_ComputeAntennaPattern +6 -0
  495. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_ComputeFstatBenchmark +6 -0
  496. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_ComputeFstatLatticeCount +6 -0
  497. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_ComputeFstatMCUpperLimit +6 -0
  498. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_ComputeFstatistic_v2 +6 -0
  499. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_ComputePSD +6 -0
  500. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_CopySFTs +6 -0
  501. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_DistanceVsMass +6 -0
  502. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_DriveHoughMulti +6 -0
  503. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_FstatMetric_v2 +6 -0
  504. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_HierarchSearchGCT +6 -0
  505. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_HierarchicalSearch +6 -0
  506. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_MakeSFTDAG +6 -0
  507. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_MakeSFTs +6 -0
  508. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_Makefakedata_v4 +6 -0
  509. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_Makefakedata_v5 +6 -0
  510. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_PredictFstat +6 -0
  511. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_PrintDetectorState +6 -0
  512. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_SFTclean +6 -0
  513. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_SFTvalidate +6 -0
  514. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_StringAddFrame +6 -0
  515. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_StringSearch +6 -0
  516. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_Weave +6 -0
  517. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_WeaveCompare +6 -0
  518. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_WeaveConcat +6 -0
  519. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_WeaveSetup +6 -0
  520. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_WriteSFTsfromSFDBs +6 -0
  521. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_animate +6 -0
  522. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_binj +6 -0
  523. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_blindinj +6 -0
  524. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_cache +6 -0
  525. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_cafe +99 -0
  526. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_calfacs +6 -0
  527. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_cbc_stochasticbank +6 -0
  528. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_chirplen +6 -0
  529. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_coh_PTF_inspiral +6 -0
  530. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_coinj +6 -0
  531. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_combine_crosscorr_toplists +6 -0
  532. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_compareFstats +6 -0
  533. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_compareSFTs +6 -0
  534. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_cosmicstring_pipe +525 -0
  535. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_create_time_correction_ephemeris +6 -0
  536. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_dumpSFT +6 -0
  537. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_effdist +6 -0
  538. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_exc_resp +6 -0
  539. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_fftw_wisdom +6 -0
  540. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_fftwf_wisdom +6 -0
  541. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_fits_header_getval +6 -0
  542. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_fits_header_list +6 -0
  543. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_fits_overview +6 -0
  544. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_fits_table_list +6 -0
  545. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_fr_ninja +6 -0
  546. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_frextr +6 -0
  547. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_frinfo +6 -0
  548. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_frjoin +6 -0
  549. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_frread +6 -0
  550. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_frview +6 -0
  551. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_gwf2xml +6 -0
  552. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_heterodyne_pulsar +6 -0
  553. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_inspawgfile +6 -0
  554. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_inspfrinj +6 -0
  555. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_inspinj +6 -0
  556. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_inspiralDistance +6 -0
  557. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_knope +6 -0
  558. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_knope_automation_script +6 -0
  559. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_knope_collate_results +6 -0
  560. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_knope_result_page +6 -0
  561. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_makeblindinj +6 -0
  562. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_makeblindinj_himass +6 -0
  563. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_ninja +6 -0
  564. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_path2cache +6 -0
  565. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_power +6 -0
  566. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_power_likelihood_pipe +219 -0
  567. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_power_pipe +417 -0
  568. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_pulsar_crosscorr_v2 +6 -0
  569. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_pulsar_frequency_evolution +6 -0
  570. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_pulsar_parameter_estimation_nested +6 -0
  571. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_random_bank +6 -0
  572. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_randombank +6 -0
  573. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_run_pulsar_crosscorr_v2 +6 -0
  574. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_searchsum2cache +6 -0
  575. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_spec_avg +6 -0
  576. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_spec_avg_long +6 -0
  577. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_spec_coherence +6 -0
  578. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_spininj +6 -0
  579. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_splitSFTs +6 -0
  580. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_splitbank +6 -0
  581. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_ssbtodetector +6 -0
  582. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_string_apply_vetoes +171 -0
  583. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_string_calc_likelihood +172 -0
  584. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_string_contour_plotter +141 -0
  585. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_string_contour_plotter_largeloops +133 -0
  586. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_string_cs_gamma +110 -0
  587. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_string_cs_gamma_largeloops +119 -0
  588. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_string_final +1064 -0
  589. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_string_meas_likelihood +264 -0
  590. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_string_plot_binj +543 -0
  591. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_string_plot_likelihood +380 -0
  592. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_synthesizeBstatMC +6 -0
  593. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_synthesizeLVStats +6 -0
  594. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_synthesizeTransientStats +6 -0
  595. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_tconvert +6 -0
  596. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_tmpltbank +6 -0
  597. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_version +6 -0
  598. lalsuite-7.26.2.dev20251206.data/scripts/lalapps_xtefitstoframe +6 -0
  599. lalsuite-7.26.2.dev20251206.data/scripts/lalburst_cluster +156 -0
  600. lalsuite-7.26.2.dev20251206.data/scripts/lalburst_coinc +224 -0
  601. lalsuite-7.26.2.dev20251206.data/scripts/lalburst_cut +425 -0
  602. lalsuite-7.26.2.dev20251206.data/scripts/lalburst_gen_timeslides +254 -0
  603. lalsuite-7.26.2.dev20251206.data/scripts/lalburst_inj_pic +254 -0
  604. lalsuite-7.26.2.dev20251206.data/scripts/lalburst_injfind +170 -0
  605. lalsuite-7.26.2.dev20251206.data/scripts/lalburst_plot_tisi +165 -0
  606. lalsuite-7.26.2.dev20251206.data/scripts/lalburst_power_calc_likelihood +182 -0
  607. lalsuite-7.26.2.dev20251206.data/scripts/lalburst_power_final +1369 -0
  608. lalsuite-7.26.2.dev20251206.data/scripts/lalburst_power_meas_likelihood +206 -0
  609. lalsuite-7.26.2.dev20251206.data/scripts/lalburst_power_plot_binj +934 -0
  610. lalsuite-7.26.2.dev20251206.data/scripts/lalburst_power_plot_binjtf +302 -0
  611. lalsuite-7.26.2.dev20251206.data/scripts/lalburst_version +6 -0
  612. lalsuite-7.26.2.dev20251206.data/scripts/lalfr-cat +6 -0
  613. lalsuite-7.26.2.dev20251206.data/scripts/lalfr-cksum +6 -0
  614. lalsuite-7.26.2.dev20251206.data/scripts/lalfr-cut +6 -0
  615. lalsuite-7.26.2.dev20251206.data/scripts/lalfr-dump +6 -0
  616. lalsuite-7.26.2.dev20251206.data/scripts/lalfr-fmt +6 -0
  617. lalsuite-7.26.2.dev20251206.data/scripts/lalfr-paste +6 -0
  618. lalsuite-7.26.2.dev20251206.data/scripts/lalfr-print +6 -0
  619. lalsuite-7.26.2.dev20251206.data/scripts/lalfr-split +6 -0
  620. lalsuite-7.26.2.dev20251206.data/scripts/lalfr-stat +6 -0
  621. lalsuite-7.26.2.dev20251206.data/scripts/lalfr-stream +6 -0
  622. lalsuite-7.26.2.dev20251206.data/scripts/lalfr-vis +6 -0
  623. lalsuite-7.26.2.dev20251206.data/scripts/lalframe_version +6 -0
  624. lalsuite-7.26.2.dev20251206.data/scripts/lalinference_bench +6 -0
  625. lalsuite-7.26.2.dev20251206.data/scripts/lalinference_burst +6 -0
  626. lalsuite-7.26.2.dev20251206.data/scripts/lalinference_burst_pp_pipe +220 -0
  627. lalsuite-7.26.2.dev20251206.data/scripts/lalinference_coherence_test +139 -0
  628. lalsuite-7.26.2.dev20251206.data/scripts/lalinference_compute_roq_weights +404 -0
  629. lalsuite-7.26.2.dev20251206.data/scripts/lalinference_cpnest +58 -0
  630. lalsuite-7.26.2.dev20251206.data/scripts/lalinference_datadump +6 -0
  631. lalsuite-7.26.2.dev20251206.data/scripts/lalinference_evolve_spins_and_append_samples +202 -0
  632. lalsuite-7.26.2.dev20251206.data/scripts/lalinference_injectedlike +6 -0
  633. lalsuite-7.26.2.dev20251206.data/scripts/lalinference_merge_posteriors +57 -0
  634. lalsuite-7.26.2.dev20251206.data/scripts/lalinference_mpi_wrapper +6 -0
  635. lalsuite-7.26.2.dev20251206.data/scripts/lalinference_multi_pipe +144 -0
  636. lalsuite-7.26.2.dev20251206.data/scripts/lalinference_nest +6 -0
  637. lalsuite-7.26.2.dev20251206.data/scripts/lalinference_nest2pos +286 -0
  638. lalsuite-7.26.2.dev20251206.data/scripts/lalinference_pipe +512 -0
  639. lalsuite-7.26.2.dev20251206.data/scripts/lalinference_pp_pipe +229 -0
  640. lalsuite-7.26.2.dev20251206.data/scripts/lalinference_review_test +362 -0
  641. lalsuite-7.26.2.dev20251206.data/scripts/lalinference_version +6 -0
  642. lalsuite-7.26.2.dev20251206.data/scripts/lalinspiral_injfind +206 -0
  643. lalsuite-7.26.2.dev20251206.data/scripts/lalinspiral_thinca +240 -0
  644. lalsuite-7.26.2.dev20251206.data/scripts/lalinspiral_version +6 -0
  645. lalsuite-7.26.2.dev20251206.data/scripts/lalmetaio_version +6 -0
  646. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_ComputeAntennaPattern +6 -0
  647. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_ComputeFstatBenchmark +6 -0
  648. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_ComputeFstatLatticeCount +6 -0
  649. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_ComputeFstatMCUpperLimit +6 -0
  650. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_ComputeFstatistic_v2 +6 -0
  651. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_ComputePSD +6 -0
  652. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_CopyPublicSFTs +216 -0
  653. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_DriveHoughMulti +6 -0
  654. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_FstatMetric_v2 +6 -0
  655. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_HierarchSearchGCT +6 -0
  656. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_HierarchicalSearch +6 -0
  657. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_MakeSFTDAG +1142 -0
  658. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_MakeSFTs +6 -0
  659. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_Makefakedata_v4 +6 -0
  660. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_Makefakedata_v5 +6 -0
  661. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_MoveSFTs +208 -0
  662. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_PiecewiseSearch +963 -0
  663. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_PredictFstat +6 -0
  664. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_PrintDetectorState +6 -0
  665. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_SFTclean +6 -0
  666. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_SFTvalidate +6 -0
  667. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_Weave +6 -0
  668. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_WeaveCompare +6 -0
  669. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_WeaveConcat +6 -0
  670. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_WeaveSetup +6 -0
  671. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_WriteSFTsfromSFDBs +6 -0
  672. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_compareFstats +6 -0
  673. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_compareSFTs +6 -0
  674. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_create_time_correction_ephemeris +6 -0
  675. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_crosscorr_v2 +6 -0
  676. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_dumpSFT +6 -0
  677. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_fits_header_getval +6 -0
  678. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_fits_header_list +6 -0
  679. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_fits_overview +6 -0
  680. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_fits_table_list +6 -0
  681. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_frequency_evolution +6 -0
  682. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_heterodyne +6 -0
  683. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_knope +145 -0
  684. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_knope_automation_script +731 -0
  685. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_knope_collate_results +675 -0
  686. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_knope_result_page +2977 -0
  687. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_parameter_estimation_nested +6 -0
  688. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_spec_avg +6 -0
  689. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_spec_avg_long +6 -0
  690. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_spec_coherence +6 -0
  691. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_splitSFTs +6 -0
  692. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_ssbtodetector +6 -0
  693. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_synthesizeBstatMC +6 -0
  694. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_synthesizeLVStats +6 -0
  695. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_synthesizeTransientStats +6 -0
  696. lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_version +6 -0
  697. lalsuite-7.26.2.dev20251206.data/scripts/lalsim-bh-qnmode +6 -0
  698. lalsuite-7.26.2.dev20251206.data/scripts/lalsim-bh-ringdown +6 -0
  699. lalsuite-7.26.2.dev20251206.data/scripts/lalsim-bh-sphwf +6 -0
  700. lalsuite-7.26.2.dev20251206.data/scripts/lalsim-burst +6 -0
  701. lalsuite-7.26.2.dev20251206.data/scripts/lalsim-detector-noise +6 -0
  702. lalsuite-7.26.2.dev20251206.data/scripts/lalsim-detector-strain +6 -0
  703. lalsuite-7.26.2.dev20251206.data/scripts/lalsim-inject +6 -0
  704. lalsuite-7.26.2.dev20251206.data/scripts/lalsim-inspiral +6 -0
  705. lalsuite-7.26.2.dev20251206.data/scripts/lalsim-ns-eos-table +6 -0
  706. lalsuite-7.26.2.dev20251206.data/scripts/lalsim-ns-mass-radius +6 -0
  707. lalsuite-7.26.2.dev20251206.data/scripts/lalsim-ns-params +6 -0
  708. lalsuite-7.26.2.dev20251206.data/scripts/lalsim-sgwb +6 -0
  709. lalsuite-7.26.2.dev20251206.data/scripts/lalsim-unicorn +6 -0
  710. lalsuite-7.26.2.dev20251206.data/scripts/lalsimulation_version +6 -0
  711. lalsuite-7.26.2.dev20251206.dist-info/METADATA +90 -0
  712. lalsuite-7.26.2.dev20251206.dist-info/RECORD +733 -0
  713. lalsuite-7.26.2.dev20251206.dist-info/WHEEL +5 -0
  714. lalsuite-7.26.2.dev20251206.dist-info/licenses/COPYING +339 -0
  715. lalsuite-7.26.2.dev20251206.dist-info/top_level.txt +9 -0
  716. lalsuite.libs/libcfitsio-729ee1b7.so.10.0.0 +0 -0
  717. lalsuite.libs/libfftw3-6b983104.so.3.5.5 +0 -0
  718. lalsuite.libs/libfftw3f-b4465a35.so.3.5.5 +0 -0
  719. lalsuite.libs/libframel-8cf74372.so.8.48.4 +0 -0
  720. lalsuite.libs/libgsl-e30be130.so.28.0.0 +0 -0
  721. lalsuite.libs/libgslcblas-460f042a.so.0.0.0 +0 -0
  722. lalsuite.libs/libhdf5-d02936e2.so.310.5.1 +0 -0
  723. lalsuite.libs/libhdf5_hl-0e40b553.so.310.0.6 +0 -0
  724. lalsuite.libs/liblal-d17109e0.so.20.5.0 +0 -0
  725. lalsuite.libs/liblalburst-d9edfb9d.so.8.0.0 +0 -0
  726. lalsuite.libs/liblalframe-d677044f.so.14.0.3 +0 -0
  727. lalsuite.libs/liblalinference-a50f0a8e.so.23.1.7 +0 -0
  728. lalsuite.libs/liblalinspiral-22638799.so.18.0.2 +0 -0
  729. lalsuite.libs/liblalmetaio-42c5bc5c.so.11.0.1 +0 -0
  730. lalsuite.libs/liblalpulsar-95c25f8c.so.30.1.1 +0 -0
  731. lalsuite.libs/liblalsimulation-bf7c4c31.so.37.2.0 +0 -0
  732. lalsuite.libs/liblalsupport-282d4115.so.14.4.0 +0 -0
  733. lalsuite.libs/libmetaio-abda72ec.so.1.1.0 +0 -0
@@ -0,0 +1,1064 @@
1
+ #!python
2
+ #
3
+ # Copyright (C) 2006--2010 Kipp Cannon
4
+ #
5
+ # This program is free software; you can redistribute it and/or modify it
6
+ # under the terms of the GNU General Public License as published by the
7
+ # Free Software Foundation; either version 2 of the License, or (at your
8
+ # option) any later version.
9
+ #
10
+ # This program is distributed in the hope that it will be useful, but
11
+ # WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
13
+ # Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU General Public License along
16
+ # with this program; if not, write to the Free Software Foundation, Inc.,
17
+ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
+
19
+
20
+ #
21
+ # =============================================================================
22
+ #
23
+ # Preamble
24
+ #
25
+ # =============================================================================
26
+ #
27
+
28
+
29
+ """
30
+ String cusp search final output rendering tool.
31
+ """
32
+
33
+
34
+ from __future__ import print_function
35
+
36
+
37
+ import bisect
38
+ import copyreg
39
+ import pickle
40
+ import heapq
41
+ import itertools
42
+ from optparse import OptionParser
43
+ import math
44
+ from matplotlib import patches
45
+ import numpy
46
+ import os
47
+ import random
48
+ import select
49
+ from scipy import interpolate
50
+ from scipy import optimize
51
+ import sqlite3
52
+ import sys
53
+ import traceback
54
+
55
+
56
+ from igwn_ligolw import dbtables
57
+ from igwn_ligolw.utils import process as ligolwprocess
58
+ import lal
59
+ from lal import rate
60
+ from lal.utils import CacheEntry
61
+ from lalburst import git_version
62
+ from lalburst import packing
63
+ from lalburst import SimBurstUtils
64
+ from lalburst import SnglBurstUtils
65
+ from lalburst import stringutils
66
+ import igwn_segments as segments
67
+ from igwn_segments import utils as segmentsUtils
68
+
69
+
70
+ SnglBurstUtils.matplotlib.rcParams.update({
71
+ "font.size": 10.0,
72
+ "text.usetex": True,
73
+ "axes.titlesize": 10.0,
74
+ "axes.labelsize": 10.0,
75
+ "xtick.labelsize": 8.0,
76
+ "ytick.labelsize": 8.0,
77
+ "legend.fontsize": 8.0,
78
+ "grid.linestyle": "-"
79
+ })
80
+
81
+
82
+ __author__ = "Kipp Cannon <kipp.cannon@ligo.org>"
83
+ __version__ = "git id %s" % git_version.id
84
+ __date__ = git_version.date
85
+
86
+
87
+ copyreg.pickle(lal.LIGOTimeGPS, lambda gps: (lal.LIGOTimeGPS, (gps.gpsSeconds, gps.gpsNanoSeconds)))
88
+
89
+
90
+ #
91
+ # =============================================================================
92
+ #
93
+ # Command Line
94
+ #
95
+ # =============================================================================
96
+ #
97
+
98
+
99
+ def parse_command_line():
100
+ parser = OptionParser(
101
+ version = "Name: %%prog\n%s" % git_version.verbose_msg,
102
+ usage = "%prog [options] [file ...]",
103
+ description = "%prog performs the final, summary, stages of the upper-limit string cusp search. Input consists of a list of all sqlite format database files produced by all injection and non-injection runs of the analysis pipeline. The file names can be given on the command line and/or provided in a LAL cache file."
104
+ )
105
+ parser.add_option("--cal-uncertainty", metavar = "fraction", type = "float", help = "Set the fractional uncertainty in amplitude due to calibration uncertainty (eg. 0.08). This option is required, use 0 to disable calibration uncertainty.")
106
+ parser.add_option("--injections-bin-size", metavar = "bins", type = "float", default = 16.7, help = "Set bin width for injection efficiency curves (default = 16.7).")
107
+ parser.add_option("-c", "--input-cache", metavar = "filename", action = "append", help = "Also process the files named in this LAL cache. See lalapps_path2cache for information on how to produce a LAL cache file. This option can be given multiple times.")
108
+ parser.add_option("--import-dump", metavar = "filename", action = "append", help = "Import additional rate vs. threshold or efficiency data from this dump file. Dump files are one of the data products produced by this program. Whether the file provides rate vs. threshold data or efficiency data will be determined automatically. This option can be given multiple times")
109
+ parser.add_option("--image-formats", metavar = "ext[,ext,...]", default = "png,pdf", help = "Set list of graphics formats to produce by providing a comma-delimited list of the filename extensions (default = \"png,pdf\").")
110
+ parser.add_option("-p", "--live-time-program", metavar = "program", default = "StringSearch", help = "Set the name, as it appears in the process table, of the program whose search summary entries define the search live time (default = StringSearch).")
111
+ parser.add_option("-o", "--open-box", action = "store_true", help = "Perform open-box analysis. In a closed-box analysis (the default), information about the events seen at zero-lag is concealed: the rate vs. threshold plot only shows the rate of events seen in the background, the detection threshold used to measure the efficiency curves is obtained from n-th loudest background event where n is (the integer closest to) the ratio of background livetime to zero-lag livetime, and messages to stdout and stderr that contain information about event counts at zero-lag are silenced.")
112
+ parser.add_option("-t", "--tmp-space", metavar = "path", help = "Path to a directory suitable for use as a work area while manipulating the database file. The database file will be worked on in this directory, and then moved to the final location when complete. This option is intended to improve performance when running in a networked environment, where there might be a local disk with higher bandwidth than is available to the filesystem on which the final output will reside.")
113
+ parser.add_option("--vetoes-name", metavar = "name", help = "Set the name of the segment lists to use as vetoes (default = do not apply vetoes).")
114
+ parser.add_option("--detection-threshold", metavar = "log likelihood ratio", type = "float", help = "Override the detection threshold. Only injection files will be processed, and the efficiency curve measured.")
115
+ parser.add_option("--record-background", metavar = "N", type = "int", default = 10000000, help = "Set the number of background log likelihood ratios to hold in memory for producing the rate vs. threshold plot (default = 10000000).")
116
+ parser.add_option("--record-candidates", metavar = "N", type = "int", default = 100, help = "Set the number of highest-ranked zero-lag candidates to dump to the candidate file (default = 100).")
117
+ parser.add_option("--threads", metavar = "N", type = "int", default = 1, help = "Set the maximum number of parallel threads to use for processing files (default = 1). Contention for the global Python interpreter lock will throttle the true number that can run. The number of threads will be automatically adjusted downwards if the number requested exceeds the number of input files.")
118
+ parser.add_option("-v", "--verbose", action = "store_true", help = "Be verbose.")
119
+ options, filenames = parser.parse_args()
120
+
121
+ if options.cal_uncertainty is None:
122
+ raise ValueError("must set --cal-uncertainty (use 0 to ignore calibration uncertainty)")
123
+
124
+ options.image_formats = options.image_formats.split(",")
125
+
126
+ if options.input_cache:
127
+ filenames += [CacheEntry(line).path for input_cache in options.input_cache for line in file(input_cache)]
128
+
129
+ if options.threads < 1:
130
+ raise ValueError("--threads must be >= 1")
131
+
132
+ return options, filenames
133
+
134
+
135
+ #
136
+ # =============================================================================
137
+ #
138
+ # Rate vs. Threshold
139
+ #
140
+ # =============================================================================
141
+ #
142
+
143
+
144
+ def ratevsthresh_bounds(background_x, background_y, zero_lag_x, zero_lag_y):
145
+ if len(zero_lag_x):
146
+ if len(background_x):
147
+ minX, maxX = min(min(zero_lag_x), min(background_x)), max(max(zero_lag_x), max(background_x))
148
+ minY, maxY = min(min(zero_lag_y), min(background_y)), max(max(zero_lag_y), max(background_y))
149
+ else:
150
+ minX, maxX = min(zero_lag_x), max(zero_lag_x)
151
+ minY, maxY = min(zero_lag_y), max(zero_lag_y)
152
+ else:
153
+ # don't check for background, if there's no zero-lag and no
154
+ # background we're screwed anyway
155
+ minX, maxX = min(background_x), max(background_x)
156
+ minY, maxY = min(background_y), max(background_y)
157
+
158
+ # override the plot's X axis lower bound
159
+ minX = 1e-2 # FIXME: don't hard-code
160
+ if len(zero_lag_x):
161
+ if len(background_x):
162
+ maxY = max(zero_lag_y[bisect.bisect_left(zero_lag_x, minX)], background_y[bisect.bisect_left(background_x, minX)])
163
+ else:
164
+ maxY = zero_lag_y[bisect.bisect_left(zero_lag_x, minX)]
165
+ else:
166
+ maxY = background_y[bisect.bisect_left(background_x, minX)]
167
+
168
+ return minX, maxX, minY, maxY
169
+
170
+
171
+ def expected_count(x, background_x, background_y):
172
+ if x > background_x[-1]:
173
+ return 0
174
+ return background_y[bisect.bisect_left(background_x, x)]
175
+
176
+
177
+ def compress_ratevsthresh_curve(x, y, yerr):
178
+ #
179
+ # construct a background mask to retain the highest-ranked 10,000
180
+ # elements, then every 10th until the 100,000th highest-ranked
181
+ # element, then every 100th after that. this is for reducing the
182
+ # dataset size so matplotlib can handle it and vector graphics
183
+ # output isn't ridiculous in size.
184
+ #
185
+
186
+ mask = numpy.arange(len(x))[::-1]
187
+ mask = (mask < 10000) | ((mask < 100000) & (mask % 10 == 0)) | (mask % 100 == 0)
188
+
189
+ return x.compress(mask), y.compress(mask), yerr.compress(mask)
190
+
191
+
192
+ class RateVsThreshold(object):
193
+ def __init__(self, open_box, record_background, record_candidates):
194
+ self.zero_lag = []
195
+ self.background = []
196
+ self.n_background = 0
197
+ self.record_background = record_background
198
+ self.most_significant_background = []
199
+ self.candidates = []
200
+ self.record_candidates = record_candidates
201
+ self.zero_lag_time = 0.0
202
+ self.background_time = 0.0
203
+ self.open_box = open_box
204
+
205
+ def __iadd__(self, other):
206
+ self.zero_lag += other.zero_lag
207
+ self.n_background += other.n_background
208
+ self.background[:] = heapq.nlargest(self.record_background, itertools.chain(self.background, other.background))
209
+ self.most_significant_background[:] = heapq.nlargest(self.record_candidates, itertools.chain(self.most_significant_background, other.most_significant_background))
210
+ self.candidates[:] = heapq.nlargest(self.record_candidates, itertools.chain(self.candidates, other.candidates))
211
+ self.zero_lag_time += other.zero_lag_time
212
+ self.background_time += other.background_time
213
+ return self
214
+
215
+ def add_contents(self, contents, verbose = False):
216
+ #
217
+ # retrieve the offset vectors, retain only instruments that
218
+ # are available
219
+ #
220
+
221
+ zero_lag_time_slides, background_time_slides = SnglBurstUtils.get_time_slides(contents.connection)
222
+ assert len(zero_lag_time_slides) == 1
223
+
224
+ #
225
+ # compute the live time
226
+ #
227
+
228
+ seglists = contents.seglists - contents.vetoseglists
229
+ self.zero_lag_time += stringutils.time_slides_livetime(seglists, zero_lag_time_slides.values(), 2, clip = contents.coincidence_segments)
230
+ self.background_time += stringutils.time_slides_livetime(seglists, background_time_slides.values(), 2, clip = contents.coincidence_segments)
231
+ if set(("H1", "H2")).issubset(set(contents.seglists)):
232
+ # we have segments for both H1 and H2, remove time
233
+ # when exactly that pair are on
234
+ self.zero_lag_time -= stringutils.time_slides_livetime_for_instrument_combo(seglists, zero_lag_time_slides.values(), ("H1", "H2"), clip = contents.coincidence_segments)
235
+ self.background_time -= stringutils.time_slides_livetime_for_instrument_combo(seglists, background_time_slides.values(), ("H1", "H2"), clip = contents.coincidence_segments)
236
+
237
+ #
238
+ # count events
239
+ #
240
+
241
+ for ln_likelihood_ratio, instruments, coinc_event_id, peak_time, is_background in contents.connection.cursor().execute("""
242
+ SELECT
243
+ coinc_event.likelihood,
244
+ coinc_event.instruments,
245
+ coinc_event.coinc_event_id,
246
+ (
247
+ SELECT
248
+ AVG(sngl_burst.peak_time) + 1e-9 * AVG(sngl_burst.peak_time_ns)
249
+ FROM
250
+ sngl_burst
251
+ JOIN coinc_event_map ON (
252
+ coinc_event_map.coinc_event_id == coinc_event.coinc_event_id
253
+ AND coinc_event_map.table_name == 'sngl_burst'
254
+ AND coinc_event_map.event_id == sngl_burst.event_id
255
+ )
256
+ ),
257
+ EXISTS (
258
+ SELECT
259
+ *
260
+ FROM
261
+ time_slide
262
+ WHERE
263
+ time_slide.time_slide_id == coinc_event.time_slide_id
264
+ AND time_slide.offset != 0
265
+ )
266
+ FROM
267
+ coinc_event
268
+ WHERE
269
+ coinc_event.coinc_def_id == ?
270
+ """, (contents.bb_definer_id,)):
271
+ # likelihood ratio must be listed first to
272
+ # act as the sort key
273
+ record = (ln_likelihood_ratio, contents.filename, coinc_event_id, dbtables.lsctables.instrumentsproperty.get(instruments), peak_time)
274
+ if ln_likelihood_ratio is None:
275
+ # coinc got vetoed (unable to compute
276
+ # likelihood)
277
+ pass
278
+ elif is_background:
279
+ # non-vetoed background
280
+ self.n_background += 1
281
+ if len(self.background) < self.record_background:
282
+ heapq.heappush(self.background, ln_likelihood_ratio)
283
+ else:
284
+ heapq.heappushpop(self.background, ln_likelihood_ratio)
285
+ if len(self.most_significant_background) < self.record_candidates:
286
+ heapq.heappush(self.most_significant_background, record)
287
+ else:
288
+ heapq.heappushpop(self.most_significant_background, record)
289
+ else:
290
+ # non-vetoed zero lag
291
+ self.zero_lag.append(ln_likelihood_ratio)
292
+ if len(self.candidates) < self.record_candidates:
293
+ heapq.heappush(self.candidates, record)
294
+ else:
295
+ heapq.heappushpop(self.candidates, record)
296
+
297
+ def finish(self):
298
+ #
299
+ # dump info about highest-ranked zero-lag and background
300
+ # events
301
+ #
302
+
303
+ self.most_significant_background.sort()
304
+ self.candidates.sort()
305
+
306
+ f = file("string_most_significant_background.txt", "w")
307
+ print("Highest-Ranked Background Events", file=f)
308
+ print("================================", file=f)
309
+ for ln_likelihood_ratio, filename, coinc_event_id, instruments, peak_time in self.most_significant_background:
310
+ print(file=f)
311
+ print("%s in %s:" % (str(coinc_event_id), filename), file=f)
312
+ print("Recovered in: %s" % ", ".join(sorted(instruments or [])), file=f)
313
+ print("Mean peak time: %.16g s GPS" % peak_time, file=f)
314
+ print("\\log \\Lambda: %.16g" % ln_likelihood_ratio, file=f)
315
+
316
+ f = file("string_candidates.txt", "w")
317
+ print("Highest-Ranked Zero-Lag Events", file=f)
318
+ print("==============================", file=f)
319
+ if self.open_box:
320
+ for ln_likelihood_ratio, filename, coinc_event_id, instruments, peak_time in self.candidates:
321
+ print(file=f)
322
+ print("%s in %s:" % (str(coinc_event_id), filename), file=f)
323
+ print("Recovered in: %s" % ", ".join(sorted(instruments or [])), file=f)
324
+ print("Mean peak time: %.16g s GPS" % peak_time, file=f)
325
+ print("\\log \\Lambda: %.16g" % ln_likelihood_ratio, file=f)
326
+ else:
327
+ print(file=f)
328
+ print("List suppressed: box is closed", file=f)
329
+
330
+ #
331
+ # sort the ranking statistics and convert to arrays.
332
+ #
333
+
334
+ self.background.sort()
335
+ self.zero_lag.sort()
336
+ self.zero_lag = numpy.array(self.zero_lag, dtype = "double")
337
+ background_x = numpy.array(self.background, dtype = "double")
338
+
339
+ #
340
+ # convert counts to rates and their uncertainties
341
+ #
342
+
343
+ # background count expected in zero-lag and \sqrt{N}
344
+ # standard deviation
345
+ background_y = numpy.arange(len(background_x), 0.0, -1.0, dtype = "double") / self.background_time * self.zero_lag_time
346
+ background_yerr = numpy.sqrt(background_y)
347
+
348
+ # count observed in zero-lag
349
+ zero_lag_y = numpy.arange(len(self.zero_lag), 0.0, -1.0, dtype = "double")
350
+
351
+ # compute zero-lag - expected residual in units of \sqrt{N}
352
+ zero_lag_residual = numpy.zeros((len(self.zero_lag),), dtype = "double")
353
+ for i in xrange(len(self.zero_lag)):
354
+ n = expected_count(self.zero_lag[i], background_x, background_y)
355
+ zero_lag_residual[i] = (zero_lag_y[i] - n) / math.sqrt(n)
356
+
357
+ # convert counts to rates
358
+ background_y /= self.zero_lag_time
359
+ background_yerr /= self.zero_lag_time
360
+ zero_lag_y /= self.zero_lag_time
361
+
362
+ #
363
+ # determine the horizontal and vertical extent of the plot
364
+ #
365
+
366
+ if self.open_box:
367
+ minX, maxX, minY, maxY = ratevsthresh_bounds(background_x, background_y, self.zero_lag, zero_lag_y)
368
+ else:
369
+ minX, maxX, minY, maxY = ratevsthresh_bounds(background_x, background_y, [], [])
370
+
371
+ #
372
+ # compress the background data
373
+ #
374
+
375
+ background_x, background_y, background_yerr = compress_ratevsthresh_curve(background_x, background_y, background_yerr)
376
+
377
+ #
378
+ # save data points in a text file
379
+ #
380
+
381
+ numpy.savetxt('string_rate_background.txt',numpy.transpose((background_x,background_y,background_yerr)))
382
+
383
+ #
384
+ # start the rate vs. threshold plot
385
+ #
386
+
387
+ ratefig, axes = SnglBurstUtils.make_burst_plot(r"Ranking Statistic Threshold, $\log \Lambda$", "Event Rate (Hz)", width = 108.0)
388
+ axes.semilogy()
389
+ axes.set_position([0.125, 0.15, 0.83, 0.75])
390
+ axes.xaxis.grid(True, which = "major,minor")
391
+ axes.yaxis.grid(True, which = "major,minor")
392
+ if self.open_box:
393
+ axes.set_title(r"Event Rate vs.\ Ranking Statistic Threshold")
394
+ else:
395
+ axes.set_title(r"Event Rate vs.\ Ranking Statistic Threshold (Closed Box)")
396
+
397
+ # warning: the error bar polygon is not *really* clipped
398
+ # to the axes' bounding box, the result will be incorrect
399
+ # if the density of data points is small where the polygon
400
+ # encounters the axes' bounding box.
401
+
402
+ poly_x = numpy.concatenate((background_x, background_x[::-1]))
403
+ poly_y = numpy.concatenate((background_y + 1 * background_yerr, (background_y - 1 * background_yerr)[::-1]))
404
+ axes.add_patch(patches.Polygon(zip(poly_x, numpy.clip(poly_y, minY, maxY)), edgecolor = "k", facecolor = "k", alpha = 0.3))
405
+ line1, = axes.semilogy(background_x.repeat(2)[:-1], background_y.repeat(2)[1:], color = "k", linestyle = "--")
406
+ if self.open_box:
407
+ line2, = axes.semilogy(self.zero_lag.repeat(2)[:-1], zero_lag_y.repeat(2)[1:], color = "k", linestyle = "-", linewidth = 2)
408
+ axes.legend((line1, line2), (r"Expected background", r"Zero-lag"), loc = "lower left")
409
+ else:
410
+ axes.legend((line1,), (r"Expected background",), loc = "lower left")
411
+
412
+ axes.set_xlim((minX, maxX))
413
+ axes.set_ylim((minY, maxY))
414
+
415
+ #
416
+ # start the count residual vs. threshold plot
417
+ #
418
+
419
+ residualfig, axes = SnglBurstUtils.make_burst_plot(r"Ranking Statistic Threshold, $\log \Lambda$", r"Event Count Residual / $\sqrt{N}$", width = 108.0)
420
+ axes.set_position([0.125, 0.15, 0.83, 0.75])
421
+ axes.xaxis.grid(True, which = "major,minor")
422
+ axes.yaxis.grid(True, which = "major,minor")
423
+ if self.open_box:
424
+ axes.set_title(r"Event Count Residual vs.\ Ranking Statistic Threshold")
425
+ else:
426
+ axes.set_title(r"Event Count Residual vs.\ Ranking Statistic Threshold (Closed Box)")
427
+
428
+ axes.add_patch(patches.Polygon(((minX, -1), (maxX, -1), (maxX, +1), (minX, +1)), edgecolor = "k", facecolor = "k", alpha = 0.3))
429
+ if self.open_box:
430
+ line1, = axes.plot(self.zero_lag, zero_lag_residual, color = "k", linestyle = "-", linewidth = 2)
431
+
432
+ axes.set_xlim((minX, maxX))
433
+
434
+ #
435
+ # done
436
+ #
437
+
438
+ return ratefig, residualfig
439
+
440
+
441
+ #
442
+ # =============================================================================
443
+ #
444
+ # Efficiency
445
+ #
446
+ # =============================================================================
447
+ #
448
+
449
+
450
+ def slope(x, y):
451
+ """
452
+ From the x and y arrays, compute the slope at the x co-ordinates
453
+ using a first-order finite difference approximation.
454
+ """
455
+ slope = numpy.zeros((len(x),), dtype = "double")
456
+ slope[0] = (y[1] - y[0]) / (x[1] - x[0])
457
+ for i in xrange(1, len(x) - 1):
458
+ slope[i] = (y[i + 1] - y[i - 1]) / (x[i + 1] - x[i - 1])
459
+ slope[-1] = (y[-1] - y[-2]) / (x[-1] - x[-2])
460
+ return slope
461
+
462
+
463
+ def upper_err(y, yerr, deltax):
464
+ z = y + yerr
465
+ deltax = int(deltax)
466
+ upper = numpy.zeros((len(yerr),), dtype = "double")
467
+ for i in xrange(len(yerr)):
468
+ upper[i] = max(z[max(i - deltax, 0) : min(i + deltax, len(z))])
469
+ return upper - y
470
+
471
+
472
+ def lower_err(y, yerr, deltax):
473
+ z = y - yerr
474
+ deltax = int(deltax)
475
+ lower = numpy.zeros((len(yerr),), dtype = "double")
476
+ for i in xrange(len(yerr)):
477
+ lower[i] = min(z[max(i - deltax, 0) : min(i + deltax, len(z))])
478
+ return y - lower
479
+
480
+
481
+ def write_efficiency(fileobj, bins, eff, yerr):
482
+ print("# A e D[e]", file=fileobj)
483
+ for A, e, De in zip(bins.centres()[0], eff, yerr):
484
+ print("%.16g %.16g %.16g" % (A, e, De), file=fileobj)
485
+
486
+
487
+ def render_data_from_bins(dump_file, axes, efficiency_num, efficiency_den, cal_uncertainty, filter_width, colour = "k", erroralpha = 0.3, linestyle = "-"):
488
+ # extract array of x co-ordinates, and the factor by which x
489
+ # increases from one sample to the next.
490
+ (x,) = efficiency_den.centres()
491
+ x_factor_per_sample = efficiency_den.bins[0].delta
492
+
493
+ # compute the efficiency, the slope (units = efficiency per
494
+ # sample), the y uncertainty (units = efficiency) due to binomial
495
+ # counting fluctuations, and the x uncertainty (units = samples)
496
+ # due to the width of the smoothing filter.
497
+ eff = efficiency_num.array / efficiency_den.array
498
+ dydx = slope(numpy.arange(len(x), dtype = "double"), eff)
499
+ yerr = numpy.sqrt(eff * (1. - eff) / efficiency_den.array)
500
+ xerr = numpy.array([filter_width / 2.] * len(yerr))
501
+
502
+ # compute the net y err (units = efficiency) by (i) multiplying the
503
+ # x err by the slope, (ii) dividing the calibration uncertainty
504
+ # (units = percent) by the fractional change in x per sample and
505
+ # multiplying by the slope, (iii) adding the two in quadradure with
506
+ # the y err.
507
+ net_yerr = numpy.sqrt((xerr * dydx)**2. + yerr**2. + (cal_uncertainty / x_factor_per_sample * dydx)**2.)
508
+
509
+ # compute net xerr (units = percent) by dividing yerr by slope and
510
+ # then multiplying by the fractional change in x per sample.
511
+ net_xerr = net_yerr / dydx * x_factor_per_sample
512
+
513
+ # write the efficiency data to file
514
+ write_efficiency(dump_file, efficiency_den.bins, eff, net_yerr)
515
+
516
+ # plot the efficiency curve and uncertainty region
517
+ patch = patches.Polygon(zip(numpy.concatenate((x, x[::-1])), numpy.concatenate((eff + upper_err(eff, yerr, filter_width / 2.), (eff - lower_err(eff, yerr, filter_width / 2.))[::-1]))), edgecolor = colour, facecolor = colour, alpha = erroralpha)
518
+ axes.add_patch(patch)
519
+ line, = axes.plot(x, eff, colour + linestyle)
520
+
521
+ # compute 50% point and its uncertainty
522
+ A50 = optimize.bisect(interpolate.interp1d(x, eff - 0.5), x[0], x[-1], xtol = 1e-40)
523
+ A50_err = interpolate.interp1d(x, net_xerr)(A50)
524
+
525
+ # mark 50% point on graph
526
+ #axes.axvline(A50, color = colour, linestyle = linestyle)
527
+
528
+ # print some analysis FIXME: this calculation needs attention
529
+ num_injections = efficiency_den.array.sum()
530
+ num_samples = len(efficiency_den.array)
531
+ print("Bins were %g samples wide, ideal would have been %g" % (filter_width, (num_samples / num_injections / interpolate.interp1d(x, dydx)(A50)**2.0)**(1.0/3.0)), file=sys.stderr)
532
+ print("Average number of injections in each bin = %g" % efficiency_den.array.mean(), file=sys.stderr)
533
+
534
+ return line, A50, A50_err
535
+
536
+
537
+ class Efficiency(object):
538
+ def __init__(self, detection_threshold, cal_uncertainty, filter_width, open_box):
539
+ self.detection_threshold = detection_threshold
540
+ self.cal_uncertainty = cal_uncertainty
541
+ self.filter_width = filter_width
542
+ self.seglists = segments.segmentlistdict()
543
+ self.vetoseglists = segments.segmentlistdict()
544
+ self.found = []
545
+ self.n_diagnostics = 100 # keep 100 loudest missed and quietest found injections
546
+ self.loudest_missed = []
547
+ self.quietest_found = []
548
+ self.all = []
549
+ self.open_box = open_box
550
+
551
+ def __iadd__(self, other):
552
+ assert other.detection_threshold == self.detection_threshold
553
+ assert other.open_box == self.open_box
554
+ self.seglists |= other.seglists
555
+ self.vetoseglists |= other.vetoseglists
556
+ self.found += other.found
557
+ self.loudest_missed[:] = heapq.nlargest(self.n_diagnostics, itertools.chain(self.loudest_missed, other.loudest_missed))
558
+ self.quietest_found[:] = heapq.nlargest(self.n_diagnostics, itertools.chain(self.quietest_found, other.quietest_found))
559
+ self.all += other.all
560
+ return self
561
+
562
+ def add_contents(self, contents, verbose = False):
563
+ #
564
+ # update segment information
565
+ #
566
+
567
+ self.seglists |= contents.seglists
568
+ self.vetoseglists |= contents.vetoseglists
569
+ seglists = contents.seglists - contents.vetoseglists
570
+ if set(("H1", "H2")).issubset(set(seglists)):
571
+ # we have segments for both H1 and H2, remove time
572
+ # when exactly that pair are on
573
+ seglists -= segments.segmentlistdict.fromkeys(seglists, seglists.intersection(("H1", "H2")) - seglists.union(set(seglists) - set(("H1", "H2"))))
574
+
575
+ # for each injection, retrieve the highest likelihood ratio
576
+ # of the burst coincs that were found to match the
577
+ # injection or null if no burst coincs matched the
578
+ # injection
579
+ offsetvectors = contents.time_slide_table.as_dict()
580
+ stringutils.create_recovered_ln_likelihood_ratio_table(contents.connection, contents.bb_definer_id)
581
+ for values in contents.connection.cursor().execute("""
582
+ SELECT
583
+ sim_burst.*,
584
+ recovered_ln_likelihood_ratio.ln_likelihood_ratio
585
+ FROM
586
+ sim_burst
587
+ LEFT JOIN recovered_ln_likelihood_ratio ON (
588
+ recovered_ln_likelihood_ratio.simulation_id == sim_burst.simulation_id
589
+ )
590
+ """):
591
+ sim = contents.sim_burst_table.row_from_cols(values[:-1])
592
+ ln_likelihood_ratio = values[-1]
593
+ found = ln_likelihood_ratio is not None
594
+ # were at least 2 instruments on when the injection
595
+ # was made?
596
+ if len(SimBurstUtils.on_instruments(sim, seglists, offsetvectors[sim.time_slide_id])) >= 2:
597
+ # yes
598
+ self.all.append(sim)
599
+ if found and ln_likelihood_ratio > self.detection_threshold:
600
+ self.found.append(sim)
601
+ # 1/amplitude needs to be first so
602
+ # that it acts as the sort key
603
+ record = (1.0 / sim.amplitude, sim, offsetvectors[sim.time_slide_id], contents.filename, ln_likelihood_ratio)
604
+ if len(self.quietest_found) < self.n_diagnostics:
605
+ heapq.heappush(self.quietest_found, record)
606
+ else:
607
+ heapq.heappushpop(self.quietest_found, record)
608
+ else:
609
+ # amplitude needs to be first so
610
+ # that it acts as the sort key
611
+ record = (sim.amplitude, sim, offsetvectors[sim.time_slide_id], contents.filename, ln_likelihood_ratio)
612
+ if len(self.loudest_missed) < self.n_diagnostics:
613
+ heapq.heappush(self.loudest_missed, record)
614
+ else:
615
+ heapq.heappushpop(self.loudest_missed, record)
616
+ elif found:
617
+ # no, but it was found anyway
618
+ print("%s: odd, injection %s was found but not injected ..." % (contents.filename, sim.simulation_id), file=sys.stderr)
619
+
620
+ def finish(self):
621
+ fig, axes = SnglBurstUtils.make_burst_plot(r"Injection Amplitude (\(\mathrm{s}^{-\frac{1}{3}}\))", "Detection Efficiency", width = 108.0)
622
+ axes.set_title(r"Detection Efficiency vs.\ Amplitude")
623
+ axes.semilogx()
624
+ axes.set_position([0.10, 0.150, 0.86, 0.77])
625
+
626
+ # set desired yticks
627
+ axes.set_yticks((0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0))
628
+ axes.set_yticklabels((r"\(0\)", r"\(0.1\)", r"\(0.2\)", r"\(0.3\)", r"\(0.4\)", r"\(0.5\)", r"\(0.6\)", r"\(0.7\)", r"\(0.8\)", r"\(0.9\)", r"\(1.0\)"))
629
+ axes.xaxis.grid(True, which = "major,minor")
630
+ axes.yaxis.grid(True, which = "major,minor")
631
+
632
+ # put made and found injections in the denominators and
633
+ # numerators of the efficiency bins
634
+ bins = rate.NDBins((rate.LogarithmicBins(min(sim.amplitude for sim in self.all), max(sim.amplitude for sim in self.all), 400),))
635
+ efficiency_num = rate.BinnedArray(bins)
636
+ efficiency_den = rate.BinnedArray(bins)
637
+ for sim in self.found:
638
+ efficiency_num[sim.amplitude,] += 1
639
+ for sim in self.all:
640
+ efficiency_den[sim.amplitude,] += 1
641
+
642
+ # generate and plot trend curves. adjust window function
643
+ # normalization so that denominator array correctly
644
+ # represents the number of injections contributing to each
645
+ # bin: make w(0) = 1.0. note that this factor has no
646
+ # effect on the efficiency because it is common to the
647
+ # numerator and denominator arrays. we do this for the
648
+ # purpose of computing the Poisson error bars, which
649
+ # requires us to know the counts for the bins
650
+ windowfunc = rate.gaussian_window(self.filter_width)
651
+ windowfunc /= windowfunc[len(windowfunc) / 2 + 1]
652
+ rate.filter_array(efficiency_num.array, windowfunc)
653
+ rate.filter_array(efficiency_den.array, windowfunc)
654
+
655
+ # regularize: adjust unused bins so that the efficiency is
656
+ # 0, not NaN
657
+ assert (efficiency_num.array <= efficiency_den.array).all()
658
+ efficiency_den.array[(efficiency_num.array == 0) & (efficiency_den.array == 0)] = 1
659
+
660
+ line1, A50, A50_err = render_data_from_bins(file("string_efficiency.dat", "w"), axes, efficiency_num, efficiency_den, self.cal_uncertainty, self.filter_width, colour = "k", linestyle = "-", erroralpha = 0.2)
661
+ print("Pipeline's 50%% efficiency point for all detections = %g +/- %g%%\n" % (A50, A50_err * 100), file=sys.stderr)
662
+
663
+ # add a legend to the axes
664
+ axes.legend((line1,), (r"\noindent Injections recovered with $\log \Lambda > %.2f$" % self.detection_threshold,), loc = "lower right")
665
+
666
+ # adjust limits
667
+ axes.set_xlim([3e-22, 3e-19])
668
+ axes.set_ylim([0.0, 1.0])
669
+
670
+ #
671
+ # dump some information about the highest-amplitude missed
672
+ # and quietest-amplitude found injections
673
+ #
674
+
675
+ self.loudest_missed.sort(reverse = True)
676
+ self.quietest_found.sort(reverse = True)
677
+
678
+ f = file("string_loud_missed_injections.txt", "w")
679
+ print("Highest Amplitude Missed Injections", file=f)
680
+ print("===================================", file=f)
681
+ for amplitude, sim, offsetvector, filename, ln_likelihood_ratio in self.loudest_missed:
682
+ print(file=f)
683
+ print("%s in %s:" % (str(sim.simulation_id), filename), file=f)
684
+ if ln_likelihood_ratio is None:
685
+ print("Not recovered", file=f)
686
+ else:
687
+ print("Recovered with \\log \\Lambda = %.16g, detection threshold was %.16g" % (ln_likelihood_ratio, self.detection_threshold), file=f)
688
+ for instrument in self.seglists:
689
+ print("In %s:" % instrument, file=f)
690
+ print("\tInjected amplitude:\t%.16g" % SimBurstUtils.string_amplitude_in_instrument(sim, instrument, offsetvector), file=f)
691
+ print("\tTime of injection:\t%s s" % sim.time_at_instrument(instrument, offsetvector), file=f)
692
+ print("Amplitude in waveframe:\t%.16g" % sim.amplitude, file=f)
693
+ t = sim.get_time_geocent()
694
+ print("Time at geocentre:\t%s s" % t, file=f)
695
+ print("Segments within 60 seconds:\t%s" % segmentsUtils.segmentlistdict_to_short_string(self.seglists & segments.segmentlistdict((instrument, segments.segmentlist([segments.segment(t-offsetvector[instrument]-60, t-offsetvector[instrument]+60)])) for instrument in self.seglists)), file=f)
696
+ print("Vetoes within 60 seconds:\t%s" % segmentsUtils.segmentlistdict_to_short_string(self.vetoseglists & segments.segmentlistdict((instrument, segments.segmentlist([segments.segment(t-offsetvector[instrument]-60, t-offsetvector[instrument]+60)])) for instrument in self.vetoseglists)), file=f)
697
+
698
+ f = file("string_quiet_found_injections.txt", "w")
699
+ print("Lowest Amplitude Found Injections", file=f)
700
+ print("=================================", file=f)
701
+ for inv_amplitude, sim, offsetvector, filename, ln_likelihood_ratio in self.quietest_found:
702
+ print(file=f)
703
+ print("%s in %s:" % (str(sim.simulation_id), filename), file=f)
704
+ if ln_likelihood_ratio is None:
705
+ print("Not recovered", file=f)
706
+ else:
707
+ print("Recovered with \\log \\Lambda = %.16g, detection threshold was %.16g" % (ln_likelihood_ratio, self.detection_threshold), file=f)
708
+ for instrument in self.seglists:
709
+ print("In %s:" % instrument, file=f)
710
+ print("\tInjected amplitude:\t%.16g" % SimBurstUtils.string_amplitude_in_instrument(sim, instrument, offsetvector), file=f)
711
+ print("\tTime of injection:\t%s s" % sim.time_at_instrument(instrument, offsetvector), file=f)
712
+ print("Amplitude in waveframe:\t%.16g" % sim.amplitude, file=f)
713
+ t = sim.get_time_geocent()
714
+ print("Time at geocentre:\t%s s" % t, file=f)
715
+ print("Segments within 60 seconds:\t%s" % segmentsUtils.segmentlistdict_to_short_string(self.seglists & segments.segmentlistdict((instrument, segments.segmentlist([segments.segment(t-offsetvector[instrument]-60, t-offsetvector[instrument]+60)])) for instrument in self.seglists)), file=f)
716
+ print("Vetoes within 60 seconds:\t%s" % segmentsUtils.segmentlistdict_to_short_string(self.vetoseglists & segments.segmentlistdict((instrument, segments.segmentlist([segments.segment(t-offsetvector[instrument]-60, t-offsetvector[instrument]+60)])) for instrument in self.vetoseglists)), file=f)
717
+
718
+ #
719
+ # done
720
+ #
721
+
722
+ return fig,
723
+
724
+
725
+ #
726
+ # =============================================================================
727
+ #
728
+ # Main
729
+ #
730
+ # =============================================================================
731
+ #
732
+
733
+
734
+ def group_files(filenames, verbose = False):
735
+ # figure out which files are injection runs and which aren't
736
+ injection_filenames = []
737
+ noninjection_filenames = []
738
+ for n, filename in enumerate(filenames):
739
+ if verbose:
740
+ print("%d/%d: %s" % (n + 1, len(filenames), filename), file=sys.stderr)
741
+ connection = sqlite3.connect(filename)
742
+ if "sim_burst" in dbtables.get_table_names(connection):
743
+ if verbose:
744
+ print("\t--> injections", file=sys.stderr)
745
+ injection_filenames.append(filename)
746
+ else:
747
+ if verbose:
748
+ print("\t--> non-injections", file=sys.stderr)
749
+ noninjection_filenames.append(filename)
750
+ connection.close()
751
+ return injection_filenames, noninjection_filenames
752
+
753
+
754
+ def pack_files(filenames, n_threads, verbose = False):
755
+ bins = packing.BiggestIntoEmptiest([packing.Bin() for n in range(n_threads)])
756
+ bins.packlist((os.stat(filename).st_size, filename) for filename in filenames)
757
+ return [bin.objects for bin in bins.bins]
758
+
759
+
760
+ def import_dumps(filenames, verbose = False):
761
+ rate_vs_threshold = None
762
+ efficiency = None
763
+ for filename in filenames:
764
+ if verbose:
765
+ print("\t%s ..." % filename, end=' ', file=sys.stderr)
766
+ dump = pickle.load(open(filename))
767
+ if type(dump) is RateVsThreshold:
768
+ if verbose:
769
+ print("found rate vs. threshold data", file=sys.stderr)
770
+ if rate_vs_threshold is None:
771
+ rate_vs_threshold = dump
772
+ else:
773
+ rate_vs_threshold += dump
774
+ elif type(dump) is Efficiency:
775
+ if verbose:
776
+ print("found efficiency data", file=sys.stderr)
777
+ if efficiency is None:
778
+ efficiency = dump
779
+ else:
780
+ efficiency += dump
781
+ else:
782
+ raise ValueError("cannot determine contents of %s" % filename)
783
+ return rate_vs_threshold, efficiency
784
+
785
+
786
+ def process_file(filename, products, live_time_program, tmp_path = None, veto_segments_name = None, verbose = False):
787
+ #
788
+ # connect to database and summarize contents
789
+ #
790
+
791
+ working_filename = dbtables.get_connection_filename(filename, tmp_path = tmp_path, verbose = verbose)
792
+ contents = SnglBurstUtils.CoincDatabase(sqlite3.connect(str(working_filename)), live_time_program, search = "StringCusp", veto_segments_name = veto_segments_name)
793
+ if verbose:
794
+ SnglBurstUtils.summarize_coinc_database(contents, filename = working_filename)
795
+
796
+ #
797
+ # augment summary with extra stuff we need. the filename
798
+ # is recorded for dumping debuggin information related to
799
+ # missed injections. if burca was run with the
800
+ # --coincidence-segments option then the value is copied
801
+ # into a segmentlistdict to facilitate the computation of
802
+ # livetime
803
+ #
804
+
805
+ contents.filename = filename
806
+
807
+ contents.coincidence_segments = ligolwprocess.get_process_params(contents.xmldoc, "lalburst_coinc", "--coincidence-segments")
808
+ if contents.coincidence_segments:
809
+ # as a side-effect, this enforces the rule that
810
+ # burca has been run on the input file exactly once
811
+ contents.coincidence_segments, = contents.coincidence_segments
812
+ # FIXME: remove when LAL accepts unicode
813
+ contents.coincidence_segments = contents.coincidence_segments.encode('utf-8')
814
+ contents.coincidence_segments = segments.segmentlistdict.fromkeys(contents.seglists, segmentsUtils.from_range_strings(contents.coincidence_segments.split(","), boundtype = dbtables.lsctables.LIGOTimeGPS).coalesce())
815
+ else:
816
+ contents.coincidence_segments = None
817
+
818
+ #
819
+ # process contents
820
+ #
821
+
822
+ for n, product in enumerate(products):
823
+ if verbose:
824
+ print("%s: adding to product %d ..." % (working_filename, n), file=sys.stderr)
825
+ product.add_contents(contents, verbose = verbose)
826
+
827
+ #
828
+ # close
829
+ #
830
+
831
+ contents.connection.close()
832
+ dbtables.discard_connection_filename(filename, working_filename, verbose = verbose)
833
+
834
+
835
+ def process_files(filenames, products, live_time_program, tmp_path = None, veto_segments_name = None, verbose = False):
836
+ for n, filename in enumerate(filenames):
837
+ if verbose:
838
+ print("%d/%d: %s" % (n + 1, len(filenames), filename), file=sys.stderr)
839
+ process_file(filename, products, live_time_program, tmp_path = tmp_path, veto_segments_name = veto_segments_name, verbose = verbose)
840
+
841
+
842
+ def write_products(products, prefix, image_formats, verbose = False):
843
+ format = "%%s%%0%dd%%s.%%s" % (int(math.log10(max(len(products) - 1, 1))) + 1)
844
+ n = 1
845
+ while products:
846
+ if verbose:
847
+ print("finishing product %d ..." % (n - 1), file=sys.stderr)
848
+ product = products.pop(0)
849
+ # write dump of raw data
850
+ filename = "%sdump_%d.pickle" % (prefix, n)
851
+ if verbose:
852
+ print("\twriting %s ..." % filename, end=' ', file=sys.stderr)
853
+ pickle.dump(product, open(filename, "w"))
854
+ if verbose:
855
+ print("done", file=sys.stderr)
856
+ # write plots
857
+ for m, fig in enumerate(product.finish()):
858
+ for ext in image_formats:
859
+ filename = format % (prefix, n, chr(m + 97), ext)
860
+ if verbose:
861
+ print("\twriting %s ..." % filename, end=' ', file=sys.stderr)
862
+ fig.savefig(filename)
863
+ if verbose:
864
+ print("done", file=sys.stderr)
865
+ n += 1
866
+
867
+
868
+ options, filenames = parse_command_line()
869
+
870
+
871
+ print("""Command line:
872
+
873
+ $ %s
874
+ """ % " ".join(sys.argv), file=sys.stderr)
875
+ if options.open_box:
876
+ print("""
877
+
878
+ ---=== !! BOX IS OPEN !! ===---
879
+
880
+ PRESS CTRL-C SOON IF YOU DIDN'T MEAN TO OPEN THE BOX
881
+
882
+ """, file=sys.stderr)
883
+
884
+
885
+ #
886
+ # figure out which files are from injection runs and which aren't
887
+ #
888
+
889
+
890
+ if options.verbose:
891
+ print("Identifying injection and non-injection databases ...", file=sys.stderr)
892
+ injection_filenames, noninjection_filenames = group_files(filenames, verbose = options.verbose)
893
+
894
+
895
+ #
896
+ # intialize the data collection objects
897
+ #
898
+
899
+
900
+ if options.import_dump:
901
+ if options.verbose:
902
+ print("Loading dump files ...", file=sys.stderr)
903
+ rate_vs_threshold, efficiency = import_dumps(options.import_dump, verbose = options.verbose)
904
+ # override box openness in rate-vs-threshold data
905
+ if rate_vs_threshold is not None:
906
+ rate_vs_threshold.open_box = options.open_box
907
+ if efficiency is not None and options.open_box and not efficiency.open_box:
908
+ raise ValueError("Box is open but one or more imjported efficiency dump file was generated in closed-box mode. Efficiency must be re-measured in open-box mode to use correct detection threshold.")
909
+ else:
910
+ rate_vs_threshold, efficiency = None, None
911
+
912
+
913
+ #
914
+ # collect zero-lag and background statistics
915
+ #
916
+
917
+
918
+ if options.detection_threshold is None:
919
+ if options.verbose:
920
+ print("Collecting background and zero-lag statistics ...", file=sys.stderr)
921
+
922
+ children = {}
923
+ rate_vs_thresholds = []
924
+ # group files into bins of about the same total number of bytes.
925
+ # don't try to create more groups than there are files
926
+ for filenames in pack_files(noninjection_filenames, min(options.threads, len(noninjection_filenames)), verbose = options.verbose):
927
+ # shuffle file names to avoid copying all the big files
928
+ # into the scratch space at the same time
929
+ random.shuffle(filenames)
930
+ # launch thread
931
+ r, w = os.pipe()
932
+ r, w = os.fdopen(r, "r", 0), os.fdopen(w, "w", 0)
933
+ pid = os.fork()
934
+ if pid == 0:
935
+ # we're the child process
936
+ r.close()
937
+ try:
938
+ # create a new book-keeping object
939
+ rate_vs_threshold = RateVsThreshold(options.open_box, record_background = options.record_background, record_candidates = options.record_candidates)
940
+ process_files(filenames, [rate_vs_threshold], options.live_time_program, tmp_path = options.tmp_space, veto_segments_name = options.vetoes_name, verbose = options.verbose)
941
+ pickle.dump(rate_vs_threshold, w)
942
+ except:
943
+ pickle.dump(traceback.format_exc(), w)
944
+ w.close()
945
+ sys.exit(1)
946
+ w.close()
947
+ sys.exit(0)
948
+ # we're not the child process
949
+ w.close()
950
+ children[r] = pid
951
+ # collect all children, report any exceptions that occured, combine
952
+ # results
953
+ while children:
954
+ for r in select.select(children.keys(), [], [])[0]:
955
+ process_output = pickle.load(r)
956
+ r.close()
957
+ pid, exit_status = os.waitpid(children.pop(r), 0)
958
+ if isinstance(process_output, RateVsThreshold):
959
+ if rate_vs_threshold is None:
960
+ rate_vs_threshold = process_output
961
+ else:
962
+ rate_vs_threshold += process_output
963
+ else:
964
+ print(process_output, file=sys.stderr)
965
+ del process_output
966
+ if exit_status:
967
+ sys.exit(exit_status)
968
+ if rate_vs_threshold is None:
969
+ raise ValueError("no non-injection data available: cannot determine detection threshold. provide non-injection data or set an explicit detection treshold. Consult --help for more information.")
970
+
971
+ # write data products
972
+ write_products([rate_vs_threshold], "string_rate_", options.image_formats, verbose = options.verbose)
973
+
974
+ # print summary information, and set detection threshold
975
+ if options.open_box:
976
+ try:
977
+ print("Zero-lag events: %d" % len(rate_vs_threshold.zero_lag), file=sys.stderr)
978
+ except OverflowError:
979
+ # python < 2.5 can't handle list-like things with more than 2**31 elements
980
+ # FIXME: remove when we can rely on python >= 2.5
981
+ print("Zero-lag events: %d" % rate_vs_threshold.zero_lag.n, file=sys.stderr)
982
+ print("Total time in zero-lag segments: %s s" % str(rate_vs_threshold.zero_lag_time), file=sys.stderr)
983
+ print("Time-slide events: %d" % rate_vs_threshold.n_background, file=sys.stderr)
984
+ print("Total time in time-slide segments: %s s" % str(rate_vs_threshold.background_time), file=sys.stderr)
985
+ if options.open_box:
986
+ detection_threshold = rate_vs_threshold.zero_lag[-1]
987
+ print("Likelihood ratio for highest-ranked zero-lag survivor: %.9g" % detection_threshold, file=sys.stderr)
988
+ else:
989
+ # if the background and zero-lag live times are identical,
990
+ # then the loudest zero-lag event is simulated by the
991
+ # loudest background event so we want entry -1 in the
992
+ # sorted list; if the background livetime is twice the
993
+ # zero-lag live time then the loudest zero-lag event is
994
+ # simulated by the next-to-loudest background event so we
995
+ # want entry -2 in the sorted list.
996
+ detection_threshold = sorted(rate_vs_threshold.background)[-int(round(rate_vs_threshold.background_time / rate_vs_threshold.zero_lag_time))]
997
+ print("Simulated \\log \\Lambda for highest-ranked zero-lag survivor: %.9g" % detection_threshold, file=sys.stderr)
998
+ else:
999
+ detection_threshold = options.detection_threshold
1000
+ print("Likelihood ratio for highest-ranked zero-lag survivor from command line: %.9g" % detection_threshold, file=sys.stderr)
1001
+
1002
+
1003
+ #
1004
+ # measure detection efficiency based on loudest (simulated, if box is
1005
+ # closed) zero-lag survivor
1006
+ #
1007
+
1008
+
1009
+ if options.verbose:
1010
+ print("Collecting efficiency statistics ...", file=sys.stderr)
1011
+ children = {}
1012
+ # group files into bins of about the same total number of bytes. don't try
1013
+ # to create more groups than there are files
1014
+ for filenames in pack_files(injection_filenames, min(options.threads, len(injection_filenames)), verbose = options.verbose):
1015
+ # shuffle file names to avoid copying all the big files
1016
+ # into the scratch space at the same time
1017
+ random.shuffle(filenames)
1018
+ # launch thread
1019
+ r, w = os.pipe()
1020
+ r, w = os.fdopen(r, "r", 0), os.fdopen(w, "w", 0)
1021
+ pid = os.fork()
1022
+ if pid == 0:
1023
+ # we're the child process
1024
+ r.close()
1025
+ try:
1026
+ # create a new book-keeping object
1027
+ efficiency = Efficiency(detection_threshold, options.cal_uncertainty, options.injections_bin_size, options.open_box)
1028
+ process_files(filenames, [efficiency], options.live_time_program, tmp_path = options.tmp_space, veto_segments_name = options.vetoes_name, verbose = options.verbose)
1029
+ pickle.dump(efficiency, w)
1030
+ except:
1031
+ pickle.dump(traceback.format_exc(), w)
1032
+ w.close()
1033
+ sys.exit(1)
1034
+ w.close()
1035
+ sys.exit(0)
1036
+ # we're not the child process
1037
+ w.close()
1038
+ children[r] = pid
1039
+ # collect all children, report any exceptions that occured, combine
1040
+ # results
1041
+ while children:
1042
+ for r in select.select(children.keys(), [], [])[0]:
1043
+ process_output = pickle.load(r)
1044
+ r.close()
1045
+ pid, exit_status = os.waitpid(children.pop(r), 0)
1046
+ if isinstance(process_output, Efficiency):
1047
+ if efficiency is None:
1048
+ efficiency = process_output
1049
+ else:
1050
+ efficiency += process_output
1051
+ else:
1052
+ print(process_output, file=sys.stderr)
1053
+ del process_output
1054
+ if exit_status:
1055
+ sys.exit(exit_status)
1056
+ # write data products
1057
+ if efficiency is not None:
1058
+ write_products([efficiency], "string_efficiency_", options.image_formats, verbose = options.verbose)
1059
+ else:
1060
+ if options.verbose:
1061
+ print("no injection data available, not writing efficiency data products.", file=sys.stderr)
1062
+
1063
+ if options.verbose:
1064
+ print("done.", file=sys.stderr)