Skip to content

Commit

Permalink
Merge pull request #20 from SpeysideHEP/issue19
Browse files Browse the repository at this point in the history
Align ```UnCorrStatisticsCombiner``` with recent updates
  • Loading branch information
jackaraz authored Oct 11, 2023
2 parents 9c4c363 + 3b13540 commit 5b029ce
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 12 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,20 @@

## Installation

If you are using a specific branch you can either use `make install` or `pip install -e .`. **Note that `main` branch is not the stable version.** Stable version can either be downloaded from the [releases](https://github.com/SpeysideHEP/spey/releases) section or via pypi using the following command
Spey can be found in [PyPi library](https://pypi.org/project/spey/) and can be downloaded using

```bash
pip install spey
```

If you like to use a specific branch you can either use `make install` or `pip install -e .` after cloning the repository or use the following command

```bash
python -m pip install --upgrade "git+https://github.com/SpeysideHEP/spey"
```

**Note that `main` branch is not the stable version.**

## What is Spey?

Spey is a plug-in based statistics tool which aims to collect all likelihood prescriptions under one roof. This provides user the workspace to freely combine different statistical models and study them through a single interface. In order to achieve a module that can be used both with statistical model prescriptions which has been proposed in the past and will be used in the future, Spey uses so-called plug-in system where developers can propose their own statistical model prescription and allow spey to use them.
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Welcome to the documentation of Spey
contributing
known_issues
outreach
releases/changelog-v0.1.1
release_notes
bibliography


Expand Down
18 changes: 10 additions & 8 deletions docs/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,14 @@ Once again, the exclusion limit can be computed as
External Plug-ins
-----------------

* ``spey-pyhf`` plugin allows pyhf's likelihood prescription to be used within ``spey``.
for details, see the `dedicated GitHub Repository <https://github.com/SpeysideHEP/spey-pyhf>`_ and
`spey-pyhf documentation <https://speysidehep.github.io/spey-pyhf/>`_ :cite:`pyhf_joss`.

* `pyhf documentation <https://pyhf.readthedocs.io>`_.

* ``spey-fastprof``: TBA :cite:`Berger:2023bat`.
.. toctree::

Spey-pyhf plug-in documentation <https://speysidehep.github.io/spey-pyhf/>
Spey-fastprof: TBA <https://speysidehep.github.io/spey/>

**Useful links:**

* `fastprof documentation <https://fastprof.web.cern.ch/fastprof/>`_.
* `pyhf documentation <https://pyhf.readthedocs.io>`_ :cite:`pyhf_joss`.
* `Spey-pyhf plug-in GitHub Repository <https://github.com/SpeysideHEP/spey-pyhf>`_
* ``spey-fastprof``: TBA :cite:`Berger:2023bat`.
* `fastprof documentation <https://fastprof.web.cern.ch/fastprof/>`_.
7 changes: 7 additions & 0 deletions docs/release_notes.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Release Notes
=============

.. toctree::
:maxdepth: 2

releases/changelog-v0.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Release notes v0.1.1
# Release notes v0.1.2

## New features since last release

Expand All @@ -17,6 +17,12 @@
* Backend inspection has been converted to inheritance property via ``ConverterBase``.
([#17](https://github.com/SpeysideHEP/spey/pull/17))

## Bug Fixes

* In accordance to the latest updates ```UnCorrStatisticsCombiner``` has been updated with
chi-square computer. See issue [#19](https://github.com/SpeysideHEP/spey/issues/19).
([#20](https://github.com/SpeysideHEP/spey/pull/20))

## Contributors

This release contains contributions from (in alphabetical order):
Expand Down
2 changes: 1 addition & 1 deletion src/spey/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Version number (major.minor.patch[-label])"""

__version__ = "0.1.1"
__version__ = "0.1.2"
5 changes: 5 additions & 0 deletions src/spey/combiner/uncorrelated_statistics_combiner.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ def is_toy_calculator_available(self) -> bool:
"""Check if Toy calculator is available for the backend"""
return False

@property
def is_chi_square_calculator_available(self) -> bool:
r"""Check if :math:`\chi^2` calculator is available for the backend"""
return all(model.is_chi_square_calculator_available for model in self)

def __getitem__(self, item: Union[Text, int]) -> StatisticalModel:
"""Retrieve a statistical model"""
if isinstance(item, int):
Expand Down

0 comments on commit 5b029ce

Please sign in to comment.