Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using different bins for different detectors throws errors #11

Open
adivijaykumar opened this issue Nov 16, 2020 · 0 comments
Open

Using different bins for different detectors throws errors #11

adivijaykumar opened this issue Nov 16, 2020 · 0 comments

Comments

@adivijaykumar
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant