Giter Club home page Giter Club logo

gwmem_2022's Introduction

gwmem_2022

Simulation of the gravitational wave memory signals for LISA and ground-based detectors (LIGO-Virgo, LIGO Voyager, Einstein Telescope, Cosmic Explorer). Model selection and parameter estimation.

Based on the paper:

Inferring fundamental spacetime symmetries with gravitational-wave memory: from LISA to the Einstein Telescope

Boris Goncharov, Laura Donnay, Jan Harms (2024, PRL)

Environment to run the code

The first step is to build a singularity/apptainer container image. The container definition file is here: /.def. To build a container, run ``. Next, open container image: singularity shell --bind "/some_new_directory_on_your_machine/:$HOME" gwmem_2022_20230321_3.sif. A few more steps are still needed. First, move surrogate waveforms to `~/gwsurrogate_downloads` in the container. Second, this needs to be performed when inside the container:

pip install ChainConsumer --user
git clone [email protected]:bvgoncharov/GWFish.git
cd GWFish
git checkout development_bg
python -m pip install --user .

Note, python setup.py install did not work for me for GWFish, the package was visible but not its modules.

Now, you can git clone this repository to /some_new_directory_on_your_machine/, the code should work with singularity exec. For example:

singularity exec --bind "/some_new_directory_on_your_machine/:$HOME" gwmem_2022_20230321_3.sif python /home/bgonchar/gwmem_2022/gwfish_analysis/memory_strain_amplitudes.py --outdir "/home/bgonchar/out_gwmem_2022/" --injfile "/home/bgonchar/pops_gwmem_2022/pop_max_o3_bbh_only_1yr_20230606.hdf5" --waveform "NRHybSur3dq8" --waveform_class "gu.LALTD_SPH_Memory" --det "ET" --config "/home/bgonchar/gwmem_2022/gwfish_analysis/detectors/gwfish_detectors_et_10_1024Hz.yaml" --fisher_pars "ra,dec,psi,theta_jn,luminosity_distance,mass_1,mass_2,a_1,a_2,geocent_time,phase,J_E,J_J" --td_fmin 9. --f_ref 20. --mem_sim "J_E,J_J" --j_e 1.0 --j_j 1.0 --label "20230606_m" --num 100 --inj 0

Make sure to adjust paths, and check out other examples in gwfish_analysis/slurm/.

An alternative approach: setting up conda environment

Please follow these steps. Create a new conda virtual environment like this:

conda create -n gwmem_sxs -y -c conda-forge python=3.9
conda activate gwmem_sxs
conda install -c conda-forge gwsurrogate
conda install -c conda-forge sxs
conda install -c conda-forge matplotlib
conda install -c conda-forge bilby
pip install git+ssh://[email protected]/ColmTalbot/gwmemory.git
pip install git+ssh://[email protected]/jblackma/NRSur7dq2.git

Additionally, I work with my fork of GWFish, locally-installed with git clone and python setup.py develop. Optional, useful: conda install -c conda-forge ipdb Optional, for gwmemory notebook: conda install -c conda-forge basemap Optional, for plotting Fisher matrix errors: pip install git+ssh://[email protected]/bvgoncharov/normal_corner.git

In development, gwmemory of Colm was required for jupyter notebook, gwmemory of Moritz required to test waveforms:

memestr
gwmemory/gwmemory_mh

After installation, deactivate the environment and activate it again:

conda deactivate
conda activate gwmem_sxs

This is necessary for LAL packages, otherwise they might not be visible. This also helps in case of the following error: ModuleNotFoundError: No module named 'lal'.

Link the conda environment to Jupyter notebook:

conda install -c anaconda ipykernel
python -m ipykernel install --user --name=gwmem_sxs

Limitations:

  • Bilby will not work with NRSur7dq4 in Jupyter notebook, only in the command line. Sometimes the ipython kernel will not see modules, and needs to be reinstalled: jupyter kernelspec uninstall gwmem_sxs.

To delete the environment (after it is deactivated): conda env remove -n gwmem_sxs

gwmem_2022's People

Contributors

bvgoncharov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.