Closed aleksandrovivan closed 1 year ago
Hi @aleksandrovivan thanks for the error report.
I can't reproduce the problem locally - with the latest itmlogic
code and the v3 ASTER DEM switched in, I can run okay:
> python scripts/p2p.py
Distance is 77.57231025439202km
len(measured_terrain_profile) 599
len(original_surface_profile_m) 157
Line of sight path
Diffraction is the dominant mode
Estimated quantiles of basic transmission loss (db)
Free space value 102.63079048306626 db
Confidence levels 50, 90, 10
Completed run
Can you check which version of itmlogic you're trying to run? The relevant block of code in itmlogic/scatter_attenuation/ascat.py
has r1
where it should be.
We've generally tested and run code from a source checkout of this repository - there was an old itmlogic
on pypi, and I've just released v1.1 which is our last tagged release.
Could you try pip install itmlogic==1.1
and then test your script again? OR download/clone this repository and pip install -e .
from within the source directory.
Thank you tomalrussell for the quick response!
The issue was indeed all about the version of itmlogic
that I was using (it was 0.1). It runs smoothly now.
I've been trying to run the code of
p2p.py
example in Google Colab (as well as Anaconda, through Jupiter) but I encountered the UnboundLocalError when runningitmlogic_p2p()
:The only difference of substance is that I'm using
ASTGTMV003_N51W001_dem.tif
instead ofASTGTM2_N51W001_dem.tif
, since only the v3 is now available online (though it is claimed that "the same gridding and tile structure as V1 and V2, with 30-meter postings and 1 x 1 degree tiles" in v3).