bilby issueshttps://git.ligo.org/lscsoft/bilby/-/issues2020-04-22T04:30:03Zhttps://git.ligo.org/lscsoft/bilby/-/issues/421Add Python 3.8 testing2020-04-22T04:30:03ZColm Talbotcolm.talbot@ligo.orgAdd Python 3.8 testingPython 3.8 has officially been released ([what's new](https://docs.python.org/3.8/whatsnew/3.8.html)). We should aim to start testing that we can still build in this version ASAP to avoid issues down the line.Python 3.8 has officially been released ([what's new](https://docs.python.org/3.8/whatsnew/3.8.html)). We should aim to start testing that we can still build in this version ASAP to avoid issues down the line.https://git.ligo.org/lscsoft/bilby/-/issues/240Make Bilby into a conda package2019-01-10T00:37:25ZCarl-Johan HasterMake Bilby into a conda packageI primarily like to use `conda` as my python package manager. It would be nice to have Bilby be a `conda` package, so that it can be installed that way in addition to the `pip` way we have now. Instructions for how to make this happen ar...I primarily like to use `conda` as my python package manager. It would be nice to have Bilby be a `conda` package, so that it can be installed that way in addition to the `pip` way we have now. Instructions for how to make this happen are available [here](https://conda.io/docs/user-guide/tutorials/build-pkgs-skeleton.html).0.3.4Duncan Macleodduncan.macleod@ligo.orgDuncan Macleodduncan.macleod@ligo.orghttps://git.ligo.org/lscsoft/bilby/-/issues/273Fix automated docker builds2019-01-11T00:37:40ZGregory Ashtongregory.ashton@ligo.orgFix automated docker buildsThe docker builds (https://cloud.docker.com/repository/docker/bilbydev/bilby-test-suite-python37) seem to be taking a long time to complete/failing. This could be a dockerhub issue so I'll wait to see.The docker builds (https://cloud.docker.com/repository/docker/bilbydev/bilby-test-suite-python37) seem to be taking a long time to complete/failing. This could be a dockerhub issue so I'll wait to see.Futurehttps://git.ligo.org/lscsoft/bilby/-/issues/315Fake sampler for likelihood consistency check2019-03-21T10:24:55ZCarl-Johan HasterFake sampler for likelihood consistency checkImplement a "fake sampler" which reads in a set of parameters from a file, and then computes the likelihood for those paramters.
This would be a really useful consistency check between the ROQ and nonROQ likelihood functions, as well as ...Implement a "fake sampler" which reads in a set of parameters from a file, and then computes the likelihood for those paramters.
This would be a really useful consistency check between the ROQ and nonROQ likelihood functions, as well as an useful check for when the likelihood function is updated/appended (as, in order to accept a merge request to the likelihood function it needs to sufficiently reproduce the likelihood values from a fiducial set of parameter samples)FutureMichael PuerrerMichael Puerrerhttps://git.ligo.org/lscsoft/bilby/-/issues/277Be ready for new injection infrastructure2019-06-25T03:43:54ZCarl-Johan HasterBe ready for new injection infrastructurePlaceholder issue for now.
As mentioned by Tom Dent in [this post on chat.ligo.org](https://chat.ligo.org/ligo/pl/6eumo4gbrjd63yrtmp6693dtjh) there are plans for a revamped CBC injection infrastructure (not relying on `inspinj` and the o...Placeholder issue for now.
As mentioned by Tom Dent in [this post on chat.ligo.org](https://chat.ligo.org/ligo/pl/6eumo4gbrjd63yrtmp6693dtjh) there are plans for a revamped CBC injection infrastructure (not relying on `inspinj` and the old xml table format).
Bilby should, and needs to, be part of that design process such that we can use it seamlessly in the future!1.0.0https://git.ligo.org/lscsoft/bilby/-/issues/343Combine multiple runs2019-05-23T07:55:34ZColm Talbotcolm.talbot@ligo.orgCombine multiple runsWe need a method for combining the output of multiple runs, this will need to be treated a little differently for different samplers.
Hopefully, outputs from nested samplers can all be combined in this way, if we wish. Similar for MCMC....We need a method for combining the output of multiple runs, this will need to be treated a little differently for different samplers.
Hopefully, outputs from nested samplers can all be combined in this way, if we wish. Similar for MCMC. I'm not sure how best, if at all to combine MCMC runs with nest runs.
Related is thinning for auto-correlation length for MCMC samplers, which may or may not be done currently.
Ideally, this will be possible from the results files.https://git.ligo.org/lscsoft/bilby/-/issues/410Discontinue Python 2.7 support?2020-01-15T05:25:11ZMatthew PitkinDiscontinue Python 2.7 support?Come the new year are we planning to continue trying to make sure bilby supports both Python 2.7 and Python 3, or will we move to a development state where we don't explicitly try and keep everything Python 2.7 compatible? I imagine that...Come the new year are we planning to continue trying to make sure bilby supports both Python 2.7 and Python 3, or will we move to a development state where we don't explicitly try and keep everything Python 2.7 compatible? I imagine that we should make sure the v1.0 release works for Python 2.7, but maybe after that we could move to Python 3-only support?Futurehttps://git.ligo.org/lscsoft/bilby/-/issues/414Scheduled tests failing due to timeouts2019-10-01T09:10:23ZGregory Ashtongregory.ashton@ligo.orgScheduled tests failing due to timeoutsSee, e.g., https://git.ligo.org/lscsoft/bilby/pipelines/81823
We may need to split the scheduled tests up into core and gw and/or improve the container to speed things up.See, e.g., https://git.ligo.org/lscsoft/bilby/pipelines/81823
We may need to split the scheduled tests up into core and gw and/or improve the container to speed things up.0.5.9Colm Talbotcolm.talbot@ligo.orgColm Talbotcolm.talbot@ligo.orghttps://git.ligo.org/lscsoft/bilby/-/issues/413Automate pypi release2020-02-18T01:38:23ZGregory Ashtongregory.ashton@ligo.orgAutomate pypi releasehttps://medium.com/@pypripackages/using-gitlab-pipelines-to-deploy-python-packages-in-production-and-staging-environments-8ab7dc979274https://medium.com/@pypripackages/using-gitlab-pipelines-to-deploy-python-packages-in-production-and-staging-environments-8ab7dc979274Gregory Ashtongregory.ashton@ligo.orgGregory Ashtongregory.ashton@ligo.orghttps://git.ligo.org/lscsoft/bilby/-/issues/440Conditional priors are not pickleable2019-12-09T23:34:13ZColm Talbotcolm.talbot@ligo.orgConditional priors are not pickleableAttempting to pickle conditional priors fails with
```python
AttributeError: Can't pickle local object 'conditional_prior_factory.<locals>.ConditionalPrior'
```
Pickling priors is essential to work with `bilby_pipe`.
This SO question ...Attempting to pickle conditional priors fails with
```python
AttributeError: Can't pickle local object 'conditional_prior_factory.<locals>.ConditionalPrior'
```
Pickling priors is essential to work with `bilby_pipe`.
This SO question suggests that we need to set the `__qualname__` of the new class.
I've tested this locally and it looks like it will work.
`__qualname__` was introduced in Python 3.3.
This would potentially make the conditional priors incompatible with Python 2.
Personally, this seems like an obvious time to explicitly drop Python 2 support.
Any thoughts?https://git.ligo.org/lscsoft/bilby/-/issues/451Update default LIGO PSD2020-04-24T18:05:45ZColm Talbotcolm.talbot@ligo.orgUpdate default LIGO PSDThe default noise curve used is out of date and should be updated to use https://dcc.ligo.org/LIGO-T1800044/public.
This will cause quite a lot of changes to existing analyses. It will still be possible to use the current PSD, we can ju...The default noise curve used is out of date and should be updated to use https://dcc.ligo.org/LIGO-T1800044/public.
This will cause quite a lot of changes to existing analyses. It will still be possible to use the current PSD, we can just leave that in the repository.
I think the only changes that are needed are in the interferometer files.
- https://git.ligo.org/lscsoft/bilby/blob/master/bilby/gw/detector/detectors/H1.interferometer
- https://git.ligo.org/lscsoft/bilby/blob/master/bilby/gw/detector/detectors/L1.interferometerhttps://git.ligo.org/lscsoft/bilby/-/issues/494Don't set the matplotlib backend2020-07-21T04:41:56ZColm Talbotcolm.talbot@ligo.orgDon't set the matplotlib backendI've been becoming increasingly frustrated with the setting of the backend to `Agg`.
I'm finding that in almost all situations I use this, it incorrectly sets the non-interactive backend and then I can't look at plots.
I'm finding myself...I've been becoming increasingly frustrated with the setting of the backend to `Agg`.
I'm finding that in almost all situations I use this, it incorrectly sets the non-interactive backend and then I can't look at plots.
I'm finding myself writing at least as much code in my scripts to avoid this behaviour than I would have to if plotting was breaking.
I would _really_ like to see this removed.
I know that this is a convenient feature to have, especially for our examples, but it really isn't appropriate to have baked into a package which now has a number of downstream uses/applications.
We could for example set this in the various bilby_pipe executables if necessary.
Thoughts? @gregory.ashton @matthew-pitkin I think you were involved in setting this up.
The fix would be to just remove
https://git.ligo.org/lscsoft/bilby/-/blob/master/bilby/core/utils.py#L969-996https://git.ligo.org/lscsoft/bilby/-/issues/509Time to refactor utils?2021-05-20T01:52:12ZColm Talbotcolm.talbot@ligo.orgTime to refactor utils?Both the core and gw utils modules are over 1000 lines of pretty random and unrelated functions/classes. We should think about turning them into packages with sensible divisions into different categories.
In core utils I see:
- constant...Both the core and gw utils modules are over 1000 lines of pretty random and unrelated functions/classes. We should think about turning them into packages with sensible divisions into different categories.
In core utils I see:
- constants
- function introspection
- functions to make time/frequency series
- conversion to/from RA/dec
- creating white noise
- FFTing
- logging/version information/making directories
- calculating derivatives/integrals
- `SamplesSummary`, `Counter`, `UnsortedInterp2d`
- JSON stuff
plus some other things. I'm not suggesting that each of these things should be in their own module, but it would easily fit into four or five groups.
In gw utils:
- generating asd/psd
- various geometry things
- inner products/SNRs
- event times, which we should remove or replace with a call to the `gwosc` package
- fetching data from frames/gwosc/gracedb/LDR
- ROQ helper functions
- lalsimulation wrappers
- calibration things
- `PropertyAccessor`
Again, this could be divided between a few modules.
Any thoughts?https://git.ligo.org/lscsoft/bilby/-/issues/541Use tqdm.auto for better notebook performance2020-12-23T06:16:20ZColm Talbotcolm.talbot@ligo.orgUse tqdm.auto for better notebook performanceI've been doing some Bilby things in notebooks recently and the progress bars have some known issues in Jupyter notebooks.
Fortunately, it looks like there's a `tqdm.auto` module which automagically uses the best backend. I think this i...I've been doing some Bilby things in notebooks recently and the progress bars have some known issues in Jupyter notebooks.
Fortunately, it looks like there's a `tqdm.auto` module which automagically uses the best backend. I think this is worth looking into.https://git.ligo.org/lscsoft/bilby/-/issues/555Dependency issues2021-04-13T23:18:31ZColm Talbotcolm.talbot@ligo.orgDependency issuesI noticed that both `pandas` and `numpy` are breaking the test suite currently.
There's a known issue with `numpy>=1.20` and `lalsuite` (although it is fixed on master, https://git.ligo.org/lscsoft/lalsuite/-/merge_requests/1526).
It l...I noticed that both `pandas` and `numpy` are breaking the test suite currently.
There's a known issue with `numpy>=1.20` and `lalsuite` (although it is fixed on master, https://git.ligo.org/lscsoft/lalsuite/-/merge_requests/1526).
It looks like `deepdish` is finally officially dead as of `pandas==1.2.1` (at least). For now we can pin the `pandas` version until we are able to remove the `deepdish` dependency. See https://git.ligo.org/lscsoft/bilby/-/merge_requests/889.https://git.ligo.org/lscsoft/bilby/-/issues/558Reduce imports2021-03-25T02:59:56ZColm Talbotcolm.talbot@ligo.orgReduce importsImporting `bilby` is pretty horribly slow, sometimes taking O(s). This is due to the number of top-level imports we have.
Using `len(sys.modules)` as a proxy for the number of packages being imported when `bilby` imports shows that we'r...Importing `bilby` is pretty horribly slow, sometimes taking O(s). This is due to the number of top-level imports we have.
Using `len(sys.modules)` as a proxy for the number of packages being imported when `bilby` imports shows that we're being pretty bad on imports. The following gives an idea of the number of things imported for a few reference modules.
```python
import sys
print(len(sys.modules.keys()))
import numpy
print(len(sys.modules.keys()))
import lal
print(len(sys.modules.keys()))
import bilby
print(len(sys.modules.keys()))
```
```bash
58
220
234
1714
```
We're about an order of magnitude above `numpy` and `lal`. This is probably why it takes so long to import `bilby`.
There are basically two choices we can make to reduce these, one is to not link everything internally, this would be one could not just do
```python
import bilby
bilby.gw.prior.BBHPriorDict()
```
Specific modules would be imported individually. Given the amount of linkage between modules, I'm not sure how successful that would be.
The second choice would be to limit the packages that we import at the top level to e.g., just `numpy`. Removing `matplotlib`, `gwpy`, `astropy` would help a lot. `pandas` and `scipy` also contribute quite a bit, but are used very widely. I think `tqdm` and `dill` are relatively harmless, but we may want to also remove these from the top level. `lal`/`lalsimulation` just add one extra module each, I guess because they're SWIG wrappers, but I'd still vote for not importing them at the top level and just doing it inside the function. Built in packages don't really make a difference.
We could also define a decorator something like `requires_import` that checks the relevant packages can be imported, although we should check that doesn't hurt performance for things like source models.
For completeness, here's all of the imports in the package
<details>
<summary>Expand/collapse</summary>
```python
$ grep import bilby/**.py (dev)
bilby/__init__.py:import sys
bilby/__init__.py:from . import core, gw, hyper
bilby/__init__.py:from .core import utils, likelihood, prior, result, sampler
bilby/__init__.py:from .core.sampler import run_sampler
bilby/__init__.py:from .core.likelihood import Likelihood
bilby/core/__init__.py:from . import grid, likelihood, prior, result, sampler, series, utils
bilby/core/grid.py:import numpy as np
bilby/core/grid.py:import os
bilby/core/grid.py:import json
bilby/core/grid.py:from collections import OrderedDict
bilby/core/grid.py:from .prior import Prior, PriorDict
bilby/core/grid.py:from .utils import (logtrapzexp, check_directory_exists_and_if_not_mkdir,
bilby/core/grid.py:from .utils import BilbyJsonEncoder, load_json, move_old_file
bilby/core/grid.py:from .result import FileMovedError
bilby/core/grid.py: import gzip
bilby/core/likelihood.py:import copy
bilby/core/likelihood.py:import numpy as np
bilby/core/likelihood.py:from scipy.special import gammaln, xlogy
bilby/core/likelihood.py:from scipy.stats import multivariate_normal
bilby/core/likelihood.py:from .utils import infer_parameters_from_function
bilby/core/prior/__init__.py:from .analytical import *
bilby/core/prior/__init__.py:from .base import *
bilby/core/prior/__init__.py:from .conditional import *
bilby/core/prior/__init__.py:from .dict import *
bilby/core/prior/__init__.py:from .interpolated import *
bilby/core/prior/__init__.py:from .joint import *
bilby/core/prior/__init__.py:from .slabspike import *
bilby/core/prior/analytical.py:import numpy as np
bilby/core/prior/analytical.py:from scipy.special import erfinv
bilby/core/prior/analytical.py:from scipy.special._ufuncs import xlogy, erf, log1p, stdtrit, gammaln, stdtr, \
bilby/core/prior/analytical.py:from .base import Prior
bilby/core/prior/analytical.py:from bilby.core.utils import logger
bilby/core/prior/base.py:from importlib import import_module
bilby/core/prior/base.py:import json
bilby/core/prior/base.py:import os
bilby/core/prior/base.py:import re
bilby/core/prior/base.py:import numpy as np
bilby/core/prior/base.py:import scipy.stats
bilby/core/prior/base.py:from scipy.integrate import cumtrapz
bilby/core/prior/base.py:from scipy.interpolate import interp1d
bilby/core/prior/base.py:from bilby.core.utils import infer_args_from_method, BilbyJsonEncoder, decode_bilby_json, logger, \
bilby/core/prior/base.py: kwargs[key] = getattr(import_module(module), name)
bilby/core/prior/base.py: other_cls = getattr(import_module(module), other_cls)
bilby/core/prior/conditional.py:import numpy as np
bilby/core/prior/conditional.py:from .base import Prior, PriorException
bilby/core/prior/conditional.py:from bilby.core.prior.interpolated import Interped
bilby/core/prior/conditional.py:from bilby.core.prior.analytical import DeltaFunction, PowerLaw, Uniform, LogUniform, \
bilby/core/prior/conditional.py:from bilby.core.utils import infer_args_from_method, infer_parameters_from_function
bilby/core/prior/dict.py:from importlib import import_module
bilby/core/prior/dict.py:from io import open as ioopen
bilby/core/prior/dict.py:import json
bilby/core/prior/dict.py:import os
bilby/core/prior/dict.py:from matplotlib.cbook import flatten
bilby/core/prior/dict.py:import numpy as np
bilby/core/prior/dict.py:from bilby.core.prior.analytical import DeltaFunction
bilby/core/prior/dict.py:from bilby.core.prior.base import Prior, Constraint
bilby/core/prior/dict.py:from bilby.core.prior.joint import JointPrior
bilby/core/prior/dict.py:from bilby.core.utils import logger, check_directory_exists_and_if_not_mkdir, BilbyJsonEncoder, decode_bilby_json
bilby/core/prior/dict.py: import_module(prior_dict["__module__"]),
bilby/core/prior/dict.py: logger.debug("Cannot import prior module {}.{}".format(
bilby/core/prior/dict.py: cls = getattr(import_module(module), cls, cls)
bilby/core/prior/dict.py: import_module(val.get("__module__", "none")),
bilby/core/prior/dict.py: logger.debug("Cannot import prior module {}.{}".format(
bilby/core/prior/dict.py: from .conditional import DirichletElement
bilby/core/prior/dict.py: import_module(prior_dict["__module__"]),
bilby/core/prior/dict.py: logger.debug("Cannot import prior module {}.{}".format(
bilby/core/prior/interpolated.py:import numpy as np
bilby/core/prior/interpolated.py:from scipy.integrate import cumtrapz
bilby/core/prior/interpolated.py:from scipy.interpolate import interp1d
bilby/core/prior/interpolated.py:from .base import Prior
bilby/core/prior/interpolated.py:from bilby.core.utils import logger
bilby/core/prior/joint.py:import numpy as np
bilby/core/prior/joint.py:import scipy.stats
bilby/core/prior/joint.py:from scipy.special import erfinv
bilby/core/prior/joint.py:from .base import Prior, PriorException
bilby/core/prior/joint.py:from bilby.core.utils import logger, infer_args_from_method, get_dict_with_properties
bilby/core/prior/slabspike.py:import numpy as np
bilby/core/prior/slabspike.py:from bilby.core.prior.base import Prior
bilby/core/prior/slabspike.py:from bilby.core.utils import logger
bilby/core/result.py:import inspect
bilby/core/result.py:import os
bilby/core/result.py:from collections import OrderedDict, namedtuple
bilby/core/result.py:from copy import copy
bilby/core/result.py:from distutils.version import LooseVersion
bilby/core/result.py:from importlib import import_module
bilby/core/result.py:from itertools import product
bilby/core/result.py:import corner
bilby/core/result.py:import h5py
bilby/core/result.py:import json
bilby/core/result.py:import matplotlib
bilby/core/result.py:import matplotlib.pyplot as plt
bilby/core/result.py:from matplotlib import lines as mpllines
bilby/core/result.py:import numpy as np
bilby/core/result.py:import pandas as pd
bilby/core/result.py:import scipy.stats
bilby/core/result.py:from scipy.special import logsumexp
bilby/core/result.py:from . import utils
bilby/core/result.py:from .utils import (
bilby/core/result.py:from .prior import Prior, PriorDict, DeltaFunction
bilby/core/result.py: import deepdish
bilby/core/result.py: import dill
bilby/core/result.py: cls = getattr(import_module(data['__module__']), data['__name__'])
bilby/core/result.py: import gzip
bilby/core/result.py: import dill
bilby/core/result.py: import dill
bilby/core/result.py: import arviz as az
bilby/core/sampler/__init__.py:import inspect
bilby/core/sampler/__init__.py:import sys
bilby/core/sampler/__init__.py:import datetime
bilby/core/sampler/__init__.py:from collections import OrderedDict
bilby/core/sampler/__init__.py:import bilby
bilby/core/sampler/__init__.py:from ..utils import command_line_args, logger, loaded_modules_dict
bilby/core/sampler/__init__.py:from ..prior import PriorDict, DeltaFunction
bilby/core/sampler/__init__.py:from .base_sampler import Sampler, SamplingMarginalisedParameterError
bilby/core/sampler/__init__.py:from .cpnest import Cpnest
bilby/core/sampler/__init__.py:from .dynamic_dynesty import DynamicDynesty
bilby/core/sampler/__init__.py:from .dynesty import Dynesty
bilby/core/sampler/__init__.py:from .emcee import Emcee
bilby/core/sampler/__init__.py:from .kombine import Kombine
bilby/core/sampler/__init__.py:from .nestle import Nestle
bilby/core/sampler/__init__.py:from .polychord import PyPolyChord
bilby/core/sampler/__init__.py:from .ptemcee import Ptemcee
bilby/core/sampler/__init__.py:from .ptmcmc import PTMCMCSampler
bilby/core/sampler/__init__.py:from .pymc3 import Pymc3
bilby/core/sampler/__init__.py:from .pymultinest import Pymultinest
bilby/core/sampler/__init__.py:from .ultranest import Ultranest
bilby/core/sampler/__init__.py:from .fake_sampler import FakeSampler
bilby/core/sampler/__init__.py:from .dnest4 import DNest4
bilby/core/sampler/__init__.py:from . import proposal
bilby/core/sampler/__init__.py: from . import IMPLEMENTED_SAMPLERS
bilby/core/sampler/__init__.py: from bilby.core.likelihood import ZeroLikelihood
bilby/core/sampler/base_sampler.py:import datetime
bilby/core/sampler/base_sampler.py:import distutils.dir_util
bilby/core/sampler/base_sampler.py:import numpy as np
bilby/core/sampler/base_sampler.py:import os
bilby/core/sampler/base_sampler.py:import tempfile
bilby/core/sampler/base_sampler.py:from pandas import DataFrame
bilby/core/sampler/base_sampler.py:from ..utils import logger, check_directory_exists_and_if_not_mkdir, command_line_args, Counter
bilby/core/sampler/base_sampler.py:from ..prior import Prior, PriorDict, DeltaFunction, Constraint
bilby/core/sampler/base_sampler.py:from ..result import Result, read_in_result
bilby/core/sampler/base_sampler.py: skip_import_verification: bool
bilby/core/sampler/base_sampler.py: use_ratio=False, plot=False, skip_import_verification=False,
bilby/core/sampler/base_sampler.py: if not skip_import_verification:
bilby/core/sampler/base_sampler.py: self.external_sampler = __import__(external_sampler_name)
bilby/core/sampler/base_sampler.py: import emcee
bilby/core/sampler/cpnest.py:import array
bilby/core/sampler/cpnest.py:import copy
bilby/core/sampler/cpnest.py:import numpy as np
bilby/core/sampler/cpnest.py:from pandas import DataFrame
bilby/core/sampler/cpnest.py:from .base_sampler import NestedSampler
bilby/core/sampler/cpnest.py:from .proposal import Sample, JumpProposalCycle
bilby/core/sampler/cpnest.py:from ..utils import logger, check_directory_exists_and_if_not_mkdir
bilby/core/sampler/cpnest.py: from cpnest import model as cpmodel, CPNest
bilby/core/sampler/cpnest.py: from cpnest.parameter import LivePoint
bilby/core/sampler/cpnest.py: from cpnest.nest2pos import compute_weights
bilby/core/sampler/cpnest.py: import sys
bilby/core/sampler/cpnest.py: from cpnest.proposal import ProposalCycle
bilby/core/sampler/cpnest.py: import cpnest.proposal
bilby/core/sampler/cpnest.py: import cpnest.proposal
bilby/core/sampler/dnest4.py:import os
bilby/core/sampler/dnest4.py:import shutil
bilby/core/sampler/dnest4.py:import distutils.dir_util
bilby/core/sampler/dnest4.py:import signal
bilby/core/sampler/dnest4.py:import time
bilby/core/sampler/dnest4.py:import datetime
bilby/core/sampler/dnest4.py:import sys
bilby/core/sampler/dnest4.py:import numpy as np
bilby/core/sampler/dnest4.py:import pandas as pd
bilby/core/sampler/dnest4.py:from ..utils import check_directory_exists_and_if_not_mkdir, logger
bilby/core/sampler/dnest4.py:from .base_sampler import NestedSampler
bilby/core/sampler/dnest4.py: exit_code=77, skip_import_verification=False, temporary_directory=True, **kwargs):
bilby/core/sampler/dnest4.py: use_ratio=use_ratio, plot=plot, skip_import_verification=skip_import_verification,
bilby/core/sampler/dnest4.py: import dnest4
bilby/core/sampler/dnest4.py: import dnest4
bilby/core/sampler/dynamic_dynesty.py:import os
bilby/core/sampler/dynamic_dynesty.py:import dill as pickle
bilby/core/sampler/dynamic_dynesty.py:import signal
bilby/core/sampler/dynamic_dynesty.py:import numpy as np
bilby/core/sampler/dynamic_dynesty.py:from ..utils import logger, check_directory_exists_and_if_not_mkdir
bilby/core/sampler/dynamic_dynesty.py:from .base_sampler import Sampler
bilby/core/sampler/dynamic_dynesty.py:from .dynesty import Dynesty
bilby/core/sampler/dynamic_dynesty.py: skip_import_verification: bool
bilby/core/sampler/dynamic_dynesty.py: skip_import_verification=False, check_point=True, n_check_point=None, check_point_delta_t=600,
bilby/core/sampler/dynamic_dynesty.py: plot=plot, skip_import_verification=skip_import_verification,
bilby/core/sampler/dynamic_dynesty.py: import dynesty
bilby/core/sampler/dynesty.py:import datetime
bilby/core/sampler/dynesty.py:import dill
bilby/core/sampler/dynesty.py:import os
bilby/core/sampler/dynesty.py:import sys
bilby/core/sampler/dynesty.py:import pickle
bilby/core/sampler/dynesty.py:import signal
bilby/core/sampler/dynesty.py:import time
bilby/core/sampler/dynesty.py:from tqdm.auto import tqdm
bilby/core/sampler/dynesty.py:import matplotlib.pyplot as plt
bilby/core/sampler/dynesty.py:import numpy as np
bilby/core/sampler/dynesty.py:from pandas import DataFrame
bilby/core/sampler/dynesty.py:from ..utils import (
bilby/core/sampler/dynesty.py:from .base_sampler import Sampler, NestedSampler
bilby/core/sampler/dynesty.py:from ..result import rejection_sample
bilby/core/sampler/dynesty.py:from numpy import linalg
bilby/core/sampler/dynesty.py:from dynesty.utils import unitcheck
bilby/core/sampler/dynesty.py:import warnings
bilby/core/sampler/dynesty.py: skip_import_verification: bool
bilby/core/sampler/dynesty.py: use_ratio=False, plot=False, skip_import_verification=False,
bilby/core/sampler/dynesty.py: plot=plot, skip_import_verification=skip_import_verification,
bilby/core/sampler/dynesty.py: import multiprocessing
bilby/core/sampler/dynesty.py: import dynesty
bilby/core/sampler/dynesty.py: import dynesty
bilby/core/sampler/dynesty.py: from ... import __version__ as bilby_version
bilby/core/sampler/dynesty.py: from dynesty import __version__ as dynesty_version
bilby/core/sampler/dynesty.py: from ... import __version__ as bilby_version
bilby/core/sampler/dynesty.py: from dynesty import __version__ as dynesty_version
bilby/core/sampler/dynesty.py: import dynesty.plotting as dyplot
bilby/core/sampler/dynesty.py: from dynesty import plotting as dyplot
bilby/core/sampler/dynesty.py: import dynesty
bilby/core/sampler/dynesty.py: import pandas as pd
bilby/core/sampler/emcee.py:from collections import namedtuple
bilby/core/sampler/emcee.py:import os
bilby/core/sampler/emcee.py:import signal
bilby/core/sampler/emcee.py:import shutil
bilby/core/sampler/emcee.py:from shutil import copyfile
bilby/core/sampler/emcee.py:import sys
bilby/core/sampler/emcee.py:import numpy as np
bilby/core/sampler/emcee.py:from pandas import DataFrame
bilby/core/sampler/emcee.py:from distutils.version import LooseVersion
bilby/core/sampler/emcee.py:import dill as pickle
bilby/core/sampler/emcee.py:from ..utils import logger, check_directory_exists_and_if_not_mkdir
bilby/core/sampler/emcee.py:from .base_sampler import MCMCSampler, SamplerError
bilby/core/sampler/emcee.py: use_ratio=False, plot=False, skip_import_verification=False,
bilby/core/sampler/emcee.py: import emcee
bilby/core/sampler/emcee.py: skip_import_verification=skip_import_verification, **kwargs)
bilby/core/sampler/emcee.py: import emcee
bilby/core/sampler/emcee.py: from tqdm.auto import tqdm
bilby/core/sampler/fake_sampler.py:import numpy as np
bilby/core/sampler/fake_sampler.py:from .base_sampler import Sampler
bilby/core/sampler/fake_sampler.py:from ..result import read_in_result
bilby/core/sampler/fake_sampler.py: use_ratio=False, plot=False, skip_import_verification=True,
bilby/core/sampler/kombine.py:from ..utils import logger
bilby/core/sampler/kombine.py:import numpy as np
bilby/core/sampler/kombine.py:import os
bilby/core/sampler/kombine.py:from .emcee import Emcee
bilby/core/sampler/kombine.py: use_ratio=False, plot=False, skip_import_verification=False,
bilby/core/sampler/kombine.py: use_ratio=use_ratio, plot=plot, skip_import_verification=skip_import_verification,
bilby/core/sampler/kombine.py: import kombine
bilby/core/sampler/kombine.py: from tqdm.auto import tqdm
bilby/core/sampler/nestle.py:import numpy as np
bilby/core/sampler/nestle.py:from pandas import DataFrame
bilby/core/sampler/nestle.py:from .base_sampler import NestedSampler
bilby/core/sampler/nestle.py: import nestle
bilby/core/sampler/nestle.py: import nestle
bilby/core/sampler/nestle.py: import nestle
bilby/core/sampler/polychord.py:import numpy as np
bilby/core/sampler/polychord.py:from .base_sampler import NestedSampler
bilby/core/sampler/polychord.py: import pypolychord
bilby/core/sampler/polychord.py: from pypolychord.settings import PolyChordSettings
bilby/core/sampler/proposal.py:from collections import OrderedDict
bilby/core/sampler/proposal.py:from inspect import isclass
bilby/core/sampler/proposal.py:import numpy as np
bilby/core/sampler/proposal.py:import random
bilby/core/sampler/proposal.py:from ..prior import Uniform
bilby/core/sampler/ptemcee.py:import os
bilby/core/sampler/ptemcee.py:import datetime
bilby/core/sampler/ptemcee.py:import copy
bilby/core/sampler/ptemcee.py:import signal
bilby/core/sampler/ptemcee.py:import sys
bilby/core/sampler/ptemcee.py:import time
bilby/core/sampler/ptemcee.py:import dill
bilby/core/sampler/ptemcee.py:from collections import namedtuple
bilby/core/sampler/ptemcee.py:import logging
bilby/core/sampler/ptemcee.py:import numpy as np
bilby/core/sampler/ptemcee.py:import pandas as pd
bilby/core/sampler/ptemcee.py:import matplotlib.pyplot as plt
bilby/core/sampler/ptemcee.py:import scipy.signal
bilby/core/sampler/ptemcee.py:from ..utils import logger, check_directory_exists_and_if_not_mkdir
bilby/core/sampler/ptemcee.py:from .base_sampler import SamplerError, MCMCSampler
bilby/core/sampler/ptemcee.py: skip_import_verification=False,
bilby/core/sampler/ptemcee.py: skip_import_verification=skip_import_verification,
bilby/core/sampler/ptemcee.py: from scipy.optimize import minimize
bilby/core/sampler/ptemcee.py: import ptemcee
bilby/core/sampler/ptemcee.py: import schwimmbad
bilby/core/sampler/ptemcee.py: import emcee
bilby/core/sampler/ptmcmc.py:import glob
bilby/core/sampler/ptmcmc.py:import shutil
bilby/core/sampler/ptmcmc.py:import numpy as np
bilby/core/sampler/ptmcmc.py:from .base_sampler import MCMCSampler, SamplerNotInstalledError
bilby/core/sampler/ptmcmc.py:from ..utils import logger
bilby/core/sampler/ptmcmc.py: use_ratio=False, plot=False, skip_import_verification=False,
bilby/core/sampler/ptmcmc.py: skip_import_verification=skip_import_verification,
bilby/core/sampler/ptmcmc.py: # PTMCMC is imported with Caps so need to overwrite the parent function
bilby/core/sampler/ptmcmc.py: self.external_sampler = __import__(external_sampler_name)
bilby/core/sampler/ptmcmc.py: def _import_external_sampler():
bilby/core/sampler/ptmcmc.py: from PTMCMCSampler import PTMCMCSampler
bilby/core/sampler/ptmcmc.py: PTMCMCSampler = self._import_external_sampler()
bilby/core/sampler/pymc3.py:from collections import OrderedDict
bilby/core/sampler/pymc3.py:from distutils.version import StrictVersion
bilby/core/sampler/pymc3.py:import numpy as np
bilby/core/sampler/pymc3.py:from ..utils import derivatives, infer_args_from_method
bilby/core/sampler/pymc3.py:from ..prior import DeltaFunction, Sine, Cosine, PowerLaw, MultivariateGaussian
bilby/core/sampler/pymc3.py:from .base_sampler import MCMCSampler
bilby/core/sampler/pymc3.py:from ..likelihood import GaussianLikelihood, PoissonLikelihood, ExponentialLikelihood, \
bilby/core/sampler/pymc3.py:from ...gw.likelihood import BasicGravitationalWaveTransient, GravitationalWaveTransient
bilby/core/sampler/pymc3.py: skip_import_verification=False, **kwargs):
bilby/core/sampler/pymc3.py: _, STEP_METHODS, _ = self._import_external_sampler()
bilby/core/sampler/pymc3.py: skip_import_verification=skip_import_verification, **kwargs)
bilby/core/sampler/pymc3.py: def _import_external_sampler():
bilby/core/sampler/pymc3.py: import pymc3
bilby/core/sampler/pymc3.py: from pymc3.sampling import STEP_METHODS
bilby/core/sampler/pymc3.py: from pymc3.theanof import floatX
bilby/core/sampler/pymc3.py: def _import_theano():
bilby/core/sampler/pymc3.py: import theano # noqa
bilby/core/sampler/pymc3.py: import theano.tensor as tt
bilby/core/sampler/pymc3.py: from theano.compile.ops import as_op # noqa
bilby/core/sampler/pymc3.py: pymc3, STEP_METHODS, floatX = self._import_external_sampler()
bilby/core/sampler/pymc3.py: theano, tt, as_op = self._import_theano()
bilby/core/sampler/pymc3.py: pymc3, STEP_METHODS, floatX = self._import_external_sampler()
bilby/core/sampler/pymc3.py: theano, tt, as_op = self._import_theano()
bilby/core/sampler/pymc3.py: pymc3, STEP_METHODS, floatX = self._import_external_sampler()
bilby/core/sampler/pymc3.py: theano, tt, as_op = self._import_theano()
bilby/core/sampler/pymc3.py: pymc3, STEP_METHODS, floatX = self._import_external_sampler()
bilby/core/sampler/pymc3.py: theano, tt, as_op = self._import_theano()
bilby/core/sampler/pymc3.py: pymc3, STEP_METHODS, floatX = self._import_external_sampler()
bilby/core/sampler/pymc3.py: pymc3, _, _ = self._import_external_sampler()
bilby/core/sampler/pymc3.py: pymc3, STEP_METHODS, floatX = self._import_external_sampler()
bilby/core/sampler/pymc3.py: pymc3, STEP_METHODS, floatX = self._import_external_sampler()
bilby/core/sampler/pymc3.py: theano, tt, as_op = self._import_theano()
bilby/core/sampler/pymultinest.py:import importlib
bilby/core/sampler/pymultinest.py:import os
bilby/core/sampler/pymultinest.py:import shutil
bilby/core/sampler/pymultinest.py:import distutils.dir_util
bilby/core/sampler/pymultinest.py:import signal
bilby/core/sampler/pymultinest.py:import time
bilby/core/sampler/pymultinest.py:import datetime
bilby/core/sampler/pymultinest.py:import sys
bilby/core/sampler/pymultinest.py:import numpy as np
bilby/core/sampler/pymultinest.py:from ..utils import check_directory_exists_and_if_not_mkdir
bilby/core/sampler/pymultinest.py:from ..utils import logger
bilby/core/sampler/pymultinest.py:from .base_sampler import NestedSampler
bilby/core/sampler/pymultinest.py: importance_nested_sampling: bool, (False)
bilby/core/sampler/pymultinest.py: If true, use importance nested sampling
bilby/core/sampler/pymultinest.py: importance_nested_sampling=False,
bilby/core/sampler/pymultinest.py: skip_import_verification=False,
bilby/core/sampler/pymultinest.py: skip_import_verification=skip_import_verification,
bilby/core/sampler/pymultinest.py: import pymultinest
bilby/core/sampler/pymultinest.py: pm_run = importlib.import_module("pymultinest.run")
bilby/core/sampler/ultranest.py:import datetime
bilby/core/sampler/ultranest.py:import distutils.dir_util
bilby/core/sampler/ultranest.py:import inspect
bilby/core/sampler/ultranest.py:import os
bilby/core/sampler/ultranest.py:import shutil
bilby/core/sampler/ultranest.py:import signal
bilby/core/sampler/ultranest.py:import time
bilby/core/sampler/ultranest.py:import numpy as np
bilby/core/sampler/ultranest.py:from pandas import DataFrame
bilby/core/sampler/ultranest.py:from ..utils import check_directory_exists_and_if_not_mkdir, logger
bilby/core/sampler/ultranest.py:from .base_sampler import NestedSampler
bilby/core/sampler/ultranest.py: skip_import_verification=False,
bilby/core/sampler/ultranest.py: skip_import_verification=skip_import_verification,
bilby/core/sampler/ultranest.py: import ultranest
bilby/core/sampler/ultranest.py: import ultranest.stepsampler
bilby/core/series.py:from . import utils
bilby/core/utils.py:from distutils.spawn import find_executable
bilby/core/utils.py:import logging
bilby/core/utils.py:import os
bilby/core/utils.py:import shutil
bilby/core/utils.py:import sys
bilby/core/utils.py:from math import fmod
bilby/core/utils.py:import argparse
bilby/core/utils.py:import inspect
bilby/core/utils.py:import functools
bilby/core/utils.py:import types
bilby/core/utils.py:import subprocess
bilby/core/utils.py:import multiprocessing
bilby/core/utils.py:from importlib import import_module
bilby/core/utils.py:import json
bilby/core/utils.py:import warnings
bilby/core/utils.py:import numpy as np
bilby/core/utils.py:from scipy.interpolate import interp2d
bilby/core/utils.py:from scipy.special import logsumexp
bilby/core/utils.py:import pandas as pd
bilby/core/utils.py:import matplotlib.pyplot as plt
bilby/core/utils.py: in both functions and methods; this is important, since the first
bilby/core/utils.py: available for any script which includes `import bilby`, but no help command
bilby/core/utils.py: # Here we import bilby, which initialses and parses the default command-line args
bilby/core/utils.py: >>> import bilby
bilby/core/utils.py: # Next, we import argparse and define a new argparse object
bilby/core/utils.py: >>> import argparse
bilby/core/utils.py: from scipy.interpolate.dfitpack import bispeu
bilby/core/utils.py: from .prior import MultivariateGaussianDist, Prior, PriorDict
bilby/core/utils.py: from ..gw.prior import HealPixMapPriorDist
bilby/core/utils.py: from astropy import cosmology as cosmo, units
bilby/core/utils.py: logger.debug("Cannot import astropy, cannot write cosmological priors")
bilby/core/utils.py: import gzip
bilby/core/utils.py: cls = getattr(import_module(dct['__module__']), dct['__name__'])
bilby/core/utils.py: cls = getattr(import_module(dct['__module__']), dct['__name__'])
bilby/core/utils.py: return getattr(import_module(dct["__module__"]), dct["__name__"], default)
bilby/core/utils.py: from astropy import cosmology as cosmo
bilby/core/utils.py: logger.debug("Cannot import astropy, cosmological priors may not be "
bilby/core/utils.py: from astropy import units
bilby/core/utils.py: logger.debug("Cannot import astropy, cosmological priors may not be "
bilby/core/utils.py: from matplotlib import rcParams
bilby/core/utils.py: from matplotlib import rcParams
bilby/core/utils.py: from .prior.dict import PriorDict
bilby/core/utils.py: import h5py
bilby/gw/__init__.py:from . import (conversion, cosmology, detector, eos, likelihood, prior,
bilby/gw/__init__.py:from .waveform_generator import WaveformGenerator
bilby/gw/__init__.py:from .likelihood import GravitationalWaveTransient
bilby/gw/__init__.py:from .detector import calibration
bilby/gw/conversion.py:import sys
bilby/gw/conversion.py:import multiprocessing
bilby/gw/conversion.py:from tqdm.auto import tqdm
bilby/gw/conversion.py:import numpy as np
bilby/gw/conversion.py:from pandas import DataFrame
bilby/gw/conversion.py:from ..core.likelihood import MarginalizedLikelihoodReconstructionError
bilby/gw/conversion.py:from ..core.utils import logger, solar_mass
bilby/gw/conversion.py:from ..core.prior import DeltaFunction
bilby/gw/conversion.py:from .utils import lalsim_SimInspiralTransformPrecessingNewInitialConditions
bilby/gw/conversion.py:from .eos.eos import SpectralDecompositionEOS, EOSFamily, IntegrateTOV
bilby/gw/conversion.py:from .cosmology import get_cosmology
bilby/gw/conversion.py: from astropy import units
bilby/gw/conversion.py: from astropy.cosmology import z_at_value
bilby/gw/cosmology.py:from ..core.utils import logger
bilby/gw/cosmology.py: from astropy import cosmology as cosmo
bilby/gw/detector/__init__.py:from ..conversion import convert_to_lal_binary_black_hole_parameters
bilby/gw/detector/__init__.py:from .calibration import *
bilby/gw/detector/__init__.py:from .interferometer import *
bilby/gw/detector/__init__.py:from .networks import *
bilby/gw/detector/__init__.py:from .psd import *
bilby/gw/detector/__init__.py:from .strain_data import *
bilby/gw/detector/__init__.py: import lal
bilby/gw/detector/__init__.py: import lalsimulation as lalsim
bilby/gw/detector/calibration.py:import numpy as np
bilby/gw/detector/calibration.py:from scipy.interpolate import interp1d
bilby/gw/detector/geometry.py:import numpy as np
bilby/gw/detector/geometry.py:from .. import utils as gwutils
bilby/gw/detector/interferometer.py:import os
bilby/gw/detector/interferometer.py:import sys
bilby/gw/detector/interferometer.py:import numpy as np
bilby/gw/detector/interferometer.py:from matplotlib import pyplot as plt
bilby/gw/detector/interferometer.py:from ...core import utils
bilby/gw/detector/interferometer.py:from ...core.utils import docstring, logger
bilby/gw/detector/interferometer.py:from .. import utils as gwutils
bilby/gw/detector/interferometer.py:from ..utils import PropertyAccessor
bilby/gw/detector/interferometer.py:from .calibration import Recalibrate
bilby/gw/detector/interferometer.py:from .geometry import InterferometerGeometry
bilby/gw/detector/interferometer.py:from .strain_data import InterferometerStrainData
bilby/gw/detector/interferometer.py: import gwpy
bilby/gw/detector/interferometer.py: import gwpy.signal
bilby/gw/detector/interferometer.py: import deepdish
bilby/gw/detector/interferometer.py: import deepdish
bilby/gw/detector/interferometer.py: import dill
bilby/gw/detector/interferometer.py: import dill
bilby/gw/detector/networks.py:import os
bilby/gw/detector/networks.py:import sys
bilby/gw/detector/networks.py:import warnings
bilby/gw/detector/networks.py:import numpy as np
bilby/gw/detector/networks.py:import math
bilby/gw/detector/networks.py:from ...core import utils
bilby/gw/detector/networks.py:from ...core.utils import logger
bilby/gw/detector/networks.py:from .. import utils as gwutils
bilby/gw/detector/networks.py:from .interferometer import Interferometer
bilby/gw/detector/networks.py:from .psd import PowerSpectralDensity
bilby/gw/detector/networks.py:from .strain_data import InterferometerStrainData
bilby/gw/detector/networks.py: import deepdish
bilby/gw/detector/networks.py: import deepdish
bilby/gw/detector/networks.py: import dill
bilby/gw/detector/networks.py: import dill
bilby/gw/detector/psd.py:import os
bilby/gw/detector/psd.py:import numpy as np
bilby/gw/detector/psd.py:from scipy.interpolate import interp1d
bilby/gw/detector/psd.py:from ...core import utils
bilby/gw/detector/psd.py:from ...core.utils import logger
bilby/gw/detector/psd.py:from .strain_data import InterferometerStrainData
bilby/gw/detector/psd.py: self.__import_amplitude_spectral_density()
bilby/gw/detector/psd.py: self.__import_power_spectral_density()
bilby/gw/detector/psd.py: def __import_amplitude_spectral_density(self):
bilby/gw/detector/psd.py: def __import_power_spectral_density(self):
bilby/gw/detector/strain_data.py:import numpy as np
bilby/gw/detector/strain_data.py:from scipy.signal.windows import tukey
bilby/gw/detector/strain_data.py:from ...core import utils
bilby/gw/detector/strain_data.py:from ...core.series import CoupledTimeAndFrequencySeries
bilby/gw/detector/strain_data.py:from ...core.utils import logger
bilby/gw/detector/strain_data.py:from .. import utils as gwutils
bilby/gw/detector/strain_data.py:from ..utils import PropertyAccessor
bilby/gw/detector/strain_data.py: import gwpy
bilby/gw/detector/strain_data.py: import gwpy.signal
bilby/gw/detector/strain_data.py: import lal
bilby/gw/detector/strain_data.py: import pycbc
bilby/gw/detector/strain_data.py: import pycbc
bilby/gw/eos/__init__.py:from .tov_solver import IntegrateTOV
bilby/gw/eos/__init__.py:from .eos import (SpectralDecompositionEOS,
bilby/gw/eos/eos.py:import os
bilby/gw/eos/eos.py:import numpy as np
bilby/gw/eos/eos.py:import matplotlib.pyplot as plt
bilby/gw/eos/eos.py:from scipy.integrate import cumtrapz, quad
bilby/gw/eos/eos.py:from scipy.interpolate import interp1d, CubicSpline
bilby/gw/eos/eos.py:from scipy.optimize import minimize_scalar
bilby/gw/eos/eos.py:from .tov_solver import IntegrateTOV
bilby/gw/eos/eos.py:from ...core import utils
bilby/gw/eos/tov_solver.py:import numpy as np
bilby/gw/eos/tov_solver.py:from scipy.integrate import solve_ivp
bilby/gw/likelihood.py:import gc
bilby/gw/likelihood.py:import os
bilby/gw/likelihood.py:import json
bilby/gw/likelihood.py:import copy
bilby/gw/likelihood.py:import numpy as np
bilby/gw/likelihood.py:import scipy.integrate as integrate
bilby/gw/likelihood.py:from scipy.interpolate import interp1d
bilby/gw/likelihood.py: from scipy.special import logsumexp
bilby/gw/likelihood.py: from scipy.misc import logsumexp
bilby/gw/likelihood.py:from scipy.special import i0e
bilby/gw/likelihood.py:from ..core.likelihood import Likelihood
bilby/gw/likelihood.py:from ..core.utils import BilbyJsonEncoder, decode_bilby_json
bilby/gw/likelihood.py:from ..core.utils import (
bilby/gw/likelihood.py:from ..core.prior import Interped, Prior, Uniform
bilby/gw/likelihood.py:from .detector import InterferometerList, get_empty_interferometer
bilby/gw/likelihood.py:from .prior import BBHPriorDict, CBCPriorDict, Cosmological
bilby/gw/likelihood.py:from .source import lal_binary_black_hole
bilby/gw/likelihood.py:from .utils import (
bilby/gw/likelihood.py:from .waveform_generator import WaveformGenerator
bilby/gw/likelihood.py:from collections import namedtuple
bilby/gw/likelihood.py: from lal import git_version, __version__
bilby/gw/likelihood.py: from lalsimulation import git_version, __version__
bilby/gw/prior.py:import os
bilby/gw/prior.py:import copy
bilby/gw/prior.py:import numpy as np
bilby/gw/prior.py:from scipy.interpolate import InterpolatedUnivariateSpline, interp1d
bilby/gw/prior.py:from scipy.integrate import cumtrapz
bilby/gw/prior.py:from scipy.special import hyp2f1
bilby/gw/prior.py:from scipy.stats import norm
bilby/gw/prior.py:from ..core.prior import (PriorDict, Uniform, Prior, DeltaFunction, Gaussian,
bilby/gw/prior.py:from ..core.utils import infer_args_from_method, logger
bilby/gw/prior.py:from .conversion import (
bilby/gw/prior.py:from .cosmology import get_cosmology
bilby/gw/prior.py: from astropy import cosmology as cosmo, units
bilby/gw/prior.py: self.hp = self._check_imports()
bilby/gw/prior.py: def _check_imports():
bilby/gw/prior.py: import healpy
bilby/gw/result.py:import json
bilby/gw/result.py:import pickle
bilby/gw/result.py:import os
bilby/gw/result.py:import matplotlib.pyplot as plt
bilby/gw/result.py:from matplotlib import rcParams
bilby/gw/result.py:import numpy as np
bilby/gw/result.py:from ..core.result import Result as CoreResult
bilby/gw/result.py:from ..core.utils import (
bilby/gw/result.py:from .utils import plot_spline_pos, spline_angle_xform, asd_from_freq_series
bilby/gw/result.py:from .detector import get_empty_interferometer, Interferometer
bilby/gw/result.py: import plotly.graph_objects as go
bilby/gw/result.py: from plotly.offline import plot
bilby/gw/result.py: from plotly.subplots import make_subplots
bilby/gw/result.py: "HTML plotting requested, but plotly cannot be imported, "
bilby/gw/result.py: from astropy.time import Time
bilby/gw/result.py: from ligo.skymap import io, version, plot, postprocess, bayestar, kde
bilby/gw/result.py: import healpy as hp
bilby/gw/sampler/__init__.py:from . import proposal
bilby/gw/sampler/proposal.py:import random
bilby/gw/sampler/proposal.py:import numpy as np
bilby/gw/sampler/proposal.py:from ...core.sampler.proposal import JumpProposal
bilby/gw/source.py:import numpy as np
bilby/gw/source.py:from ..core import utils
bilby/gw/source.py:from ..core.utils import logger
bilby/gw/source.py:from .conversion import bilby_to_lalsimulation_spins
bilby/gw/source.py:from .utils import (lalsim_GetApproximantFromString,
bilby/gw/source.py: import lal
bilby/gw/source.py: import lalsimulation as lalsim
bilby/gw/utils.py:import os
bilby/gw/utils.py:import json
bilby/gw/utils.py:from math import fmod
bilby/gw/utils.py:import numpy as np
bilby/gw/utils.py:from scipy.interpolate import interp1d
bilby/gw/utils.py:import matplotlib.pyplot as plt
bilby/gw/utils.py:from ..core.utils import (ra_dec_to_theta_phi,
bilby/gw/utils.py: from gwpy.timeseries import TimeSeries
bilby/gw/utils.py: import lal
bilby/gw/utils.py: import lalsimulation as lalsim
bilby/gw/utils.py: from ligo.gracedb.rest import GraceDb
bilby/gw/waveform_generator.py:import numpy as np
bilby/gw/waveform_generator.py:from ..core import utils
bilby/gw/waveform_generator.py:from ..core.series import CoupledTimeAndFrequencySeries
bilby/gw/waveform_generator.py:from .utils import PropertyAccessor
bilby/gw/waveform_generator.py:from .conversion import convert_to_lal_binary_black_hole_parameters
bilby/hyper/__init__.py:from . import likelihood, model
bilby/hyper/likelihood.py:import logging
bilby/hyper/likelihood.py:import numpy as np
bilby/hyper/likelihood.py:from ..core.likelihood import Likelihood
bilby/hyper/likelihood.py:from .model import Model
bilby/hyper/likelihood.py:from ..core.prior import PriorDict
bilby/hyper/model.py:from ..core.utils import infer_args_from_function_except_n_args
```
</details>https://git.ligo.org/lscsoft/bilby/-/issues/586`bilby.gw.conversion` module for waveforms which use a custom reference frequ...2022-06-20T20:15:07ZGregory Ashtongregory.ashton@ligo.org`bilby.gw.conversion` module for waveforms which use a custom reference frequency@serguei.ossokine writes:
> I was recently thinking of doing some test runs with SEOBNRv4PHM and bilby/parallel bilby and I think that there might be currently a bug/misconfiguration possible when running with this waveform. In particu...@serguei.ossokine writes:
> I was recently thinking of doing some test runs with SEOBNRv4PHM and bilby/parallel bilby and I think that there might be currently a bug/misconfiguration possible when running with this waveform. In particular, as far as I can tell, currently the code that transforms from the spin angles (so tilts, $\phi_{jl}$, etc) to Cartesian coordinates of the spin, always uses the reference frequency. For SEOB the reference frequency is actually ignored and it's always the starting frequency. Therefore if the reference frequency is different from the starting frequency, the code will do the transformation from spin angles to Cartesian coordinates of the spin at the "wrong" frequency - i.e. not at the starting frequency of EOB waveform.
> I don't think this affects any results so far, but I think it's important to fix this. This does not affect RIFT - RIFT samples directly in Cartesian spin components. (It also doesn't affect LALInference which handles SEOB in a special way for this reason)
I think I've seen this effect when doing test runs.
The solution here is to tell the waveform generator the correct reference frequency. AFAIK, there is no way from lalsimulation to know if the waveform uses the starting frequency or something passed in (do we pass it in and it is ignored.. or is it never passed it?).
I think this is a priority issue for O4 development.