From f00851bf6ef85f9b0495772bd9c5e8eb1904ba85 Mon Sep 17 00:00:00 2001 From: Michele Vallisneri Date: Tue, 5 Oct 2021 18:06:00 -0700 Subject: [PATCH 01/15] Enable automatic documentation --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ff55eba4..70a5a1ed 100644 --- a/Makefile +++ b/Makefile @@ -81,7 +81,8 @@ docs: ## generate Sphinx HTML documentation, including API docs rm -f docs/enterprise*.rst rm -f docs/modules.rst rm -rf docs/_build - sphinx-apidoc -o docs/ -M enterprise + sphinx-apidoc --ext-autodoc -o docs/ -M enterprise + sphinx-apidoc --ext-autodoc -o docs/ -M tests $(MAKE) -C docs clean $(MAKE) -C docs html $(BROWSER) docs/_build/html/index.html From 0f121b5bbbbf34bc0980156e1771de24b67b8956 Mon Sep 17 00:00:00 2001 From: Michele Vallisneri Date: Tue, 5 Oct 2021 19:04:28 -0700 Subject: [PATCH 02/15] Added docstrings for enterprise_test_data.py and test_deterministic_signals.py. --- enterprise/signals/utils.py | 22 ++++++------ tests/enterprise_test_data.py | 3 ++ tests/test_deterministic_signals.py | 56 +++++++++++++++++++++++------ 3 files changed, 60 insertions(+), 21 deletions(-) diff --git a/enterprise/signals/utils.py b/enterprise/signals/utils.py index 55b1d545..d04eb4ee 100644 --- a/enterprise/signals/utils.py +++ b/enterprise/signals/utils.py @@ -610,21 +610,21 @@ def create_gw_antenna_pattern(pos, gwtheta, gwphi): @function def bwm_delay(toas, pos, log10_h=-14.0, cos_gwtheta=0.0, gwphi=0.0, gwpol=0.0, t0=55000, antenna_pattern_fn=None): """ - Function that calculates the earth-term gravitational-wave - burst-with-memory signal, as described in: - Seto et al, van haasteren and Levin, phsirkov et al, Cordes and Jenet. - This version uses the F+/Fx polarization modes, as verified with the - Continuous Wave and Anisotropy papers. - - :param toas: Time-of-arrival measurements [s] - :param pos: Unit vector from Earth to pulsar + Function that calculates the Earth-term gravitational-wave + Burst-With-Memory signal, as described in: + Seto et al., van Haasteren and Levin, Pshirkov et al., Cordes and Jenet. + This version uses the F+/Fx polarization modes, and matches the + continuous-wave and anisotropy papers. + + :param toas: time-of-arrival measurements [s] + :param pos: unit vector from Earth to pulsar :param log10_h: log10 of GW strain - :param cos_gwtheta: Cosine of GW polar angle + :param cos_gwtheta: cosine of GW polar angle :param gwphi: GW azimuthal polar angle [rad] :param gwpol: GW polarization angle - :param t0: Burst central time [day] + :param t0: burst central time [day] :param antenna_pattern_fn: - User defined function that takes `pos`, `gwtheta`, `gwphi` as + user defined function that takes `pos`, `gwtheta`, `gwphi` as arguments and returns (fplus, fcross) :return: the waveform as induced timing residuals (seconds) diff --git a/tests/enterprise_test_data.py b/tests/enterprise_test_data.py index 758ab760..629581fd 100644 --- a/tests/enterprise_test_data.py +++ b/tests/enterprise_test_data.py @@ -1,5 +1,8 @@ # enterprise_test_data.py +"""This module provides the location of data files for tests as `datadir`. +Currently they are in `tests/data`, and they are based on the 9-yr data release.""" + # import this to get the location of the datafiles for tests. This file # must be kept in the appropriate location relative to the test data # dir for this to work. diff --git a/tests/test_deterministic_signals.py b/tests/test_deterministic_signals.py index 886d292d..81c4f987 100644 --- a/tests/test_deterministic_signals.py +++ b/tests/test_deterministic_signals.py @@ -2,10 +2,9 @@ # -*- coding: utf-8 -*- """ -test_deterministic_signals ----------------------------------- - -Tests for deterministic signal module +Deterministic Signals are those that provide a `get_delay()` method, +and are created by the class factories in :mod:`enterprise.signals.deterministic_signals`. +All tests in this module are run on `B1855+09_NANOGrav_9yv1`. """ @@ -23,25 +22,40 @@ @function def sine_wave(toas, log10_A=-7, log10_f=-8, phase=0.0): + """A simple sine wave Enterprise function object. When instantiated, + it will create named Parameters for `log10_A`, `log10_f`, `phase`, + and it will automatically extract `toas` from the linked `Pulsar` object. """ + return 10 ** log10_A * np.sin(2 * np.pi * toas * 10 ** log10_f + phase) class TestDeterministicSignals(unittest.TestCase): + """Tests deterministic signals with a tempo2 Pulsar object.""" + @classmethod def setUpClass(cls): - """Setup the Pulsar object.""" + """Set up the :func:`enterprise.Pulsar` object used in tests (tempo2 version).""" # initialize Pulsar class cls.psr = Pulsar(datadir + "/B1855+09_NANOGrav_9yv1.gls.par", datadir + "/B1855+09_NANOGrav_9yv1.tim") def test_bwm(self): - """Test BWM waveform.""" + """Tests :meth:`enterprise.signals.deterministic_signals.Deterministic` + using the burst-with-memory function :func:`enterprise.signals.utils.bwm_delay`. + The test instantiates a deterministic Signal on our test pulsar, and + compares the array returned by calling `get_delay()` on the Signal + with a fixed dictionary of parameters, with the result of calling + the function directly with those parameters. + """ + log10_h = parameter.Uniform(-20, -11)("bwm_log10_h") cos_gwtheta = parameter.Uniform(-1, 1)("bwm_cos_gwtheta") gwphi = parameter.Uniform(0, 2 * np.pi)("bwm_gwphi") gwpol = parameter.Uniform(0, np.pi)("bwm_gwpol") t0 = parameter.Uniform(53000, 57000)("bwm_t0") + bwm_wf = utils.bwm_delay(log10_h=log10_h, cos_gwtheta=cos_gwtheta, gwphi=gwphi, gwpol=gwpol, t0=t0) + bwm = deterministic_signals.Deterministic(bwm_wf) m = bwm(self.psr) @@ -68,11 +82,15 @@ def test_bwm(self): assert np.all(m.get_delay(params) == d1), msg def test_delay(self): - """Test deterministic signal no selection.""" + """Same as :meth:`TestDeterministicSignals.test_bwm`, but + for a simple sine wave signal.""" + # set up signal and parameters log10_Ad = parameter.Uniform(-10, -5) log10_fd = parameter.Uniform(-9, -7) + waveform = sine_wave(log10_A=log10_Ad, log10_f=log10_fd) + dt = deterministic_signals.Deterministic(waveform) m = dt(self.psr) @@ -89,11 +107,20 @@ def test_delay(self): assert np.all(m.get_delay(params) == delay), msg def test_delay_backend(self): - """Test deterministic signal with selection.""" + """Same as :meth:`TestDeterministicSignals.test_delay`, but + instantiates the Signal with :func:`enterprise.signals.selections.by_backend`, + which creates separated named parameters for 430_ASP, 430_PUPPI, + L-wide_ASP, L-wide_PUPPI. The parameters are automatically accounted for + in `get_delay()`, but they need to be used explicitly when calling the + function directly. The tests therefore reconstructs the delay vector by + building selection masks from :meth:`enterprise.Pulsar.backend_flags`.""" + # set up signal and parameters log10_Ad = parameter.Uniform(-10, -5) log10_fd = parameter.Uniform(-9, -7) + waveform = sine_wave(log10_A=log10_Ad, log10_f=log10_fd) + selection = Selection(selections.by_backend) dt = deterministic_signals.Deterministic(waveform, selection=selection) m = dt(self.psr) @@ -124,7 +151,14 @@ def test_delay_backend(self): assert np.all(m.get_delay(params) == delay), msg def test_physical_ephem_model(self): - """Test physical ephemeris model""" + """Tests physical ephemeris model (which is implemented as a deterministic signal) + four ways: + + - computed directly with :func:`enterprise.signals.utils.physical_ephem_delay`; + - computed with :meth:`enterprise.signals.deterministic_signals.PhysicalEphemerisSignal.get_delay` with `use_epoch_toas=True` (the default), which reduces computation by evaluating ephemeris corrections once per measurement epoch, and then interpolating to the full `toas` vector; + - computed with :meth:`enterprise.signals.deterministic_signals.PhysicalEphemerisSignal.get_delay`, setting `use_epoch_toas=False`; + - loaded from a golden copy. + """ if isinstance(self.psr, enterprise.pulsar.Tempo2Pulsar): # define signals with and without epoch TOAs @@ -189,9 +223,11 @@ def test_physical_ephem_model(self): class TestDeterministicSignalsPint(TestDeterministicSignals): + """Tests deterministic signals with a PINT Pulsar object.""" + @classmethod def setUpClass(cls): - """Setup the Pulsar object.""" + """Set up the :func:`enterprise.Pulsar` object used in tests (PINT version).""" # initialize Pulsar class cls.psr = Pulsar( From 026e153b54442e1e896af6e5c9784feea291882d Mon Sep 17 00:00:00 2001 From: Michele Vallisneri Date: Tue, 5 Oct 2021 19:20:58 -0700 Subject: [PATCH 03/15] Flaking, deferring to readthedocs.org configuration --- .readthedocs.yaml | 20 -------------------- tests/test_deterministic_signals.py | 9 ++++++--- 2 files changed, 6 insertions(+), 23 deletions(-) delete mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml deleted file mode 100644 index da2bb298..00000000 --- a/.readthedocs.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# .readthedocs.yaml -# Read the Docs configuration file -# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details - -# Required -version: 2 - -# Build documentation in the docs/ directory with Sphinx -sphinx: - configuration: docs/conf.py - -# Optionally build your docs in additional formats such as PDF -formats: - - pdf - -# Optionally set the version of Python and requirements required to build your docs -python: - version: 3.7 - install: - - requirements: requirements_dev.txt \ No newline at end of file diff --git a/tests/test_deterministic_signals.py b/tests/test_deterministic_signals.py index 81c4f987..564aec2d 100644 --- a/tests/test_deterministic_signals.py +++ b/tests/test_deterministic_signals.py @@ -153,10 +153,13 @@ def test_delay_backend(self): def test_physical_ephem_model(self): """Tests physical ephemeris model (which is implemented as a deterministic signal) four ways: - + - computed directly with :func:`enterprise.signals.utils.physical_ephem_delay`; - - computed with :meth:`enterprise.signals.deterministic_signals.PhysicalEphemerisSignal.get_delay` with `use_epoch_toas=True` (the default), which reduces computation by evaluating ephemeris corrections once per measurement epoch, and then interpolating to the full `toas` vector; - - computed with :meth:`enterprise.signals.deterministic_signals.PhysicalEphemerisSignal.get_delay`, setting `use_epoch_toas=False`; + - computed with :meth:`enterprise.signals.deterministic_signals.PhysicalEphemerisSignal.get_delay` + with `use_epoch_toas=True` (the default), which reduces computation by evaluating ephemeris corrections + once per measurement epoch, and then interpolating to the full `toas` vector; + - computed with :meth:`enterprise.signals.deterministic_signals.PhysicalEphemerisSignal.get_delay`, + setting `use_epoch_toas=False`; - loaded from a golden copy. """ From 2fe6d31bf17e6f54dd99d9dbe94f3df7234c72e5 Mon Sep 17 00:00:00 2001 From: Michele Vallisneri Date: Tue, 5 Oct 2021 19:33:52 -0700 Subject: [PATCH 04/15] Default version for readthedocs --- enterprise/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/enterprise/__init__.py b/enterprise/__init__.py index 70430935..7bc719e9 100644 --- a/enterprise/__init__.py +++ b/enterprise/__init__.py @@ -1,3 +1,6 @@ -from .version import version +try: + from .version import version +except: + version = 'unknown' __version__ = version From 2a4d76b7fafb14235ec61d2ce84fe472b2e74443 Mon Sep 17 00:00:00 2001 From: Michele Vallisneri Date: Wed, 6 Oct 2021 09:28:26 -0700 Subject: [PATCH 05/15] Back in black --- enterprise/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enterprise/__init__.py b/enterprise/__init__.py index 7bc719e9..44c10eaf 100644 --- a/enterprise/__init__.py +++ b/enterprise/__init__.py @@ -1,6 +1,6 @@ try: from .version import version except: - version = 'unknown' + version = "unknown" __version__ = version From 3d610bc1d6c34a205f643d269e0aab637870f8b5 Mon Sep 17 00:00:00 2001 From: Michele Vallisneri Date: Wed, 6 Oct 2021 10:03:29 -0700 Subject: [PATCH 06/15] Tell autodoc to skip difficult packages --- docs/conf.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index bd31aca4..b7545caa 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,6 +48,9 @@ # make order or docs 'groupwise' autodoc_member_order = "groupwise" +# no hope of installing these... +autodoc_mock_imports = ["libstempo", "PINT", "astropy", "healpy", "sksparse"] + # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] From 7a457d531d5fabe915f637c47884d21f53dfcc55 Mon Sep 17 00:00:00 2001 From: Michele Vallisneri Date: Wed, 6 Oct 2021 10:07:31 -0700 Subject: [PATCH 07/15] Add tests to autodoc --- docs/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index b7545caa..0b8fab56 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,8 +48,8 @@ # make order or docs 'groupwise' autodoc_member_order = "groupwise" -# no hope of installing these... -autodoc_mock_imports = ["libstempo", "PINT", "astropy", "healpy", "sksparse"] +# we won't even try installing these +autodoc_mock_imports = ["libstempo", "PINT", "astropy", "healpy", "sksparse", "ephem"] # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] @@ -283,7 +283,7 @@ def run_apidoc(_): # subprocess.check_call(['jupyter nbconvert --template nb-rst.tpl --to rst', # nb, '--output-dir', output_path]) - modules = ["../enterprise"] + modules = ["../enterprise", "../tests"] for module in modules: cmd_path = "sphinx-apidoc" if hasattr(sys, "real_prefix"): # Check to see if we are in a virtualenv From c9a186f2cb11e8c862109393e410add1a741a66d Mon Sep 17 00:00:00 2001 From: Michele Vallisneri Date: Wed, 6 Oct 2021 10:17:49 -0700 Subject: [PATCH 08/15] More sphinx fixes --- docs/history.rst | 1 - docs/index.rst | 13 +++++++------ docs/mdc.rst | 1 + docs/nano9.rst | 1 + docs/readme.rst | 1 - 5 files changed, 9 insertions(+), 8 deletions(-) delete mode 100644 docs/history.rst delete mode 100644 docs/readme.rst diff --git a/docs/history.rst b/docs/history.rst deleted file mode 100644 index 25064996..00000000 --- a/docs/history.rst +++ /dev/null @@ -1 +0,0 @@ -.. include:: ../HISTORY.rst diff --git a/docs/index.rst b/docs/index.rst index 4146ab67..a54ad2ab 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -43,11 +43,12 @@ searches, and timing model analysis. mdc nano9 -.. include:: ../AUTHORS.rst +.. toctree:: + :maxdepth: 2 + :caption: Code Documentation -Indices and tables -================== + :ref:`modindex` + :ref:`genindex` + :ref:`search` -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` +.. include:: ../AUTHORS.rst diff --git a/docs/mdc.rst b/docs/mdc.rst index 2c37ba07..20571d02 100644 --- a/docs/mdc.rst +++ b/docs/mdc.rst @@ -1,5 +1,6 @@ .. module:: enterprise + :noindex: .. note:: This tutorial was generated from a Jupyter notebook that can be downloaded `here <_static/notebooks/mdc.ipynb>`_. diff --git a/docs/nano9.rst b/docs/nano9.rst index c0591c77..d79f2525 100644 --- a/docs/nano9.rst +++ b/docs/nano9.rst @@ -1,5 +1,6 @@ .. module:: enterprise + :noindex: .. note:: This tutorial was generated from a Jupyter notebook that can be downloaded `here <_static/notebooks/nano9.ipynb>`_. diff --git a/docs/readme.rst b/docs/readme.rst deleted file mode 100644 index 72a33558..00000000 --- a/docs/readme.rst +++ /dev/null @@ -1 +0,0 @@ -.. include:: ../README.rst From e7f0b4c351af7eade0800bc9bfb08e09997105c3 Mon Sep 17 00:00:00 2001 From: Michele Vallisneri Date: Wed, 6 Oct 2021 10:21:24 -0700 Subject: [PATCH 09/15] More sphinx fixes --- docs/index.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index a54ad2ab..f12afa90 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -47,8 +47,8 @@ searches, and timing model analysis. :maxdepth: 2 :caption: Code Documentation - :ref:`modindex` - :ref:`genindex` - :ref:`search` + modules + enterprise + tests .. include:: ../AUTHORS.rst From 382ed801c571336039a485ee816a43b590139806 Mon Sep 17 00:00:00 2001 From: Michele Vallisneri Date: Wed, 6 Oct 2021 10:26:14 -0700 Subject: [PATCH 10/15] More sphinx fixes --- AUTHORS.rst | 13 ++++--------- docs/index.rst | 1 - 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 3e0349f6..9e0eee28 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -1,12 +1,7 @@ Development Leads ----------------- -* `Justin A. Ellis (@jellis18) `_ -* `Stephen R. Taylor (@stevertaylor) `_ -* `Paul T. Baker (@paulthebaker) `_ -* `Michele Vallisneri (@vallis) `_ - -Contributors ------------- - -None yet. Why not be the first? +* Justin A. Ellis (@jellis18) +* Stephen R. Taylor (@stevertaylor) +* Paul T. Baker (@paulthebaker) +* Michele Vallisneri (@vallis) diff --git a/docs/index.rst b/docs/index.rst index f12afa90..223d63dd 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -47,7 +47,6 @@ searches, and timing model analysis. :maxdepth: 2 :caption: Code Documentation - modules enterprise tests From 512e557da1ab1e55eaa1e881451de843c632c196 Mon Sep 17 00:00:00 2001 From: Michele Vallisneri Date: Mon, 11 Oct 2021 18:23:01 -0700 Subject: [PATCH 11/15] Fix regression in pulsar.py (unsorted backend_flags) --- enterprise/pulsar.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/enterprise/pulsar.py b/enterprise/pulsar.py index 0fdb5e3d..dd71accc 100644 --- a/enterprise/pulsar.py +++ b/enterprise/pulsar.py @@ -263,7 +263,7 @@ def backend_flags(self): if flag in flagnames: ret[:] = np.where(self._flags[flag] == "", ret, self._flags[flag]) - return ret + return ret[self._isort] @property def theta(self): @@ -327,7 +327,6 @@ def __init__(self, toas, model, sort=True, drop_pintpsr=True, planets=True): self._flags = {} for ii, obsflags in enumerate(toas.get_flags()): for jj, flag in enumerate(obsflags): - if flag not in list(self._flags.keys()): self._flags[flag] = [""] * toas.ntoas From 1d8e0609702f22dea8440cecb9bb5b8c9cdbd41e Mon Sep 17 00:00:00 2001 From: Michele Vallisneri Date: Mon, 25 Oct 2021 19:30:03 -0700 Subject: [PATCH 12/15] Make sure SignalCollection.get_basis() does not reuse numpy arrays to store new bases. --- enterprise/signals/signal_base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/enterprise/signals/signal_base.py b/enterprise/signals/signal_base.py index 765a1b6c..8f1fa933 100644 --- a/enterprise/signals/signal_base.py +++ b/enterprise/signals/signal_base.py @@ -869,10 +869,11 @@ def get_detres(self, params): # than the last time @cache_call("basis_params", limit=1) def get_basis(self, params={}): + Fmat = np.zeros_like(self._Fmat) for signal in self._signals: if signal in self._idx: - self._Fmat[:, self._idx[signal]] = signal.get_basis(params) - return self._Fmat + Fmat[:, self._idx[signal]] = signal.get_basis(params) + return Fmat def get_phiinv(self, params): return self.get_phi(params).inv() From 9bf13cb04347e8feba58b1c0e8baaa5e8de9e99d Mon Sep 17 00:00:00 2001 From: Michele Vallisneri Date: Tue, 26 Oct 2021 09:54:13 -0700 Subject: [PATCH 13/15] Fixed SignalCollection regression when handling GPs with coefficients=True --- enterprise/signals/gp_signals.py | 2 -- enterprise/signals/signal_base.py | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/enterprise/signals/gp_signals.py b/enterprise/signals/gp_signals.py index a69b0303..c6bb1076 100644 --- a/enterprise/signals/gp_signals.py +++ b/enterprise/signals/gp_signals.py @@ -338,7 +338,6 @@ def _construct_basis(self, params={}): self._basis, self._labels = self._bases(params=params) if coefficients: - def _get_coefficient_logprior(self, c, **params): # MV: for correlated GPs, the prior needs to use # the coefficients for all GPs together; @@ -371,7 +370,6 @@ def get_phiinv(self, params): return None else: - @property def delay_params(self): return [] diff --git a/enterprise/signals/signal_base.py b/enterprise/signals/signal_base.py index 8f1fa933..0eca8bef 100644 --- a/enterprise/signals/signal_base.py +++ b/enterprise/signals/signal_base.py @@ -869,10 +869,15 @@ def get_detres(self, params): # than the last time @cache_call("basis_params", limit=1) def get_basis(self, params={}): + if self._Fmat is None: + return None + Fmat = np.zeros_like(self._Fmat) + for signal in self._signals: if signal in self._idx: Fmat[:, self._idx[signal]] = signal.get_basis(params) + return Fmat def get_phiinv(self, params): From 62dd2b0c31d229af677257b84bcc24a850ea30cd Mon Sep 17 00:00:00 2001 From: Michele Vallisneri Date: Tue, 26 Oct 2021 10:25:26 -0700 Subject: [PATCH 14/15] Linting, of course --- enterprise/signals/gp_signals.py | 2 ++ enterprise/signals/signal_base.py | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/enterprise/signals/gp_signals.py b/enterprise/signals/gp_signals.py index c6bb1076..a69b0303 100644 --- a/enterprise/signals/gp_signals.py +++ b/enterprise/signals/gp_signals.py @@ -338,6 +338,7 @@ def _construct_basis(self, params={}): self._basis, self._labels = self._bases(params=params) if coefficients: + def _get_coefficient_logprior(self, c, **params): # MV: for correlated GPs, the prior needs to use # the coefficients for all GPs together; @@ -370,6 +371,7 @@ def get_phiinv(self, params): return None else: + @property def delay_params(self): return [] diff --git a/enterprise/signals/signal_base.py b/enterprise/signals/signal_base.py index 0eca8bef..adf6c2e6 100644 --- a/enterprise/signals/signal_base.py +++ b/enterprise/signals/signal_base.py @@ -871,13 +871,13 @@ def get_detres(self, params): def get_basis(self, params={}): if self._Fmat is None: return None - + Fmat = np.zeros_like(self._Fmat) - + for signal in self._signals: if signal in self._idx: Fmat[:, self._idx[signal]] = signal.get_basis(params) - + return Fmat def get_phiinv(self, params): From 2472e4304d6ec7e518274c5c588939e735b9a077 Mon Sep 17 00:00:00 2001 From: Michele Vallisneri Date: Tue, 2 Nov 2021 10:26:34 -0700 Subject: [PATCH 15/15] Bumped PINT and libstempo minimum versions --- requirements.txt | 4 ++-- setup.cfg | 2 +- setup.py | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/requirements.txt b/requirements.txt index 5d6d808e..1ae7405b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,5 +3,5 @@ scipy>=1.2.0 ephem>=3.7.6.0 healpy>=1.14.0 scikit-sparse>=0.4.5 -pint-pulsar>=0.8.2 -libstempo>=2.4.0 +pint-pulsar>=0.8.3 +libstempo>=2.4.3 diff --git a/setup.cfg b/setup.cfg index 71b1c044..236c02ca 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 3.0.0 +current_version = 3.2.2 commit = False tag = False diff --git a/setup.py b/setup.py index e8380b32..9d6eb4af 100644 --- a/setup.py +++ b/setup.py @@ -12,13 +12,12 @@ "ephem>=3.7.6.0", "healpy>=1.14.0", "scikit-sparse>=0.4.5", - "pint-pulsar>=0.8.2", - "libstempo>=2.4.0", + "pint-pulsar>=0.8.3", + "libstempo>=2.4.3", ] test_requirements = [] - setup( name="enterprise-pulsar", description="ENTERPRISE (Enhanced Numerical Toolbox Enabling a Robust PulsaR Inference SuitE)",