# Path: ccdproc/core.py
# def sigma_func(arr, axis=None, ignore_nan=False):
#     """
#     Robust method for calculating the deviation of an array. ``sigma_func``
#     uses the median absolute deviation to determine the standard deviation.
# 
#     Parameters
#     ----------
#     arr : `~astropy.nddata.CCDData` or `numpy.ndarray`
#         Array whose deviation is to be calculated.
# 
#     axis : int, tuple of ints or None, optional
#         Axis or axes along which the function is performed.
#         If ``None`` it is performed over all the dimensions of
#         the input array. The axis argument can also be negative, in this case
#         it counts from the last to the first axis.
#         Default is ``None``.
# 
#     Returns
#     -------
#     uncertainty : float
#         uncertainty of array estimated from median absolute deviation.
#     """
#     return (stats.median_absolute_deviation(arr, axis=axis,
#                                             ignore_nan=ignore_nan)
#             * 1.482602218505602)


import numpy as np
    import bottleneck as bn
from numpy import ma
from .core import sigma_func
from astropy.nddata import CCDData, StdDevUncertainty
from astropy.stats import sigma_clip
from astropy import log
        if self.data_arr.mask.any():
            data = np.ma.filled(data, fill_value=np.nan)
        else:
            data = data.data
        return data

    def _combination_setup(self,
                           user_func,
                           default_func,
                           scale_to):
        """
        Handle the common pieces of image combination data/mask setup.
        """
        data = self._get_scaled_data(scale_to)

        # Play it safe for now and only do the nan thing if the user is using
        # the default combination function.
        if user_func is None:
            combo_func = default_func
            # Subtitute NaN for masked entries
            data = self._get_nan_substituted_data(data)
            masked_values = np.isnan(data).sum(axis=0)
        else:
            masked_values = self.data_arr.mask.sum(axis=0)
            combo_func = user_func

        return data, masked_values, combo_func

    # set up the combining algorithms
    def median_combine(self, median_func=None, scale_to=None,

# Path: ccdproc/core.py
# def sigma_func(arr, axis=None, ignore_nan=False):
#     """
#     Robust method for calculating the deviation of an array. ``sigma_func``
#     uses the median absolute deviation to determine the standard deviation.
# 
#     Parameters
#     ----------
#     arr : `~astropy.nddata.CCDData` or `numpy.ndarray`
#         Array whose deviation is to be calculated.
# 
#     axis : int, tuple of ints or None, optional
#         Axis or axes along which the function is performed.
#         If ``None`` it is performed over all the dimensions of
#         the input array. The axis argument can also be negative, in this case
#         it counts from the last to the first axis.
#         Default is ``None``.
# 
#     Returns
#     -------
#     uncertainty : float
#         uncertainty of array estimated from median absolute deviation.
#     """
#     return (stats.median_absolute_deviation(arr, axis=axis,
#                                             ignore_nan=ignore_nan)
#             * 1.482602218505602)


# Path: ccdproc/combiner.py
import numpy as np
    import bottleneck as bn
from numpy import ma
from .core import sigma_func
from astropy.nddata import CCDData, StdDevUncertainty
from astropy.stats import sigma_clip
from astropy import log

        if self.data_arr.mask.any():
            data = np.ma.filled(data, fill_value=np.nan)
        else:
            data = data.data
        return data

    def _combination_setup(self,
                           user_func,
                           default_func,
                           scale_to):
        """
        Handle the common pieces of image combination data/mask setup.
        """
        data = self._get_scaled_data(scale_to)

        # Play it safe for now and only do the nan thing if the user is using
        # the default combination function.
        if user_func is None:
            combo_func = default_func
            # Subtitute NaN for masked entries
            data = self._get_nan_substituted_data(data)
            masked_values = np.isnan(data).sum(axis=0)
        else:
            masked_values = self.data_arr.mask.sum(axis=0)
            combo_func = user_func

        return data, masked_values, combo_func

    # set up the combining algorithms
    def median_combine(self, median_func=None, scale_to=None,

                       uncertainty_func=sigma_func):