Closed DebjitP1997 closed 9 months ago
Hi,
Based on the error message, it looks like the returned values from the function phase_cross_correlation
has 0 dimensions for some reason. You may want to check if the input reflectivity fields (field_1
and field_2
) have valid dimensions and values. I think they should be 2D arrays.
One trick to debug Python code error is using the Python Debugger. You can put this line of code right above the line of your error, which will drop the code into debug mode, and you can check the input variables interactively:
import pdb; pdb.set_trace()
Remember to run the code in serial mode when you want to do debug (set run_parallel: 0
in the config file).
Hope this helps. -Zhe
Hi Sir, Thank you for the reply, I could solve the error by debugging and the code is working fine now.
Thanking you, Debjit
I am trying to run the 'demo_cell_nexrad.sh'. I have made required changes as mentioned in the script, but I am getting the follwoing error:
Traceback (most recent call last): File "/media/debjit/DATA/PyFLEXTRKR/config/../runscripts/run_celltracking.py", line 49, in
driftfile = calc_mean_advection(config)
File "/media/debjit/DATA/PyFLEXTRKR/pyflextrkr/advection_tiles.py", line 312, in calc_mean_advection
x_y = movement_of_storm_fft_l(file1, file2, dx=dx, dy=dy, config=config)
File "/media/debjit/DATA/PyFLEXTRKR/pyflextrkr/advection_tiles.py", line 230, in movement_of_storm_fft_l y1, x1 = movement_of_storm_fft( File "/media/debjit/DATA/PyFLEXTRKR/pyflextrkr/advection_tiles.py", line 170, in movement_of_storm_fft y,x = -1 * phase_cross_correlation(field_1, field_2, reference_mask=mask_1t, moving_mask=mask_2t, overlap_ratio=0.7) ValueError: not enough values to unpack (expected 2, got 0)
Kindly help me to resolve the error.