Understanding the atmospheric properties and chemical composition of the ultra-hot Jupiter HAT-P-7b