res2d

changed 2dres to be a function of (array, a, a1, a2, x, contrast, z)
need to define x and contrast in ui.