I am a postdoctoral fellow at CITA.
More information about me can be found on my personal website! Here are some quick links:
This project forked from lscsoft/bilby
License: MIT License
I am a postdoctoral fellow at CITA.
More information about me can be found on my personal website! Here are some quick links:
The _bessel_function_interped method is deprecated and will be removed, please update the implementation of phase marginalization to use bilby.gw.utils.ln_i0
Important when sampling in detector frame times.
If one uses different bins for different detectors, one gets errors. The current code sets common bins for all detectors, even though it calculates stuff for all detectors. This is not a problem if the minimum frequency and the maximum frequency are the same across detectors, but would be a problem otherwise.
We were getting this error:
Traceback (most recent call last):
File "bilby_likelihood_error.py", line 134, in <module>
print("Relative Binning Likelihood:", likelihood_relbin.log_likelihood())
File "/home/aditya.vijaykumar/work/relbin/bilby/bilby/gw/likelihood.py", line 1534, in log_likelihood
return self.log_likelihood_ratio() + self.noise_log_likelihood()
File "/home/aditya.vijaykumar/work/relbin/bilby/bilby/gw/likelihood.py", line 1544, in log_likelihood_ratio
interferometer)
File "/home/aditya.vijaykumar/work/relbin/bilby/bilby/gw/likelihood.py", line 1657, in compute_relative_ratio
new_polarizations = self.waveform_generator.frequency_domain_strain(parameter_dictionary)
File "/home/aditya.vijaykumar/work/relbin/bilby/bilby/gw/waveform_generator.py", line 129, in frequency_domain_strain
transformed_model_data_points=self.time_array)
File "/home/aditya.vijaykumar/work/relbin/bilby/bilby/gw/waveform_generator.py", line 165, in _calculate_strain
if self.parameters == self._cache['parameters'] and self._cache['model'] == model and \
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
(relbin) [aditya.vijaykumar@dodo ~]$ vim /home/aditya.vijaykumar/work/relbin/bilby/bilby/gw/waveform_generator.py
I think it makes sense to just get rid of get_detector_response_relative_binning
and just add a if
statement in get_detector_response
to take care of the Relative Binning Case.
I did a naive test run, and it seems that the distance estimates are a bit off. This could be due to the summary data calculation here
Line 1617 in 9ab7608
have done some weird gymnastics there. @Kruthi24 could you check if this is consistent? What you need to check is if we really need the division by 2 in each of a0, a1, b0, b1
.
We are getting the following error (screenshots attached) when we use conversion_function= bilby.gw.conversion.generate_all_bns_parameters
in bilby. run_sampler
. This is due to the fact that in conversion.py
, likelihood.calculate_snrs
is being called instead of likelihood.calculate_snrs_from_summary_data
. A temporary fix for this issue has been made here #5
Iβm getting a runtime error (screenshot attached) while using scipy differential evolution. I read somewhere that this might have something to do with the callable function (self.log_likelihood_ratio_relative_binning
) not being picklable because somehow we might be using multiprocessing. But I donβt know how a picklable function should look like in OOP.
More details: This issue is popping up when we call self.find_maximum_likelihood_waveform
to update the fiducial waveform. The scipy differential_evolution
function is being called within the function get_best_fit_parameters
.
Lines 1585 to 1593 in 9ab7608
When we change the number of bins by changing epsilon
, the accuracy doesn't seem to improve.
To do:
setup_bins
more readable. (@adivijaykumar #16)setup_bins
function in bilby to the one in IAS code. (@Kruthi24)get_detector_response
. (@Kruthi24)inteferometer.frequency_array
and waveform_generator.frequency_array
are consistent. (@Kruthi24)lal_binary_black_hole_relativebinning
and lal_binary_neutron_star_relativebinning
. (@Kruthi24)Calculating the waveform ratio between the same waveform gives some spurious stuff at the bin edges.
import bilby
import matplotlib.pyplot as plt
import numpy as np
minimum_frequency = 20
duration = 4
sampling_frequency = 1024.0
injection_parameters = dict(
chirp_mass=28.0,
mass_ratio=0.8,
a_1=0.4,
a_2=0.3,
tilt_1=0.5,
tilt_2=1.0,
phi_12=1.7,
phi_jl=0.3,
luminosity_distance=2000.0,
theta_jn=0.4,
psi=2.659,
phase=1.3,
geocent_time=1126259642.413,
ra=1.375,
dec=-1.2108,
fiducial=1,
)
# Fixed arguments passed into the source model
waveform_arguments = dict(
waveform_approximant="IMRPhenomXPHM",
reference_frequency=50.0,
minimum_frequency=minimum_frequency,
)
# Create the waveform_generator using a LAL BinaryBlackHole source function
waveform_generator = bilby.gw.WaveformGenerator(
duration=duration,
sampling_frequency=sampling_frequency,
# frequency_domain_source_model=bilby.gw.source.lal_binary_black_hole,
frequency_domain_source_model=bilby.gw.source.lal_binary_black_hole_relativebinning,
parameter_conversion=bilby.gw.conversion.convert_to_lal_binary_black_hole_parameters,
waveform_arguments=waveform_arguments,
)
# Set up interferometers. In this case we'll use two interferometers
# (LIGO-Hanford (H1), LIGO-Livingston (L1). These default to their design
# sensitivity
ifos = bilby.gw.detector.InterferometerList(["H1", "L1"])
ifos.set_strain_data_from_power_spectral_densities(
sampling_frequency=sampling_frequency,
duration=duration,
start_time=injection_parameters["geocent_time"] - 2,
)
ifos.inject_signal(
waveform_generator=waveform_generator, parameters=injection_parameters
)
Maybe the likelihood calculation is so fast that the communication overhead dominates?
Maybe making it faster needs a HTC cluster and not a HPC cluster.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.