'Distance modulus at redshift ``z``.
The distance modulus is defined as the (apparent magnitude -
absolute magnitude) for an object at redshift ``z``.
Parameters
z : array-like
Input redshifts.  Must be 1D or scalar.
Returns
distmod : `~astropy.units.Quantity`
Distance modulus at each input redshift, in magnitudes
See Also
z_at_value : Find the redshift corresponding to a distance modulus.'

def distmod(self, z):

    val = ((5.0 * np.log10(abs(self.luminosity_distance(z).value))) + 25.0)
    return u.Quantity(val, u.mag)
