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

WIP: Brute force method to find the optimal number of harmonics for WaveX, DMWaveX, and CMWaveX #1822

Closed
wants to merge 43 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
5cbd67d
add cmwavex
abhisrkckl Jul 11, 2024
e9b0d35
init
abhisrkckl Jul 11, 2024
557ab55
test_dmwavex
abhisrkckl Jul 11, 2024
fd87992
cmwavex_setup
abhisrkckl Jul 11, 2024
86a83b9
test_cmwavex
abhisrkckl Jul 11, 2024
19c3521
CHANGELOG
abhisrkckl Jul 11, 2024
5ddf707
validation for correlated noise components
abhisrkckl Jul 11, 2024
75a5cf5
changelog#
abhisrkckl Jul 11, 2024
9c97955
sourcery
abhisrkckl Jul 11, 2024
38f3b30
Merge branch 'chromatic' into cmwavex
abhisrkckl Jul 11, 2024
30c8f4b
validation
abhisrkckl Jul 11, 2024
a826cde
Merge branch 'master' into cmwavex
abhisrkckl Jul 11, 2024
b841455
Merge branch 'master' into cmwavex
abhisrkckl Jul 12, 2024
236cf25
Merge branch 'master' into cmwavex
abhisrkckl Jul 22, 2024
74fe0dd
Merge branch 'nanograv:master' into cmwavex
abhisrkckl Jul 23, 2024
8bcdb83
Merge branch 'nanograv:master' into cmwavex
abhisrkckl Aug 1, 2024
4bdbc65
Merge branch 'nanograv:master' into cmwavex
abhisrkckl Aug 7, 2024
fa6a9d6
--
abhisrkckl Aug 7, 2024
4b931c3
plchromnoise_from_cmwavex
abhisrkckl Aug 7, 2024
b39395a
tests
abhisrkckl Aug 7, 2024
e5f6783
CHANGELOG
abhisrkckl Aug 7, 2024
e9e1771
float
abhisrkckl Aug 8, 2024
5492daf
Merge branch 'master' into cmwavex
abhisrkckl Aug 8, 2024
27c7c4e
move functions
abhisrkckl Aug 8, 2024
d1dfcf8
CHANGELOG
abhisrkckl Aug 9, 2024
fa95894
find_optimal_nharms
abhisrkckl Aug 9, 2024
f51474d
move function
abhisrkckl Aug 9, 2024
b66d989
fix test
abhisrkckl Aug 9, 2024
b64d743
test_prepare_model_for_find_optimal_nharms
abhisrkckl Aug 9, 2024
37877a4
refactor
abhisrkckl Aug 9, 2024
a47b4f2
fix epochs
abhisrkckl Aug 9, 2024
03f0de6
test_noise_analysis
abhisrkckl Aug 9, 2024
829a5ba
don't subtract aic_min
abhisrkckl Aug 9, 2024
5fbdc5f
parallel
abhisrkckl Aug 9, 2024
e9ae79e
Merge branch 'master' into opt-nharm
abhisrkckl Aug 11, 2024
6402740
black
abhisrkckl Aug 11, 2024
6690d91
Merge branch 'master' into cmwavex
abhisrkckl Aug 11, 2024
524fc8f
setup.cfg
abhisrkckl Aug 11, 2024
1dde7d6
float
abhisrkckl Aug 12, 2024
354d18b
Merge branch 'cmwavex' into opt-nharm
abhisrkckl Aug 12, 2024
95702e2
wavex_setup
abhisrkckl Aug 12, 2024
2a5321d
tests
abhisrkckl Aug 12, 2024
ddac595
Merge branch 'master' into opt-nharm
abhisrkckl Aug 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG-unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ the released changes.
### Changed
- Moved the events -> TOAs and photon weights code into the function `load_events_weights` within `event_optimize`.
- Updated the `maxMJD` argument in `event_optimize` to default to the current mjd
- More validation for correlated noise components in `TimingModel`
- Moved functions related to `WaveX`, `DMWaveX`, and `CMWaveX` from `pint.utils` to their own namespaces within `pint.models`
- Moved `plrednoise_from_wavex` and similar functions from `pint.utils` to `pint.noise_analysis`
- `maskParameter.__repr__()` output now includes the frozen attribute.
- Changed default value of `FDJUMPLOG` to `Y`
- Bumped `black` version to 24.x
Expand All @@ -19,7 +22,10 @@ the released changes.
`pint.erfautils`, `pint.fits_utils`, `pint.logging` and `pint.residuals`
- Doing `model.par = something` will try to assign to `par.quantity` or `par.value` but will give warning
- `PLChromNoise` component to model chromatic red noise with a power law spectrum
- Fourier series representation of chromatic noise (`CMWaveX`)
- `pint.utils.cmwavex_setup` and `pint.utils.plchromnoise_from_cmwavex` functions
### Fixed
- Bug in `DMWaveX.get_indices()` function
- Explicit type conversion in `woodbury_dot()` function
- Documentation: Fixed empty descriptions in the timing model components table
- BIC implementation
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ uncertainties
loguru
nestle>=0.2.0
numdifftools
joblib
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ install_requires =
loguru
nestle>=0.2.0
numdifftools
joblib

[options.packages.find]
where = src
Expand Down
2 changes: 1 addition & 1 deletion src/pint/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def __init__(
onlyonce_level: str = "INFO",
) -> None:
r"""
Define regexs for messages that will only be seen once. Use ``\S+`` for a variable that might change.
Define regexs for messages that will only be seen once. Use ``\\S+`` for a variable that might change.
If a message comes through with a new value for that variable, it will be seen.

Make sure to escape other regex commands like ``()``.
Expand Down
1 change: 1 addition & 0 deletions src/pint/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from pint.models.binary_ddk import BinaryDDK
from pint.models.binary_ell1 import BinaryELL1, BinaryELL1H, BinaryELL1k
from pint.models.chromatic_model import ChromaticCM
from pint.models.cmwavex import CMWaveX
from pint.models.dispersion_model import (
DispersionDM,
DispersionDMX,
Expand Down
29 changes: 17 additions & 12 deletions src/pint/models/binary_ddk.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,19 @@ class BinaryDDK(BinaryDD):
of the system from Earth, the finite size of the system, and the
interaction of these with the proper motion.

From Kopeikin (1995) this includes :math:`\Delta_{\pi M}` (Equation 17), the mixed annual-orbital parallax term, which changes :math:`a_1` and :math:`\omega`
(:meth:`~pint.models.stand_alone_psr_binaries.DDK_model.DDKmodel.delta_a1_parallax` and :meth:`~pint.models.stand_alone_psr_binaries.DDK_model.DDKmodel.delta_omega_parallax`).
From Kopeikin (1995) this includes :math:`\\Delta_{\\pi M}` (Equation 17),
the mixed annual-orbital parallax term, which changes :math:`a_1` and :math:`\\omega`
(:meth:`~pint.models.stand_alone_psr_binaries.DDK_model.DDKmodel.delta_a1_parallax`
and :meth:`~pint.models.stand_alone_psr_binaries.DDK_model.DDKmodel.delta_omega_parallax`).

It does not include :math:`\Delta_{\pi P}`, the pure pulsar orbital parallax term (Equation 14).
It does not include :math:`\\Delta_{\\pi P}`, the pure pulsar orbital parallax term
(Equation 14).

From Kopeikin (1996) this includes apparent changes in :math:`\omega`, :math:`a_1`, and :math:`i` due to the proper motion
(:meth:`~pint.models.stand_alone_psr_binaries.DDK_model.DDKmodel.delta_omega_proper_motion`, :meth:`~pint.models.stand_alone_psr_binaries.DDK_model.DDKmodel.delta_a1_proper_motion`,
:meth:`~pint.models.stand_alone_psr_binaries.DDK_model.DDKmodel.delta_kin_proper_motion`) (Equations 8, 9, 10).
From Kopeikin (1996) this includes apparent changes in :math:`\\omega`, :math:`a_1`, and
:math:`i` due to the proper motion (:meth:`~pint.models.stand_alone_psr_binaries.DDK_model.DDKmodel.delta_omega_proper_motion`,
:meth:`~pint.models.stand_alone_psr_binaries.DDK_model.DDKmodel.delta_a1_proper_motion`,
:meth:`~pint.models.stand_alone_psr_binaries.DDK_model.DDKmodel.delta_kin_proper_motion`)
(Equations 8, 9, 10).

The actual calculations for this are done in
:class:`pint.models.stand_alone_psr_binaries.DDK_model.DDKmodel`.
Expand All @@ -67,7 +72,7 @@ class BinaryDDK(BinaryDD):
KIN
the inclination angle: :math:`i`
KOM
the longitude of the ascending node, Kopeikin (1995) Eq 9: :math:`\Omega`
the longitude of the ascending node, Kopeikin (1995) Eq 9: :math:`\\Omega`
K96
flag for Kopeikin binary model proper motion correction

Expand Down Expand Up @@ -233,19 +238,19 @@ def alternative_solutions(self):

We first define the symmetry point where a1dot is zero (in equatorial coordinates):

:math:`KOM_0 = \\tan^{-1} (\mu_{\delta} / \mu_{\\alpha})`
:math:`KOM_0 = \\tan^{-1} (\\mu_{\\delta} / \\mu_{\\alpha})`

The solutions are then:

:math:`(KIN, KOM)`

:math:`(KIN, 2KOM_0 - KOM - 180^{\circ})`
:math:`(KIN, 2KOM_0 - KOM - 180^{\\circ})`

:math:`(180^{\circ}-KIN, KOM+180^{\circ})`
:math:`(180^{\\circ}-KIN, KOM+180^{\\circ})`

:math:`(180^{\circ}-KIN, 2KOM_0 - KOM)`
:math:`(180^{\\circ}-KIN, 2KOM_0 - KOM)`

All values will be between 0 and :math:`360^{\circ}`.
All values will be between 0 and :math:`360^{\\circ}`.

Returns
-------
Expand Down
Loading
Loading