Temperature calculation fixed

For all possible pairs of density profiles.