put call of diagonalization functions into separate function

for later reuse in LoopMasses.m