ContactEngineering / topobank-statistics

Plugin for TopoBank that provides statistical analysis functions
MIT License
2 stars 1 forks source link

Reentrant line scans: One class of surfaces is simply failing to do PSD #25

Open tdbjacobs opened 5 years ago

tdbjacobs commented 5 years ago

One surface (called "FloorTile_Ruikang_RoughQuarry_Bakelite") simply fails to execute. So do all of its individual topographies. Error message copy/pasted below.

It is possible that these contain reentrant points. Do we have any way of dealing with those?

Traceback (most recent call last): File "/app/topobank/taskapp/tasks.py", line 129, in perform_analysis result = analysis.function.eval(topography, kwargs) File "/app/topobank/analysis/models.py", line 83, in eval return self.python_function(*args, *kwargs) File "/app/topobank/analysis/functions.py", line 447, in power_spectrum q_1D, C_1D = topography.power_spectrum_1D(window=window) File "/opt/conda/lib/python3.7/site-packages/PyCo/Topography/HeightContainer.py", line 124, in return lambda args, kwargs: self._functions[name](self, *args, *kwargs) File "/opt/conda/lib/python3.7/site-packages/PyCo/Topography/Nonuniform/PowerSpectrum.py", line 130, in power_spectrum_1D q = 2 np.pi * np.arange(int(L / np.diff(x).min())) / L OverflowError: cannot convert float infinity to integer

pastewka commented 5 years ago

@mcrot This is fixed here https://github.com/pastewka/PyCo/issues/165

Not sure whether it makes sense to backport to 0.31.x or switch TopoBank to current 0.5x.x

pastewka commented 5 years ago

@tdbjacobs Can you share "FloorTile_Ruikang_RoughQuarry_Bakelite" with me? I'll check this out. I think it is unrelated to the fixed we just pushed.

tdbjacobs commented 5 years ago

Sure. I'm almost certain that it is because of reentrant features (i.e. same height at duplicate (or even locally decreasing) lateral position

Tevis Jacobs Assistant Professor Mechanical Engineering and Materials Science University of Pittsburgh http://www.engineering.pitt.edu/JacobsLab/ Mail: 636 Benedum Hall, 3700 O'Hara St., Pittsburgh, PA 15261 Office: 538-E Benedum Hall, 412-624-9736 tjacobs@pitt.edumailto:tjacobs@pitt.edu

On Mon, Jul 15, 2019 at 3:31 PM Lars Pastewka notifications@github.com<mailto:notifications@github.com> wrote:

@tdbjacobshttps://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftdbjacobs&data=02%7C01%7Ctjacobs%40pitt.edu%7C0c2e3a4aabc946b7df6208d7095b148b%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1%7C0%7C636988159098701959&sdata=0LqUj8BOUogx10mq%2BKSAGAgtCz%2Be7fsIDz4jYb6qGZg%3D&reserved=0 Can you share "FloorTile_Ruikang_RoughQuarry_Bakelite" with me? I'll check this out. I think it is unrelated to the fixed we just pushed.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpastewka%2FTopoBank%2Fissues%2F274%3Femail_source%3Dnotifications%26email_token%3DAFOUYWRDCAXTIB22TMBGYBDP7TGCJA5CNFSM4IDRO6WKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ6XJAA%23issuecomment-511538304&data=02%7C01%7Ctjacobs%40pitt.edu%7C0c2e3a4aabc946b7df6208d7095b148b%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1%7C0%7C636988159098711954&sdata=KW1m135Exz0HDJibRbG0%2FZirIbM7ncE29S4522ylx%2FM%3D&reserved=0, or mute the threadhttps://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAFOUYWVLLGXDGJHZQU5LOA3P7TGCJANCNFSM4IDRO6WA&data=02%7C01%7Ctjacobs%40pitt.edu%7C0c2e3a4aabc946b7df6208d7095b148b%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1%7C0%7C636988159098711954&sdata=RImR%2FYKHMnDw1BnWhnBWWubiodrFj%2Bk75YEhFGZVLBw%3D&reserved=0.

pastewka commented 5 years ago

Yes. This is because of reentrant features. The ACF analysis complains "Positions not sorted". We should discuss this if it is something you are interested in.

Note that the VBM works on these surfaces.

pastewka commented 5 years ago

Add a filter "eliminate reentrant points"

pastewka commented 5 years ago

Warn the user if the surface is reentrant

mcrot commented 3 years ago

Do we need to implement ContactEngineering/topobank#323 for this? Or would we just add a flag for topographies, that reentrant points should be eleminitated?

Should this elemination be done on every action with the topography or only for specific analysis like PSD?

pastewka commented 3 years ago

We need the filters (#323). The problem is that you don't generally want to remove reentrant points, as this can be a severe modification of the surface. Some of the analysis functions (height distribution, variable bandwidth) work in principle fine with reentrant surfaces. All other functions should just emit a message that reentrant topographies are not supported.

We need to rms height for reentrant surfaces, see also https://github.com/pastewka/PyCo/issues/174

tdbjacobs commented 3 years ago

Yes, for now it is fine to simply throw an error for any analysis that can't be run on reentrant surfaces.

But it would be nice if there were a "fix" for reentrant surfaces in the future. I could imagine three options:

  1. It simply excludes the reentrant portion and analyzes the rest of the surface
  2. It enables a manual fix (user clicks on points to delete or move)
  3. It attempts an automatic fix (i.e. shifting of points with identical y by an angstrom). But this would need some sort of check with the user for their approval that it didn't change the surface too much.

-Tevis

Tevis Jacobs William Kepler Whiteford Faculty Fellow and Associate Professor Mechanical Engineering and Materials Science University of Pittsburgh http://www.engineering.pitt.edu/JacobsLab/ Mail: 636 Benedum Hall, 3700 O'Hara St., Pittsburgh, PA 15261 Office: 538-E Benedum Hall, 412-624-9736 tjacobs@pitt.edu

On Wed, Nov 25, 2020 at 2:45 PM Lars Pastewka notifications@github.com wrote:

We need the filters (#323 https://github.com/ComputationalMechanics/TopoBank/issues/323). The problem is that you don't generally want to remove reentrant points, as this can be a severe modification of the surface. Some of the analysis functions (height distribution, variable bandwidth) work in principle fine with reentrant surfaces. All other functions should just emit a message that reentrant topographies are not supported.

We need to rms height for reentrant surfaces, see also pastewka/PyCo#174 https://github.com/pastewka/PyCo/issues/174

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ComputationalMechanics/TopoBank/issues/274#issuecomment-733914119, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFOUYWVKJCSRERO5SOTW623SRVNG7ANCNFSM4IDRO6WA .