Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecating CalibrationDataLibrary and our Pyfai detectors modules #1043

Merged
merged 3 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pyxem/detectors/generic_flat_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"""

from pyFAI.detectors import Detector
from pyxem.utils._deprecated import deprecated


class GenericFlatDetector(Detector):
Expand Down Expand Up @@ -58,6 +59,7 @@ class GenericFlatDetector(Detector):
API_VERSION = "1.0"
aliases = ["GenericFlatDetector"]

@deprecated(since="0.18.0", removal="0.20.0")
def __init__(self, size_x, size_y):
MAX_SHAPE = size_x, size_y
Detector.__init__(self, pixel1=1, pixel2=1, max_shape=MAX_SHAPE)
2 changes: 2 additions & 0 deletions pyxem/detectors/medipix_256x256.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"""

from pyFAI.detectors import Detector
from pyxem.utils._deprecated import deprecated


class Medipix256x256Detector(Detector):
Expand All @@ -45,6 +46,7 @@ class Medipix256x256Detector(Detector):
aliases = ["Medipix256x256Detector"]
MAX_SHAPE = 256, 256

@deprecated(since="0.18.0", removal="0.20.0")
def __init__(self):
pixel1 = 55e-6 # 55 micron pixel size in x
pixel2 = 55e-6 # 55 micron pixel size in y
Expand Down
2 changes: 2 additions & 0 deletions pyxem/detectors/medipix_515x515.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

from pyFAI.detectors import Detector
import numpy as np
from pyxem.utils._deprecated import deprecated


class Medipix515x515Detector(Detector):
Expand All @@ -51,6 +52,7 @@ class Medipix515x515Detector(Detector):
aliases = ["Medipix515x515Detector"]
MAX_SHAPE = 515, 515

@deprecated(since="0.18.0", removal="0.20.0")
def __init__(self):
pixel1 = 55e-6 # 55 micron pixel size in x
pixel2 = 55e-6 # 55 micron pixel size in y
Expand Down
3 changes: 3 additions & 0 deletions pyxem/libraries/calibration_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with pyXem. If not, see <http://www.gnu.org/licenses/>.

from pyxem.utils._deprecated import deprecated


class CalibrationDataLibrary(dict):
"""Maps crystal structure (phase) to diffraction vectors.
Expand All @@ -29,6 +31,7 @@ class CalibrationDataLibrary(dict):

"""

@deprecated(since="0.18.0", removal="0.20.0")
def __init__(
self, au_x_grating_dp=None, au_x_grating_im=None, moo3_dp=None, moo3_im=None
):
Expand Down
Loading