# Path: osrefl/loaders/reduction/correction.py
# class Correction(object):
#     properties = []  # Property sheet for interacting with correction
#     def apply(self, data):
#         """
#         Apply the correction to the dataset, modifying the dataset
#         in the process.  The data is returned, allowing users to
#         apply multiple corrections in one step:
#              C2(C1(data))
#         Each correction will automatically be logged in the data using
#         data.log(str(Correction))
#         """
#         raise NotImplementedError
# 
#     def __str__(self):
#         """
#         Name of the correction, and enough detail to record in the
#         reduced data log.
#         """
#         raise NotImplementedError
# 
#     # ==== Inherited behaviours ====
#     def __call__(self, data):
#         data = copy(data)
#         data.log(str(self))
#         self.apply(data)
#         return data
# 
#     def __or__(self, other):
#         # "Correction | Correction" forms a pipeline
#         if isinstance(other,Correction):
#             return Pipeline([self,other])
#         raise NotImplementedError
# 
#     def __ror__(self, other):
#         # "Pipeline | Correction" is handled by pipeline
#         # "data | Correction" applies the correction to the data
#         if not isinstance(other, Pipeline):
#             return self(other)
#         raise NotImplementedError


from .correction import Correction
# This program is public domain
"""
Alignment correction.

Sometimes the sample alignment is not perfect, and the sample may
be slightly rotated.  The net effect of this is that the Q values
stored in the data file are not correct.  The angle correction
allows you to adjust Q as if the data were taken at a slightly
different angle.

Note that this adjustment will fail to properly account for the change
in intensity due to the neutrons at the unexpected reflection angle
being filtered by the back slits, or due to the unexpected sample
footprint poorly estimating the beam spill.  Whether these effects are
significant depends on the details of the experiment geometry.

Usage
=====

    data.appy(AdjustAlignment(offset=0.01)
"""


# Path: osrefl/loaders/reduction/correction.py
# class Correction(object):
#     properties = []  # Property sheet for interacting with correction
#     def apply(self, data):
#         """
#         Apply the correction to the dataset, modifying the dataset
#         in the process.  The data is returned, allowing users to
#         apply multiple corrections in one step:
#              C2(C1(data))
#         Each correction will automatically be logged in the data using
#         data.log(str(Correction))
#         """
#         raise NotImplementedError
# 
#     def __str__(self):
#         """
#         Name of the correction, and enough detail to record in the
#         reduced data log.
#         """
#         raise NotImplementedError
# 
#     # ==== Inherited behaviours ====
#     def __call__(self, data):
#         data = copy(data)
#         data.log(str(self))
#         self.apply(data)
#         return data
# 
#     def __or__(self, other):
#         # "Correction | Correction" forms a pipeline
#         if isinstance(other,Correction):
#             return Pipeline([self,other])
#         raise NotImplementedError
# 
#     def __ror__(self, other):
#         # "Pipeline | Correction" is handled by pipeline
#         # "data | Correction" applies the correction to the data
#         if not isinstance(other, Pipeline):
#             return self(other)
#         raise NotImplementedError


# Path: osrefl/loaders/reduction/anglecor.py
from .correction import Correction

# This program is public domain
"""
Alignment correction.

Sometimes the sample alignment is not perfect, and the sample may
be slightly rotated.  The net effect of this is that the Q values
stored in the data file are not correct.  The angle correction
allows you to adjust Q as if the data were taken at a slightly
different angle.

Note that this adjustment will fail to properly account for the change
in intensity due to the neutrons at the unexpected reflection angle
being filtered by the back slits, or due to the unexpected sample
footprint poorly estimating the beam spill.  Whether these effects are
significant depends on the details of the experiment geometry.

Usage
=====

    data.appy(AdjustAlignment(offset=0.01)
"""


class AdjustAlignment(Correction):