You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been "partially" succesful with running a standard deviation stretch on my 8bit 1 band tif imagery. But pystretch crashes on some of them with the following (memory issue) message:
I use 32 bit version of Python, GDAL, numpy, scipy and pystretch.
"Processing on 8 cores.
Read band 1 of 1
Image segmented. Processing segment 1 of 1
Traceback (most recent call last):
File "c:\Python266\Scripts\pystretcher.py", line 185, in
main(options, args)
File "c:\Python266\Scripts\pystretcher.py", line 97, in main
array = numpy.ma.masked_values(array, options['ndv'], copy=False)
File "C:\Python266\lib\site-packages\numpy\ma\core.py", line 2206, in masked_values
condition = umath.less_equal(mabs(xnew - value), atol + rtol * mabs(value))
MemoryError"
All the input 8bit 1 band TIFs have been created in the same software.
However the one that fails, due to memory issue, is a larger matrix (6687,8190) comparing to one that completes OK (3230,8978), although the physical file size is actually smaller (~1.5MB) from the one that completes OK (~3MB).
Do I need to explicitly add the segmenting of an image to the following command?:
Traceback (most recent call last):
File "c:\Python266\Scripts\pystretcher.py", line 185, in
main(options, args)
File "c:\Python266\Scripts\pystretcher.py", line 157, in main
del stats,array, jobs, shared_arr.data, p
UnboundLocalError: local variable 'p' referenced before assignment
I would like to avoid having to physically split the raster into smaller rasters if possible.
Your help much appreciated!
Many thanks
Magda
The text was updated successfully, but these errors were encountered:
Hello jlaura,
I have been "partially" succesful with running a standard deviation stretch on my 8bit 1 band tif imagery. But pystretch crashes on some of them with the following (memory issue) message:
I use 32 bit version of Python, GDAL, numpy, scipy and pystretch.
"Processing on 8 cores.
Read band 1 of 1
Image segmented. Processing segment 1 of 1
Traceback (most recent call last):
File "c:\Python266\Scripts\pystretcher.py", line 185, in
main(options, args)
File "c:\Python266\Scripts\pystretcher.py", line 97, in main
array = numpy.ma.masked_values(array, options['ndv'], copy=False)
File "C:\Python266\lib\site-packages\numpy\ma\core.py", line 2206, in masked_values
condition = umath.less_equal(mabs(xnew - value), atol + rtol * mabs(value))
MemoryError"
All the input 8bit 1 band TIFs have been created in the same software.
However the one that fails, due to memory issue, is a larger matrix (6687,8190) comparing to one that completes OK (3230,8978), although the physical file size is actually smaller (~1.5MB) from the one that completes OK (~3MB).
Do I need to explicitly add the segmenting of an image to the following command?:
c:Python266\python c:\Python266\Scripts\pystretcher.py --std --standarddeviations 2.5 input_image.tif --output output_image.tif.
I tried adding --horizontal and --verical to the above command for splitting the memory (?):
c:Python266\python c:\Python266\Scripts\pystretcher.py --std --standarddeviations 2.5 --horizontal 4 --vertical 4 input_image.tif --output output_image.tif.
but the process fails with an error message:
Traceback (most recent call last):
File "c:\Python266\Scripts\pystretcher.py", line 185, in
main(options, args)
File "c:\Python266\Scripts\pystretcher.py", line 157, in main
del stats,array, jobs, shared_arr.data, p
UnboundLocalError: local variable 'p' referenced before assignment
I would like to avoid having to physically split the raster into smaller rasters if possible.
Your help much appreciated!
Many thanks
Magda
The text was updated successfully, but these errors were encountered: