Structure of ELMs in MAST and the implications for energy deposition