More robust trigger to code conversion for Neuromag files