Polynomial curve-fitting over a large 3D data set
In terms of possible speed optimisations there's not much to work with, but one thing does stand out:


        def func(t, a, b, c, d, e, f):
            return a+ b*t+ c*(b*t)**2+ d*(b*t)**3+ e*(b*t)**4+ f*(b*t)**5



(and similarly for the four-element case). It's fairly standard knowledge that polynomials evaluation can be optimised for speed using Horner's method. I'll also pull out that multiplication by b:

        def func(t, a, b, c, d, e, f):
            bt = b*t
            return a + bt*(1 + bt*(c + bt*(d + bt*(e + bt*f))))