surfacetopography 0.91.2__py3.6-linux-x86_64.egg

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. EGG-INFO/PKG-INFO +11 -0
  2. EGG-INFO/SOURCES.txt +96 -0
  3. EGG-INFO/dependency_links.txt +1 -0
  4. EGG-INFO/native_libs.txt +1 -0
  5. EGG-INFO/not-zip-safe +1 -0
  6. EGG-INFO/requires.txt +6 -0
  7. EGG-INFO/top_level.txt +3 -0
  8. SurfaceTopography/ChangeLog.md +358 -0
  9. SurfaceTopography/Converters.py +197 -0
  10. SurfaceTopography/Generation.py +440 -0
  11. SurfaceTopography/HeightContainer.py +315 -0
  12. SurfaceTopography/IO/DI.py +261 -0
  13. SurfaceTopography/IO/FromFile.py +802 -0
  14. SurfaceTopography/IO/H5.py +79 -0
  15. SurfaceTopography/IO/IBW.py +176 -0
  16. SurfaceTopography/IO/MI.py +307 -0
  17. SurfaceTopography/IO/Matlab.py +106 -0
  18. SurfaceTopography/IO/NC.py +228 -0
  19. SurfaceTopography/IO/NPY.py +139 -0
  20. SurfaceTopography/IO/OPDx.py +885 -0
  21. SurfaceTopography/IO/Reader.py +389 -0
  22. SurfaceTopography/IO/__init__.py +241 -0
  23. SurfaceTopography/IO/__pycache__/DI.cpython-36.pyc +0 -0
  24. SurfaceTopography/IO/__pycache__/FromFile.cpython-36.pyc +0 -0
  25. SurfaceTopography/IO/__pycache__/H5.cpython-36.pyc +0 -0
  26. SurfaceTopography/IO/__pycache__/IBW.cpython-36.pyc +0 -0
  27. SurfaceTopography/IO/__pycache__/MI.cpython-36.pyc +0 -0
  28. SurfaceTopography/IO/__pycache__/Matlab.cpython-36.pyc +0 -0
  29. SurfaceTopography/IO/__pycache__/NC.cpython-36.pyc +0 -0
  30. SurfaceTopography/IO/__pycache__/NPY.cpython-36.pyc +0 -0
  31. SurfaceTopography/IO/__pycache__/OPDx.cpython-36.pyc +0 -0
  32. SurfaceTopography/IO/__pycache__/Reader.cpython-36.pyc +0 -0
  33. SurfaceTopography/IO/__pycache__/__init__.cpython-36.pyc +0 -0
  34. SurfaceTopography/Interpolation.py +30 -0
  35. SurfaceTopography/Nonuniform/Autocorrelation.py +161 -0
  36. SurfaceTopography/Nonuniform/Detrending.py +87 -0
  37. SurfaceTopography/Nonuniform/PowerSpectrum.py +178 -0
  38. SurfaceTopography/Nonuniform/ScalarParameters.py +140 -0
  39. SurfaceTopography/Nonuniform/VariableBandwidth.py +155 -0
  40. SurfaceTopography/Nonuniform/__init__.py +28 -0
  41. SurfaceTopography/Nonuniform/__pycache__/Autocorrelation.cpython-36.pyc +0 -0
  42. SurfaceTopography/Nonuniform/__pycache__/Detrending.cpython-36.pyc +0 -0
  43. SurfaceTopography/Nonuniform/__pycache__/PowerSpectrum.cpython-36.pyc +0 -0
  44. SurfaceTopography/Nonuniform/__pycache__/ScalarParameters.cpython-36.pyc +0 -0
  45. SurfaceTopography/Nonuniform/__pycache__/VariableBandwidth.cpython-36.pyc +0 -0
  46. SurfaceTopography/Nonuniform/__pycache__/__init__.cpython-36.pyc +0 -0
  47. SurfaceTopography/Nonuniform/__pycache__/common.cpython-36.pyc +0 -0
  48. SurfaceTopography/Nonuniform/common.py +95 -0
  49. SurfaceTopography/NonuniformLineScan.py +310 -0
  50. SurfaceTopography/Special.py +225 -0
  51. SurfaceTopography/Tools/__init__.py +28 -0
  52. SurfaceTopography/Tools/__pycache__/__init__.cpython-36.pyc +0 -0
  53. SurfaceTopography/Tools/__pycache__/common.cpython-36.pyc +0 -0
  54. SurfaceTopography/Tools/common.py +75 -0
  55. SurfaceTopography/Uniform/Autocorrelation.py +211 -0
  56. SurfaceTopography/Uniform/Detrending.py +155 -0
  57. SurfaceTopography/Uniform/Filtering.py +226 -0
  58. SurfaceTopography/Uniform/Interpolation.py +159 -0
  59. SurfaceTopography/Uniform/PowerSpectrum.py +197 -0
  60. SurfaceTopography/Uniform/ScalarParameters.py +173 -0
  61. SurfaceTopography/Uniform/VariableBandwidth.py +169 -0
  62. SurfaceTopography/Uniform/__init__.py +28 -0
  63. SurfaceTopography/Uniform/__pycache__/Autocorrelation.cpython-36.pyc +0 -0
  64. SurfaceTopography/Uniform/__pycache__/Detrending.cpython-36.pyc +0 -0
  65. SurfaceTopography/Uniform/__pycache__/Filtering.cpython-36.pyc +0 -0
  66. SurfaceTopography/Uniform/__pycache__/Interpolation.cpython-36.pyc +0 -0
  67. SurfaceTopography/Uniform/__pycache__/PowerSpectrum.cpython-36.pyc +0 -0
  68. SurfaceTopography/Uniform/__pycache__/ScalarParameters.cpython-36.pyc +0 -0
  69. SurfaceTopography/Uniform/__pycache__/VariableBandwidth.cpython-36.pyc +0 -0
  70. SurfaceTopography/Uniform/__pycache__/__init__.cpython-36.pyc +0 -0
  71. SurfaceTopography/Uniform/__pycache__/common.cpython-36.pyc +0 -0
  72. SurfaceTopography/Uniform/common.py +260 -0
  73. SurfaceTopography/UniformLineScanAndTopography.py +887 -0
  74. SurfaceTopography/__init__.py +62 -0
  75. SurfaceTopography/__pycache__/Converters.cpython-36.pyc +0 -0
  76. SurfaceTopography/__pycache__/Generation.cpython-36.pyc +0 -0
  77. SurfaceTopography/__pycache__/HeightContainer.cpython-36.pyc +0 -0
  78. SurfaceTopography/__pycache__/Interpolation.cpython-36.pyc +0 -0
  79. SurfaceTopography/__pycache__/NonuniformLineScan.cpython-36.pyc +0 -0
  80. SurfaceTopography/__pycache__/Special.cpython-36.pyc +0 -0
  81. SurfaceTopography/__pycache__/UniformLineScanAndTopography.cpython-36.pyc +0 -0
  82. SurfaceTopography/__pycache__/__init__.cpython-36.pyc +0 -0
  83. SurfaceTopography/__pycache__/common.cpython-36.pyc +0 -0
  84. SurfaceTopography/common.py +111 -0
  85. _SurfaceTopography.cpython-36m-x86_64-linux-gnu.so +0 -0
  86. _SurfaceTopography.py +8 -0
  87. __pycache__/_SurfaceTopography.cpython-36.pyc +0 -0
  88. test/IO/__init__.py +28 -0
  89. test/IO/__pycache__/__init__.cpython-36.pyc +0 -0
  90. test/IO/__pycache__/test_ibw.cpython-36.pyc +0 -0
  91. test/IO/__pycache__/test_io.cpython-36.pyc +0 -0
  92. test/IO/__pycache__/test_mi.cpython-36.pyc +0 -0
  93. test/IO/__pycache__/test_netcdf.cpython-36.pyc +0 -0
  94. test/IO/__pycache__/test_npy.cpython-36.pyc +0 -0
  95. test/IO/__pycache__/test_opdx.cpython-36.pyc +0 -0
  96. test/IO/test_ibw.py +178 -0
  97. test/IO/test_io.py +401 -0
  98. test/IO/test_mi.py +103 -0
  99. test/IO/test_netcdf.py +134 -0
  100. test/IO/test_npy.py +135 -0
  101. test/IO/test_opdx.py +441 -0
  102. test/__init__.py +26 -0
  103. test/__pycache__/__init__.cpython-36.pyc +0 -0
  104. test/__pycache__/compare-orientation-with-gwyddion.cpython-36.pyc +0 -0
  105. test/__pycache__/conftest.cpython-36.pyc +0 -0
  106. test/__pycache__/test_autocorrelation.cpython-36.pyc +0 -0
  107. test/__pycache__/test_bicubic.cpython-36.pyc +0 -0
  108. test/__pycache__/test_filtering.cpython-36.pyc +0 -0
  109. test/__pycache__/test_generation.cpython-36.pyc +0 -0
  110. test/__pycache__/test_import.cpython-36.pyc +0 -0
  111. test/__pycache__/test_make_sphere.cpython-36.pyc +0 -0
  112. test/__pycache__/test_power_spectrum.cpython-36.pyc +0 -0
  113. test/__pycache__/test_scalar_parameters.cpython-36.pyc +0 -0
  114. test/__pycache__/test_topography1.cpython-36.pyc +0 -0
  115. test/__pycache__/test_topography2.cpython-36.pyc +0 -0
  116. test/__pycache__/test_variable_bandwidth.cpython-36.pyc +0 -0
  117. test/compare-orientation-with-gwyddion.py +102 -0
  118. test/conftest.py +80 -0
  119. test/test_autocorrelation.py +311 -0
  120. test/test_bicubic.py +190 -0
  121. test/test_filtering.py +69 -0
  122. test/test_generation.py +259 -0
  123. test/test_import.py +54 -0
  124. test/test_make_sphere.py +108 -0
  125. test/test_power_spectrum.py +259 -0
  126. test/test_scalar_parameters.py +176 -0
  127. test/test_topography1.py +1287 -0
  128. test/test_topography2.py +328 -0
  129. test/test_variable_bandwidth.py +107 -0
EGG-INFO/PKG-INFO ADDED
@@ -0,0 +1,11 @@
1
+ Metadata-Version: 1.2
2
+ Name: SurfaceTopography
3
+ Version: 0.91.2
4
+ Summary: Read and analyze surface topographies
5
+ Home-page: UNKNOWN
6
+ Author: Lars Pastewka
7
+ Author-email: lars.pastewka@imtek.uni-freiburg.de
8
+ License: MIT
9
+ Description: UNKNOWN
10
+ Platform: UNKNOWN
11
+ Requires-Python: >=3.5.0
EGG-INFO/SOURCES.txt ADDED
@@ -0,0 +1,96 @@
1
+ .gitattributes
2
+ .gitignore
3
+ .install_parallel_netcdf.sh
4
+ .print_netcdf_capabilities.sh
5
+ .travis.before_install.bash
6
+ .travis.before_script.bash
7
+ .travis.yml
8
+ AUTHORS
9
+ LICENSE.md
10
+ MANIFEST.in
11
+ README.md
12
+ env.sh
13
+ pytest.ini
14
+ requirements.txt
15
+ run-tests.py
16
+ setup.py
17
+ .github/workflows/main.yml
18
+ .idea/.gitignore
19
+ .idea/vcs.xml
20
+ SurfaceTopography/ChangeLog.md
21
+ SurfaceTopography/Converters.py
22
+ SurfaceTopography/Generation.py
23
+ SurfaceTopography/HeightContainer.py
24
+ SurfaceTopography/Interpolation.py
25
+ SurfaceTopography/NonuniformLineScan.py
26
+ SurfaceTopography/Special.py
27
+ SurfaceTopography/UniformLineScanAndTopography.py
28
+ SurfaceTopography/__init__.py
29
+ SurfaceTopography/common.py
30
+ SurfaceTopography.egg-info/PKG-INFO
31
+ SurfaceTopography.egg-info/SOURCES.txt
32
+ SurfaceTopography.egg-info/dependency_links.txt
33
+ SurfaceTopography.egg-info/not-zip-safe
34
+ SurfaceTopography.egg-info/requires.txt
35
+ SurfaceTopography.egg-info/top_level.txt
36
+ SurfaceTopography/IO/DI.py
37
+ SurfaceTopography/IO/FromFile.py
38
+ SurfaceTopography/IO/H5.py
39
+ SurfaceTopography/IO/IBW.py
40
+ SurfaceTopography/IO/MI.py
41
+ SurfaceTopography/IO/Matlab.py
42
+ SurfaceTopography/IO/NC.py
43
+ SurfaceTopography/IO/NPY.py
44
+ SurfaceTopography/IO/OPDx.py
45
+ SurfaceTopography/IO/Reader.py
46
+ SurfaceTopography/IO/__init__.py
47
+ SurfaceTopography/Nonuniform/Autocorrelation.py
48
+ SurfaceTopography/Nonuniform/Detrending.py
49
+ SurfaceTopography/Nonuniform/PowerSpectrum.py
50
+ SurfaceTopography/Nonuniform/ScalarParameters.py
51
+ SurfaceTopography/Nonuniform/VariableBandwidth.py
52
+ SurfaceTopography/Nonuniform/__init__.py
53
+ SurfaceTopography/Nonuniform/common.py
54
+ SurfaceTopography/Tools/__init__.py
55
+ SurfaceTopography/Tools/common.py
56
+ SurfaceTopography/Uniform/Autocorrelation.py
57
+ SurfaceTopography/Uniform/Detrending.py
58
+ SurfaceTopography/Uniform/Filtering.py
59
+ SurfaceTopography/Uniform/Interpolation.py
60
+ SurfaceTopography/Uniform/PowerSpectrum.py
61
+ SurfaceTopography/Uniform/ScalarParameters.py
62
+ SurfaceTopography/Uniform/VariableBandwidth.py
63
+ SurfaceTopography/Uniform/__init__.py
64
+ SurfaceTopography/Uniform/common.py
65
+ c/autocorrelation.cpp
66
+ c/autocorrelation.h
67
+ c/bicubic.cpp
68
+ c/bicubic.h
69
+ c/module.cpp
70
+ c/patchfinder.cpp
71
+ c/patchfinder.h
72
+ c/stack.h
73
+ c/test_stack.cpp
74
+ docs/Makefile
75
+ docs/conf.py
76
+ docs/contributing.rst
77
+ docs/development.rst
78
+ docs/index.rst
79
+ docs/installation.rst
80
+ docs/make.bat
81
+ docs/testing.rst
82
+ docs/usage.rst
83
+ docs/Figures/geometry.svg
84
+ docs/Figures/geometry_pdf_tex.svg
85
+ examples/bicubic_interpolation.py
86
+ examples/files_xy_width_heights.ipynb
87
+ examples/howto_plot_2D_data.ipynb
88
+ helpers/HurstEstimationNumerics.py
89
+ helpers/HurstEstimationSymbolics.py
90
+ helpers/PowerSpectrumSymbolics.py
91
+ helpers/SurfaceExample.asc
92
+ helpers/SurfaceExampleUnfiltered.asc
93
+ helpers/WindowTest.py
94
+ maintenance/copyright.py
95
+ maintenance/replace_header.py
96
+ maintenance/update_license_headers.sh
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+ _SurfaceTopography.cpython-36m-x86_64-linux-gnu.so
EGG-INFO/not-zip-safe ADDED
@@ -0,0 +1 @@
1
+
EGG-INFO/requires.txt ADDED
@@ -0,0 +1,6 @@
1
+ numpy>=1.11.0
2
+ NuMPI>=0.1.1
3
+ muFFT>=0.10.0
4
+ netCDF4>=1.5.0
5
+ igor
6
+ h5py
EGG-INFO/top_level.txt ADDED
@@ -0,0 +1,3 @@
1
+ SurfaceTopography
2
+ _SurfaceTopography
3
+ test
@@ -0,0 +1,358 @@
1
+
2
+ Change log for SurfaceTopography
3
+ =============================
4
+
5
+ v0.91.2 (31Jul20)
6
+ -----------------
7
+
8
+ - BUG: Memory leak in Python bindings for bicubic interpolation
9
+
10
+ v0.91.1 (23Jul20)
11
+ -----------------
12
+
13
+ - MAINT: Bumped muFFT dependency to v0.10.0
14
+
15
+ v0.91.0 (2Jul20)
16
+ ----------------
17
+
18
+ - ENH: return topography with undefined (masked) data filled (#19)
19
+ - ENH: make_sphere has option to put undefined data in standoff or not
20
+ - BUG: Fixed missing dependencies when installed as package (#15)
21
+ - BUG: Fixed error when loading text file with trailing newline (#16)
22
+ - BUG: Fixed wrong error message when loading unknown text file format (#14)
23
+ - BUG: renamed CompoundTopography.array to CompoundTopography.heights (#18)
24
+
25
+ v0.90.0 (17Jun20)
26
+ -----------------
27
+
28
+ - Refactored PyCo code into three separate Python modules:
29
+ SurfaceTopography, ContactMechanics and Adhesion
30
+ - muFFT dependency updated to muFFT-0.9.1
31
+ - Moved documentation from README.md to the docs folder
32
+
33
+ v0.57.0 (15May20)
34
+ -----------------
35
+
36
+ - MAINT: Support for new, rewritten muFFT bindings
37
+ - ENH: Bicubic interpolation of two-dimensional topography maps
38
+ - ENH: Fourier derivative of topography
39
+ - BUG: Computation of plastic area is now parallelized (#303)
40
+ - BUG: Info dictionary mutable from user
41
+
42
+ v0.56.0 (26Feb20)
43
+ -----------------
44
+
45
+ - ENH: Change orientation of some readers such that all topographies
46
+ look like the image in Gwyddion when plotted with
47
+ "pcolormesh(t.heights().T)" (#295)
48
+ - BUG: Fixes unknown unit "um" when reading mi file (#296)
49
+ - BUG: Fixes missing channel name for mi files (#294)
50
+ - ENH: generate self-affine random surfaces by specifying the self-affine prefactor (#261, #278, #279)
51
+ - BUG: now fourier synthesis can generate Linescans again (#277, #279)
52
+
53
+
54
+ v0.55.0 (14Feb20)
55
+ -----------------
56
+
57
+ - API: Readers now report channel info in ChannelInfo class,
58
+ fixes inconsistencies in reporting channel information (#190, #192, #236)
59
+ - ENH: Readers report format identifier and are self-documented (#229, #238)
60
+ - ENH: Readers now support Gwyddion's text export format for English and German locale (#230)
61
+ - ENH: DI reader now read acquisition date and stores it in the info dictionary
62
+ - BUG: DI reader autodetection did not work (#258)
63
+ - BUG: Fixes orientation for DI files (#291)
64
+ - DOC: Added notebook showing how 2D topographies can be plotted
65
+ - TST: Added demo notebook which shows how to plot 2D topographies
66
+ - ENH: adhesive ideal plastic simulations with Softwall system (#260, #283)
67
+
68
+ v0.54.4 (20Dec19)
69
+ -----------------
70
+
71
+ - BUG: Fixes missing 'nb_grid_pts' key in channels from IBW reader
72
+
73
+ v0.54.3 (20Dec19)
74
+ -----------------
75
+
76
+ - BUG: Fixes assertion because of wrong number of channel names (#252)
77
+
78
+ v0.54.2 (13Dec19)
79
+ -----------------
80
+
81
+ - BUG: fix rms_laplacian for periodic topographies (#247)
82
+
83
+ v0.54.1 (13Dec19)
84
+ -----------------
85
+
86
+ - ENH: higher order derivative for periodic surface (#234,#227)
87
+ - ENH: new reader for Igor Binary Wave files (IBW) (#224)
88
+ - BUG: opdx reader can now handle binary filestreams (#209)
89
+ - BUG: store and restore periodic flag in NonuniformTopography (#240)
90
+
91
+ v0.54.0 (06Dec19)
92
+ -----------------
93
+
94
+ - MAINT: correct installation problems because Eigen repository has moved
95
+ - ENH: anisotropic cubic Green's Functions
96
+ - BUG: NPY reader can now handle filestreams (#209, NUMPI/#24)
97
+ - BUG: opdx reader can now handle filestreams (#209)
98
+
99
+ v0.53.1 (21Nov19)
100
+ -----------------
101
+ - API: Detrended Topographies with mode "center" keep is_periodic property. Other modes lead to is_periodic=False.
102
+ See pastewka/TopoBank/#347
103
+
104
+ v0.53.0 (20Nov19)
105
+ -----------------
106
+
107
+ - API: ability to set periodic property of HeightContainer in reader.topography (#198)
108
+ - API: default window for computing PSD is choosen according to topography.is_periodic (#217)
109
+ - Feature: interpolate_fourier pipeline function
110
+ - API: Default of check_boundaries in FreeSystem is False
111
+ - Bug fix: fourier synthesis had a padding line in the generation of topographies with odd number of points (#202)
112
+ - Bug fix: `topography.rms_curvature` no returns rms_curvature, previously rms_laplacian (#200)
113
+ - gnuplot scripts to plot logger output
114
+
115
+ v0.52.0 (25Aug19)
116
+ -----------------
117
+
118
+ - API: Return contact map (the 'active set') from constrained conjugate gradient
119
+ - Bug fix: `assign_patch_numbers` was broken on some configurations since v0.51.2
120
+
121
+ v0.51.2 (8Aug19)
122
+ ----------------
123
+
124
+ - Bug fix: `assign_patch_numbers` crashed for maps larger that 64k x 64k (#191)
125
+
126
+ v0.51.1 (7Aug19)
127
+ ----------------
128
+
129
+ - Bug fix: Setting physical_sizes argument in readers (#188)
130
+ - Bug fix: physical_sizes should be None for surfacs without a physical size (#189)
131
+ - Bug fix: Running and testing without mpi4py is now possible (#179)
132
+ - Bug fix: Multiple calls to `topography` method of readers (#187)
133
+ - Method to inspect pipeline (#175)
134
+ - CI: All tests (serial and MPI parallel) pass in Travis CI
135
+
136
+ v0.51.0 (5Aug19)
137
+ ----------------
138
+
139
+ - Cleanup of new reader API
140
+
141
+ v0.50.2 (1Aug19)
142
+ ----------------
143
+
144
+ - Bug fix: Missing `channel` argument for `topography` method of `WrappedReader` (#181)
145
+ - `WrappedReader` now uses 'Default' as channel name
146
+
147
+ v0.50.1 (1Aug19)
148
+ ----------------
149
+
150
+ - Bug fix: Running without an MPI installation
151
+ - Bug fix: Reading DI files with non-topographic data (#338)
152
+
153
+ v0.50.0 (31Jul19)
154
+ -----------------
155
+
156
+ Overview:
157
+
158
+ - MPI parallelization of topographies, substrates and interaction.
159
+ - Updated reader framework that supports loading files in parallel. This requires to peek at the files (without
160
+ loading them) to understand the number of grid points to decide on a domain decomposition strategy.
161
+
162
+ Technical:
163
+
164
+ - Use MPI wrapper provided by NuMPI (https://github.com/IMTEK-Simulation/NuMPI) for serial calculations.
165
+ - Switch to parallel L-BFGS of NuMPI.
166
+ - Removed Cython dependencies. (Parallel) FFT is now handled by muFFT (https://gitlab.com/muspectre/muspectre).
167
+ - Tests have been partially converted to pytest. Parallel tests are run through run-tests
168
+ (https://github.com/AntoineSIMTEK/runtests).
169
+
170
+ v0.32.0 (15Jul19)
171
+ -----------------
172
+
173
+ - Autocorrelation and power-spectrum updates. Both now have an option 'algorithm' that let's the user select
174
+ between a (fast) FFT and a (slow) brute-force implementation.
175
+
176
+ v0.31.3 (7Jul19)
177
+ ----------------
178
+
179
+ - Removed check for existing forces on boundaries (nonperiodic calculations only).
180
+
181
+ v0.31.1 (20May19)
182
+ -----------------
183
+
184
+ - Bug fix: Contact calculations now also run with detrended/scaled topographies.
185
+ - Updated hard wall command line script to new topography interface.
186
+
187
+ v0.31.0 (5Mar19)
188
+ ----------------
189
+
190
+ - Added height-difference autocorrelation and variable bandwidth analysis for nonuniform
191
+ line scans.
192
+ - Added wrapper 'to_nonuniform' function that turns uniform into nonuniform line scans.
193
+ - Bug fix: 'center' detrend mode for nonunform line scans now minimizes rms height.
194
+
195
+ v0.30.0 (15Feb19)
196
+ -----------------
197
+
198
+ Overview:
199
+
200
+ - Added non-uniform line scans, which can be loaded from text files or constructed from arrays.
201
+ - New class structure for topographies and line scans (for easier maintenance).
202
+ - Major API changes and several bug fixes (see below).
203
+ - Added Hardwall simulation tutorial.
204
+ - Added calculation for second derivative and RMS curvature for nonuniform topographies.
205
+ - Added coordination counting for contact patches.
206
+ - Simplified computation of perimeter using coordination counting.
207
+ - Started Sphinx documentation with notes how to use the package.
208
+
209
+ API Changes:
210
+
211
+ - New API for generating topographies and line scans (height containers) from data,
212
+ please use "from PyCo Topography import Topography, NonlinearLineScan, UniformLineScan" now.
213
+ - New API for building pipelines using methods on height containers, e.g. "topography.scale(2).detrend()".
214
+ - Uniform topographies and line scans can be periodic.
215
+ - Removed unit property from height containers. Units are now stored in the info dictionary,
216
+ which has to be set on generation of the height container.
217
+ - All topographies must have a physical_sizes. Readers use the resolution as the default physical_sizes
218
+ if the files contain no physical_sizes information.
219
+ - Removed 'shape' alias to 'resolution' property for height containers.
220
+ - Size + shape are now always tuples, physical_sizes is also always set as tuple.
221
+ - Topographies can now be pickled and unpickled.
222
+ - Replaced class 'Sphere' with generator function 'make_sphere'.
223
+ - Contact with "FreeFFTElasticHalfSpace":
224
+ Now an error is raised when points at the outer ring of the surface are interacting.
225
+ See notebook "examples/Hardwall_Simulation.ipynb".
226
+
227
+ Bug fixes:
228
+
229
+ - periodicity was ignored in calculation of the distance between contact patches in `distance_map`
230
+ - computation of energy in fourier space didn't match the computation of energy in real space
231
+ (however it is not used in actual simulation)
232
+ - Removed keyword "full_output" from shift_and_tilt().
233
+ - Text files without spaces at beginning of line can be read now.
234
+ - Enable reading topography data from memory buffers and from binary streams.
235
+ - Calculation of 2D autocorrelation function was broken, e.g. radial average.
236
+ - 1D autocorrelation was broken for nonperiodic calculations.
237
+
238
+
239
+ v0.18.0 (31Oct18)
240
+ -----------------
241
+
242
+ - Refactored "Surface" to "Topography".
243
+ - Bug fix: Corrected computation of attractive contact area in Smooth contact system.
244
+ - Bug fix: Corrected computation of inflexion point in LJ93 and VW82 smoothed potentials.
245
+
246
+ v0.17.0 (06Jul18)
247
+ -----------------
248
+
249
+ - Height-difference autocorrelation function.
250
+
251
+ v0.16.0 (23Oct17)
252
+ -----------------
253
+
254
+ - PyCo now licensed under MIT license.
255
+
256
+ v0.15.0 (06Sep17)
257
+ -----------------
258
+
259
+ - Implemented substrates of finite thickness.
260
+ - Support for additional DI file formats.
261
+ - More clever unit conversion in DI files.
262
+
263
+ v0.14.1 (16Jun17)
264
+ -----------------
265
+
266
+ - macOS compatibility fixes.
267
+ - Automatic conversion from hardness value (given in units of pressure)
268
+ into internal units in constrained CG solver.
269
+
270
+ v0.14.0 (14Mar17)
271
+ -----------------
272
+
273
+ - Added penetration hardness model for simple plastic calculations.
274
+
275
+ v0.13.1 (07Mar17)
276
+ -----------------
277
+
278
+ - Bug fix: Periodic Green's function offset by one lattice constant.
279
+
280
+ v0.13.0 (13Jan17)
281
+ -----------------
282
+
283
+ - Added further adhesive reference models (Maugis-Dugdale type models for
284
+ cylinder and wedge).
285
+ - Added callback option for Polonsky & Keer optimizer.
286
+ - setup.py now has '--openmp' option that triggers compilation of shared-memory
287
+ (OpenMP) parallel code.
288
+
289
+ v0.12.0 (05Dec16)
290
+ -----------------
291
+
292
+ - Main enhancement: Support for masked_arrays in NumpySurface. This allows to
293
+ have undefined (missing) data points in surfaces. Polonsky & Keer can handle
294
+ this now.
295
+ - Polonsky & Keer can now optimize at constant pressure (in addition to
296
+ constant displacement)
297
+ - Updated hard wall script to accept command line arguments.
298
+ - Moved scripts to new 'commandline' folder.
299
+ - Added plotmap.py, tool for plotting surfaces from the command line.
300
+ - Added plotpsd.py, tool for plotting the PSD of a surface from the command
301
+ line.
302
+
303
+ v0.11.0 (21Sep16)
304
+ -----------------
305
+
306
+ - Renamed TiltedSurface to DetrendedSurface.
307
+
308
+ v0.10.3 (16Sep16)
309
+ -----------------
310
+
311
+ - Added reader for HGT files (topography data from NASA Shuttle Radar Topography
312
+ Mission).
313
+ - Bug fix in deprecated 'set_size' that broke hard wall example.
314
+
315
+ v0.10.2 (29Aug16)
316
+ -----------------
317
+
318
+ - Added reader for MATLAB files.
319
+
320
+ v0.10.1 (22Aug16)
321
+ -----------------
322
+
323
+ - Added 'center' detrending mode which just subtracts the mean value.
324
+ - Added getter and setter for detrend_mode.
325
+ - Added function to return string representation of subtracted plane.
326
+ - Added area_per_pt property to Surface object.
327
+
328
+ v0.10.0 (31Jul16)
329
+ -----------------
330
+
331
+ - Exponential adhesion potential from Martin's contact mechanics challenge, to
332
+ be used in combination with hard-wall (bounded L-BFGS). Added tests for this
333
+ potential. Thanks go to Joe Monty for implementing this.
334
+ - Surfaces now have a *unit* property, that can be any object but will likely
335
+ be a string in many cases.
336
+ - Readers now create NumpySurface with *raw* data and wrap it into a
337
+ ScaledSurface to convert to proper unit.
338
+ - Travis-CI integration
339
+
340
+ v0.9.4 (27Apr16)
341
+ ----------------
342
+
343
+ - Greenwood-Tripp reference solution
344
+ - Many bug fixes in topography file readers
345
+
346
+ v0.9.3 (20Mar16)
347
+ ----------------
348
+
349
+ - Wyko OPD reader (.opd)
350
+ - Digital Instruments Nanoscope reader (.di)
351
+ - Igor Binary Wave reader (.ibw)
352
+ - Detrending
353
+
354
+ v0.9.2 (06Mar16)
355
+ ----------------
356
+
357
+ - X3P reader (.x3p)
358
+ - Automatic file format detection
@@ -0,0 +1,197 @@
1
+ #
2
+ # Copyright 2019-2020 Lars Pastewka
3
+ # 2019 Antoine Sanner
4
+ #
5
+ # ### MIT license
6
+ #
7
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ # of this software and associated documentation files (the "Software"), to deal
9
+ # in the Software without restriction, including without limitation the rights
10
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ # copies of the Software, and to permit persons to whom the Software is
12
+ # furnished to do so, subject to the following conditions:
13
+ #
14
+ # The above copyright notice and this permission notice shall be included in
15
+ # all copies or substantial portions of the Software.
16
+ #
17
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ # SOFTWARE.
24
+ #
25
+
26
+ """
27
+ Utility function for conversion between uniform and nonuniform
28
+ representations.
29
+ """
30
+
31
+ import numpy as np
32
+
33
+ from .HeightContainer import DecoratedTopography, UniformTopographyInterface, \
34
+ NonuniformLineScanInterface
35
+ from .NonuniformLineScan import NonuniformLineScan
36
+ from .UniformLineScanAndTopography import UniformLineScan
37
+
38
+
39
+ class WrapAsNonuniformLineScan(DecoratedTopography,
40
+ NonuniformLineScanInterface):
41
+ """
42
+ Wrap a uniform topography into a nonuniform one.
43
+ """
44
+
45
+ def __init__(self, topography, info={}):
46
+ """
47
+ Parameters
48
+ ----------
49
+ topography : :obj:`NonuniformLineScan`
50
+ SurfaceTopography to wrap.
51
+ """
52
+ super().__init__(topography, info=info)
53
+
54
+ # This is populated with functions from the nonuniform topography, but
55
+ # this is a uniform topography
56
+ self._functions = NonuniformLineScan._functions
57
+
58
+ # Implement abstract methods of AbstractHeightContainer
59
+
60
+ @property
61
+ def dim(self):
62
+ return 1
63
+
64
+ @property
65
+ def physical_sizes(self):
66
+ s, = self.parent_topography.physical_sizes
67
+ p, = self.parent_topography.pixel_size
68
+ return s - p,
69
+
70
+ @property
71
+ def is_periodic(self):
72
+ return False
73
+
74
+ # Implement nonuniform line scan interface
75
+
76
+ @property
77
+ def nb_grid_pts(self):
78
+ return self.parent_topography.nb_grid_pts
79
+
80
+ @property
81
+ def x_range(self):
82
+ s, = self.parent_topography.physical_sizes
83
+ p, = self.parent_topography.pixel_size
84
+ return 0, s - p
85
+
86
+ def positions(self):
87
+ """
88
+ Returns array containing the lateral positions.
89
+ """
90
+ r, = self.parent_topography.nb_grid_pts
91
+ p, = self.parent_topography.pixel_size
92
+ return np.arange(r) * p
93
+
94
+ def heights(self):
95
+ """
96
+ Returns array containing the topography data.
97
+ """
98
+ return self.parent_topography.heights()
99
+
100
+
101
+ class UniformlyInterpolatedLineScan(DecoratedTopography,
102
+ UniformTopographyInterface):
103
+ """
104
+ Interpolate a topography onto a uniform grid.
105
+ """
106
+
107
+ def __init__(self, topography, nb_points, padding, info={}):
108
+ """
109
+ Parameters
110
+ ----------
111
+ topography : :obj:`SurfaceTopography` or :obj:`UniformLineScan`
112
+ SurfaceTopography to interpolate.
113
+ nb_points : int
114
+ Number of equidistant grid points.
115
+ padding : int
116
+ Number of padding grid points, zeros appended to the data.
117
+ """
118
+ super().__init__(topography, info=info)
119
+ self.nb_points = nb_points
120
+ self.padding = padding
121
+
122
+ # This is populated with functions from the nonuniform topography, but
123
+ # this is a uniform topography
124
+ self._functions = UniformLineScan._functions
125
+
126
+ def __getstate__(self):
127
+ """ is called and the returned object is pickled as the contents for
128
+ the instance
129
+ """
130
+ state = super().__getstate__(), self.nb_points, self.padding
131
+ return state
132
+
133
+ def __setstate__(self, state):
134
+ """ Upon unpickling, it is called with the unpickled state
135
+ Keyword Arguments:
136
+ state -- result of __getstate__
137
+ """
138
+ superstate, self.nb_points, self.padding = state
139
+ super().__setstate__(superstate)
140
+
141
+ # Implement abstract methods of AbstractHeightContainer
142
+
143
+ @property
144
+ def dim(self):
145
+ return 1
146
+
147
+ @property
148
+ def physical_sizes(self):
149
+ s, = self.parent_topography.physical_sizes
150
+ return s * (self.nb_points + self.padding) / self.nb_points,
151
+
152
+ @property
153
+ def is_periodic(self):
154
+ return False
155
+
156
+ @property
157
+ def is_uniform(self):
158
+ return True
159
+
160
+ # Implement uniform line scan interface
161
+
162
+ @property
163
+ def nb_grid_pts(self):
164
+ """Return nb_grid_pts, i.e. number of pixels, of the topography."""
165
+ return self.nb_points + self.padding,
166
+
167
+ @property
168
+ def pixel_size(self):
169
+ return (s / r for s, r in zip(self.physical_sizes, self.nb_grid_pts))
170
+
171
+ @property
172
+ def area_per_pt(self):
173
+ return self.pixel_size
174
+
175
+ @property
176
+ def has_undefined_data(self):
177
+ return False
178
+
179
+ def positions(self):
180
+ left, right = self.parent_topography.x_range
181
+ size = right - left
182
+ return np.linspace(left - size * self.padding / (2 * self.nb_points),
183
+ right + size * self.padding / (2 * self.nb_points),
184
+ self.nb_points + self.padding)
185
+
186
+ def heights(self):
187
+ """ Computes the rescaled profile.
188
+ """
189
+ x = self.positions()
190
+ return np.interp(x, *self.parent_topography.positions_and_heights())
191
+
192
+
193
+ # Register pipeline functions from this module
194
+ UniformTopographyInterface.register_function('to_nonuniform',
195
+ WrapAsNonuniformLineScan)
196
+ NonuniformLineScanInterface.register_function('to_uniform',
197
+ UniformlyInterpolatedLineScan)