Skip to Content.

mget-help - RE: [mget-help] Issue with visualizing simulation results : MGET

Please Wait...

Subject: Marine Geospatial Ecology Tools (MGET) help

Text archives


RE: [mget-help] Issue with visualizing simulation results : MGET


Chronological Thread 
  • From: Jason Roberts <>
  • To: Young Jin <>, "" <>
  • Subject: RE: [mget-help] Issue with visualizing simulation results : MGET
  • Date: Mon, 9 Jul 2018 18:07:44 +0000
  • Accept-language: en-US
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

Dear Young,

 

I’m very sorry to take so long to reply. I have been travelling and in meetings for most of the past month. This will finally end this week. I can look at this problem in detail next week.

 

I believe you are correct that there is nothing wrong with your files. I suspect the problem is that MGET did not anticipate that ArcGIS might use a negative number to represent the “no data value” in some of the simulation rasters. The error message comes from a function in the Python numpy package that MGET is using to compute some counts. That function requires there be no negative numbers in the input data. I suspect that MGET needs to change the negative value representing “no data” to zero before calling the numpy function. But I will get back to you next week about it.

 

Best regards,

 

Jason

 

From: <> On Behalf Of Young Jin
Sent: Monday, July 2, 2018 10:56 PM
To:
Subject: [mget-help] Issue with visualizing simulation results : MGET

 

Dear sir,

 

I came across an error message "The first argument of bincount must be non-negative" after executing "Visualize Larval Dispersal Simulation Results (2012). I couldn't find anything wrong with my files. I believe all values and counts are non-negative. I would really apprecate it if you could help me with this. A whole error message is copied and pasted below. I also attached my three raster files.

 

Thanks,

 

Young 

 

Executing: LarvalDispersalVisualizeResults2012 E:\ArcGIS_files_YJIN\Test_LDS2\LDS E:\ArcGIS_files_YJIN\Test_LDS2\Results Test_output 0.1 A true 0.00001 false true 0.00001 Quantity

Start Time: Tue Jul 03 09:23:21 2018

Running script LarvalDispersalVisualizeResults2012...

Reading the simulation results from E:\ArcGIS_files_YJIN\Test_LDS2\Results\Results.pickle.

Creating the output geodatabase E:\ArcGIS_files_YJIN\Test_LDS2\Results\Test_output.gdb.

Importing 6 datasets into ArcGIS Workspace E:\ArcGIS_files_YJIN\Test_LDS2\Results\Test_output.gdb with mode "replace".

Import complete: 0:00:11 elapsed, 6 datasets imported, 0:00:01.848333 per dataset.

Creating raster catalog E:\ArcGIS_files_YJIN\Test_LDS2\Results\Test_output.gdb\Density.

Loading rasters into the raster catalog.

Retrieving raster paths from the raster catalog.

Finished retrieving paths: 0:00:00 elapsed, 6 paths retrieved, 0:00:00.001666 per path.

Querying ArcGIS Workspace E:\ArcGIS_files_YJIN\Test_LDS2\Results\Test_output.gdb.

Query complete: 0:00:00 elapsed, 6 datasets found, 0:00:00.037500 per dataset.

Updating the fields of each row of the raster catalog.

Update complete: 0:00:00 elapsed, 6 rows updated, 0 deleted, 0 unchanged, 0:00:00.000666 per row.

ValueError: The first argument of bincount must be non-negative

Failed script LarvalDispersalVisualizeResults2012...

 

Traceback (most recent call last):

  File "C:\Program Files\GeoEco\ArcGISToolbox\Scripts\LarvalDispersalVisualizeResults2012.py", line 5, in <module>

    ExecuteMethodFromCommandLineAsArcGISTool('GeoEco.Connectivity.LarvalDispersal', 'LarvalDispersal', 'VisualizeResults2012')

  File "C:\Python27\ArcGIS10.5\lib\site-packages\GeoEco\ArcGISScripts.py", line 210, in ExecuteMethodFromCommandLineAsArcGISTool

    exec sourceCode in globals(), locals()

  File "<string>", line 1, in <module>

  File "C:\Python27\ArcGIS10.5\lib\site-packages\GeoEco\Connectivity\LarvalDispersal.py", line 1371, in VisualizeResults2012

    probabilityMatrix = cls._ComputeProbabilityMatrix(simulationDirectory, settlementMatrix, metadata)[0]

  File "C:\Python27\ArcGIS10.5\lib\site-packages\GeoEco\Connectivity\LarvalDispersal.py", line 1543, in _ComputeProbabilityMatrix

    larvaeReleasedForPatch = numpy.bincount(patchIDsImage.flatten(), weights=patchCoverImage.flatten())

ValueError: The first argument of bincount must be non-negative

 

Failed to execute (LarvalDispersalVisualizeResults2012).

Failed at Tue Jul 03 09:23:42 2018 (Elapsed Time: 20.69 seconds)

 




Archive powered by MHonArc 2.6.19.

Top of Page