Skip to content

Commit

Permalink
Merge pull request #2301 from kif/2283_refactor_integrator
Browse files Browse the repository at this point in the history
2283 refactor integrator
  • Loading branch information
kif authored Oct 14, 2024
2 parents 938d201 + 7569d06 commit b00661a
Show file tree
Hide file tree
Showing 54 changed files with 4,695 additions and 4,415 deletions.
4 changes: 4 additions & 0 deletions doc/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
Change-log of versions
======================

Next Version: 2025
------------------
- Refactoring of the integrator classes

2024.09 12/09/2024
------------------
- New tutorials:
Expand Down
19 changes: 12 additions & 7 deletions src/pyFAI/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

__author__ = "Jérôme Kieffer"
__license__ = "MIT"
__date__ = "28/09/2024"
__date__ = "09/10/2024"

import sys
import os
Expand Down Expand Up @@ -57,21 +57,26 @@
"""


@decorators.deprecated(replacement="pyFAI.azimuthalIntegrator.AzimuthalIntegrator", since_version="0.16")
@decorators.deprecated(replacement="pyFAI.integrator.azimuthal.AzimuthalIntegrator", since_version="0.16")
def AzimuthalIntegrator(*args, **kwargs):
from .azimuthalIntegrator import AzimuthalIntegrator
from .integrator.azimuthal import AzimuthalIntegrator
return AzimuthalIntegrator(*args, **kwargs)


def load(filename):
def load(filename, type_="AzimuthalIntegrator"):
"""
Load an azimuthal integrator from a filename description.
:param str filename: name of the file to load
:param str filename: name of the file to load, or dict of config or ponifile ...
:return: instance of Gerometry of AzimuthalIntegrator set-up with the parameter from the file.
"""
from .azimuthalIntegrator import AzimuthalIntegrator
return AzimuthalIntegrator.sload(filename)
if type_=="AzimuthalIntegrator":
from .integrator.azimuthal import AzimuthalIntegrator
return AzimuthalIntegrator.sload(filename)
else:
from .geometry import Geometry
Geometry.sload(filename).promote(type_)



def detector_factory(name, config=None):
Expand Down
2 changes: 1 addition & 1 deletion src/pyFAI/app/saxs.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

from .. import date as pyFAI_date, version as pyFAI_version, units, utils
from ..method_registry import IntegrationMethod
from ..azimuthalIntegrator import AzimuthalIntegrator
from ..integrator.azimuthal import AzimuthalIntegrator
hc = units.hc


Expand Down
2 changes: 1 addition & 1 deletion src/pyFAI/app/waxs.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

from .. import date as pyFAI_date, version as pyFAI_version, units, utils
from ..average import average_dark
from ..azimuthalIntegrator import AzimuthalIntegrator
from ..integrator.azimuthal import AzimuthalIntegrator
from ..method_registry import IntegrationMethod
hc = units.hc

Expand Down
Loading

0 comments on commit b00661a

Please sign in to comment.