more careful handling of error arrays and raw ramps in reprocessing script