Solution-processed perovskite for direct X-ray detection