Several changes to parameterisation and diagnostics to the functions trialscode and of tr.mu.sp