Updated IRMOS_imarith with mean and median options