llama dev background pvalue

Take the output files made by llama dev background table for each population you are interested in and collate them into a single HDF5 file for p-value calculations. All files are expected to be in the current directory, and the output will be in this directory as well.

Both input and output files correspond to background significance values for various source populations. The HDF5 file simply contains a dictionary of ascending-order arrays whose values are the test statistics of background simulations and whose keys are the name of the background population in a specific heirarchical order. These keys are automatically selected when populations-hdf5-collater is run in this directory by splitting the source .txt table filenames on hyphens (-). For example, if the populations folder containg bns-design.txt bns-o2.txt, the output HDF5 populations file will have the following dictionary in it:

{
    "bns": {
        "design": array([...]),
        "o2": array([...])
    }
}

The output HDF5 file is saved to the current directory by default, but if you want to use it for LLAMA p-value calculations, make sure to upload both the tarballed populations directory and the compressed HDF5 file to cloud storage using llama dev upload and then store the new URLs in the RemoteFileCacher instances used for llama.files.coinc_significance.NEUTRINO_POPULATIONS and llama.files.coinc_significance.NEUTRINO_POPULATIONS_TARBALL.

To summarize: you want to download the existing population tarball, decompress it with tar -xzf populations.tar.gz (assuming it’s named populations.tar.gz, of course), move your llama dev background table output text files to that directory, name the new tables in the expected format of {SEARCH_TYPE}-{POPULATION}-{LVCRUN}-{GWDETECTORS}.txt (e.g. opa-bbh-o3-H1V1.txt), run this script in that directory, put the text tables in a compressed tarball called e.g. populations.tar.gz by running tar -czf populations.tar.gz populations in the containing directory, upload both that and the HDF5 file to the cloud with llama dev upload, and then use the URLs in the manifest printed by llama dev upload to update the values of NEUTRINO_POPULATIONS and NEUTRINO_POPULATIONS_TARBALL in the llama.files.coinc_significance source code.

usage: llama dev background pvalue [-h] [-c]

Named Arguments

-c, --clobber

Overwrite “./populations.hdf5” if it already exists. Will not overwrite by default.

Default: False