Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circuitscape in pairwise mode return cumulative current map with invalid value (from -1,79769e+308 to 1,79769e+308) #411

Open
Daviser95 opened this issue Feb 13, 2024 · 2 comments

Comments

@Daviser95
Copy link

Daviser95 commented Feb 13, 2024

Hi everyone, I am getting some strange result when I ran Circuitscape in pairwise option in Julia. When I get the results and open them in GIS software, the cumulative current maps are not displayed and have values from -1.79769e+308 to 1.79769e+308. I tried two different versions of Julia (i.e., 1.8.5 and 1.10), but nothing changed.
Apparently, the process works well and does not give any errors.
At the end I get this result in Julia:

 [ Info: 2024-02-13 11:38:50 : Time taken to complete job = 168209.9600356
150×150 Matrix{Float64}:
   0.0    2.0        4.0        8.0       9.0       10.0     …  275.0     276.0      277.0      278.0      279.0
   2.0    0.0       17.1324    52.9831   21.8604    25.7419     236.217   234.467    236.565    233.987    238.428
   4.0   17.1324     0.0       41.7452   16.5703    18.9436     225.299   223.549    225.647    223.07     227.51
   8.0   52.9831    41.7452     0.0      48.3928    48.916      207.907   206.157    208.255    205.677    210.118
   9.0   21.8604    16.5703    48.3928    0.0       10.7699     231.558   229.808    231.906    229.328    233.769
  10.0   25.7419    18.9436    48.916    10.7699     0.0     …  232.062   230.313    232.41     229.833    234.273
  12.0   23.3686    19.7972    50.8156   10.5328    16.9382     233.928   232.178    234.276    231.698    236.139
  13.0   18.722     23.1195    55.1755   23.7742    27.4891     238.261   236.511    238.609    236.032    240.472
  14.0   21.9132    24.6225    56.3481   24.3549    28.1845     239.427   237.678    239.775    237.198    241.638
  19.0   24.2237    20.8277    49.923    16.1318    18.7847     232.95    231.2      233.298    230.721    235.161
  20.0   22.5011    24.6325    55.4101   24.3884    27.8669  …  238.441   236.692    238.79     236.212    240.652
  22.0   65.0679    54.0687    34.2902   60.4262    60.9354     193.131   191.381    193.479    190.902    195.342
  23.0    3.15753    4.36779   41.6173    5.15091   11.5079     224.817   223.067    225.165    222.587    227.028
   ⋮                                                 ⋮       ⋱    ⋮
 268.0  199.01     188.093    170.7     194.351    194.856       71.398    69.6335    71.7396    69.1419    73.5862
 269.0  197.289    186.371    168.979   192.63     193.134       68.0119   66.2489    68.3546    65.7588    70.2037
 270.0  188.207    177.289    159.897   183.548    184.053   …   58.3507   56.5937    58.6972    56.1091    60.5548
 271.0  198.913    187.996    170.603   194.254    194.759       60.9455   59.2017    61.3007    58.7294    63.1786
 272.0  195.444    184.526    167.134   190.785    191.289       61.1325   59.3753    61.4795    58.8911    63.3384
 273.0  233.357    222.439    205.047   228.698    229.203       21.7018   18.9548    22.5848    19.3263    26.4801
 274.0  231.674    220.757    203.364   227.015    227.52        10.621    12.9897    15.3627    16.0835    22.5499
 275.0  236.217    225.299    207.907   231.558    232.062   …    0.0      11.3991    11.1414    16.4926    22.8633
 276.0  234.467    223.549    206.157   229.808    230.313       11.3991    0.0        8.70692    8.21068   18.6174
 277.0  236.565    225.647    208.255   231.906    232.41        11.1414    8.70692    0.0       13.0328    19.6155
 278.0  233.987    223.07     205.677   229.328    229.833       16.4926    8.21068   13.0328     0.0       15.1768
 279.0  238.428    227.51     210.118   233.769    234.273       22.8633   18.6174    19.6155    15.1768     0.0

This is the .ini file:

[Options for advanced mode]
ground_file_is_resistances = True
remove_src_or_gnd = keepall
ground_file = 
use_unit_currents = True
source_file = 
use_direct_grounds = True

[Mask file]
mask_file = (Browse for a raster mask file)
use_mask = False

[Calculation options]
low_memory_mode = True
parallelize = True
solver = cholmod
print_timings = True
preemptive_memory_release = True
print_rusages = False
max_parallel = 8
precision = double

[Short circuit regions (aka polygons)]
polygon_file = None
use_polygons = False

[Options for one-to-all and all-to-one modes]
use_variable_source_strengths = False
variable_source_file = (Browse for a source strength file)

[Output options]
set_null_currents_to_nodata = False
set_focal_node_currents_to_zero = True
set_null_voltages_to_nodata = False
compress_grids = True
write_cur_maps = 1
write_volt_maps = 0
output_file = C:\Users\david\Desktop\ricerca2\connectivity\try_current_pairwise00m2.out
write_cum_cur_map_only = True
log_transform_maps = True
write_max_cur_maps = False

[Version]
version = 4.0.5

[Options for reclassification of habitat data]
reclass_file = (Browse for file with reclassification data)
use_reclass_table = False

[Logging Options]
log_level = INFO
log_file = C:\Users\david\Desktop\ricerca2\connectivity\try_current_pairwise300m2.log
profiler_log_file = C:\Users\david\Desktop\ricerca2\connectivity\try_current_pairwise00m_rusages2.log
screenprint_log = True

[Options for pairwise and one-to-all and all-to-one modes]
included_pairs_file = (Browse for a file with pairs to include or exclude)
use_included_pairs = False
point_file = C:\Users\david\Desktop\ricerca2\connectivity\curr_suitable_areas.asc

[Connection scheme for raster habitat data]
connect_using_avg_resistances = False
connect_four_neighbors_only = False

[Habitat raster or graph]
habitat_map_is_resistances = True
habitat_file = C:\Users\david\Desktop\ricerca2\connectivity\curr_resist.asc

[Circuitscape mode]
data_type = raster
scenario = pairwise

These are the version info:

julia> Pkg.status("Circuitscape")
Status `C:\Users\david\.julia\environments\v1.10\Project.toml`
  [2b7a1792] Circuitscape v5.13.2
julia> versioninfo()
Julia Version 1.10.0-rc3
Commit ed79752b93 (2023-12-18 09:57 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 20 × 12th Gen Intel(R) Core(TM) i7-12700H
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, alderlake)
  Threads: 1 on 20 virtual cores

Any advice would be appreciated!
Thank you in advance!

@Daviser95
Copy link
Author

A little update. This problem seems to be related to #289, because also in my case the cumulative current map contains only -9999 even though in Julia the final matrix showed normal values (i.e., from 0 to x). I think that's why when I open the final map on GIS software it's empty and nothing is shown.

@ranjanan
Copy link
Member

@Daviser95 also, you have use_unit_currents = true and use_direct_grounds=true, two options that just received support via #421. Once this is merged, feel free to try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants