diff --git a/CHANGELOG-unreleased.md b/CHANGELOG-unreleased.md index 32b491913..d9e0369e7 100644 --- a/CHANGELOG-unreleased.md +++ b/CHANGELOG-unreleased.md @@ -29,6 +29,7 @@ the released changes. - Piecewise orbital model (`BinaryBTPiecewise`) - `TimingModel.fittable_params` property - Simulate correlated noise using `pint.simulation` (also available via the `zima` script) +- `pintk` can plot against solar elongation - Optionally return the the log normalization factor of the likelihood function from the `Residuals.calc_chi2()` method. - `DownhilWLSFitter` can now estimate white noise parameters and their uncertainties. - `Residuals.lnlikelihood()` method diff --git a/src/pint/pintk/plk.py b/src/pint/pintk/plk.py index 3a32ad013..9b3e87e3b 100644 --- a/src/pint/pintk/plk.py +++ b/src/pint/pintk/plk.py @@ -49,6 +49,7 @@ "frequency": r"Observing Frequency (MHz)", "TOA error": r"TOA uncertainty ($\mu$s)", "rounded MJD": r"MJD", + "elongation": r"Solar Elongation (deg)", } helpstring = """The following interactions are currently supported in the plotting pane in `pintk`: @@ -1228,6 +1229,12 @@ def psr_data_from_label(self, label): elif label == "rounded MJD": data = np.floor(self.psr.all_toas.get_mjds() + 0.5 * u.d) error = self.psr.all_toas.get_errors().to(u.d) + elif label == "elongation": + data = np.degrees( + self.psr.prefit_model.sun_angle(self.psr.all_toas, also_distance=False) + ) + error = None + return data, error def coordToPoint(self, cx, cy): diff --git a/src/pint/pintk/pulsar.py b/src/pint/pintk/pulsar.py index aa938fe31..e5ebeff78 100644 --- a/src/pint/pintk/pulsar.py +++ b/src/pint/pintk/pulsar.py @@ -37,6 +37,7 @@ "frequency", "TOA error", "rounded MJD", + "elongation", ] # Some parameters we do not want to add a fitting checkbox for: