Closed CSUPZW closed 1 year ago
Well, what is the problem with using numpy arrays for passing the Tx & Rx parameters? How do you create Tx & Rx?
I create Tx & Rx by using np.loadtxt to load the file. The parts of Tx and Rx are shown in following:
Tx : array([[ 4.4, 41.1, 22. ], [ 4.4, 41.1, 22. ], [ 4.4, 41.1, 22. ]])
Rx: array([[ 5.6, 27.5, 21.6], [16.2, 40.2, 15.9], [15.7, 25.8, 15.5]])
It does not have any problem when Tx and Rx are passed to function "Mesh3d.raytrace". However, when they are passed to the function "Mesh3d.data_kernel_straight_rays", it shows problem mentioned above. The files are attached following. . Error when using Mesh3D.data_kernel_straight_rays.ipynb.zip
Sorry for the long delay to reply. The problem arises because data_kernel_straight_rays is not a static method for meshes (contrary to rgrid). You should pass your mesh as first argument, or use it with an instance, e.g.
tm = Mesh3D(...) tm.data_kernel_straight_rays(Tx, Rx)
Dear sir, I got an error when using function "data_kernel_straight_rays" of Mesh3d. I had read the help of "Mesh3d.data_kernel_straight_rays", and it did not tell me what type of data I should use if 'numpy.ndarray' was not allowed. Here is the error:
TypeError Traceback (most recent call last)