ContactEngineering / SurfaceTopography

Read and analyze surface topographies
https://contactengineering.github.io/SurfaceTopography/
MIT License
17 stars 10 forks source link

Brute force integrate PSD not compatible with NonUniformLineScan #309

Open sannant opened 1 year ago

sannant commented 1 year ago

I suggest to create a copy of the container that interpolates all the linescans. At least as a shortterm soluion.

def _interpolate_nonuniform(self, nb_interpolate=5):
    topographies = []
    for t in self._topographies:
        if not t.is_uniform:
            t = t.to_uniform(nb_interpolate=nb_interpolate)

        topographies.append(t)
    return SurfaceContainer(topographies=topographies)

The reason I create the whole container is that we need to know the pixel size of the inerpolated PSD to compute the weighting factors before actually computing the PSD.