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.
- lal/__init__.py +145 -0
- lal/_lal.cpython-312-x86_64-linux-gnu.so +0 -0
- lal/_lal_swig.py +12 -0
- lal/antenna.py +1200 -0
- lal/git_version.py +64 -0
- lal/gpstime.py +233 -0
- lal/iterutils.py +408 -0
- lal/pipeline.py +3139 -0
- lal/rate.py +2455 -0
- lal/series.py +244 -0
- lal/utils/__init__.py +29 -0
- lal/utils/cache.py +379 -0
- lal/utils/series.py +277 -0
- lalapps/__init__.py +26 -0
- lalapps/bin/lal_cache +0 -0
- lalapps/bin/lal_fftw_wisdom +0 -0
- lalapps/bin/lal_fftwf_wisdom +0 -0
- lalapps/bin/lal_simd_detect +0 -0
- lalapps/bin/lal_tconvert +0 -0
- lalapps/bin/lal_version +0 -0
- lalapps/bin/lalapps_ComputeAntennaPattern +16 -0
- lalapps/bin/lalapps_ComputeFstatBenchmark +16 -0
- lalapps/bin/lalapps_ComputeFstatLatticeCount +16 -0
- lalapps/bin/lalapps_ComputeFstatMCUpperLimit +16 -0
- lalapps/bin/lalapps_ComputeFstatistic_v2 +16 -0
- lalapps/bin/lalapps_ComputePSD +16 -0
- lalapps/bin/lalapps_CopySFTs +16 -0
- lalapps/bin/lalapps_DistanceVsMass +0 -0
- lalapps/bin/lalapps_DriveHoughMulti +16 -0
- lalapps/bin/lalapps_FstatMetric_v2 +16 -0
- lalapps/bin/lalapps_HierarchSearchGCT +16 -0
- lalapps/bin/lalapps_HierarchicalSearch +16 -0
- lalapps/bin/lalapps_MakeSFTDAG +16 -0
- lalapps/bin/lalapps_MakeSFTs +16 -0
- lalapps/bin/lalapps_Makefakedata_v4 +16 -0
- lalapps/bin/lalapps_Makefakedata_v5 +16 -0
- lalapps/bin/lalapps_PredictFstat +16 -0
- lalapps/bin/lalapps_PrintDetectorState +16 -0
- lalapps/bin/lalapps_SFTclean +16 -0
- lalapps/bin/lalapps_SFTvalidate +16 -0
- lalapps/bin/lalapps_StringAddFrame +0 -0
- lalapps/bin/lalapps_StringSearch +0 -0
- lalapps/bin/lalapps_Weave +16 -0
- lalapps/bin/lalapps_WeaveCompare +16 -0
- lalapps/bin/lalapps_WeaveConcat +16 -0
- lalapps/bin/lalapps_WeaveSetup +16 -0
- lalapps/bin/lalapps_WriteSFTsfromSFDBs +16 -0
- lalapps/bin/lalapps_animate +0 -0
- lalapps/bin/lalapps_binj +0 -0
- lalapps/bin/lalapps_blindinj +0 -0
- lalapps/bin/lalapps_cache +16 -0
- lalapps/bin/lalapps_calfacs +0 -0
- lalapps/bin/lalapps_cbc_stochasticbank +0 -0
- lalapps/bin/lalapps_chirplen +0 -0
- lalapps/bin/lalapps_coh_PTF_inspiral +0 -0
- lalapps/bin/lalapps_coinj +0 -0
- lalapps/bin/lalapps_combine_crosscorr_toplists +16 -0
- lalapps/bin/lalapps_compareFstats +16 -0
- lalapps/bin/lalapps_compareSFTs +16 -0
- lalapps/bin/lalapps_create_time_correction_ephemeris +16 -0
- lalapps/bin/lalapps_dumpSFT +16 -0
- lalapps/bin/lalapps_effdist +0 -0
- lalapps/bin/lalapps_exc_resp +0 -0
- lalapps/bin/lalapps_fftw_wisdom +16 -0
- lalapps/bin/lalapps_fftwf_wisdom +16 -0
- lalapps/bin/lalapps_fits_header_getval +16 -0
- lalapps/bin/lalapps_fits_header_list +16 -0
- lalapps/bin/lalapps_fits_overview +16 -0
- lalapps/bin/lalapps_fits_table_list +16 -0
- lalapps/bin/lalapps_fr_ninja +0 -0
- lalapps/bin/lalapps_frextr +0 -0
- lalapps/bin/lalapps_frinfo +0 -0
- lalapps/bin/lalapps_frjoin +0 -0
- lalapps/bin/lalapps_frread +0 -0
- lalapps/bin/lalapps_frview +0 -0
- lalapps/bin/lalapps_gwf2xml +0 -0
- lalapps/bin/lalapps_heterodyne_pulsar +16 -0
- lalapps/bin/lalapps_inspawgfile +0 -0
- lalapps/bin/lalapps_inspfrinj +0 -0
- lalapps/bin/lalapps_inspinj +0 -0
- lalapps/bin/lalapps_inspiralDistance +0 -0
- lalapps/bin/lalapps_knope +16 -0
- lalapps/bin/lalapps_knope_automation_script +16 -0
- lalapps/bin/lalapps_knope_collate_results +16 -0
- lalapps/bin/lalapps_knope_result_page +16 -0
- lalapps/bin/lalapps_makeblindinj +85 -0
- lalapps/bin/lalapps_makeblindinj_himass +67 -0
- lalapps/bin/lalapps_ninja +0 -0
- lalapps/bin/lalapps_path2cache +16 -0
- lalapps/bin/lalapps_power +0 -0
- lalapps/bin/lalapps_pulsar_crosscorr_v2 +16 -0
- lalapps/bin/lalapps_pulsar_frequency_evolution +16 -0
- lalapps/bin/lalapps_pulsar_parameter_estimation_nested +16 -0
- lalapps/bin/lalapps_random_bank +0 -0
- lalapps/bin/lalapps_randombank +0 -0
- lalapps/bin/lalapps_run_pulsar_crosscorr_v2 +16 -0
- lalapps/bin/lalapps_searchsum2cache +16 -0
- lalapps/bin/lalapps_spec_avg +16 -0
- lalapps/bin/lalapps_spec_avg_long +16 -0
- lalapps/bin/lalapps_spec_coherence +16 -0
- lalapps/bin/lalapps_spininj +0 -0
- lalapps/bin/lalapps_splitSFTs +16 -0
- lalapps/bin/lalapps_splitbank +0 -0
- lalapps/bin/lalapps_ssbtodetector +16 -0
- lalapps/bin/lalapps_synthesizeBstatMC +16 -0
- lalapps/bin/lalapps_synthesizeLVStats +16 -0
- lalapps/bin/lalapps_synthesizeTransientStats +16 -0
- lalapps/bin/lalapps_tconvert +16 -0
- lalapps/bin/lalapps_tmpltbank +0 -0
- lalapps/bin/lalapps_version +0 -0
- lalapps/bin/lalapps_xtefitstoframe +0 -0
- lalapps/bin/lalburst_version +0 -0
- lalapps/bin/lalfr-cat +0 -0
- lalapps/bin/lalfr-cksum +0 -0
- lalapps/bin/lalfr-cut +0 -0
- lalapps/bin/lalfr-dump +0 -0
- lalapps/bin/lalfr-fmt +0 -0
- lalapps/bin/lalfr-paste +0 -0
- lalapps/bin/lalfr-print +0 -0
- lalapps/bin/lalfr-split +0 -0
- lalapps/bin/lalfr-stat +0 -0
- lalapps/bin/lalfr-stream +0 -0
- lalapps/bin/lalfr-vis +0 -0
- lalapps/bin/lalframe_version +0 -0
- lalapps/bin/lalinference_bench +0 -0
- lalapps/bin/lalinference_burst +0 -0
- lalapps/bin/lalinference_datadump +0 -0
- lalapps/bin/lalinference_injectedlike +0 -0
- lalapps/bin/lalinference_mpi_wrapper +59 -0
- lalapps/bin/lalinference_nest +0 -0
- lalapps/bin/lalinference_version +0 -0
- lalapps/bin/lalinspiral_version +0 -0
- lalapps/bin/lalmetaio_version +0 -0
- lalapps/bin/lalpulsar_ComputeAntennaPattern +0 -0
- lalapps/bin/lalpulsar_ComputeFstatBenchmark +0 -0
- lalapps/bin/lalpulsar_ComputeFstatLatticeCount +0 -0
- lalapps/bin/lalpulsar_ComputeFstatMCUpperLimit +0 -0
- lalapps/bin/lalpulsar_ComputeFstatistic_v2 +0 -0
- lalapps/bin/lalpulsar_ComputePSD +0 -0
- lalapps/bin/lalpulsar_DriveHoughMulti +0 -0
- lalapps/bin/lalpulsar_FstatMetric_v2 +0 -0
- lalapps/bin/lalpulsar_HierarchSearchGCT +0 -0
- lalapps/bin/lalpulsar_HierarchicalSearch +0 -0
- lalapps/bin/lalpulsar_MakeSFTs +0 -0
- lalapps/bin/lalpulsar_Makefakedata_v4 +0 -0
- lalapps/bin/lalpulsar_Makefakedata_v5 +0 -0
- lalapps/bin/lalpulsar_PredictFstat +0 -0
- lalapps/bin/lalpulsar_PrintDetectorState +0 -0
- lalapps/bin/lalpulsar_SFTclean +0 -0
- lalapps/bin/lalpulsar_SFTvalidate +0 -0
- lalapps/bin/lalpulsar_Weave +0 -0
- lalapps/bin/lalpulsar_WeaveCompare +0 -0
- lalapps/bin/lalpulsar_WeaveConcat +0 -0
- lalapps/bin/lalpulsar_WeaveSetup +0 -0
- lalapps/bin/lalpulsar_WriteSFTsfromSFDBs +0 -0
- lalapps/bin/lalpulsar_compareFstats +0 -0
- lalapps/bin/lalpulsar_compareSFTs +0 -0
- lalapps/bin/lalpulsar_create_time_correction_ephemeris +0 -0
- lalapps/bin/lalpulsar_crosscorr_v2 +0 -0
- lalapps/bin/lalpulsar_dumpSFT +0 -0
- lalapps/bin/lalpulsar_fits_header_getval +0 -0
- lalapps/bin/lalpulsar_fits_header_list +0 -0
- lalapps/bin/lalpulsar_fits_overview +0 -0
- lalapps/bin/lalpulsar_fits_table_list +0 -0
- lalapps/bin/lalpulsar_frequency_evolution +0 -0
- lalapps/bin/lalpulsar_heterodyne +0 -0
- lalapps/bin/lalpulsar_parameter_estimation_nested +0 -0
- lalapps/bin/lalpulsar_spec_avg +0 -0
- lalapps/bin/lalpulsar_spec_avg_long +0 -0
- lalapps/bin/lalpulsar_spec_coherence +0 -0
- lalapps/bin/lalpulsar_splitSFTs +0 -0
- lalapps/bin/lalpulsar_ssbtodetector +0 -0
- lalapps/bin/lalpulsar_synthesizeBstatMC +0 -0
- lalapps/bin/lalpulsar_synthesizeLVStats +0 -0
- lalapps/bin/lalpulsar_synthesizeTransientStats +0 -0
- lalapps/bin/lalpulsar_version +0 -0
- lalapps/bin/lalsim-bh-qnmode +0 -0
- lalapps/bin/lalsim-bh-ringdown +0 -0
- lalapps/bin/lalsim-bh-sphwf +0 -0
- lalapps/bin/lalsim-burst +0 -0
- lalapps/bin/lalsim-detector-noise +0 -0
- lalapps/bin/lalsim-detector-strain +0 -0
- lalapps/bin/lalsim-inject +0 -0
- lalapps/bin/lalsim-inspiral +0 -0
- lalapps/bin/lalsim-ns-eos-table +0 -0
- lalapps/bin/lalsim-ns-mass-radius +0 -0
- lalapps/bin/lalsim-ns-params +0 -0
- lalapps/bin/lalsim-sgwb +0 -0
- lalapps/bin/lalsim-unicorn +0 -0
- lalapps/bin/lalsimulation_version +0 -0
- lalapps/cosmicstring.py +691 -0
- lalapps/data/BNSMasses.dat +65022 -0
- lalapps/data/CorrelationMatrix.csv +15 -0
- lalapps/data/LALSimNeutronStarEOS_ABHT_QMC_RMF1_META.dat +1882 -0
- lalapps/data/LALSimNeutronStarEOS_ABHT_QMC_RMF2_META.dat +1939 -0
- lalapps/data/LALSimNeutronStarEOS_ABHT_QMC_RMF3_META.dat +1784 -0
- lalapps/data/LALSimNeutronStarEOS_ABHT_QMC_RMF4_META.dat +2074 -0
- lalapps/data/LALSimNeutronStarEOS_ALF1.dat +435 -0
- lalapps/data/LALSimNeutronStarEOS_ALF2.dat +453 -0
- lalapps/data/LALSimNeutronStarEOS_ALF3.dat +441 -0
- lalapps/data/LALSimNeutronStarEOS_ALF4.dat +441 -0
- lalapps/data/LALSimNeutronStarEOS_AP1.dat +212 -0
- lalapps/data/LALSimNeutronStarEOS_AP2.dat +212 -0
- lalapps/data/LALSimNeutronStarEOS_AP3.dat +212 -0
- lalapps/data/LALSimNeutronStarEOS_AP4.dat +210 -0
- lalapps/data/LALSimNeutronStarEOS_APR.dat +500 -0
- lalapps/data/LALSimNeutronStarEOS_APR4_EPP.dat +1447 -0
- lalapps/data/LALSimNeutronStarEOS_BBB2.dat +84 -0
- lalapps/data/LALSimNeutronStarEOS_BGN1H1.dat +123 -0
- lalapps/data/LALSimNeutronStarEOS_BHF_BBB2.dat +499 -0
- lalapps/data/LALSimNeutronStarEOS_BL_CHIRAL_META.dat +1534 -0
- lalapps/data/LALSimNeutronStarEOS_BPAL12.dat +61 -0
- lalapps/data/LALSimNeutronStarEOS_BSK19.dat +310 -0
- lalapps/data/LALSimNeutronStarEOS_BSK20.dat +310 -0
- lalapps/data/LALSimNeutronStarEOS_BSK21.dat +310 -0
- lalapps/data/LALSimNeutronStarEOS_ENG.dat +108 -0
- lalapps/data/LALSimNeutronStarEOS_FPS.dat +129 -0
- lalapps/data/LALSimNeutronStarEOS_GMSR_BSK14_BSK24.dat +1010 -0
- lalapps/data/LALSimNeutronStarEOS_GMSR_DHSL59_BSK24.dat +1009 -0
- lalapps/data/LALSimNeutronStarEOS_GMSR_DHSL69_BSK24.dat +1009 -0
- lalapps/data/LALSimNeutronStarEOS_GMSR_F0_BSK24.dat +1010 -0
- lalapps/data/LALSimNeutronStarEOS_GMSR_H1_BSK24.dat +1009 -0
- lalapps/data/LALSimNeutronStarEOS_GMSR_H2_BSK24.dat +1010 -0
- lalapps/data/LALSimNeutronStarEOS_GMSR_H3_BSK24.dat +1010 -0
- lalapps/data/LALSimNeutronStarEOS_GMSR_H4_BSK24.dat +1010 -0
- lalapps/data/LALSimNeutronStarEOS_GMSR_H5_BSK24.dat +1009 -0
- lalapps/data/LALSimNeutronStarEOS_GMSR_LN55_BSK24.dat +1010 -0
- lalapps/data/LALSimNeutronStarEOS_GMSR_SLY5_BSK24.dat +1010 -0
- lalapps/data/LALSimNeutronStarEOS_GNH3.dat +71 -0
- lalapps/data/LALSimNeutronStarEOS_GPPVA_DD2_BSK24.dat +1009 -0
- lalapps/data/LALSimNeutronStarEOS_GPPVA_DDME2_BSK24.dat +1010 -0
- lalapps/data/LALSimNeutronStarEOS_GPPVA_FSU2H_BSK24.dat +1009 -0
- lalapps/data/LALSimNeutronStarEOS_GPPVA_FSU2_BSK24.dat +1010 -0
- lalapps/data/LALSimNeutronStarEOS_GPPVA_NL3WRL55_BSK24.dat +1010 -0
- lalapps/data/LALSimNeutronStarEOS_GS1.dat +136 -0
- lalapps/data/LALSimNeutronStarEOS_GS2.dat +100 -0
- lalapps/data/LALSimNeutronStarEOS_H1.dat +114 -0
- lalapps/data/LALSimNeutronStarEOS_H2.dat +114 -0
- lalapps/data/LALSimNeutronStarEOS_H3.dat +98 -0
- lalapps/data/LALSimNeutronStarEOS_H4.dat +664 -0
- lalapps/data/LALSimNeutronStarEOS_H5.dat +703 -0
- lalapps/data/LALSimNeutronStarEOS_H6.dat +509 -0
- lalapps/data/LALSimNeutronStarEOS_H7.dat +703 -0
- lalapps/data/LALSimNeutronStarEOS_HQC18.dat +388 -0
- lalapps/data/LALSimNeutronStarEOS_KDE0V.dat +500 -0
- lalapps/data/LALSimNeutronStarEOS_KDE0V1.dat +500 -0
- lalapps/data/LALSimNeutronStarEOS_KDE0V1_BSK24.dat +1388 -0
- lalapps/data/LALSimNeutronStarEOS_KDE0V_BSK24.dat +1398 -0
- lalapps/data/LALSimNeutronStarEOS_MPA1.dat +102 -0
- lalapps/data/LALSimNeutronStarEOS_MS1.dat +122 -0
- lalapps/data/LALSimNeutronStarEOS_MS1B.dat +126 -0
- lalapps/data/LALSimNeutronStarEOS_MS1B_PP.dat +1447 -0
- lalapps/data/LALSimNeutronStarEOS_MS1_PP.dat +1447 -0
- lalapps/data/LALSimNeutronStarEOS_MS2.dat +48 -0
- lalapps/data/LALSimNeutronStarEOS_PAL6.dat +148 -0
- lalapps/data/LALSimNeutronStarEOS_PCL2.dat +134 -0
- lalapps/data/LALSimNeutronStarEOS_PCP_BSK24_BSK24.dat +1010 -0
- lalapps/data/LALSimNeutronStarEOS_PS.dat +165 -0
- lalapps/data/LALSimNeutronStarEOS_QMC700.dat +117 -0
- lalapps/data/LALSimNeutronStarEOS_RG_SLY4_BSK24.dat +1010 -0
- lalapps/data/LALSimNeutronStarEOS_RS.dat +500 -0
- lalapps/data/LALSimNeutronStarEOS_RS_BSK24.dat +1356 -0
- lalapps/data/LALSimNeutronStarEOS_SK255.dat +500 -0
- lalapps/data/LALSimNeutronStarEOS_SK255_BSK24.dat +1066 -0
- lalapps/data/LALSimNeutronStarEOS_SK272.dat +500 -0
- lalapps/data/LALSimNeutronStarEOS_SKA.dat +500 -0
- lalapps/data/LALSimNeutronStarEOS_SKA_BSK24.dat +1433 -0
- lalapps/data/LALSimNeutronStarEOS_SKB.dat +500 -0
- lalapps/data/LALSimNeutronStarEOS_SKB_BSK24.dat +1373 -0
- lalapps/data/LALSimNeutronStarEOS_SKI2.dat +500 -0
- lalapps/data/LALSimNeutronStarEOS_SKI2_BSK24.dat +1348 -0
- lalapps/data/LALSimNeutronStarEOS_SKI3.dat +500 -0
- lalapps/data/LALSimNeutronStarEOS_SKI3_BSK24.dat +1355 -0
- lalapps/data/LALSimNeutronStarEOS_SKI4.dat +497 -0
- lalapps/data/LALSimNeutronStarEOS_SKI4_BSK24.dat +1348 -0
- lalapps/data/LALSimNeutronStarEOS_SKI5.dat +500 -0
- lalapps/data/LALSimNeutronStarEOS_SKI6.dat +500 -0
- lalapps/data/LALSimNeutronStarEOS_SKI6_BSK24.dat +1358 -0
- lalapps/data/LALSimNeutronStarEOS_SKMP.dat +498 -0
- lalapps/data/LALSimNeutronStarEOS_SKOP.dat +500 -0
- lalapps/data/LALSimNeutronStarEOS_SKOP_BSK24.dat +1373 -0
- lalapps/data/LALSimNeutronStarEOS_SLY.dat +99 -0
- lalapps/data/LALSimNeutronStarEOS_SLY2.dat +500 -0
- lalapps/data/LALSimNeutronStarEOS_SLY230A.dat +500 -0
- lalapps/data/LALSimNeutronStarEOS_SLY230A_BSK24.dat +1116 -0
- lalapps/data/LALSimNeutronStarEOS_SLY2_BSK24.dat +1106 -0
- lalapps/data/LALSimNeutronStarEOS_SLY4.dat +100 -0
- lalapps/data/LALSimNeutronStarEOS_SLY9.dat +498 -0
- lalapps/data/LALSimNeutronStarEOS_SLY9_BSK24.dat +1083 -0
- lalapps/data/LALSimNeutronStarEOS_SQM1.dat +176 -0
- lalapps/data/LALSimNeutronStarEOS_SQM2.dat +180 -0
- lalapps/data/LALSimNeutronStarEOS_SQM3.dat +176 -0
- lalapps/data/LALSimNeutronStarEOS_WFF1.dat +109 -0
- lalapps/data/LALSimNeutronStarEOS_WFF2.dat +109 -0
- lalapps/data/LALSimNeutronStarEOS_WFF3.dat +107 -0
- lalapps/data/LALSimNeutronStarEOS_XMLSLZ_DDLZ1_BSK24.dat +1227 -0
- lalapps/data/LALSimNeutronStarEOS_XMLSLZ_DDME2_BSK24.dat +1272 -0
- lalapps/data/LALSimNeutronStarEOS_XMLSLZ_DDMEX_BSK24.dat +1280 -0
- lalapps/data/LALSimNeutronStarEOS_XMLSLZ_GM1_BSK24.dat +1288 -0
- lalapps/data/LALSimNeutronStarEOS_XMLSLZ_MTVTC_BSK24.dat +1288 -0
- lalapps/data/LALSimNeutronStarEOS_XMLSLZ_NL3_BSK24.dat +1230 -0
- lalapps/data/LALSimNeutronStarEOS_XMLSLZ_PKDD_BSK24.dat +1288 -0
- lalapps/data/LALSimNeutronStarEOS_XMLSLZ_TM1_BSK24.dat +1288 -0
- lalapps/data/LALSimNeutronStarEOS_XMLSLZ_TW99_BSK24.dat +1288 -0
- lalapps/data/LIGO-P1200087-v18-AdV_BNS_OPTIMIZED.txt +3000 -0
- lalapps/data/LIGO-P1200087-v18-AdV_DESIGN.txt +3000 -0
- lalapps/data/LIGO-P1200087-v18-AdV_EARLY_HIGH.txt +3000 -0
- lalapps/data/LIGO-P1200087-v18-AdV_EARLY_LOW.txt +3000 -0
- lalapps/data/LIGO-P1200087-v18-AdV_LATE_HIGH.txt +3000 -0
- lalapps/data/LIGO-P1200087-v18-AdV_LATE_LOW.txt +3000 -0
- lalapps/data/LIGO-P1200087-v18-AdV_MID_HIGH.txt +3000 -0
- lalapps/data/LIGO-P1200087-v18-AdV_MID_LOW.txt +3000 -0
- lalapps/data/LIGO-P1200087-v18-aLIGO_BNS_OPTIMIZED.txt +3000 -0
- lalapps/data/LIGO-P1200087-v18-aLIGO_DESIGN.txt +3000 -0
- lalapps/data/LIGO-P1200087-v18-aLIGO_EARLY_HIGH.txt +3000 -0
- lalapps/data/LIGO-P1200087-v18-aLIGO_EARLY_LOW.txt +3000 -0
- lalapps/data/LIGO-P1200087-v18-aLIGO_LATE_HIGH.txt +3000 -0
- lalapps/data/LIGO-P1200087-v18-aLIGO_LATE_LOW.txt +3000 -0
- lalapps/data/LIGO-P1200087-v18-aLIGO_MID_HIGH.txt +3000 -0
- lalapps/data/LIGO-P1200087-v18-aLIGO_MID_LOW.txt +3000 -0
- lalapps/data/LIGO-P1600143-v18-CE.txt +3000 -0
- lalapps/data/LIGO-P1600143-v18-CE_Pessimistic.txt +3000 -0
- lalapps/data/LIGO-P1600143-v18-CE_Wideband.txt +3000 -0
- lalapps/data/LIGO-P1600143-v18-ET_D.txt +3000 -0
- lalapps/data/LIGO-T0900288-v3-BHBH_20deg.txt +3000 -0
- lalapps/data/LIGO-T0900288-v3-High_Freq.txt +3000 -0
- lalapps/data/LIGO-T0900288-v3-NO_SRM.txt +3000 -0
- lalapps/data/LIGO-T0900288-v3-NSNS_Opt.txt +3000 -0
- lalapps/data/LIGO-T0900288-v3-ZERO_DET_high_P.txt +3000 -0
- lalapps/data/LIGO-T0900288-v3-ZERO_DET_low_P.txt +3000 -0
- lalapps/data/LIGO-T1600593-v1-KAGRA_Design.txt +4000 -0
- lalapps/data/LIGO-T1600593-v1-KAGRA_Early.txt +4000 -0
- lalapps/data/LIGO-T1600593-v1-KAGRA_Late.txt +4000 -0
- lalapps/data/LIGO-T1600593-v1-KAGRA_Mid.txt +4000 -0
- lalapps/data/LIGO-T1600593-v1-KAGRA_Opening.txt +4000 -0
- lalapps/data/LIGO-T1800042-v5-aLIGO_APLUS.txt +3000 -0
- lalapps/data/LIGO-T1800044-v5-aLIGO_DESIGN.txt +3000 -0
- lalapps/data/LIGO-T1800545-v1-AdV_O3low.txt +3000 -0
- lalapps/data/LIGO-T1800545-v1-AdV_O4.txt +3000 -0
- lalapps/data/LIGO-T1800545-v1-AdV_O4intermediate.txt +3000 -0
- lalapps/data/LIGO-T1800545-v1-KAGRA_128Mpc.txt +1000 -0
- lalapps/data/LIGO-T1800545-v1-KAGRA_25Mpc.txt +1000 -0
- lalapps/data/LIGO-T1800545-v1-KAGRA_80Mpc.txt +1000 -0
- lalapps/data/LIGO-T1800545-v1-aLIGO_140Mpc.txt +1000 -0
- lalapps/data/LIGO-T1800545-v1-aLIGO_175Mpc.txt +2792 -0
- lalapps/data/LIGO-T1800545-v1-aLIGO_O3low.txt +2792 -0
- lalapps/data/bimodalMeans.csv +3 -0
- lalapps/data/config_tiger_example.ini +150 -0
- lalapps/data/fiducialBBH.xml +67 -0
- lalapps/data/fiducialBNS.xml +67 -0
- lalapps/data/inspsrcs100Mpc.errors +38735 -0
- lalapps/data/lalinference_pipe_example.ini +573 -0
- lalapps/data/lib_pipe_example.ini +303 -0
- lalapps/data/power_pipe.ini +129 -0
- lalapps/data/unimodalMeans.csv +2 -0
- lalapps/git_version.py +64 -0
- lalburst/SimBurstUtils.py +324 -0
- lalburst/SnglBurstUtils.py +367 -0
- lalburst/__init__.py +7 -0
- lalburst/_lalburst.cpython-312-x86_64-linux-gnu.so +0 -0
- lalburst/_lalburst_swig.py +16 -0
- lalburst/binjfind.py +824 -0
- lalburst/bucluster.py +409 -0
- lalburst/burca.py +315 -0
- lalburst/burca_tailor.py +349 -0
- lalburst/cafe.py +579 -0
- lalburst/calc_likelihood.py +145 -0
- lalburst/cs_gamma.cpython-312-x86_64-linux-gnu.so +0 -0
- lalburst/date.py +118 -0
- lalburst/git_version.py +64 -0
- lalburst/offsetvector.py +278 -0
- lalburst/packing.py +170 -0
- lalburst/power.py +1457 -0
- lalburst/snglcluster.py +136 -0
- lalburst/snglcoinc.py +2637 -0
- lalburst/stringutils.py +607 -0
- lalburst/timeslides.py +236 -0
- lalframe/__init__.py +7 -0
- lalframe/_lalframe.cpython-312-x86_64-linux-gnu.so +0 -0
- lalframe/_lalframe_swig.py +14 -0
- lalframe/frread.py +324 -0
- lalframe/git_version.py +64 -0
- lalframe/utils/__init__.py +25 -0
- lalframe/utils/frtools.py +61 -0
- lalinference/__init__.py +7 -0
- lalinference/_bayespputils.cpython-312-x86_64-linux-gnu.so +0 -0
- lalinference/_lalinference.cpython-312-x86_64-linux-gnu.so +0 -0
- lalinference/_lalinference_swig.py +19 -0
- lalinference/bayespputils.py +7479 -0
- lalinference/bayestar/__init__.py +2 -0
- lalinference/bayestar/deprecation.py +72 -0
- lalinference/git_version.py +64 -0
- lalinference/imrtgr/__init__.py +0 -0
- lalinference/imrtgr/imrtgrutils.py +168 -0
- lalinference/imrtgr/nrutils.py +1366 -0
- lalinference/imrtgr/pneqns.py +250 -0
- lalinference/io/__init__.py +31 -0
- lalinference/io/hdf5.py +365 -0
- lalinference/lalinference_pipe_utils.py +3617 -0
- lalinference/nest2pos.py +151 -0
- lalinference/plot/__init__.py +34 -0
- lalinference/plot/spindisk.py +104 -0
- lalinference/tiger/__init__.py +0 -0
- lalinference/tiger/make_injtimes.py +634 -0
- lalinference/tiger/omegascans_dag.py +691 -0
- lalinference/tiger/postproc.py +1338 -0
- lalinference/wrapper.py +231 -0
- lalinspiral/__init__.py +7 -0
- lalinspiral/_lalinspiral.cpython-312-x86_64-linux-gnu.so +0 -0
- lalinspiral/_lalinspiral_swig.py +18 -0
- lalinspiral/_thinca.cpython-312-x86_64-linux-gnu.so +0 -0
- lalinspiral/git_version.py +64 -0
- lalinspiral/inspinjfind.py +485 -0
- lalinspiral/thinca.py +509 -0
- lalmetaio/__init__.py +7 -0
- lalmetaio/_lalmetaio.cpython-312-x86_64-linux-gnu.so +0 -0
- lalmetaio/_lalmetaio_swig.py +14 -0
- lalmetaio/git_version.py +64 -0
- lalpulsar/NstarTools.py +259 -0
- lalpulsar/PulsarParametersWrapper.py +938 -0
- lalpulsar/__init__.py +7 -0
- lalpulsar/_lalpulsar.cpython-312-x86_64-linux-gnu.so +0 -0
- lalpulsar/_lalpulsar_swig.py +17 -0
- lalpulsar/git_version.py +64 -0
- lalpulsar/knope_utils.py +6497 -0
- lalpulsar/lineFileParser.py +264 -0
- lalpulsar/metric_utils.py +78 -0
- lalpulsar/piecewise_model/__init__.py +7 -0
- lalpulsar/piecewise_model/basis_functions.py +156 -0
- lalpulsar/piecewise_model/class_definitions.py +323 -0
- lalpulsar/piecewise_model/errors.py +37 -0
- lalpulsar/piecewise_model/estimating_knots.py +833 -0
- lalpulsar/piecewise_model/gte_and_other_methods.py +189 -0
- lalpulsar/piecewise_model/mols_for_gte.py +269 -0
- lalpulsar/piecewise_model/pw_fstat.py +813 -0
- lalpulsar/piecewise_model/pw_model_simulations.py +156 -0
- lalpulsar/piecewise_model/sampling_methods.py +186 -0
- lalpulsar/piecewise_model/semicoherent_metric_methods.py +375 -0
- lalpulsar/piecewise_model/tbank_estimates.py +293 -0
- lalpulsar/public_sft_directory.py +82 -0
- lalpulsar/pulsarhtmlutils.py +1395 -0
- lalpulsar/pulsarpputils.py +3638 -0
- lalpulsar/simulateCW.py +602 -0
- lalpulsar/simulateHeterodynedCW.py +591 -0
- lalsimulation/__init__.py +7 -0
- lalsimulation/_lalsimulation.cpython-312-x86_64-linux-gnu.so +0 -0
- lalsimulation/_lalsimulation_swig.py +14 -0
- lalsimulation/git_version.py +64 -0
- lalsimulation/gwsignal/__init__.py +9 -0
- lalsimulation/gwsignal/core/__init__.py +2 -0
- lalsimulation/gwsignal/core/conditioning_subroutines.py +196 -0
- lalsimulation/gwsignal/core/errors.py +136 -0
- lalsimulation/gwsignal/core/gw.py +206 -0
- lalsimulation/gwsignal/core/parameter_conventions.py +122 -0
- lalsimulation/gwsignal/core/utils.py +329 -0
- lalsimulation/gwsignal/core/waveform.py +725 -0
- lalsimulation/gwsignal/core/waveform_conditioning.py +455 -0
- lalsimulation/gwsignal/models/__init__.py +29 -0
- lalsimulation/gwsignal/models/pyseobnr_model.py +452 -0
- lalsimulation/nrfits/NRSur3dq8Remnant.py +92 -0
- lalsimulation/nrfits/NRSur7dq4Remnant.py +469 -0
- lalsimulation/nrfits/__init__.py +1 -0
- lalsimulation/nrfits/eval_fits.py +364 -0
- lalsimulation/nrfits/nrfits.py +78 -0
- lalsimulation/nrfits/pn_spin_evolution_wrapper.py +92 -0
- lalsimulation/nrfits/quaternion_utils.py +74 -0
- lalsimulation/tilts_at_infinity/__init__.py +2 -0
- lalsimulation/tilts_at_infinity/calc_tilts_prec_avg_regularized.py +1424 -0
- lalsimulation/tilts_at_infinity/hybrid_spin_evolution.py +461 -0
- lalsimulation/tilts_at_infinity/tilts_at_infinity_utils.py +167 -0
- lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesBurstPPAnalysis +305 -0
- lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesBurstPostProc +1364 -0
- lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesCombinePTMCMCh5s +100 -0
- lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesCombinePosteriors +235 -0
- lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesCompPos +1121 -0
- lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesDIEvidence +68 -0
- lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesGraceDBinfo +182 -0
- lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesMCMC2pos +314 -0
- lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesPPAnalysis +322 -0
- lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesPlotSpinDisk +42 -0
- lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesPosToSimBurst +227 -0
- lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesPosToSimInspiral +307 -0
- lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesPostProc +1345 -0
- lalsuite-7.26.2.dev20251206.data/scripts/cbcBayesThermoInt +107 -0
- lalsuite-7.26.2.dev20251206.data/scripts/imrtgr_imr_consistency_test +796 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lal_cache +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lal_fftw_wisdom +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lal_fftwf_wisdom +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lal_path2cache +148 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lal_searchsum2cache +172 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lal_simd_detect +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lal_tconvert +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lal_version +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_ComputeAntennaPattern +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_ComputeFstatBenchmark +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_ComputeFstatLatticeCount +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_ComputeFstatMCUpperLimit +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_ComputeFstatistic_v2 +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_ComputePSD +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_CopySFTs +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_DistanceVsMass +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_DriveHoughMulti +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_FstatMetric_v2 +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_HierarchSearchGCT +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_HierarchicalSearch +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_MakeSFTDAG +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_MakeSFTs +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_Makefakedata_v4 +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_Makefakedata_v5 +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_PredictFstat +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_PrintDetectorState +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_SFTclean +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_SFTvalidate +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_StringAddFrame +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_StringSearch +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_Weave +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_WeaveCompare +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_WeaveConcat +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_WeaveSetup +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_WriteSFTsfromSFDBs +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_animate +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_binj +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_blindinj +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_cache +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_cafe +99 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_calfacs +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_cbc_stochasticbank +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_chirplen +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_coh_PTF_inspiral +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_coinj +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_combine_crosscorr_toplists +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_compareFstats +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_compareSFTs +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_cosmicstring_pipe +525 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_create_time_correction_ephemeris +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_dumpSFT +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_effdist +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_exc_resp +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_fftw_wisdom +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_fftwf_wisdom +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_fits_header_getval +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_fits_header_list +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_fits_overview +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_fits_table_list +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_fr_ninja +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_frextr +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_frinfo +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_frjoin +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_frread +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_frview +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_gwf2xml +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_heterodyne_pulsar +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_inspawgfile +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_inspfrinj +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_inspinj +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_inspiralDistance +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_knope +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_knope_automation_script +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_knope_collate_results +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_knope_result_page +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_makeblindinj +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_makeblindinj_himass +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_ninja +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_path2cache +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_power +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_power_likelihood_pipe +219 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_power_pipe +417 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_pulsar_crosscorr_v2 +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_pulsar_frequency_evolution +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_pulsar_parameter_estimation_nested +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_random_bank +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_randombank +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_run_pulsar_crosscorr_v2 +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_searchsum2cache +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_spec_avg +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_spec_avg_long +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_spec_coherence +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_spininj +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_splitSFTs +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_splitbank +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_ssbtodetector +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_string_apply_vetoes +171 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_string_calc_likelihood +172 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_string_contour_plotter +141 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_string_contour_plotter_largeloops +133 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_string_cs_gamma +110 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_string_cs_gamma_largeloops +119 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_string_final +1064 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_string_meas_likelihood +264 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_string_plot_binj +543 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_string_plot_likelihood +380 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_synthesizeBstatMC +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_synthesizeLVStats +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_synthesizeTransientStats +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_tconvert +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_tmpltbank +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_version +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalapps_xtefitstoframe +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalburst_cluster +156 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalburst_coinc +224 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalburst_cut +425 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalburst_gen_timeslides +254 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalburst_inj_pic +254 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalburst_injfind +170 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalburst_plot_tisi +165 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalburst_power_calc_likelihood +182 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalburst_power_final +1369 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalburst_power_meas_likelihood +206 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalburst_power_plot_binj +934 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalburst_power_plot_binjtf +302 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalburst_version +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalfr-cat +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalfr-cksum +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalfr-cut +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalfr-dump +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalfr-fmt +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalfr-paste +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalfr-print +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalfr-split +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalfr-stat +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalfr-stream +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalfr-vis +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalframe_version +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalinference_bench +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalinference_burst +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalinference_burst_pp_pipe +220 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalinference_coherence_test +139 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalinference_compute_roq_weights +404 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalinference_cpnest +58 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalinference_datadump +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalinference_evolve_spins_and_append_samples +202 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalinference_injectedlike +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalinference_merge_posteriors +57 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalinference_mpi_wrapper +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalinference_multi_pipe +144 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalinference_nest +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalinference_nest2pos +286 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalinference_pipe +512 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalinference_pp_pipe +229 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalinference_review_test +362 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalinference_version +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalinspiral_injfind +206 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalinspiral_thinca +240 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalinspiral_version +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalmetaio_version +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_ComputeAntennaPattern +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_ComputeFstatBenchmark +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_ComputeFstatLatticeCount +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_ComputeFstatMCUpperLimit +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_ComputeFstatistic_v2 +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_ComputePSD +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_CopyPublicSFTs +216 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_DriveHoughMulti +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_FstatMetric_v2 +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_HierarchSearchGCT +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_HierarchicalSearch +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_MakeSFTDAG +1142 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_MakeSFTs +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_Makefakedata_v4 +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_Makefakedata_v5 +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_MoveSFTs +208 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_PiecewiseSearch +963 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_PredictFstat +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_PrintDetectorState +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_SFTclean +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_SFTvalidate +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_Weave +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_WeaveCompare +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_WeaveConcat +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_WeaveSetup +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_WriteSFTsfromSFDBs +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_compareFstats +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_compareSFTs +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_create_time_correction_ephemeris +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_crosscorr_v2 +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_dumpSFT +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_fits_header_getval +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_fits_header_list +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_fits_overview +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_fits_table_list +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_frequency_evolution +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_heterodyne +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_knope +145 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_knope_automation_script +731 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_knope_collate_results +675 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_knope_result_page +2977 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_parameter_estimation_nested +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_spec_avg +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_spec_avg_long +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_spec_coherence +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_splitSFTs +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_ssbtodetector +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_synthesizeBstatMC +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_synthesizeLVStats +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_synthesizeTransientStats +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalpulsar_version +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalsim-bh-qnmode +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalsim-bh-ringdown +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalsim-bh-sphwf +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalsim-burst +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalsim-detector-noise +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalsim-detector-strain +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalsim-inject +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalsim-inspiral +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalsim-ns-eos-table +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalsim-ns-mass-radius +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalsim-ns-params +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalsim-sgwb +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalsim-unicorn +6 -0
- lalsuite-7.26.2.dev20251206.data/scripts/lalsimulation_version +6 -0
- lalsuite-7.26.2.dev20251206.dist-info/METADATA +90 -0
- lalsuite-7.26.2.dev20251206.dist-info/RECORD +733 -0
- lalsuite-7.26.2.dev20251206.dist-info/WHEEL +5 -0
- lalsuite-7.26.2.dev20251206.dist-info/licenses/COPYING +339 -0
- lalsuite-7.26.2.dev20251206.dist-info/top_level.txt +9 -0
- lalsuite.libs/libcfitsio-729ee1b7.so.10.0.0 +0 -0
- lalsuite.libs/libfftw3-6b983104.so.3.5.5 +0 -0
- lalsuite.libs/libfftw3f-b4465a35.so.3.5.5 +0 -0
- lalsuite.libs/libframel-8cf74372.so.8.48.4 +0 -0
- lalsuite.libs/libgsl-e30be130.so.28.0.0 +0 -0
- lalsuite.libs/libgslcblas-460f042a.so.0.0.0 +0 -0
- lalsuite.libs/libhdf5-d02936e2.so.310.5.1 +0 -0
- lalsuite.libs/libhdf5_hl-0e40b553.so.310.0.6 +0 -0
- lalsuite.libs/liblal-d17109e0.so.20.5.0 +0 -0
- lalsuite.libs/liblalburst-d9edfb9d.so.8.0.0 +0 -0
- lalsuite.libs/liblalframe-d677044f.so.14.0.3 +0 -0
- lalsuite.libs/liblalinference-a50f0a8e.so.23.1.7 +0 -0
- lalsuite.libs/liblalinspiral-22638799.so.18.0.2 +0 -0
- lalsuite.libs/liblalmetaio-42c5bc5c.so.11.0.1 +0 -0
- lalsuite.libs/liblalpulsar-95c25f8c.so.30.1.1 +0 -0
- lalsuite.libs/liblalsimulation-bf7c4c31.so.37.2.0 +0 -0
- lalsuite.libs/liblalsupport-282d4115.so.14.4.0 +0 -0
- lalsuite.libs/libmetaio-abda72ec.so.1.1.0 +0 -0
|
@@ -0,0 +1,1338 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Postprocessing for the tiger pipeline
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
__author__ = "Tjonnie Li"
|
|
6
|
+
__credits__ = ["Tjonnie Li"]
|
|
7
|
+
__maintainer__ = "Tjonnie Li"
|
|
8
|
+
__email__ = "tjonnie.li@ligo.org"
|
|
9
|
+
__status__ = "Production"
|
|
10
|
+
|
|
11
|
+
###############################################################################
|
|
12
|
+
#
|
|
13
|
+
# USER DEFINED DATA
|
|
14
|
+
#
|
|
15
|
+
###############################################################################
|
|
16
|
+
|
|
17
|
+
clusters = {'atlas':'titan2.atlas.aei.uni-hannover.de', \
|
|
18
|
+
'nemo':'pcdev2.phys.uwm.edu', \
|
|
19
|
+
'cit':'ldas-pcdev2.ligo.caltech.edu', \
|
|
20
|
+
'llo':'ldas-pcdev2.ligo-la.caltech.edu', \
|
|
21
|
+
'lho':'ldas-pcdev1.ligo-wa.caltech.edu'}
|
|
22
|
+
|
|
23
|
+
color_default = ['blue','red','green']
|
|
24
|
+
hatch_default = ['..','//','||']
|
|
25
|
+
|
|
26
|
+
###############################################################################
|
|
27
|
+
#
|
|
28
|
+
# LOAD LIBRARIES
|
|
29
|
+
#
|
|
30
|
+
###############################################################################
|
|
31
|
+
|
|
32
|
+
from configparser import ConfigParser
|
|
33
|
+
from pickle import dump, load
|
|
34
|
+
from datetime import datetime
|
|
35
|
+
from itertools import combinations
|
|
36
|
+
from itertools import cycle
|
|
37
|
+
from matplotlib import use, rcParams, __version__ as mpl_version
|
|
38
|
+
use('Agg')
|
|
39
|
+
from matplotlib.pyplot import clf, figure
|
|
40
|
+
from os import access, path, R_OK, makedirs
|
|
41
|
+
from scipy.stats import ks_2samp
|
|
42
|
+
from scipy.stats.mstats import mquantiles
|
|
43
|
+
from subprocess import Popen, PIPE
|
|
44
|
+
from sys import exit, stdout, version_info, float_info
|
|
45
|
+
from time import time
|
|
46
|
+
from numpy import sqrt, array, empty, hstack, min, max, reshape, shape, loadtxt, vstack, append, arange, random, column_stack, concatenate, savetxt, log, exp, size, zeros, argmax, argsort, sort, sum, subtract, array_split
|
|
47
|
+
from re import findall
|
|
48
|
+
|
|
49
|
+
py_version = version_info[:2]
|
|
50
|
+
if py_version < (2, 7):
|
|
51
|
+
from optparse import OptionParser
|
|
52
|
+
else:
|
|
53
|
+
from argparse import ArgumentParser
|
|
54
|
+
|
|
55
|
+
###############################################################################
|
|
56
|
+
#
|
|
57
|
+
# PLOTTING OPTIONS
|
|
58
|
+
#
|
|
59
|
+
###############################################################################
|
|
60
|
+
|
|
61
|
+
fig_width_pt = 3*246.0 # Get this from LaTeX using \showthe\columnwidth
|
|
62
|
+
inches_per_pt = 1.0/72.27 # Convert pt to inch
|
|
63
|
+
golden_mean = (sqrt(5)-1.0)/2.0 # Aesthetic ratio
|
|
64
|
+
fig_width = fig_width_pt*inches_per_pt # width in inches
|
|
65
|
+
fig_height = fig_width*golden_mean # height in inches
|
|
66
|
+
fig_size = [fig_width,fig_height]
|
|
67
|
+
|
|
68
|
+
fontsize = 'font.size' if mpl_version >= '1.5.0' else 'text.fontsize'
|
|
69
|
+
params = {'backend': 'PDF',
|
|
70
|
+
'axes.labelsize': 24,
|
|
71
|
+
fontsize: 24,
|
|
72
|
+
'legend.fontsize': 20,
|
|
73
|
+
'xtick.labelsize': 24,
|
|
74
|
+
'ytick.labelsize': 24,
|
|
75
|
+
'axes.grid' : True,
|
|
76
|
+
'text.usetex': True,
|
|
77
|
+
'savefig.dpi' : 200,
|
|
78
|
+
'lines.markersize' : 14,
|
|
79
|
+
'figure.figsize': fig_size}
|
|
80
|
+
|
|
81
|
+
rcParams.update(params)
|
|
82
|
+
|
|
83
|
+
scriptfilename = path.realpath(__file__)
|
|
84
|
+
###############################################################################
|
|
85
|
+
#
|
|
86
|
+
# PLOTTING OPTIONS
|
|
87
|
+
#
|
|
88
|
+
###############################################################################
|
|
89
|
+
|
|
90
|
+
def main():
|
|
91
|
+
"""
|
|
92
|
+
-------------------------------------------------------------------------------
|
|
93
|
+
"""
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
###############################################################################
|
|
97
|
+
#
|
|
98
|
+
# ARGUMENT PARSING
|
|
99
|
+
#
|
|
100
|
+
###############################################################################
|
|
101
|
+
|
|
102
|
+
# SETUP ARGUMENT PARSER
|
|
103
|
+
if py_version < (2, 7):
|
|
104
|
+
parser = OptionParser()
|
|
105
|
+
parser.add_option('-c', '--config', metavar='FILE', dest='configfile', \
|
|
106
|
+
type=str, help='configuration file')
|
|
107
|
+
parser.add_option('-g', '--generate', metavar='FILE', dest='examplecfg', \
|
|
108
|
+
type=str, help='generate example configuration file')
|
|
109
|
+
parser.add_option('-p', '--preprocess', metavar='FILE', dest='preprocessfile', \
|
|
110
|
+
type=str, help='preprocess data before sending to main script (NB: NOT WORKING!)')
|
|
111
|
+
(args, options) = parser.parse_args()
|
|
112
|
+
else:
|
|
113
|
+
parser = ArgumentParser(description='Post-processing for TIGER')
|
|
114
|
+
parser.add_argument('-c', '--config', metavar='FILE', dest='configfile', \
|
|
115
|
+
type=str, help='configuration file')
|
|
116
|
+
parser.add_argument('-g', '--generate', metavar='FILE', dest='examplecfg', \
|
|
117
|
+
type=str, help='generate example configuration file')
|
|
118
|
+
parser.add_argument('-p', '--preprocess', metavar='FILE', dest='preprocessfile', \
|
|
119
|
+
type=str, help='preprocess data before sending to main script (NB: NOT WORKING!)')
|
|
120
|
+
args = parser.parse_args()
|
|
121
|
+
|
|
122
|
+
if (args.configfile == None) and (args.examplecfg == None) and (args.preprocessfile == None):
|
|
123
|
+
exit("Specify either -c/--config, -g/--generate or -p/--preprocess")
|
|
124
|
+
elif (args.configfile != None):
|
|
125
|
+
stdout.write("****************************************\nTIGER post-process\n%s\n****************************************\n" % args.configfile)
|
|
126
|
+
TigerPostProcess(args.configfile)
|
|
127
|
+
elif (args.examplecfg != None):
|
|
128
|
+
TigerCreateExampleConfigFile(args.examplecfg)
|
|
129
|
+
elif (args.preprocessfile != None):
|
|
130
|
+
TigerPreProcess(args.preprocessfile)
|
|
131
|
+
else:
|
|
132
|
+
exit('Unknown options - check input')
|
|
133
|
+
exit(0)
|
|
134
|
+
|
|
135
|
+
def TigerPostProcess(configfile):
|
|
136
|
+
"""
|
|
137
|
+
Main TIGER post processing function. Calls the relevant function for source
|
|
138
|
+
collection, odds ratio calculations, and plotting
|
|
139
|
+
"""
|
|
140
|
+
|
|
141
|
+
# CONFIGURATION FILE: CHECKING FILE
|
|
142
|
+
stdout.write("Configuration file: checking file\n")
|
|
143
|
+
if access(configfile, R_OK):
|
|
144
|
+
config = ConfigParser()
|
|
145
|
+
config.read(configfile)
|
|
146
|
+
else:
|
|
147
|
+
exit("Configuration file: checking file - file does not exist. Abort script\n")
|
|
148
|
+
|
|
149
|
+
# CONFIGURATION FILE: READING
|
|
150
|
+
stdout.write("Configuration file: reading\n")
|
|
151
|
+
testcoef = config.get('run','hypotheses').split(',')
|
|
152
|
+
localdest = config.get('run','localdest')
|
|
153
|
+
N_sources=[int(i) for i in config.get('hist','nsources').split(',')]
|
|
154
|
+
types = config.get('plot','types').split(',')
|
|
155
|
+
engine=config.get('run','engine').split(',')
|
|
156
|
+
runid = config.get('run','runid')
|
|
157
|
+
labels=config.get('fetch','labels').split(',')
|
|
158
|
+
|
|
159
|
+
latexlabels_str = config.get('fetch','latexlabels')
|
|
160
|
+
matches=findall(r'\$(.+?)\$',latexlabels_str)
|
|
161
|
+
latexlabels=["$%s$"%s for s in matches]
|
|
162
|
+
|
|
163
|
+
# CREATE DESTINATION DIRECTOR
|
|
164
|
+
ensure(localdest)
|
|
165
|
+
|
|
166
|
+
###############################################################################
|
|
167
|
+
#
|
|
168
|
+
# FETCH DATA
|
|
169
|
+
#
|
|
170
|
+
###############################################################################
|
|
171
|
+
|
|
172
|
+
# FETCHING DATA: GETTING OPTIONS
|
|
173
|
+
fetch_type = config.get('fetch','type').split(',')
|
|
174
|
+
fetch_loc = config.get('fetch','locs').split(',')
|
|
175
|
+
fetch_snrthres = config.getfloat('cut','snrthres')
|
|
176
|
+
fetch_bayesgrthres = config.getfloat('cut','bayesgrthres')
|
|
177
|
+
fetch_seed = config.getint('fetch','seed')
|
|
178
|
+
if len(fetch_type) != len(fetch_loc):
|
|
179
|
+
exit('Locations and types are not of the same length - exit\n')
|
|
180
|
+
|
|
181
|
+
# FETCHING DATA
|
|
182
|
+
tigerruns = []
|
|
183
|
+
for i in range(len(fetch_type)):
|
|
184
|
+
if fetch_type[i] == 'source':
|
|
185
|
+
# READING LOCATION FILES
|
|
186
|
+
locfp = open(fetch_loc[i],'r')
|
|
187
|
+
locations = [k.split() for k in locfp.readlines()]
|
|
188
|
+
stdout.write("Fetching data: %s\n" % fetch_loc[i])
|
|
189
|
+
# CREATING CLASS INSTANCES
|
|
190
|
+
tigerruns.append(TigerSet(locations, labels[i],latexlabels[i],testcoef,engine[i]))
|
|
191
|
+
# FETCH DATA
|
|
192
|
+
tigerruns[-1].searchsources() # SEARCH FOR SOURCES
|
|
193
|
+
tigerruns[-1].pullbayes() # PULL BAYESFACTORS
|
|
194
|
+
tigerruns[-1].pullsnr() # PULL SNR
|
|
195
|
+
#tigerruns[-1].preprocess() # preprocess data on clusters (NOT READY YET)
|
|
196
|
+
elif fetch_type[i] == 'pickle':
|
|
197
|
+
tigerruns.append(LoadPickledTigerSet(fetch_loc[i]))
|
|
198
|
+
tigerruns[-1].latexlabel=latexlabels[i]
|
|
199
|
+
else:
|
|
200
|
+
exit('Fetch has to be either source or pickle. Check the configuration file - Abort')
|
|
201
|
+
|
|
202
|
+
# SAVING DATA BEFORE CUT
|
|
203
|
+
html_files_sources = []
|
|
204
|
+
stdout.write('Saving data\n')
|
|
205
|
+
for i in range(len(tigerruns)):
|
|
206
|
+
html_files_sources.append(path.join(localdest,tigerruns[i].label+'.pickle'))
|
|
207
|
+
tigerruns[i].savetopickle(html_files_sources[-1])
|
|
208
|
+
stdout.write('... Saving data: %s\n' % html_files_sources[-1])
|
|
209
|
+
html_files_sources.append(path.join(localdest,tigerruns[i].label+'.dat'))
|
|
210
|
+
tigerruns[i].savetoascii(html_files_sources[-1])
|
|
211
|
+
stdout.write('... Saving data: %s\n' % html_files_sources[-1])
|
|
212
|
+
|
|
213
|
+
# APPLY CUTS
|
|
214
|
+
stdout.write("Applying cuts\n")
|
|
215
|
+
for tg in tigerruns:
|
|
216
|
+
tg.applycut(st=fetch_snrthres, bt=fetch_bayesgrthres)
|
|
217
|
+
|
|
218
|
+
# SHUFFLE REALISATIONS
|
|
219
|
+
#if fetch_seed != 0:
|
|
220
|
+
#print 'Shuffling realisation'
|
|
221
|
+
#for tg in tigerruns:
|
|
222
|
+
#tg.shufflesources(seed=fetch_seed)
|
|
223
|
+
|
|
224
|
+
# SAVING DATA AFTER CUT
|
|
225
|
+
#print 'Saving data - after cut'
|
|
226
|
+
#for i in range(len(tigerruns)):
|
|
227
|
+
#html_files_sources.append(path.join(localdest,tigerruns[i].label+'_cut'+'.pickle'))
|
|
228
|
+
#tigerruns[i].savetopickle(html_files_sources[-1])
|
|
229
|
+
#html_files_sources.append(path.join(localdest,tigerruns[i].label+'_cut'+'.dat'))
|
|
230
|
+
#tigerruns[i].savetoascii(html_files_sources[-1])
|
|
231
|
+
|
|
232
|
+
###############################################################################
|
|
233
|
+
#
|
|
234
|
+
# PRODUCE PLOTS
|
|
235
|
+
#
|
|
236
|
+
###############################################################################
|
|
237
|
+
|
|
238
|
+
stdout.write("Producing plots\n")
|
|
239
|
+
|
|
240
|
+
# FETCH OPTIONS
|
|
241
|
+
plot_hist = config.getboolean('plot','hist')
|
|
242
|
+
plot_snrVSodds = config.getboolean('plot','snrvsodds')
|
|
243
|
+
plot_cumbayes = config.getboolean('plot','cumbayes')
|
|
244
|
+
plot_cumfreq = config.getboolean('plot','cumfreq')
|
|
245
|
+
hist_odds_bins=config.getint('hist','bins')
|
|
246
|
+
|
|
247
|
+
# STATISTICS
|
|
248
|
+
html_data_efficiencies = []
|
|
249
|
+
betas = [0.95,0.99]
|
|
250
|
+
if len(tigerruns)>1:
|
|
251
|
+
for ns in N_sources:
|
|
252
|
+
tmp = TigerCalculateEfficiency(tigerruns,N=ns,beta=betas)
|
|
253
|
+
html_data_efficiencies.append(tmp)
|
|
254
|
+
html_data_efficiencies = array(html_data_efficiencies)
|
|
255
|
+
|
|
256
|
+
html_data_ks =[[TigerKSandPvalue(tigerruns[0],j,N=ns) for ns in N_sources] for j in tigerruns[1:] if len(tigerruns)>1]
|
|
257
|
+
#for ns in N_sources:
|
|
258
|
+
#html_data_ks.append(TigerKSandPvalue(tigerruns[0],tigerruns[1],N=ns))
|
|
259
|
+
|
|
260
|
+
# HISTOGRAMS
|
|
261
|
+
html_files_hist = []
|
|
262
|
+
if plot_hist==True:
|
|
263
|
+
stdout.write("... Histograms\n")
|
|
264
|
+
# GET XLIM FOR HISTOGRAMS (IF SPECIFICIED)
|
|
265
|
+
hist_xlim = [float(item) for item in config.get('hist','xlim').split(',')]
|
|
266
|
+
if hist_xlim == [0.0,0.0]:
|
|
267
|
+
# SETTING HISTOGRAM LIMITS (ADD 10% TO EACH EDGE)
|
|
268
|
+
tmplist = empty(0)
|
|
269
|
+
for tg in tigerruns:
|
|
270
|
+
for ns in N_sources:
|
|
271
|
+
tmplist = hstack((tmplist,tg.odds(ns)))
|
|
272
|
+
|
|
273
|
+
# CALCULATE XLIM FROM [MIN,MAX] + 10 PERCENT
|
|
274
|
+
xlim = array([min(tmplist),max(tmplist)])
|
|
275
|
+
xlim = array([xlim[0]-0.1*(xlim[1]-xlim[0]),xlim[1]+0.1*(xlim[1]-xlim[0])])
|
|
276
|
+
del tmplist
|
|
277
|
+
else:
|
|
278
|
+
xlim = hist_xlim
|
|
279
|
+
|
|
280
|
+
# CREATE HISTOGRAMS
|
|
281
|
+
for ns in N_sources:
|
|
282
|
+
clf()
|
|
283
|
+
fig = figure(ns)
|
|
284
|
+
ax = fig.add_subplot(111)
|
|
285
|
+
TigerCreateHistogram(tigerruns,ax,N=ns, xlim=xlim, bins=hist_odds_bins)
|
|
286
|
+
for typ in types:
|
|
287
|
+
html_files_hist.append(path.join(localdest,'hist_'+runid+"_"+str(ns)+"sources."+typ))
|
|
288
|
+
fig.savefig(html_files_hist[-1],bbox_inches='tight')
|
|
289
|
+
|
|
290
|
+
# SNR VS ODDS
|
|
291
|
+
html_files_snrvsodds = []
|
|
292
|
+
if plot_snrVSodds == True:
|
|
293
|
+
stdout.write("... SNR vs. Odds\n")
|
|
294
|
+
clf()
|
|
295
|
+
fig = figure()
|
|
296
|
+
ax = fig.add_subplot(111)
|
|
297
|
+
TigerCreateSNRvsOdds(tigerruns, ax)
|
|
298
|
+
for ext in types:
|
|
299
|
+
html_files_snrvsodds.append(path.join(localdest,"snrVSodds_"+runid+"."+ext))
|
|
300
|
+
fig.savefig(html_files_snrvsodds[-1], bbox_inches='tight')
|
|
301
|
+
|
|
302
|
+
# CUMULATIVE FREQUENCY PLOTS
|
|
303
|
+
html_files_cumfreq = [[]]*len(tigerruns)
|
|
304
|
+
if plot_cumfreq == True:
|
|
305
|
+
stdout.write("... Cumulative frequency\n")
|
|
306
|
+
for i in range(len(tigerruns)):
|
|
307
|
+
html_files_cumfreq[i] = []
|
|
308
|
+
clf()
|
|
309
|
+
fig = figure()
|
|
310
|
+
ax = fig.add_subplot(111)
|
|
311
|
+
TigerCreateCumFreq(tigerruns[i], ax)
|
|
312
|
+
for ext in types:
|
|
313
|
+
html_files_cumfreq[i].append(path.join(localdest,"cumfreq_"+tigerruns[i].label+"."+ext))
|
|
314
|
+
fig.savefig(html_files_cumfreq[i][-1],bbox_inches='tight')
|
|
315
|
+
|
|
316
|
+
# CUMULATIVE BAYES PLOTS
|
|
317
|
+
html_files_cumbayes = [[]]*len(tigerruns)
|
|
318
|
+
N_sources = array(N_sources)
|
|
319
|
+
stdout.write("... Cumulative Bayes\n")
|
|
320
|
+
if plot_cumbayes == True:
|
|
321
|
+
N_sources_cats = array(N_sources[N_sources!=1])
|
|
322
|
+
for i in range(len(tigerruns)):
|
|
323
|
+
html_files_cumbayes[i] = [[]]*len(N_sources_cats)
|
|
324
|
+
for j in range(len(N_sources_cats)):
|
|
325
|
+
html_files_cumbayes[i][j] = []
|
|
326
|
+
for k in range(tigerruns[i].nsources/N_sources_cats[j]):
|
|
327
|
+
clf()
|
|
328
|
+
fig = figure()
|
|
329
|
+
ax = fig.add_subplot(111)
|
|
330
|
+
TigerCreateCumBayes(tigerruns[i],ax,k,N_sources_cats[j])
|
|
331
|
+
for ext in types:
|
|
332
|
+
html_files_cumbayes[i][j].append(path.join(localdest,"cumbayes_"+tigerruns[i].label+"_catalog"+str(k)+"_sourcespercat_"+str(N_sources_cats[j])+"."+ext))
|
|
333
|
+
fig.savefig(html_files_cumbayes[i][j][-1], bbox_inches='tight')
|
|
334
|
+
|
|
335
|
+
###############################################################################
|
|
336
|
+
#
|
|
337
|
+
# MAKE HTML OUTPUT PAGE
|
|
338
|
+
#
|
|
339
|
+
###############################################################################
|
|
340
|
+
|
|
341
|
+
# TODO - CREATE SIMPLE OUTPUT PAGE
|
|
342
|
+
|
|
343
|
+
stdout.write("Creating html pages\n")
|
|
344
|
+
htmlfile=open(path.join(localdest,'index.html'), 'w')
|
|
345
|
+
htmltxt=\
|
|
346
|
+
"""
|
|
347
|
+
<!DOCTYPE html>
|
|
348
|
+
<html>
|
|
349
|
+
|
|
350
|
+
<head>
|
|
351
|
+
<title> TIGER post-processing page </title>
|
|
352
|
+
</head>
|
|
353
|
+
|
|
354
|
+
<body>
|
|
355
|
+
|
|
356
|
+
<h1>TIGER post-processing page</h1>
|
|
357
|
+
"""
|
|
358
|
+
|
|
359
|
+
timesec = time()
|
|
360
|
+
timedate = datetime.fromtimestamp(timesec).strftime('%Y-%m-%d %H:%M:%S')
|
|
361
|
+
htmltxt+="Last updated on "+timedate
|
|
362
|
+
|
|
363
|
+
# ADD SOURCE LOCATIONS
|
|
364
|
+
#htmltxt+=\
|
|
365
|
+
#"""
|
|
366
|
+
#<h2>Sources</h2>
|
|
367
|
+
#"""
|
|
368
|
+
#for hfs in html_files_sources:
|
|
369
|
+
#hfsbase = path.basename(hfs)
|
|
370
|
+
#htmltxt+="<a href='"+hfsbase+"'>"+hfsbase+"</a> "
|
|
371
|
+
|
|
372
|
+
if len(tigerruns)>1:
|
|
373
|
+
htmltxt+=\
|
|
374
|
+
"""
|
|
375
|
+
<h2>Statistics</h2>
|
|
376
|
+
"""
|
|
377
|
+
htmltxt+=\
|
|
378
|
+
"""
|
|
379
|
+
<h3>Efficiencies</h3>
|
|
380
|
+
"""
|
|
381
|
+
htmltxt+=\
|
|
382
|
+
"""
|
|
383
|
+
<table border="1">
|
|
384
|
+
<tr>
|
|
385
|
+
<td>catsize</td>
|
|
386
|
+
"""
|
|
387
|
+
for ns in N_sources:
|
|
388
|
+
htmltxt+='<td>'+str(ns)+'</td>'
|
|
389
|
+
htmltxt+='</tr>'
|
|
390
|
+
|
|
391
|
+
background = 0
|
|
392
|
+
for i in range(len(tigerruns)):
|
|
393
|
+
if i != background: # hardcoded for the time being
|
|
394
|
+
htmltxt+='<tr>'
|
|
395
|
+
htmltxt+='<td>'+tigerruns[i].label+'</td>'
|
|
396
|
+
for j in range(len(N_sources)):
|
|
397
|
+
if i < background:
|
|
398
|
+
effstr="%.2f "%html_data_efficiencies[j,i,0]+' | '+ '%.2f'% html_data_efficiencies[j,i,1]
|
|
399
|
+
else:
|
|
400
|
+
effstr="%.2f"%html_data_efficiencies[j,i-1,0]+' | '+'%.2f'%html_data_efficiencies[j,i-1,1]
|
|
401
|
+
htmltxt+='<td>'+effstr+'</td>'
|
|
402
|
+
htmltxt+='</tr>'
|
|
403
|
+
htmltxt+='</table>'
|
|
404
|
+
|
|
405
|
+
htmltxt+=\
|
|
406
|
+
"""
|
|
407
|
+
<h3>KS and p value</h3>
|
|
408
|
+
"""
|
|
409
|
+
htmltxt+=\
|
|
410
|
+
"""
|
|
411
|
+
<table border="1">
|
|
412
|
+
<tr>
|
|
413
|
+
<td></td>
|
|
414
|
+
<td>ks stat</td>
|
|
415
|
+
<td>p value</td>
|
|
416
|
+
</tr>
|
|
417
|
+
"""
|
|
418
|
+
for i in range(len(tigerruns)-1):
|
|
419
|
+
for j in range(len(N_sources)):
|
|
420
|
+
htmltxt+='<tr>'
|
|
421
|
+
htmltxt+='<td>'+'N='+str(N_sources[j])+'</td>'
|
|
422
|
+
htmltxt+='<td>'+'%.2f'%html_data_ks[i][j][0]+'</td>'
|
|
423
|
+
htmltxt+='<td>'+'%.2f'%html_data_ks[i][j][1]+'</td>'
|
|
424
|
+
htmltxt+='</tr>'
|
|
425
|
+
htmltxt+='</table>'
|
|
426
|
+
|
|
427
|
+
# HISTOGRAMS
|
|
428
|
+
htmltxt+=\
|
|
429
|
+
"""
|
|
430
|
+
<h2>Histograms</h2>
|
|
431
|
+
"""
|
|
432
|
+
for item in html_files_hist:
|
|
433
|
+
if ".png" in item:
|
|
434
|
+
itembase = path.basename(item)
|
|
435
|
+
htmltxt+="<a href='"+itembase+"'>"+"<img src='"+itembase+"' width=512></a>"
|
|
436
|
+
|
|
437
|
+
# SNR VS ODDS
|
|
438
|
+
htmltxt+=\
|
|
439
|
+
"""
|
|
440
|
+
<h2>SNR vs odds</h2>
|
|
441
|
+
"""
|
|
442
|
+
for item in html_files_snrvsodds:
|
|
443
|
+
if ".png" in item:
|
|
444
|
+
itembase = path.basename(item)
|
|
445
|
+
htmltxt+="<a href='"+itembase+"'>"+"<img src='"+itembase+"' width=512></a>"
|
|
446
|
+
|
|
447
|
+
# PREPARE INDIVIDUAL PAGES
|
|
448
|
+
htmltxt+=\
|
|
449
|
+
"""
|
|
450
|
+
<h2>Individual runs</h2>
|
|
451
|
+
"""
|
|
452
|
+
for i in range(len(tigerruns)):
|
|
453
|
+
htmltxt+="<a href='"+tigerruns[i].label+".html"+"'>"+tigerruns[i].label+"</a> "
|
|
454
|
+
|
|
455
|
+
# CLOSE
|
|
456
|
+
htmltxt+=\
|
|
457
|
+
"""
|
|
458
|
+
</body>
|
|
459
|
+
</html>
|
|
460
|
+
"""
|
|
461
|
+
|
|
462
|
+
# CREATE PAGES FOR INIDVIDUAL RUNS
|
|
463
|
+
for i in range(len(tigerruns)):
|
|
464
|
+
indhtmlfile=open(path.join(localdest,tigerruns[i].label+'.html'), 'w')
|
|
465
|
+
indhtmltxt=\
|
|
466
|
+
"""
|
|
467
|
+
<!DOCTYPE html>
|
|
468
|
+
<html>
|
|
469
|
+
|
|
470
|
+
<head>
|
|
471
|
+
<title> TIGER post-processing page </title>
|
|
472
|
+
</head>
|
|
473
|
+
|
|
474
|
+
<body>
|
|
475
|
+
"""
|
|
476
|
+
|
|
477
|
+
indhtmltxt+="<h1>"+tigerruns[i].label+"</h1>"
|
|
478
|
+
|
|
479
|
+
# CUMFREQ
|
|
480
|
+
indhtmltxt+=\
|
|
481
|
+
"""
|
|
482
|
+
<h2>Cumulative frequency highest Bayes factor</h2>
|
|
483
|
+
"""
|
|
484
|
+
for item in html_files_cumfreq[i]:
|
|
485
|
+
if ".png" in item:
|
|
486
|
+
itembase = path.basename(item)
|
|
487
|
+
indhtmltxt+="<a href='"+itembase+"'>"+"<img src='"+itembase+"' width=512></a>"
|
|
488
|
+
|
|
489
|
+
# CUMBAYES
|
|
490
|
+
indhtmltxt+=\
|
|
491
|
+
"""
|
|
492
|
+
<h2>Cumulative Bayes factors (per catalog)</h2>
|
|
493
|
+
"""
|
|
494
|
+
N_sources_cats = array(N_sources[N_sources!=1])
|
|
495
|
+
for j in range(len(html_files_cumbayes[i])):
|
|
496
|
+
indhtmltxt+="<h2>"+str(N_sources_cats[j])+" sources per catalog"+"</h2>"
|
|
497
|
+
for item in html_files_cumbayes[i][j]:
|
|
498
|
+
if ".png" in item:
|
|
499
|
+
itembase = path.basename(item)
|
|
500
|
+
indhtmltxt+="<a href='"+itembase+"'>"+"<img src='"+itembase+"' width=512></a>"
|
|
501
|
+
|
|
502
|
+
indhtmlfile.write(indhtmltxt)
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
htmlfile.write(htmltxt)
|
|
506
|
+
|
|
507
|
+
#############################################################################
|
|
508
|
+
#
|
|
509
|
+
# COPY TO REMOTE CLUSTER
|
|
510
|
+
#
|
|
511
|
+
#############################################################################
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
#############################################################################
|
|
515
|
+
#
|
|
516
|
+
# EXIT MAIN
|
|
517
|
+
#
|
|
518
|
+
#############################################################################
|
|
519
|
+
|
|
520
|
+
print('Script finished')
|
|
521
|
+
"""
|
|
522
|
+
------------------------------------------------------------------------------
|
|
523
|
+
"""
|
|
524
|
+
|
|
525
|
+
###############################################################################
|
|
526
|
+
#
|
|
527
|
+
# TIGERRUN CLASS DEFINITIONS
|
|
528
|
+
#
|
|
529
|
+
###############################################################################
|
|
530
|
+
|
|
531
|
+
class TigerRun:
|
|
532
|
+
"""
|
|
533
|
+
Class for a specific TIGER run
|
|
534
|
+
"""
|
|
535
|
+
|
|
536
|
+
def __init__(self, cluster, directory, engine, subhyp):
|
|
537
|
+
"""
|
|
538
|
+
Initialisation of class
|
|
539
|
+
"""
|
|
540
|
+
self.cluster = cluster
|
|
541
|
+
if directory[-1] != '/':
|
|
542
|
+
self.directory = directory+'/'
|
|
543
|
+
else:
|
|
544
|
+
self.directory = directory
|
|
545
|
+
self.engine = engine
|
|
546
|
+
self.subhyp = subhyp
|
|
547
|
+
self.bayesfiles = []
|
|
548
|
+
self.snrfiles = []
|
|
549
|
+
self.detectors = []
|
|
550
|
+
self.posteriorfiles = []
|
|
551
|
+
self.gps = []
|
|
552
|
+
self.nsources = 0
|
|
553
|
+
self.bayes = []
|
|
554
|
+
self.snr = []
|
|
555
|
+
self.posteriorsamples =[]
|
|
556
|
+
|
|
557
|
+
def searchsources(self):
|
|
558
|
+
"""
|
|
559
|
+
Search for sources completed sources in the specified cluster and location
|
|
560
|
+
"""
|
|
561
|
+
|
|
562
|
+
stdout.write("... searching sources: %s\t%s\r" % (self.cluster,self.directory))
|
|
563
|
+
stdout.flush()
|
|
564
|
+
# GET BAYESFILES
|
|
565
|
+
command = ""
|
|
566
|
+
if self.cluster in clusters.keys():
|
|
567
|
+
command += "gsissh -C "+clusters[self.cluster]+" '"
|
|
568
|
+
command+="for i in `ls -a "+self.directory+"/"+self.subhyp[0]
|
|
569
|
+
if self.engine == 'lalnest':
|
|
570
|
+
command+="/nest/"
|
|
571
|
+
elif self.engine == 'lalinference':
|
|
572
|
+
command+="/posterior_samples/"
|
|
573
|
+
command+="*_B.txt | xargs -n1 basename`; do "
|
|
574
|
+
for sh in self.subhyp:
|
|
575
|
+
if self.engine == 'lalnest':
|
|
576
|
+
command+="test -f "+self.directory+"/"+sh
|
|
577
|
+
command+="/nest/"
|
|
578
|
+
elif self.engine == 'lalinference':
|
|
579
|
+
command+="test -f "+self.directory+"/"+sh.replace('phi','chi')
|
|
580
|
+
command+="/posterior_samples/"
|
|
581
|
+
command+="$i && "
|
|
582
|
+
command=command+"echo $i; done"
|
|
583
|
+
if self.cluster in clusters.keys():
|
|
584
|
+
command += "'"
|
|
585
|
+
p = Popen(command, stdout=PIPE, stderr=PIPE,shell=True)
|
|
586
|
+
lines = p.stdout.readlines()
|
|
587
|
+
self.bayesfiles = array([k.strip('\n') for k in lines])
|
|
588
|
+
del lines
|
|
589
|
+
|
|
590
|
+
# GET DETECTOR INFORMATION
|
|
591
|
+
if self.engine == 'lalnest':
|
|
592
|
+
self.detectors = array([k.split('_')[2].split('.')[0] for k in self.bayesfiles])
|
|
593
|
+
elif self.engine == 'lalinference':
|
|
594
|
+
self.detectors = array([k.split('_')[1] for k in self.bayesfiles])
|
|
595
|
+
|
|
596
|
+
# GET POSTERIOR FILES
|
|
597
|
+
if self.engine == 'lalnest':
|
|
598
|
+
self.posteriorfiles = array([k.replace('_B.txt','') for k in self.bayesfiles])
|
|
599
|
+
elif self.engine == 'lalinference':
|
|
600
|
+
self.posteriorfiles = array([k.replace('_B.txt','') for k in self.bayesfiles])
|
|
601
|
+
|
|
602
|
+
# EXTRACT GPS TIMES
|
|
603
|
+
if self.engine == 'lalnest':
|
|
604
|
+
self.gps=array([k.split('_')[1].split('.')[0] for k in self.bayesfiles])
|
|
605
|
+
elif self.engine == 'lalinference':
|
|
606
|
+
self.gps=array([k.split('_')[2].split('-')[0] for k in self.bayesfiles])
|
|
607
|
+
#self.gps=hstack((self.gps,gpstmp))
|
|
608
|
+
|
|
609
|
+
# GET SNR FILES
|
|
610
|
+
#snrfilename = "snr_%s_%.1f.dat"%(self.bayesfiles[k].split('_')[1],int(self.gps[k]))
|
|
611
|
+
#self.snrfiles = array(["snr_%s_%.1f.dat"%(self.bayesfiles[k].split('_')[1],int(self.gps[k])) for k in range(len(self.bayesfiles))])
|
|
612
|
+
#self.snrfiles = array(["snr_%s_%.1f.dat"%(x,int(y)) for x,y in zip(self.detectors, self.gps)])
|
|
613
|
+
self.snrfiles = array([k.replace('_','-').replace('-B.txt','_snr.txt').replace('posterior','lalinferencenest-%s'%(k.split('-')[1].split('.')[0])).replace('%s'%(k.split('-')[0].split('_')[-1]),'%.1f'%(float(k.split('-')[0].split('_')[-1]))) for k in self.bayesfiles])
|
|
614
|
+
#self.snrfiles = array(["snr_H1L1V1_"+item+".0.dat" for item in self.gps])
|
|
615
|
+
|
|
616
|
+
self.nsources = len(self.bayesfiles)
|
|
617
|
+
stdout.write("... searching sources: %s\t%s - %d sources\n" % (self.cluster,self.directory, self.nsources))
|
|
618
|
+
#print "... ", self.cluster,self.directory, " - ", self.nsources, " sources found"
|
|
619
|
+
|
|
620
|
+
def pullbayes(self):
|
|
621
|
+
"""
|
|
622
|
+
Download Bayes factors from remote location. Only works after sources are
|
|
623
|
+
found by the searchsources function.
|
|
624
|
+
"""
|
|
625
|
+
stdout.write("... pulling Bayes factors: %s\t%s\r" % (self.cluster,self.directory))
|
|
626
|
+
stdout.flush()
|
|
627
|
+
if self.nsources == 0:
|
|
628
|
+
stdout.write("... pulling Bayes factors: %s\t%s - nothing to fetch\n" % (self.cluster,self.directory))
|
|
629
|
+
else:
|
|
630
|
+
# new command
|
|
631
|
+
files=""
|
|
632
|
+
for item in self.bayesfiles:
|
|
633
|
+
files+=" "+self.directory+"{"+",".join(self.subhyp)+"}"
|
|
634
|
+
if self.engine == 'lalnest':
|
|
635
|
+
files += "/nest/"
|
|
636
|
+
elif self.engine == 'lalinference':
|
|
637
|
+
files += "/posterior_samples/"
|
|
638
|
+
files += item
|
|
639
|
+
nsplit = 3 if self.nsources > 1000 else 1
|
|
640
|
+
for fsplit in array_split(files.split(),nsplit):
|
|
641
|
+
command="%s %s '%s %s'"%("gsissh -C",clusters[self.cluster],"cat"," ".join(fsplit)) if self.cluster in clusters.keys() else "%s %s"%("cat"," ".join(fsplit))
|
|
642
|
+
p = Popen(command, stdout=PIPE, stderr=PIPE,shell=True)
|
|
643
|
+
self.bayes.extend(loadtxt(p.stdout, usecols=[0]))
|
|
644
|
+
self.bayes = reshape(self.bayes, (self.nsources,len(self.subhyp)))
|
|
645
|
+
savetxt('test.dat',self.bayes);
|
|
646
|
+
stdout.write("... pulling Bayes factors: %s\t%s - %d x %d dimension\n" % (self.cluster,self.directory, shape(self.bayes)[0],shape(self.bayes)[1]))
|
|
647
|
+
|
|
648
|
+
def pullsnr(self):
|
|
649
|
+
"""
|
|
650
|
+
Download SNRs from remote location. Only works after sources are found by
|
|
651
|
+
the searchsources function.
|
|
652
|
+
"""
|
|
653
|
+
stdout.write("... pulling SNRs: %s\t%s\n" % (self.cluster,self.directory))
|
|
654
|
+
# GET SNRS
|
|
655
|
+
if self.nsources == 0:
|
|
656
|
+
stdout.write("... pulling SNRs: %s\t%s - nothing to fetch\n" % (self.cluster,self.directory))
|
|
657
|
+
else:
|
|
658
|
+
command = ""
|
|
659
|
+
if self.cluster != 'local':
|
|
660
|
+
command+="gsissh -C "+clusters[self.cluster]+" '"
|
|
661
|
+
command+="cat"
|
|
662
|
+
snrfilescomma=",".join(self.snrfiles)
|
|
663
|
+
command += " "+self.directory+self.subhyp[0]+"/engine/"+"{"+snrfilescomma+"}"
|
|
664
|
+
if self.cluster != 'local':
|
|
665
|
+
command+="'"
|
|
666
|
+
p = Popen(command, stdout=PIPE, stderr=PIPE,shell=True)
|
|
667
|
+
#self.snr = array([float(k.strip('Network:').strip()) for k in p.stdout.readlines() if k.find('Network')!=-1])
|
|
668
|
+
snrrawdata = p.stdout.readlines()
|
|
669
|
+
if snrrawdata == []:
|
|
670
|
+
stdout.write("... Warning: Cannot find SNR file. Writing zeros\n")
|
|
671
|
+
self.snr = zeros(self.nsources)
|
|
672
|
+
return
|
|
673
|
+
count = 0
|
|
674
|
+
for k in range(len(self.gps)):
|
|
675
|
+
ndet = len(self.detectors[k])/2
|
|
676
|
+
if ndet == 1:
|
|
677
|
+
self.snr.append(float(snrrawdata[count+ndet-1].strip('%s:'%(self.detectors[k])).strip()))
|
|
678
|
+
count+=1
|
|
679
|
+
else:
|
|
680
|
+
self.snr.append(float(snrrawdata[count+ndet].strip('Network:').strip()))
|
|
681
|
+
count+=ndet+1
|
|
682
|
+
self.snr = array(self.snr)
|
|
683
|
+
stdout.write("... pulling SNRs: %s\t%s - %d sources\n" % (self.cluster,self.directory, len(self.snr)))
|
|
684
|
+
|
|
685
|
+
def pullposteriors(self):
|
|
686
|
+
"""
|
|
687
|
+
Download posterior pdfs from remote location. Only works after sources are
|
|
688
|
+
found by the searchsources function.
|
|
689
|
+
NB: NOT READY FOR USE YET!
|
|
690
|
+
"""
|
|
691
|
+
if self.nsources == 0:
|
|
692
|
+
print("Nothing to fetch")
|
|
693
|
+
else:
|
|
694
|
+
# FIND THE NUMBER OF LINE FIRST SO THAT ONE CAN DIFFERENTIATE FILES
|
|
695
|
+
command = ""
|
|
696
|
+
if self.cluster != 'local':
|
|
697
|
+
command+="gsissh -C "+clusters[self.cluster]+" '"
|
|
698
|
+
command+="wc -l"
|
|
699
|
+
posteriorfilescomma=",".join(self.posteriorfiles)
|
|
700
|
+
command += " "+self.directory+self.subhyp[0]+"/nest/"+"{"+posteriorfilescomma+"}"
|
|
701
|
+
if self.cluster != 'local':
|
|
702
|
+
command+="'"
|
|
703
|
+
p = Popen(command, stdout=PIPE, stderr=PIPE,shell=True)
|
|
704
|
+
posteriorfilesizes = loadtxt(p.stdout, usecols=[0])[:-1]
|
|
705
|
+
print(shape(posteriorfilesizes))
|
|
706
|
+
|
|
707
|
+
# PULLING THE POSTERIOR SAMPLES
|
|
708
|
+
command = ""
|
|
709
|
+
if self.cluster != 'local':
|
|
710
|
+
command+="gsissh -C "+clusters[self.cluster]+" '"
|
|
711
|
+
command+="cat"
|
|
712
|
+
posteriorfilescomma=",".join(self.posteriorfiles)
|
|
713
|
+
command += " "+self.directory+self.subhyp[0]+"/nest/"+"{"+posteriorfilescomma+"}"
|
|
714
|
+
if self.cluster != 'local':
|
|
715
|
+
command+="'"
|
|
716
|
+
p = Popen(command, stdout=PIPE, stderr=PIPE,shell=True)
|
|
717
|
+
self.posteriorsamples = loadtxt(p.stdout)
|
|
718
|
+
print(shape(self.posteriorsamples))
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+
def applycut(self, st=8.0, bt=32.0):
|
|
722
|
+
"""
|
|
723
|
+
Apply a Bayes factor and SNR cut on the data
|
|
724
|
+
"""
|
|
725
|
+
# SET CONDITION
|
|
726
|
+
cond = ((self.snr>st) | (self.snr==0.0)) & (self.bayes[:,0]>bt)
|
|
727
|
+
|
|
728
|
+
# UPDATE DATA
|
|
729
|
+
self.bayes = self.bayes[cond,:]
|
|
730
|
+
self.snr = self.snr[cond]
|
|
731
|
+
self.gps = self.gps[cond]
|
|
732
|
+
self.nsources=shape(self.bayes)[0]
|
|
733
|
+
|
|
734
|
+
def savetopickle(self,dest):
|
|
735
|
+
"""
|
|
736
|
+
Pull data from remote or local locations
|
|
737
|
+
"""
|
|
738
|
+
|
|
739
|
+
# SAVING TO PICKLE
|
|
740
|
+
f = open(dest,'wb')
|
|
741
|
+
dump(self,f,2)
|
|
742
|
+
|
|
743
|
+
class TigerSet:
|
|
744
|
+
"""
|
|
745
|
+
CLASS TO CONTAIN A SET OF RUNS UNDER A COMMON CHARACTERISTIC (E.G.
|
|
746
|
+
BACKGROUND, FOREGROUND).
|
|
747
|
+
"""
|
|
748
|
+
def __init__(self,locations,label,latexlabel,testcoef,engine):
|
|
749
|
+
"""
|
|
750
|
+
INITIALISATION OF CLASS
|
|
751
|
+
"""
|
|
752
|
+
|
|
753
|
+
# CALCULATING SUBHYPOTHESES
|
|
754
|
+
self.testcoef = testcoef # testing coefficients
|
|
755
|
+
self.subhyp=[]
|
|
756
|
+
for i in range(len(self.testcoef)):
|
|
757
|
+
s = combinations(testcoef, i+1)
|
|
758
|
+
self.subhyp.extend(["".join(j) for j in s])
|
|
759
|
+
self.subhyp.insert(0,'GR')
|
|
760
|
+
self.nsubhyp = len(self.subhyp)
|
|
761
|
+
|
|
762
|
+
# SET ENGINE
|
|
763
|
+
if engine in ['lalinference','lalnest']: # engine: either lalnest or lalinference
|
|
764
|
+
self.engine = engine
|
|
765
|
+
else:
|
|
766
|
+
exit('Engine not recognised')
|
|
767
|
+
|
|
768
|
+
# CREATE LOCATIONS
|
|
769
|
+
self.locations = [TigerRun(loc[0].lower(),loc[1],self.engine,self.subhyp) for loc in locations if loc[0].lower() in clusters.keys()+['local']]
|
|
770
|
+
|
|
771
|
+
# SET LABELS
|
|
772
|
+
self.label = label
|
|
773
|
+
self.latexlabel = latexlabel
|
|
774
|
+
|
|
775
|
+
# DATA STRUCTURES TO BE FILLED USING FUNCTIONS
|
|
776
|
+
self.nsources=0
|
|
777
|
+
self.bayes = empty((0,len(self.subhyp)))
|
|
778
|
+
self.snr = empty(0)
|
|
779
|
+
|
|
780
|
+
def searchsources(self):
|
|
781
|
+
"""
|
|
782
|
+
FIND COMPLETED JOBS AND GET THE FILESNAMES
|
|
783
|
+
"""
|
|
784
|
+
|
|
785
|
+
for loc in self.locations:
|
|
786
|
+
loc.searchsources()
|
|
787
|
+
self.nsources += loc.nsources
|
|
788
|
+
|
|
789
|
+
stdout.write("--> searching sources: Total number of sources - %d\n" % self.nsources)
|
|
790
|
+
|
|
791
|
+
def pullbayes(self):
|
|
792
|
+
"""
|
|
793
|
+
PULL DATA FROM REMOTE OR LOCAL LOCATIONS
|
|
794
|
+
"""
|
|
795
|
+
|
|
796
|
+
for loc in self.locations:
|
|
797
|
+
if loc.nsources > 0:
|
|
798
|
+
loc.pullbayes()
|
|
799
|
+
self.bayes=vstack((self.bayes,loc.bayes))
|
|
800
|
+
stdout.write("--> pulling Bayes factors: matrix size - %d x %d\n" % (shape(self.bayes)[0], shape(self.bayes)[1]))
|
|
801
|
+
|
|
802
|
+
def pullsnr(self):
|
|
803
|
+
"""
|
|
804
|
+
PULL DATA FROM REMOTE OR LOCAL LOCATIONS
|
|
805
|
+
"""
|
|
806
|
+
for loc in self.locations:
|
|
807
|
+
if loc.nsources > 0:
|
|
808
|
+
loc.pullsnr()
|
|
809
|
+
self.snr=hstack((self.snr,loc.snr))
|
|
810
|
+
stdout.write("--> pulling SNRs: total number of sources %d\n" % (len(self.snr)))
|
|
811
|
+
|
|
812
|
+
def pullposteriors(self):
|
|
813
|
+
"""
|
|
814
|
+
PULLING THE POSTERIOR FILES
|
|
815
|
+
"""
|
|
816
|
+
for loc in self.locations:
|
|
817
|
+
if loc.nsources > 0:
|
|
818
|
+
loc.pullposteriors()
|
|
819
|
+
|
|
820
|
+
def odds(self,N=1):
|
|
821
|
+
"""
|
|
822
|
+
CALCULATE THE TOTAL ODDS FROM DATA STRUCTURE
|
|
823
|
+
"""
|
|
824
|
+
odds = empty(0)
|
|
825
|
+
for i in range(self.nsources/N):
|
|
826
|
+
odds = append(odds,OddsFromBayes(self.bayes[i*N:(i+1)*N,:], len(self.testcoef)))
|
|
827
|
+
return odds
|
|
828
|
+
|
|
829
|
+
def applycut(self, st=8.0,bt=32.0):
|
|
830
|
+
"""
|
|
831
|
+
APPLY DETECTION CUTS (SNR AND BAYESGR)
|
|
832
|
+
"""
|
|
833
|
+
stdout.write("... %s - before cut: %d sources\n" % (self.label,self.nsources))
|
|
834
|
+
|
|
835
|
+
for loc in self.locations:
|
|
836
|
+
if loc.nsources > 0:
|
|
837
|
+
loc.applycut(st=st, bt=bt)
|
|
838
|
+
|
|
839
|
+
# RELOAD BAYES, SNR AND GPS
|
|
840
|
+
self.bayes = empty((0,len(self.subhyp)))
|
|
841
|
+
self.snr = empty(0)
|
|
842
|
+
for loc in self.locations:
|
|
843
|
+
if loc.nsources > 0:
|
|
844
|
+
self.bayes=vstack((self.bayes,loc.bayes))
|
|
845
|
+
self.snr=hstack((self.snr,loc.snr))
|
|
846
|
+
self.nsources=shape(self.bayes)[0]
|
|
847
|
+
|
|
848
|
+
stdout.write("... %s - after cut: %d sources\n" % (self.label,self.nsources))
|
|
849
|
+
|
|
850
|
+
def shufflesources(self,seed):
|
|
851
|
+
"""
|
|
852
|
+
APPLY DETECTION CUTS (SNR AND BAYESGR)
|
|
853
|
+
"""
|
|
854
|
+
|
|
855
|
+
print("... Shuufling with seed", str(seed))
|
|
856
|
+
|
|
857
|
+
# CREATE NEW ORDER OF SOURCES
|
|
858
|
+
if (self.nsources != 0) and (self.nsources == shape(self.bayes)[0]):
|
|
859
|
+
order = arange(self.nsources)
|
|
860
|
+
random.seed(seed)
|
|
861
|
+
random.shuffle(order)
|
|
862
|
+
|
|
863
|
+
# UPDATE DATA
|
|
864
|
+
self.bayes = self.bayes[order,:]
|
|
865
|
+
self.snr = self.snr[order]
|
|
866
|
+
|
|
867
|
+
def savetopickle(self,dest):
|
|
868
|
+
"""
|
|
869
|
+
SAVE DATA TO PICKLE FOR QUICK FUTURE LOADING
|
|
870
|
+
"""
|
|
871
|
+
|
|
872
|
+
# SAVING TO PICKLE
|
|
873
|
+
f = open(dest,'wb')
|
|
874
|
+
dump(self,f,2)
|
|
875
|
+
|
|
876
|
+
def savetoascii(self,filename):
|
|
877
|
+
"""
|
|
878
|
+
SAVE DATA TO ASCII FILE FOR QUICK FUTURE LOADING.
|
|
879
|
+
NB: BROKEN - DO NOT USE!
|
|
880
|
+
"""
|
|
881
|
+
# PRINT DATA FOR FUTURE USE
|
|
882
|
+
savedata = empty((0,4+len(self.subhyp))) # cluster, directory, gps, bayes, ...., netsnr
|
|
883
|
+
for loc in self.locations:
|
|
884
|
+
if loc.nsources > 0:
|
|
885
|
+
locsdata = column_stack(([loc.cluster]*loc.nsources, [loc.directory]*loc.nsources))
|
|
886
|
+
savedatatmp = column_stack((locsdata,loc.gps,loc.bayes,loc.snr))
|
|
887
|
+
savedata = vstack((savedata,savedatatmp))
|
|
888
|
+
header = array(concatenate((["#cluster",'folder','gps'],self.subhyp,['netsnr'])))
|
|
889
|
+
savedata = vstack((header,savedata))
|
|
890
|
+
savetxt(filename,savedata,delimiter='\t',fmt='%s')
|
|
891
|
+
|
|
892
|
+
def preprocess(self):
|
|
893
|
+
"""
|
|
894
|
+
PREPROCESS DATA ON THE CLUSTERS BEFORE SENDING DATA TO MASTER.
|
|
895
|
+
NB: UNDER DEVELOPMENT
|
|
896
|
+
"""
|
|
897
|
+
for loc in self.locations:
|
|
898
|
+
# CREATE PREPROCESSFILE
|
|
899
|
+
print('Writing preprocessfile')
|
|
900
|
+
preprocesstmp = 'tig_preprocess_tmp.txt'
|
|
901
|
+
preprocessfp = open(preprocesstmp,'w')
|
|
902
|
+
preprocessfp.write('local')
|
|
903
|
+
preprocessfp.write('\t')
|
|
904
|
+
preprocessfp.write(loc.directory)
|
|
905
|
+
preprocessfp.write('\t')
|
|
906
|
+
preprocessfp.write(self.engine)
|
|
907
|
+
preprocessfp.write('\t')
|
|
908
|
+
preprocessfp.write(str(loc.subhyp))
|
|
909
|
+
preprocessfp.close()
|
|
910
|
+
print('Writing preprocessfile - done')
|
|
911
|
+
|
|
912
|
+
# UPLOAD FILE AND RUN: TESTING PHASE
|
|
913
|
+
command = ""
|
|
914
|
+
command += "gsiscp -C"
|
|
915
|
+
command += " "
|
|
916
|
+
command += scriptfilename
|
|
917
|
+
command += " "
|
|
918
|
+
command += preprocesstmp
|
|
919
|
+
command += " "
|
|
920
|
+
command += clusters[loc.cluster]+":~/"
|
|
921
|
+
print(command)
|
|
922
|
+
p = Popen(command, stdout=PIPE, stderr=PIPE,shell=True)
|
|
923
|
+
p.communicate()
|
|
924
|
+
if p.returncode == 0:
|
|
925
|
+
command = "gsissh "+clusters[loc.cluster]+" 'python "+path.basename(scriptfilename)+" -p "+preprocesstmp+"'"
|
|
926
|
+
print(command)
|
|
927
|
+
p = Popen(command, stdout=PIPE, stderr=PIPE,shell=True)
|
|
928
|
+
print(p.stdout.read())
|
|
929
|
+
print(p.stderr.read())
|
|
930
|
+
exit(0)
|
|
931
|
+
|
|
932
|
+
|
|
933
|
+
###############################################################################
|
|
934
|
+
#
|
|
935
|
+
# FUNCTIONS
|
|
936
|
+
#
|
|
937
|
+
###############################################################################
|
|
938
|
+
|
|
939
|
+
def LoadPickledTigerSet(filename):
|
|
940
|
+
"""
|
|
941
|
+
LOAD FROM PICKLE
|
|
942
|
+
"""
|
|
943
|
+
print('... Loading file from pickle',filename)
|
|
944
|
+
fp = open(filename,'rb')
|
|
945
|
+
return load(fp)
|
|
946
|
+
|
|
947
|
+
def ensure(f):
|
|
948
|
+
"""
|
|
949
|
+
CREATE DIRECTORY IF IT DOES NOT EXIST
|
|
950
|
+
"""
|
|
951
|
+
if not path.exists(f):
|
|
952
|
+
makedirs(f)
|
|
953
|
+
|
|
954
|
+
def lnPLUS(x,y):
|
|
955
|
+
"""
|
|
956
|
+
FUNCTION TO ADD IN LOGARITHMIC SPACE
|
|
957
|
+
"""
|
|
958
|
+
|
|
959
|
+
output = 0.0
|
|
960
|
+
if x>y:
|
|
961
|
+
output = x+log(1.0+exp(y-x))
|
|
962
|
+
else:
|
|
963
|
+
output = y+log(1.0+exp(x-y))
|
|
964
|
+
|
|
965
|
+
return output
|
|
966
|
+
|
|
967
|
+
def OddsFromBayes(matrix, Nhyp):
|
|
968
|
+
"""
|
|
969
|
+
CALCULATE THE TOTAL ODDS FROM DATA STRUCTURE
|
|
970
|
+
"""
|
|
971
|
+
|
|
972
|
+
TotalOdds = -float_info.max
|
|
973
|
+
# ONE SMALLER THAN THE WIDTH OF THE MATRIX FOR GR
|
|
974
|
+
for j in range(shape(matrix)[1]-1):
|
|
975
|
+
TotalOdds = lnPLUS(TotalOdds, sum(matrix[:, j+1]-matrix[:, 0]))
|
|
976
|
+
TotalOdds -= log(pow(2,Nhyp)-1)
|
|
977
|
+
|
|
978
|
+
return TotalOdds
|
|
979
|
+
|
|
980
|
+
def TigerCreateHistogram(list_tigerruns, axis, N=1, xlim=None,bins=50):
|
|
981
|
+
"""
|
|
982
|
+
CREATE TIGER HISTOGRAMS FROM A LIST OF TIGERRUNS
|
|
983
|
+
"""
|
|
984
|
+
for i in range(len(list_tigerruns)):
|
|
985
|
+
if N == 1:
|
|
986
|
+
# PLOT HISTOGRAMS
|
|
987
|
+
axis.hist(list_tigerruns[i].odds(N), \
|
|
988
|
+
facecolor="none", \
|
|
989
|
+
label=list_tigerruns[i].latexlabel+r"\n$\mathrm{("+str(size(list_tigerruns[i].odds(N)))+r"\; sources)}$", \
|
|
990
|
+
histtype="stepfilled", \
|
|
991
|
+
linewidth=1, \
|
|
992
|
+
range=xlim, \
|
|
993
|
+
bins = bins, \
|
|
994
|
+
hatch = hatch_default[i], \
|
|
995
|
+
edgecolor = color_default[i], \
|
|
996
|
+
density=True)
|
|
997
|
+
# ADD X-AXIS LABEL
|
|
998
|
+
axis.set_xlabel(r"$\ln{O_{GR}^{modGR}}$")
|
|
999
|
+
axis.set_ylabel(r"$P(\ln{O_{GR}^{modGR}})$")
|
|
1000
|
+
elif N < list_tigerruns[i].nsources:
|
|
1001
|
+
# PLOT HISTOGRAMS
|
|
1002
|
+
axis.hist(list_tigerruns[i].odds(N), \
|
|
1003
|
+
facecolor="none", \
|
|
1004
|
+
label=list_tigerruns[i].latexlabel+r"\n$\mathrm{("+str(size(list_tigerruns[i].odds(N)))+r"\; catalogs)}$", \
|
|
1005
|
+
histtype="stepfilled", \
|
|
1006
|
+
linewidth=1, \
|
|
1007
|
+
range=xlim, \
|
|
1008
|
+
bins = bins, \
|
|
1009
|
+
hatch = hatch_default[i], \
|
|
1010
|
+
edgecolor = color_default[i], \
|
|
1011
|
+
density=True)
|
|
1012
|
+
# ADD X-AXIS LABEL
|
|
1013
|
+
axis.set_xlabel(r"$\ln{\mathcal{O}_{GR}^{modGR}}$")
|
|
1014
|
+
axis.set_ylabel(r"$P(\ln{\mathcal{O}_{GR}^{modGR}})$")
|
|
1015
|
+
|
|
1016
|
+
# ADD LEGEND
|
|
1017
|
+
handles, labels = axis.get_legend_handles_labels()
|
|
1018
|
+
axis.legend(handles, labels, loc='upper left')
|
|
1019
|
+
|
|
1020
|
+
def TigerCalculateEfficiency(list_tigerruns, N=1, beta=[0.95], background=0):
|
|
1021
|
+
"""
|
|
1022
|
+
CALCULATE EFFICIENCY FROM A LIST OF TIGERRUNS
|
|
1023
|
+
"""
|
|
1024
|
+
efficiencies = []
|
|
1025
|
+
OddsBeta=[mquantiles(list_tigerruns[background].odds(N),prob=[b]) for b in beta]
|
|
1026
|
+
efficiencies = empty((len(list_tigerruns)-1,len(beta)))
|
|
1027
|
+
for i in range(len(list_tigerruns)):
|
|
1028
|
+
if N>list_tigerruns[i].nsources:
|
|
1029
|
+
stdout.write("... Warning: Not sufficient events (%s) to calculate the efficiency for %s sources. Writing zeros\n"%(list_tigerruns[i].nsources,N))
|
|
1030
|
+
if i < background:
|
|
1031
|
+
efficiencies[i,:] = 0.0
|
|
1032
|
+
else:
|
|
1033
|
+
efficiencies[i-1,:] = 0.0
|
|
1034
|
+
continue
|
|
1035
|
+
if i != background:
|
|
1036
|
+
tmp = list_tigerruns[i].odds(N)
|
|
1037
|
+
for j in range(len(OddsBeta)):
|
|
1038
|
+
msk = tmp>OddsBeta[j]
|
|
1039
|
+
nmsk = tmp<OddsBeta[j]
|
|
1040
|
+
nabovebeta=len(tmp[msk])
|
|
1041
|
+
ntotal=len(tmp)
|
|
1042
|
+
eff=float(nabovebeta)/float(ntotal)
|
|
1043
|
+
if i < background:
|
|
1044
|
+
efficiencies[i,j] = eff
|
|
1045
|
+
else:
|
|
1046
|
+
efficiencies[i-1,j] = eff
|
|
1047
|
+
return efficiencies
|
|
1048
|
+
|
|
1049
|
+
def TigerKSandPvalue(tigerrun1,tigerrun2, N=1):
|
|
1050
|
+
"""
|
|
1051
|
+
CALCULATE KS STATISTICS FROM A LIST OF TIGERRUNS
|
|
1052
|
+
"""
|
|
1053
|
+
if tigerrun1.nsources < N or tigerrun2.nsources < N:
|
|
1054
|
+
stdout.write("... Warning: Not sufficient events (%s,%s) to calculate KS-statistic for %s sources. Writing zeros\n"%(tigerrun1.nsources, tigerrun2.nsources,N))
|
|
1055
|
+
return [0.0,0.0]
|
|
1056
|
+
data1 = tigerrun1.odds(N)
|
|
1057
|
+
data2 = tigerrun2.odds(N)
|
|
1058
|
+
ksstat, pvalue = ks_2samp(data1,data2)
|
|
1059
|
+
return [ksstat, pvalue]
|
|
1060
|
+
|
|
1061
|
+
|
|
1062
|
+
def TigerCreateSNRvsOdds(list_tigerruns, axis):
|
|
1063
|
+
"""
|
|
1064
|
+
CREATE SNR VS ODDS DIAGRAMS FROM A LIST OF TIGERRUNS
|
|
1065
|
+
"""
|
|
1066
|
+
markers = ['x','o']
|
|
1067
|
+
colors = ['blue','red']
|
|
1068
|
+
axis.set_xlabel(r"$\mathrm{SNR}$")
|
|
1069
|
+
axis.set_ylabel(r"$\ln{O_{\mathrm{GR}}^{\mathrm{modGR}}}$")
|
|
1070
|
+
|
|
1071
|
+
for i in range(len(list_tigerruns)):
|
|
1072
|
+
axis.scatter(list_tigerruns[i].snr, list_tigerruns[i].odds(), \
|
|
1073
|
+
color=colors[i], \
|
|
1074
|
+
marker=markers[i], \
|
|
1075
|
+
label=list_tigerruns[i].latexlabel+r"\n$\mathrm{("+str(list_tigerruns[i].nsources)+r"\; sources)}$",\
|
|
1076
|
+
s=64)
|
|
1077
|
+
|
|
1078
|
+
# SET AXIS LIMITS
|
|
1079
|
+
axis.set_xlim(5.0,50.0)
|
|
1080
|
+
|
|
1081
|
+
# ADD LEGEND
|
|
1082
|
+
handles, labels = axis.get_legend_handles_labels()
|
|
1083
|
+
axis.legend(handles, labels, loc='best')
|
|
1084
|
+
|
|
1085
|
+
return None
|
|
1086
|
+
|
|
1087
|
+
def TigerCreateCumFreq(tigerrun, axis):
|
|
1088
|
+
"""
|
|
1089
|
+
CREATE CUMULATIVE FREQUENCY DIAGRAMS FROM A LIST OF TIGERRUNS
|
|
1090
|
+
"""
|
|
1091
|
+
xlim = [5.0,100.0]
|
|
1092
|
+
snrrange = arange(xlim[0], xlim[1], 5.)
|
|
1093
|
+
nsnrsteps = len(snrrange)
|
|
1094
|
+
freqs = zeros((nsnrsteps,tigerrun.nsubhyp))
|
|
1095
|
+
|
|
1096
|
+
for i in range(nsnrsteps):
|
|
1097
|
+
if snrrange[i] > min(tigerrun.snr):
|
|
1098
|
+
snrmask = tigerrun.snr<snrrange[i]
|
|
1099
|
+
bayesmasked = tigerrun.bayes[snrmask,:]
|
|
1100
|
+
maxarray = list(argmax(bayesmasked, axis=1))
|
|
1101
|
+
for j in range(tigerrun.nsubhyp):
|
|
1102
|
+
freqs[i,j] = maxarray.count(j)
|
|
1103
|
+
|
|
1104
|
+
# CHECK IF TOTAL ADDS UP TO TOTAL NUMBER OF SOURCES
|
|
1105
|
+
if sum(freqs[-1,:]) != tigerrun.nsources:
|
|
1106
|
+
print(r"Warning, some sources maybe out of the SNR range and are not plotted: SNR \in [%.1f:%.1f], %i sources missing" %(xlim[0], xlim[1], tigerrun.nsources-sum(freqs[-1,:])))
|
|
1107
|
+
|
|
1108
|
+
# PLOT CUMULATIVE HIGHEST BAYES SIGNAL VERSUS NOISE
|
|
1109
|
+
rcParams['legend.fontsize']=18 # MANUAL RESET FONTSIZE
|
|
1110
|
+
linestyles = cycle(['-', '--', '-.', ':'])
|
|
1111
|
+
markerstyles = cycle(['+','*','.','<','d', '^', 'x', 's'])
|
|
1112
|
+
colorstyles = cycle(["b", "g","r","c","m","y","k"])
|
|
1113
|
+
|
|
1114
|
+
for i in range(tigerrun.nsubhyp):
|
|
1115
|
+
if tigerrun.subhyp[i].split("_")[-1] =="GR":
|
|
1116
|
+
axis.plot(snrrange, freqs[:,i], label=r'$\mathcal{H}_{\mathrm{GR}}$', color="black", linewidth=3.0)
|
|
1117
|
+
else:
|
|
1118
|
+
if tigerrun.engine == 'lalnest':
|
|
1119
|
+
curlabel = "$H_{"+''.join(tigerrun.subhyp[i].split("_")[-1].split('dphi'))+"}$"
|
|
1120
|
+
elif tigerrun.engine == 'lalinference':
|
|
1121
|
+
curlabel="$H_{"+''.join(tigerrun.subhyp[i].split("_")[-1].split('dchi'))+"}$"
|
|
1122
|
+
axis.plot(snrrange, freqs[:,i], \
|
|
1123
|
+
label=curlabel,\
|
|
1124
|
+
marker=markerstyles.next(), \
|
|
1125
|
+
linestyle='--', \
|
|
1126
|
+
linewidth=1.0, \
|
|
1127
|
+
color=colorstyles.next())
|
|
1128
|
+
|
|
1129
|
+
axis.set_xlabel(r"$\mathrm{SNR}$")
|
|
1130
|
+
axis.set_ylabel(r"$\mathrm{Cumulative\;frequency\;(lines)}$")
|
|
1131
|
+
axis.set_xlim(xlim)
|
|
1132
|
+
|
|
1133
|
+
# ADD LEGEND
|
|
1134
|
+
handles, labels = axis.get_legend_handles_labels()
|
|
1135
|
+
axis.legend(handles, labels, loc='best',ncol=3)
|
|
1136
|
+
|
|
1137
|
+
# DRAW HISTOGRAM
|
|
1138
|
+
ax2 = axis.twinx()
|
|
1139
|
+
ax2.hist(tigerrun.snr, range=xlim, bins=nsnrsteps, alpha=0.25, color="k")
|
|
1140
|
+
ax2.grid(False)
|
|
1141
|
+
ax2.set_ylabel(r'$\mathrm{\#\;of\;sources\;per\;SNR\;bin\;(hist)}$')
|
|
1142
|
+
ax2.set_xlim(xlim)
|
|
1143
|
+
|
|
1144
|
+
def TigerCreateCumBayes(tigerrun,axis,nthcat,nsourcespercat):
|
|
1145
|
+
"""
|
|
1146
|
+
CREATE CUMULATIVE BAYES FACTOR/ODDS DIAGRAMS FROM A LIST OF TIGERRUNS (FOR
|
|
1147
|
+
EACH CATALOG)
|
|
1148
|
+
"""
|
|
1149
|
+
|
|
1150
|
+
# COUNT CUMULATIVE FREQUENCY OF HIGHEST BAYES (SIGNAL VS. NOISE)
|
|
1151
|
+
snrcat = tigerrun.snr[nthcat*nsourcespercat:(nthcat+1)*nsourcespercat]
|
|
1152
|
+
bayescat = tigerrun.bayes[nthcat*nsourcespercat:(nthcat+1)*nsourcespercat,:]
|
|
1153
|
+
sortorder = argsort(snrcat)
|
|
1154
|
+
snrcatsorted = sort(snrcat)
|
|
1155
|
+
bayescatsorted = bayescat[sortorder,:]
|
|
1156
|
+
cumodds = array([OddsFromBayes(bayescatsorted[:i+1,:],len(tigerrun.testcoef)) for i in range(nsourcespercat)])
|
|
1157
|
+
cumbayes = array([sum(subtract(bayescatsorted[:i+1,1:].T,bayescatsorted[:i+1,0]).T,axis=0) for i in range(nsourcespercat)])
|
|
1158
|
+
|
|
1159
|
+
markerstyles = cycle(['+','*','.','<','d', '^', 'x', 's'])
|
|
1160
|
+
|
|
1161
|
+
axis.set_xlabel(r"$\mathrm{SNR}$")
|
|
1162
|
+
axis.set_ylabel(r"$\ln{{}^{(cat)}B^{i_1 i_2 \ldots i_k}_{\mathrm{GR}}}$")
|
|
1163
|
+
|
|
1164
|
+
# PLOT BAYESFACTORS
|
|
1165
|
+
for i in range(tigerrun.nsubhyp-1):
|
|
1166
|
+
|
|
1167
|
+
if tigerrun.engine == 'lalnest':
|
|
1168
|
+
curlabel = "$H_{"+''.join(tigerrun.subhyp[i+1].split("_")[-1].split('dphi'))+"}$"
|
|
1169
|
+
elif tigerrun.engine == 'lalinference':
|
|
1170
|
+
curlabel="$H_{"+''.join(tigerrun.subhyp[i+1].split("_")[-1].split('dchi'))+"}$"
|
|
1171
|
+
|
|
1172
|
+
axis.plot(snrcatsorted, cumbayes[:,i],\
|
|
1173
|
+
label=curlabel, \
|
|
1174
|
+
marker=markerstyles.next(), \
|
|
1175
|
+
linestyle='--', \
|
|
1176
|
+
linewidth=1.0)
|
|
1177
|
+
|
|
1178
|
+
# PLOT ODDS RATIO
|
|
1179
|
+
axis.plot(snrcatsorted, cumodds, label=r"$\ln{O_{GR}^{modGR}}$", linewidth=2.0, color="black")
|
|
1180
|
+
|
|
1181
|
+
axis.set_xlim(5.0,50.0)
|
|
1182
|
+
# ADD LEGEND
|
|
1183
|
+
handles, labels = axis.get_legend_handles_labels()
|
|
1184
|
+
axis.legend(handles, labels, loc='best',ncol=3)
|
|
1185
|
+
|
|
1186
|
+
def TigerCreateExampleConfigFile(filename):
|
|
1187
|
+
"""
|
|
1188
|
+
CREATE EXAMPLE CONFIGURATION FILE (TO BE USED WITH -G OPTION)
|
|
1189
|
+
"""
|
|
1190
|
+
basename = path.basename(filename)
|
|
1191
|
+
dirname = path.dirname(filename)
|
|
1192
|
+
if dirname == '':
|
|
1193
|
+
dirname = './'
|
|
1194
|
+
|
|
1195
|
+
# CREATE DIRECTORY IF IT DOES NOT EXIST
|
|
1196
|
+
ensure(dirname)
|
|
1197
|
+
|
|
1198
|
+
# OPEN FILE
|
|
1199
|
+
outfile = open(path.join(dirname,basename),'w')
|
|
1200
|
+
|
|
1201
|
+
examplecfgtxt="""\
|
|
1202
|
+
###############################################################################
|
|
1203
|
+
#
|
|
1204
|
+
# Configuration file for tiger_postproc.py
|
|
1205
|
+
#
|
|
1206
|
+
###############################################################################
|
|
1207
|
+
|
|
1208
|
+
#------------------------------------------------------------------------------
|
|
1209
|
+
[run]
|
|
1210
|
+
#------------------------------------------------------------------------------
|
|
1211
|
+
|
|
1212
|
+
# Engine for TIGER runs: lalnest or lalinference
|
|
1213
|
+
engine=engine1,engine2
|
|
1214
|
+
|
|
1215
|
+
# Subhypotheses: Notation depends on engine.
|
|
1216
|
+
# lalnest: dphi1,dphi2,...
|
|
1217
|
+
# lalinference: dchi1,dchi2,...
|
|
1218
|
+
hypotheses=dphi1,dphi2,dphi3
|
|
1219
|
+
|
|
1220
|
+
# Run identifier (used in filenames for plots)
|
|
1221
|
+
runid=name_for_run
|
|
1222
|
+
|
|
1223
|
+
# Local destination folder for postproc files: created if non-existing
|
|
1224
|
+
localdest=/home/user/public_html/tiger/inj_tt4spin_tt4all_rec_tf2spin/
|
|
1225
|
+
|
|
1226
|
+
#------------------------------------------------------------------------------
|
|
1227
|
+
[fetch]
|
|
1228
|
+
#------------------------------------------------------------------------------
|
|
1229
|
+
|
|
1230
|
+
# Fetch data from (one per type of runs)
|
|
1231
|
+
# - source : directly from output of engine
|
|
1232
|
+
# - pickle : saved state
|
|
1233
|
+
type=source,source
|
|
1234
|
+
|
|
1235
|
+
# Location files.(one per type of runs)
|
|
1236
|
+
# source: ascii file two columns: cluster directory
|
|
1237
|
+
# cluster: (atlas, nemo, cit, lho, llo, or local)
|
|
1238
|
+
# pickle: location to python pickle file
|
|
1239
|
+
locs=/path/to/the/location/file.txt,/path/to/the/location/file.txt
|
|
1240
|
+
|
|
1241
|
+
# Labels (one for each type of runs)
|
|
1242
|
+
labels=tt4spin,tt4all
|
|
1243
|
+
|
|
1244
|
+
# Latex labels for different runs for plot legends (one for each run type).
|
|
1245
|
+
# Currently not working with commas in the latex itself!
|
|
1246
|
+
latexlabels=$\\mathrm{TaylorT4+spin}$,$\\mathrm{TaylorT4+all}$
|
|
1247
|
+
|
|
1248
|
+
# Seed for shuffling the sources. seed=0 means no shuffling
|
|
1249
|
+
# NB: NOT WORKING!
|
|
1250
|
+
seed=0
|
|
1251
|
+
|
|
1252
|
+
#------------------------------------------------------------------------------
|
|
1253
|
+
[cut]
|
|
1254
|
+
#------------------------------------------------------------------------------
|
|
1255
|
+
|
|
1256
|
+
# SNR threshold
|
|
1257
|
+
snrthres=8.0
|
|
1258
|
+
|
|
1259
|
+
# B^GR_noise cutoff
|
|
1260
|
+
bayesgrthres=32.0
|
|
1261
|
+
|
|
1262
|
+
#------------------------------------------------------------------------------
|
|
1263
|
+
[plot]
|
|
1264
|
+
#------------------------------------------------------------------------------
|
|
1265
|
+
|
|
1266
|
+
# Plot histograms (see [hist] for plotting options)
|
|
1267
|
+
hist=true
|
|
1268
|
+
|
|
1269
|
+
# Plot SNR vs odds scatter plot (see [snrvsodds] for plotting options)
|
|
1270
|
+
snrvsodds=true
|
|
1271
|
+
|
|
1272
|
+
# Plot cumulative frequency of a subhypothesis having the highest Bayes factor
|
|
1273
|
+
# (see [cumfreq] for plotting options)
|
|
1274
|
+
cumfreq=true
|
|
1275
|
+
|
|
1276
|
+
# Plot cumulative Bayes factor, per subhypothesis, and the odds ratio, as a
|
|
1277
|
+
# function of SNR, per catalog. (see [cumbayes] for plotting options).
|
|
1278
|
+
cumbayes=false
|
|
1279
|
+
|
|
1280
|
+
# File output extensions: png required for html page
|
|
1281
|
+
# Other supported formats: pdf, ps, eps, svg
|
|
1282
|
+
types=png,pdf
|
|
1283
|
+
|
|
1284
|
+
#------------------------------------------------------------------------------
|
|
1285
|
+
[hist]
|
|
1286
|
+
#------------------------------------------------------------------------------
|
|
1287
|
+
|
|
1288
|
+
# Number of bins in the histograms
|
|
1289
|
+
bins=50
|
|
1290
|
+
|
|
1291
|
+
# Number of sources per catalog for the histograms
|
|
1292
|
+
nsources=1,15
|
|
1293
|
+
|
|
1294
|
+
# Limits on the x-axis. Use xlim=0,0 for automatic determination (range will be
|
|
1295
|
+
# the same for ALL sizes of the catalog).
|
|
1296
|
+
xlim=0,0
|
|
1297
|
+
|
|
1298
|
+
#------------------------------------------------------------------------------
|
|
1299
|
+
[snrvsodds]
|
|
1300
|
+
#------------------------------------------------------------------------------
|
|
1301
|
+
|
|
1302
|
+
|
|
1303
|
+
#------------------------------------------------------------------------------
|
|
1304
|
+
[cumbayes]
|
|
1305
|
+
#------------------------------------------------------------------------------
|
|
1306
|
+
|
|
1307
|
+
"""
|
|
1308
|
+
|
|
1309
|
+
outfile.write(examplecfgtxt)
|
|
1310
|
+
|
|
1311
|
+
def TigerPreProcess(preprocessfile):
|
|
1312
|
+
"""
|
|
1313
|
+
TIGER PREPROCESSOR FUNCTION
|
|
1314
|
+
NB: UNDER DEVELOPMENT
|
|
1315
|
+
"""
|
|
1316
|
+
if access(preprocessfile, R_OK):
|
|
1317
|
+
preprocessfp = open(preprocessfile,'r')
|
|
1318
|
+
args = preprocessfp.read().split('\t')
|
|
1319
|
+
subhyp= args[3][1:-1].replace("'","").replace(" ","").split(',')
|
|
1320
|
+
tgloc = TigerRun(args[0].lower(),args[1],args[2],subhyp)
|
|
1321
|
+
tgloc.searchsources()
|
|
1322
|
+
tgloc.pullbayes()
|
|
1323
|
+
tgloc.pullposteriors()
|
|
1324
|
+
tgloc.savetopickle('tigerloc_preprocess.pickle')
|
|
1325
|
+
exit(0)
|
|
1326
|
+
else:
|
|
1327
|
+
exit('Preprocess file cannot be found - abort')
|
|
1328
|
+
|
|
1329
|
+
###############################################################################
|
|
1330
|
+
#
|
|
1331
|
+
# START THE MAIN FUNCTION
|
|
1332
|
+
#
|
|
1333
|
+
###############################################################################
|
|
1334
|
+
|
|
1335
|
+
if __name__ == "__main__":
|
|
1336
|
+
# START THE MAIN FUNCTION IF RUN AS A SCRIPT. OTHERWISE, JUST LOADS THE CLASS
|
|
1337
|
+
# AND FUNCTION DEFINITIONS
|
|
1338
|
+
exit(main())
|