Production of high-quality electron bunches by dephasing and beam loading in channeled and unchanneled laser plasma accelerators.