From 2bc79dc512f009bb37a5e339d33f2a50fbed5025 Mon Sep 17 00:00:00 2001 From: Shane Maloney Date: Mon, 15 Apr 2024 14:55:19 +0100 Subject: [PATCH] Updates for github repo rename to sunkit-spex. (#129) * Updates for github repo rename to sunkit-spex. * Small fix for docs build use r-string for some doc strings --- .sunpy-template.yml | 4 ++-- changelog/129.trivial.rst | 1 + pyproject.toml | 6 +++--- sunkit_spex/fitting_legacy/likelihoods.py | 10 +++++----- 4 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 changelog/129.trivial.rst diff --git a/.sunpy-template.yml b/.sunpy-template.yml index 0822d679..4b509585 100644 --- a/.sunpy-template.yml +++ b/.sunpy-template.yml @@ -6,8 +6,8 @@ default_context: author_name: "The SunPy Community" author_email: "sunpy@googlegroups.com" license: "BSD 3-Clause" - project_url: "https://sunkit_spex.readthedocs.io" - github_repo: "sunpy/sunxspex" + project_url: "https://sunkit-spex.readthedocs.io" + github_repo: "sunpy/sunkit-spex" minimum_python_version: "3.7" use_compiled_extensions: "n" include_example_code: "n" diff --git a/changelog/129.trivial.rst b/changelog/129.trivial.rst new file mode 100644 index 00000000..1ddf77f6 --- /dev/null +++ b/changelog/129.trivial.rst @@ -0,0 +1 @@ +Update references to new repository name `sunkit-spex`. diff --git a/pyproject.toml b/pyproject.toml index 771849e1..baa9d7d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,11 +27,11 @@ build-backend = 'setuptools.build_meta' enabled = true verify_pr_number = true changelog_skip_label = "No Changelog Entry Needed" - help_url = "https://github.com/sunpy/sunxspex/blob/master/changelog/README.rst" + help_url = "https://github.com/sunpy/sunkit-spex/blob/master/changelog/README.rst" - changelog_missing_long = "There isn't a changelog file in this pull request. Please add a changelog file to the `changelog/` directory following the instructions in the changelog [README](https://github.com/sunpy/sunxspex/blob/master/changelog/README.rst." + changelog_missing_long = "There isn't a changelog file in this pull request. Please add a changelog file to the `changelog/` directory following the instructions in the changelog [README](https://github.com/sunpy/sunkit-spex/blob/master/changelog/README.rst." - type_incorrect_long = "The changelog file you added is not one of the allowed types. Please use one of the types described in the changelog [README](https://github.com/sunpy/sunxspex/blob/master/changelog/README.rst)" + type_incorrect_long = "The changelog file you added is not one of the allowed types. Please use one of the types described in the changelog [README](https://github.com/sunpy/sunkit-spex/blob/master/changelog/README.rst)" number_incorrect_long = "The number in the changelog file you added does not match the number of this pull request. Please rename the file." diff --git a/sunkit_spex/fitting_legacy/likelihoods.py b/sunkit_spex/fitting_legacy/likelihoods.py index b64a4eee..7c9f1e37 100644 --- a/sunkit_spex/fitting_legacy/likelihoods.py +++ b/sunkit_spex/fitting_legacy/likelihoods.py @@ -126,7 +126,7 @@ def _check_numbers_left(self, remaining): return np.sum(remaining) def gaussian_loglikelihood(self, model_counts, observed_counts, observed_count_errors): - """ Gaussian log-likelihood. + r""" Gaussian log-likelihood. .. math:: ln(L_{Gauss}) = -\frac{N}{2} ln(2\pi D^{2}) + \frac{1}{2}\Chi^{2} @@ -150,7 +150,7 @@ def gaussian_loglikelihood(self, model_counts, observed_counts, observed_count_e return self._check_numbers_left(self.remove_non_numbers(likelihoods)) # =ln(L) def chi2(self, model_counts, observed_counts, observed_count_errors): - """ Chi-squared fit statistic. + r""" Chi-squared fit statistic. .. math:: \Chi^{2} = - (\frac{(D - \mu)^{2}}{\sigma})^{2} @@ -173,7 +173,7 @@ def chi2(self, model_counts, observed_counts, observed_count_errors): return self._check_numbers_left(self.remove_non_numbers(likelihoods)) def poisson_loglikelihood(self, model_counts, observed_counts, observed_count_errors): - """ Poissonian log-likelihood. + r""" Poissonian log-likelihood. .. math:: ln(L_{Poisson}) = D ln(\mu) - \mu - ln(D!) @@ -196,7 +196,7 @@ def poisson_loglikelihood(self, model_counts, observed_counts, observed_count_er return self._check_numbers_left(self.remove_non_numbers(likelihoods)) def cash_loglikelihood(self, model_counts, observed_counts, observed_count_errors): - """ Cash log-likelihood. + r""" Cash log-likelihood. A simplification of the poissonian log-likelihood where the independent data term is neglected. Since the data term is neglected the absolute number does not say much @@ -226,7 +226,7 @@ def cash_loglikelihood(self, model_counts, observed_counts, observed_count_error return self._check_numbers_left(self.remove_non_numbers(likelihoods)) def cstat_loglikelihood(self, model_counts, observed_counts, observed_count_errors): - """ C-stat log-likelihood. + r""" C-stat log-likelihood. A simplification of the poissonian log-likelihood where the independent data term is replaced using sterling's approximation. Used in the XSPEC fitting software.