Determination of coronal temperatures from electron density profiles