Skip to content

Package which uses neural networks to emulate the Tolman-Oppenheimer-Volkoff equations for neutron star structure.

License

Notifications You must be signed in to change notification settings

gwastro/pycbc-tovemu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyCBC TOV Emulator Waveform Plugin

Nuclear equation of state (EOS) generator and TOV solver that can be used as a plug-in to PyCBC. The package contains both a "full solver" version and a neural-network based emulator that can be used for fast evaluation.

Installation

To install:

  1. Clone the repository to your local computer:
git clone [email protected]:gwastro/pycbc-tovemu.git
  1. If you wish to install into a virtual environment or a conda environment, activate the environment.

  2. Navigate to the folder that the repository was downloaded to, then install with pip:

cd pycbc-tovemu
pip install .

Using with PyCBC

To use with PyCBC, install PyCBC to the same environment that you installed pycbc-tovemu to. Once installed, PyCBC will automatically detect the plugin at run time and allow you to use it with waveform generation. To tell PyCBC to use the emulator for waveform generation, set the approximant argument to "TOVemulatorTD" or "TOVemulatorFD" if you are generating a time-domain or frequency-domain gravitational wave. Additionally specify the waveform model to generate the gravitational wave by setting the waveform_approximant to the desired model (e.g., "TaylorF2").

For example, to generate a frequency-domain waveform using the 5 parameter EOS model and IMRPhenomD_NRTidal:

from pycbc import waveform

hp, hc = waveform.get_fd_waveform(
    approximant="TOVemulatorFD",
    waveform_approximant="IMRPhenomD_NRTidal",
    srcmass1=1.4,
    srcmass2=1.4,
    mass1=1.4,
    mass2=1.4,
    distance=1,
    f_lower=20,
    delta_f=1/256.,
    nparams=5,
    ksat=240,
    lsym=45,
    ksym=-200,
    cssq2=0.5,
    cssq3=0.5)

Note that both source-frame masses (srcmass1, srcmass2) must be provided in addition to the detector-frame masses (mass1, mass2). The former are used to determine the tidal deformability of each object for the given EOS parameters while the latter are used to generate the waveform. The detector-frame masses are related to the source frame by massX = (1+z)*srcmassX where z is the redshift to the source. The redshift is related to the distance (which is in Mpc), and can be established once a cosmology is assumed. However, no such relationship is assumed here; it is incumbent upon the user to properly calculate the relationship. See the pycbc.cosmology module for useful functions for doing this.

About

Package which uses neural networks to emulate the Tolman-Oppenheimer-Volkoff equations for neutron star structure.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages