|
1 | 1 | ''' |
2 | | -PyTrx (c) by Penelope How, Nick Hulton, Lynne Buie |
3 | | -
|
4 | | -PyTrx is licensed under a MIT License. |
| 2 | +PyTrx (c) is licensed under a MIT License. |
5 | 3 |
|
6 | 4 | You should have received a copy of the license along with this |
7 | 5 | work. If not, see <https://choosealicense.com/licenses/mit/>. |
|
23 | 21 | ''' |
24 | 22 |
|
25 | 23 | #Import packages |
26 | | -import os |
| 24 | +import os, sys |
27 | 25 | import numpy as np |
28 | 26 |
|
29 | | -# #Import PyTrx modules (from PyTrx file directory) |
30 | | -# import sys |
31 | | -# sys.path.append('../') |
32 | | -# from CamEnv import CamEnv |
33 | | -# from Velocity import Velocity, Homography |
34 | | -# from FileHandler import writeHomogFile, writeVeloFile, writeVeloSHP, writeCalibFile |
35 | | -# from Utilities import plotVeloPX, plotVeloXYZ, interpolateHelper, plotInterpolate |
36 | | - |
37 | | -#If you have pip/conda installed PyTrx then comment out the PyTrx module |
38 | | -#imports above and uncomment these ones below |
39 | | -from PyTrx.CamEnv import CamEnv |
40 | | -from PyTrx.Velocity import Velocity, Homography |
41 | | -from PyTrx.FileHandler import writeHomogFile, writeVeloFile, writeVeloSHP, writeCalibFile |
42 | | -from PyTrx.Utilities import plotVeloPX, plotVeloXYZ, interpolateHelper, plotInterpolate |
| 27 | +#Import PyTrx modules |
| 28 | +try: |
| 29 | + sys.path.append('../') |
| 30 | + from CamEnv import CamEnv |
| 31 | + from Velocity import Velocity, Homography |
| 32 | + from FileHandler import writeHomogFile, writeVeloFile, writeVeloSHP, writeCalibFile |
| 33 | + from Utilities import plotVeloPX, plotVeloXYZ, interpolateHelper, plotInterpolate |
| 34 | +except: |
| 35 | + from PyTrx.CamEnv import CamEnv |
| 36 | + from PyTrx.Velocity import Velocity, Homography |
| 37 | + from PyTrx.FileHandler import writeHomogFile, writeVeloFile, writeVeloSHP, writeCalibFile |
| 38 | + from PyTrx.Utilities import plotVeloPX, plotVeloXYZ, interpolateHelper, plotInterpolate |
43 | 39 |
|
44 | 40 |
|
45 | 41 | #------------------------- Map data sources ------------------------------- |
|
0 commit comments