A homogeneous sample of 34 000 M7-M9.5 dwarfs brighter than $J$=17.5
  with accurate spectral types
  The space density of late M dwarfs, subtypes M7-M9.5, is not well determined.
We applied the photo-type method to $iz$ photometry from the Sloan Digital Sky
Survey and $YJHK$ photometry from the UKIRT Infrared Deep Sky Survey, over an
effective area of 3070 $deg^{2}$, to produce a new, bright $J$(Vega) < 17.5,
homogeneous sample of 33 665 M7-M9.5 dwarfs. The typical S/N of each source
summed over the six bands is > 100. Classifications are provided to the nearest
half spectral subtype. Through a comparison with the classifications in the
BOSS Ultracool Dwarfs (BUD) spectroscopic sample, the typing is shown to be
accurately calibrated to the BUD classifications and the precision is better
than 0.5 subtypes rms; i.e. the photo-type classifcations are as precise as
good spectroscopic classifications. Sources with large $\chi^2$ > 20 include
several catalogued late-type subdwarfs. The new sample of late M dwarfs is
highly complete, but there is a bias in the classification of rare peculiar
blue or red objects. For example, L subdwarfs are misclassified towards earlier
types by approximately two spectral subtypes. We estimate that this bias only
affects ~1% of the course. Therefore the sample is well suited to measure the
luminsoity function and investigate the softening towards the Galactic plane of
the exponential variation of density with height.
