# Path: blond/toolbox/filters_and_fitting.py
# def beam_profile_filter_chebyshev(Y_array, X_array, filter_option):
# def gaussian_fit(Y_array, X_array, p0):
# def gauss(x, *p):
# def rms(Y_array, X_array):
# def fwhm(Y_array, X_array, shift=0):
# def fwhm_multibunch(Y_array, X_array, n_bunches,
#                     bunch_spacing_buckets, bucket_size_tau,
#                     bucket_tolerance=0.40, shift=0):
# def rms_multibunch(Y_array, X_array, n_bunches,
#                    bunch_spacing_buckets, bucket_size_tau,
#                    bucket_tolerance=0.40):
# 
# Path: blond/utils/bmath.py
# def use_mpi():
# def mpiMode():
# def use_fftw():
# def use_precision(_precision='double'):
# def update_active_dict(new_dict):


from builtins import object
from scipy import ndimage
from ..toolbox import filters_and_fitting as ffroutines
from ..utils import bmath as bm
        from ..utils.mpi_config import worker
        from ..utils.mpi_config import worker
import numpy as np


        if cut_left is not None:
            self.cut_left = float(cut_left)
        else:
            self.cut_left = cut_left

        if cut_right is not None:
            self.cut_right = float(cut_right)
        else:
            self.cut_right = cut_right

        self.n_slices = int(n_slices)

        if n_sigma is not None:
            self.n_sigma = float(n_sigma)
        else:
            self.n_sigma = n_sigma

        self.cuts_unit = str(cuts_unit)

        self.RFParams = RFSectionParameters

        if self.cuts_unit == 'rad' and self.RFParams is None:
            # CutError
            raise RuntimeError('You should pass an RFParams object to ' +
                               'convert from radians to seconds')
        if self.cuts_unit != 'rad' and self.cuts_unit != 's':
            # CutError
            raise RuntimeError('cuts_unit should be "s" or "rad"')


# Path: blond/toolbox/filters_and_fitting.py
# def beam_profile_filter_chebyshev(Y_array, X_array, filter_option):
# def gaussian_fit(Y_array, X_array, p0):
# def gauss(x, *p):
# def rms(Y_array, X_array):
# def fwhm(Y_array, X_array, shift=0):
# def fwhm_multibunch(Y_array, X_array, n_bunches,
#                     bunch_spacing_buckets, bucket_size_tau,
#                     bucket_tolerance=0.40, shift=0):
# def rms_multibunch(Y_array, X_array, n_bunches,
#                    bunch_spacing_buckets, bucket_size_tau,
#                    bucket_tolerance=0.40):
# 
# Path: blond/utils/bmath.py
# def use_mpi():
# def mpiMode():
# def use_fftw():
# def use_precision(_precision='double'):
# def update_active_dict(new_dict):


# Path: blond/beam/profile.py
from builtins import object
from scipy import ndimage
from ..toolbox import filters_and_fitting as ffroutines
from ..utils import bmath as bm
        from ..utils.mpi_config import worker
        from ..utils.mpi_config import worker
import numpy as np


        if cut_left is not None:
            self.cut_left = float(cut_left)
        else:
            self.cut_left = cut_left

        if cut_right is not None:
            self.cut_right = float(cut_right)
        else:
            self.cut_right = cut_right

        self.n_slices = int(n_slices)

        if n_sigma is not None:
            self.n_sigma = float(n_sigma)
        else:
            self.n_sigma = n_sigma

        self.cuts_unit = str(cuts_unit)

        self.RFParams = RFSectionParameters

        if self.cuts_unit == 'rad' and self.RFParams is None:
            # CutError
            raise RuntimeError('You should pass an RFParams object to ' +
                               'convert from radians to seconds')
        if self.cuts_unit != 'rad' and self.cuts_unit != 's':
            # CutError
            raise RuntimeError('cuts_unit should be "s" or "rad"')


        self.edges = np.zeros(n_slices + 1, dtype=bm.precision.real_t, order='C')
