def completeness(self, mags, method='step'):
        """
        Return the completeness as a function of magnitude.

        ADW: Eventually want a completeness mask to set overall efficiency.
        """
        if method == 'step':
            func = lambda x: (x < self.mask_roi_unique[:,np.newaxis]).astype(float)
        elif method == 'erf':
            # Trust the ERD???
            # 95% completeness: 
            def func(x):
                # Efficiency at bright end (assumed to be 100%)
                e = 1.0
                # SDSS EDR says full width is ~0.5 mag
                width = 0.2 
                # This should be the halfway point in the curve
                maglim = self.mask_roi_unique[:,np.newaxis]
                return (e/2.0)*(1/np.sqrt(2*width))*(np.sqrt(2*width)-scipy.special.erf((x-maglim)))
        else:
            raise Exception('...')

        return func(mags)
def completeness ( self , mags , method = 'step' ) : if method == 'step' : func = lambda x : ( x < self . mask_roi_unique [ : , np . newaxis ] ) . astype ( float ) elif method == 'erf' : def func ( x ) : e = 1.0 width = 0.2 maglim = self . mask_roi_unique [ : , np . newaxis ] return ( e / 2.0 ) * ( 1 / np . sqrt ( 2 * width ) ) * ( np . sqrt ( 2 * width ) - scipy . special . erf ( ( x - maglim ) ) ) else : raise Exception ( '...' ) return func ( mags )
Return the completeness as a function of magnitude.

        ADW: Eventually want a completeness mask to set overall efficiency.