Skip to content

Commit

Permalink
Implement corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
Rastislav Turanyi committed Dec 3, 2024
1 parent 89e38fd commit c603703
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ literature. The main purposes are:

## Quick Start

The package can be installed with pip (see Installation). To start, import the main object and get
the instrument of your choice:
The package can be installed with pip (see Installation). To start, import the main `Instrument`
class and get the instrument object of your choice:

```
>>> from resolution_functions import Instrument
Expand All @@ -29,13 +29,13 @@ which model you want to use, as well as any model-specific parameters.

```
>>> # The available models for a given instrument can be queried:
>>> tosca.availabl_models
>>> tosca.available_models
['AbINS', 'book', 'vision']
>>> # There are multiple ways of querying the model-specific parameters, but the most comprehensive is
>>> tosca.get_model_signature('book')
<Signature (model_name: Optional[str] = 'book', *, detector_bank: Literal['Backward', 'Forward'] = 'Backward', _)>
>>> # Now we can get the resolution function
>>> book = tsoca.get_resolution_function('book', detector_bank='Forward')
>>> book = tosca.get_resolution_function('book', detector_bank='Forward')
>>> book
<resolution_functions.models.tosca_book.ToscaBookModel object at 0x000000000>
>>> book(100)
Expand All @@ -50,13 +50,13 @@ array([0.81802604, 1.34222267, 1.88255039])
This package can be installed using pip, though it is not yet on PyPI, so it has to be installed directly from GitHub:

```
pip install git+https://github.com/RastislavTuranyi/resolution_functions.git
pip install git+https://github.com/pace-neutrons/resolution_functions.git
```

or from local:
or from a local copy:

```
git clone https://github.com/RastislavTuranyi/resolution_functions.git
git clone https://github.com/pace-neutrons/resolution_functions.git
pip install resolution_functions
```

Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ test = [
"more_itertools >= 10.5.0",
]
docs = [
"sphinx >= 8.1.30",
"sphinxcontrib-napoleon >= 0.7",
"sphinx >= 8.1.3",
"numpydoc >= 1.8.0",
"myst-parser >= 4.0.0",
]

[project.urls]
Repository = "https://github.com/RastislavTuranyi/resolution_functions"
Repository = "https://github.com/pace-neutrons/resolution_functions"

[tool.setuptools]
include-package-data = true
Expand Down
6 changes: 3 additions & 3 deletions src/resolution_functions/models/model_base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Module containing the abstract base classes for all instrument models.
Abstract base classes for all instrument models.
The classes defined within provide a common interface that all models must follow. A model consists
of two objects:
Expand All @@ -9,7 +9,8 @@
Any new models must implement a subclass of each of these base classes (see their individual
documentation for details about how to use them). Additionally, the model must be added to the
`models.MODELS` mapping (found in ``models/__init__.py``) or they won't be found.
`models.MODELS` mapping (found in ``models/__init__.py``) or they won't be found from the
`Instrument` class.
"""
from __future__ import annotations

Expand All @@ -27,7 +28,6 @@ class InvalidInputError(Exception):
incident energy (``e_init``) provided to a model of a direct instrument is outside the the range
available to that instrument.
"""
pass


@dataclass(init=True, repr=True, frozen=True, slots=True, kw_only=True)
Expand Down

0 comments on commit c603703

Please sign in to comment.