-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_power_spectra.py
46 lines (38 loc) · 1.11 KB
/
test_power_spectra.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
'''
Test file for power_spectra.py
'''
import unittest
import power_spectra
class PowerSpectraTests(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_initialize(self):
power_spectra.PowerSpectra([0, 1], [0, 1], [[1, 0],[0,1]])
# def test_input_size_consisentcy(self):
# """
# Checks that the input sizing is consistent, and if not an exception is raised.
#
# x = [1xm]
# y = [1xn]
# z = [mxn]
# :return:
# """
# x1 = range(3)
# y1 = range(5)
# z1 = [range(len(x1)), range(len(y1))]
#
# power_spectra.PowerSpectra(x1, y1, z1)
def test_from_multiscale_file(self):
"""
Uses a multiscale consulting file to determine surface roughness.
:return:
"""
ps = power_spectra.PowerSpectra.from_multiscale_file(
'http://www.multiscaleconsulting.com/downloads/ROADTYPE.NX.NY.a.prefz.Height.data.1x.2y.3h')
ps.plot_surface()
ps.imshow_surface()
assert True
if __name__ == "__main__":
unittest.main()