Measuring junction temperature