Create Mass gap review authored by Sushant Sharma-Chaudhary's avatar Sushant Sharma-Chaudhary
# Mass Gap
## Step-wise installation of packages:
1. Clone the repository in a desired directory.
```
git clone git@git.ligo.org:sushant.sharma-chaudhary/em-bright-gp.git
cd em-bright-gp
git checkout massgap
```
2. Create a anaconda environment using: `conda create -n {name} python=3.{8/9}`
3. Activate the environment : `conda activate {name}`
4. Install poetry using : `pip install poetry`
5. Go to the em-bright cloned directory and install the package using : `poetry install`
## Training classifier
1. Change configurations for training in `etc/conf.ini` (if required)
2. Creating condor jobs for training:
```
em_bright_dag_writer
-d {filename}.dag \
-w {output_dir} \
-i /home/sushant.sharma-chaudhary/O2-HL-rates-injections \
-c {CLONED_PROJECT_DIRECTORY}/etc/conf.ini \
-e $(dirname `which em_bright_dag_writer`) \
--mass-gap
```
3. Change directory to `{output_dir}`
4. Submit condor jobs :
` condor_submit_dag {filename}.dag`
## Output files
1. The `mass_gap.pickle` output is stored at `{output_dir}` directory
2. The `parameter_sweep_mass_gap.png` is also stored at `{output_dir}` directory
## Testing classifier on gstlal reconstructed data
1. If you have previously installed em-bright-gp then: `rm ~/.ligo.em_bright`
2. In the conda environment open python
```
from ligo.em_bright import em_bright
em_bright.source_classification_genetic_prog({m1},{m2},{chi1},{chi2},{snr})
Output
(p_NS, p_EMB, p_massgap)
```