sub gradient from fits