Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
gw_inference [2023/06/13 16:11]
theoastro
gw_inference [2023/06/25 15:26] (current)
theoastro
Line 30: Line 30:
    duration = 128    duration = 128
      
-################################################################################+  ################################################################################
   ## Job submission arguments   ## Job submission arguments
   ################################################################################   ################################################################################
Line 45: Line 45:
   time-marginalization=False   time-marginalization=False
      
 +  ################################################################################
 +  ## Prior arguments
 +  ################################################################################
 +  
 +  prior-file = GW170817.prior
 +  
 +  ################################################################################
 +  ## Waveform arguments
 +  ################################################################################
 +  
 +  frequency-domain-source-model = lal_binary_neutron_star
 +  waveform_approximant = IMRPhenomPv2_NRTidalv2
 +  binary-type=BNS
 +  
 +  ################################################################################
 +  ## EOS arguments
 +  ################################################################################
 +  
 +  with-eos=True 
 +  eos-data=./eos/eos_sorted 
 +  Neos=x<provide_number_EOS_files>
 +  eos-weight=./eos/EOS_sorted_weight.dat
  
-For inferring the source properties of GW170817, we will sample over a set of EOSs that were computed with Chiral Effective Field Theory. The EOS set ''15nsat_cse_natural_R14'' was used in the study of [[https://www.nature.com/articles/s41586-022-04750-w#data-availability| Huth et al.]] and can be downloaded there. In order to + 
 +The trigger time is the time of the observed event. With regard to detector arguments, one has to specify which detectors should be used.  For example, detectors = [H1, L1, V1] stand for LIGO detectors Hanford, Livingston and Virgo. For each detector, the noise power spectral density of gravitational wave detector needs to be provided. Within ''data_dict'',  one needs to provide the  GW170817 data measured within each detector.  
 + 
 +With regard to likelihood arguments, we can specify if want a marginal likelihood that has been integrated over the parameter space, e.g. for distance, phase, or time.  The prior file should be tailored to the observed event, in this case GW170817 but also with regard to the GW model that is used for the parameter estimation. The GW model can be specified in ''waveform_approximant''. Here, we use the phenomenological model [[https://pure.mpg.de/rest/items/item_3058536/component/file_3058537/content|IMRPhenomPv2_NRTidalv2]] for a precessing binary neutron star model.  
 + 
 +For inferring the source properties of GW170817, we will sample over a set of EOSs that were computed with Chiral Effective Field Theory. The EOS set ''15nsat_cse_natural_R14'' was used in the study of [[https://www.nature.com/articles/s41586-022-04750-w#data-availability| Huth et al.]] and can be downloaded there.  In order to make use of the EOS set during the sampling, a pre-routine is required. Within this step, one can include different constraints on the NS EOS such as measurement of NICER or pulsar measurements which is reflected in the ''EOS_sorted_weight.dat'' and one needs to sort the EOS files ''eos_sorted'' in order to reduce sampling time.      
 + 
 +Once the ''config.ini'' file is set, the generation can be run with ''nmma_gw_generation config.ini'' which will create a directory ''outdir''. The submit file for the inference can be found under ''outdir/data/<name_of_analysis>_data_dump.pickle'' in the example above it would be ''GW170817_data_dump.pickle''. For the analysis of GW signals, it is recommended to run the inference (''nmma_gw_analysis <name_of_analysis>_data_dump.pickle'') on larger clusters. An exemplary submit script is shown below:  
 + 
 + #!/bin/bash 
 + #SBATCH -p <queue_name> 
 + #SBATCH --job-name=GW170817 
 + #SBATCH --nodes=17 
 + #SBATCH --ntasks-per-node=48 
 + #SBATCH --time=48:00:00 
 + #SBATCH -o outdir/log_data_analysis/GW170817.log 
 + #SBATCH -e outdir/log_data_analysis/GW170817.err 
 + #SBATCH -D ./ 
 + #SBATCH --export=NONE 
 + #SBATCH --no-requeue 
 + #SBATCH --account=<account_name> 
 + #SBATCH --mail-type=BEGIN,END 
 + #SBATCH --mail-user=<email> 
 +         
 + module load slurm_setup 
 + module load python/3.8 
 + source <path_to_environment>/bin/activate 
 +         
 + export SLURM_EAR_LOAD_MPI_VERSION="intel"    #for Intel MPI 
 + export MKL_NUM_THREADS="1" 
 + export MKL_DYNAMIC="FALSE" 
 + export OMP_NUM_THREADS=1 
 + export MPI_PER_NODE=48 
 +         
 + mpiexec -n $SLURM_NTASKS nmma_gw_analysis outdir/data/GW170817_data_dump.pickle --nlive 2048 --maxmcmc 10000 --nact 10 --no-plot --label GW170817 --outdir outdir/result --sampling-seed 1234 
 + 
 +The final posterior samples for the observed event GW170817 can be found under ''outdir/result/''.
  
 ==== Inference of injected GW signals ==== ==== Inference of injected GW signals ====
  
 +For synthetic signals, the `config.ini` file needs to be slightly adapted. First of all, some injection specific flags need to be provided which are listed below:
 +
 + ################################################################################
 + ## Injection arguments
 + ################################################################################
 +
 + injection = True
 + n-simulation = 1
 + injection-file = ./injections.json
 + injection_numbers=[0]
 +
 +The ''injection = True'' flag enables parameter estimation with injected signals and ''n-simulation = 1'' initiates inference for one synthetic signal. An ''injection-file'' needs to be provided in order to specify for which system the inference should be run. The creation of injected signals is shown [[https://enlil.gw.physik.uni-potsdam.de/dokuwiki/doku.php?id=injections_nmma|here]]. The ''injection_numbers= [0]'' uses in this case only the first signal in the injection file. 
 +
 +Moreover, other flags which are related to an observed event should be commented out such as trigger time and provided observational data. The rest remains the same as shown above for the case of an observed GW event. 
  
  
Last modified: le 2023/06/13 16:11