ContactEngineering / SurfaceTopography

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

Channel index should be replaced by unique channel name #360

Open pastewka opened 6 months ago

pastewka commented 6 months ago

The problem

The channel index is currently used to uniquely refer to the data channel. The channel index is stored in topobank verbatim in the database to refer to a specific channel. This is bad because the order of the channels may depend on multiple factors, for example the matlab reader of scipy currently returns a dictionary and the order may be random.

The solution

There should be a unique channel-indexing scheme that is invariant to the actual order of channels in the data file. Note that the channel name cannot be used as there are data files that have multiple channels of the same name. We could of course normalize that name by appending an index, but then the order matters again. This may be a fallback solution if the channel name is not unique.