Modified code to also handle electron T2*