def absolute_magnitude_martin(self, richness=1, steps=1e4, n_trials=1000, mag_bright=None, mag_faint=23., alpha=0.32, seed=None):
        """
        Calculate the absolute magnitude (Mv) of the isochrone using
        the prescription of Martin et al. 2008.
        
        ADW: Seems like the faint and bright limits should depend on the survey maglim?

        Parameters:
        -----------
        richness   : Isochrone nomalization factor
        steps      : Number of steps for sampling the isochrone.
        n_trials   : Number of bootstrap samples
        mag_bright : Bright magnitude limit [SDSS g-band] for luminosity calculation
        mag_faint  : Faint magnitude limit [SDSS g-band] for luminosity calculation
        alpha      : Output confidence interval (1-alpha)
        seed       : Random seed

        Returns:
        --------
        med,lo,hi : Total absolute magnitude interval
        """
        # ADW: This function is not quite right. It should restrict
        # the catalog to the obsevable space using the mask in each
        # pixel.  This becomes even more complicated when we transform
        # the isochrone into SDSS g,r...
        if seed is not None: np.random.seed(seed)

        # Create a copy of the isochrone in the SDSS system
        params = {k:v.value for k,v in self._params.items()}
        params.update(band_1='g',band_2='r',survey='sdss')
        iso = self.__class__(**params)

        # Analytic part (below detection threshold)
        # g, r are absolute magnitudes
        mass_init, mass_pdf, mass_act, sdss_g, sdss_r = iso.sample(mass_steps = steps)
        V = jester_mag_v(sdss_g, sdss_r)
        cut = ( (sdss_g + iso.distance_modulus) > mag_faint)
        mag_unobs = sum_mags(V[cut], weights = richness * mass_pdf[cut])

        # Stochastic part (above detection threshold)
        abs_mag_v = np.zeros(n_trials)
        for i in range(n_trials):
            if i%100==0: logger.debug('%i absolute magnitude trials'%i)
            # g,r are apparent magnitudes
            sdss_g, sdss_r = iso.simulate(richness * iso.stellar_mass())
            cut = (sdss_g < mag_faint) 
            # V is absolute magnitude
            V = jester_mag_v(sdss_g[cut]-iso.distance_modulus,
                             sdss_r[cut]-iso.distance_modulus)
            mag_obs = sum_mags(V)
            abs_mag_v[i] = sum_mags([mag_obs,mag_unobs])

        # ADW: Careful, fainter abs mag is larger (less negative) number
        q = [100*alpha/2., 50, 100*(1-alpha/2.)]
        hi,med,lo = np.percentile(abs_mag_v,q)
        return ugali.utils.stats.interval(med,lo,hi)