# 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

    >>>                             direct_slicing = True)
    >>> self.profile4 = profileModule.Profile(my_beam, CutOptions = CutOptions,
    >>>                     FitOptions= FitOptions,
    >>>                     FilterOptions=FilterOptions,
    >>>                     OtherSlicesOptions = OtherSlicesOptions)

    """

    def __init__(self, Beam,
                 CutOptions=CutOptions(),
                 FitOptions=FitOptions(),
                 FilterOptions=FilterOptions(),
                 OtherSlicesOptions=OtherSlicesOptions()):
        """
        Constructor
        """

        # Copy of CutOptions object to be usef for reslicing
        self.cut_options = CutOptions

        # Define bins
        CutOptions.set_cuts(Beam)

        # Import (reference) Beam
        self.Beam = Beam

        # Get all computed parameters from CutOptions
        self.set_slices_parameters()

        # Initialize profile array as zero array

# 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

    >>>                             direct_slicing = True)
    >>> self.profile4 = profileModule.Profile(my_beam, CutOptions = CutOptions,
    >>>                     FitOptions= FitOptions,
    >>>                     FilterOptions=FilterOptions,
    >>>                     OtherSlicesOptions = OtherSlicesOptions)

    """

    def __init__(self, Beam,
                 CutOptions=CutOptions(),
                 FitOptions=FitOptions(),
                 FilterOptions=FilterOptions(),
                 OtherSlicesOptions=OtherSlicesOptions()):
        """
        Constructor
        """

        # Copy of CutOptions object to be usef for reslicing
        self.cut_options = CutOptions

        # Define bins
        CutOptions.set_cuts(Beam)

        # Import (reference) Beam
        self.Beam = Beam

        # Get all computed parameters from CutOptions
        self.set_slices_parameters()

        # Initialize profile array as zero array

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