check intermediate calib >0 , raise error if total ivar=0, apply polynomial correction only if fit is successful
check intermediate calib >0 , raise error if total ivar=0, apply polynomial correction only if fit is successful

desihub/desispec,desihub/desispec