Merge branch 'master' of https://github.com/isce-framework/isce2 into UAVSAR
commit
c2ecbe2c23
|
@ -141,12 +141,13 @@ else:
|
||||||
gdal_version = os.popen('gdal-config --version').read()
|
gdal_version = os.popen('gdal-config --version').read()
|
||||||
print('GDAL version: {0}'.format(gdal_version))
|
print('GDAL version: {0}'.format(gdal_version))
|
||||||
try:
|
try:
|
||||||
|
gdal_majorversion = int(gdal_version.split('.')[0])
|
||||||
gdal_subversion = int(gdal_version.split('.')[1])
|
gdal_subversion = int(gdal_version.split('.')[1])
|
||||||
except:
|
except:
|
||||||
raise Exception('gdal-config not found. GDAL does not appear to be installed ... cannot proceed. If you have installed gdal, ensure that you have path to gdal-config in your environment')
|
raise Exception('gdal-config not found. GDAL does not appear to be installed ... cannot proceed. If you have installed gdal, ensure that you have path to gdal-config in your environment')
|
||||||
|
|
||||||
env['GDALISCXX11'] = None
|
env['GDALISCXX11'] = None
|
||||||
if gdal_subversion >= 3:
|
if (gdal_majorversion > 2) or (gdal_subversion >= 3):
|
||||||
env['GDALISCXX11'] = 'True'
|
env['GDALISCXX11'] = 'True'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ GDALAccessor::getStream (char * dataLine, int & numEl)
|
||||||
int ypos0 = LastPosition / LineWidth;
|
int ypos0 = LastPosition / LineWidth;
|
||||||
int xpos0 = LastPosition % LineWidth;
|
int xpos0 = LastPosition % LineWidth;
|
||||||
LastPosition += numEl;
|
LastPosition += numEl;
|
||||||
int ypos1 = (LastPosition - 1) / LineWidth;
|
int ypos1 = (LastPosition - std::streampos(1)) / LineWidth;
|
||||||
if (LastPosition * SizeV >= FileSize)
|
if (LastPosition * SizeV >= FileSize)
|
||||||
{
|
{
|
||||||
numEl -= LastPosition % LineWidth;
|
numEl -= LastPosition % LineWidth;
|
||||||
|
|
|
@ -145,7 +145,7 @@ PyObject * cpxlooks_C(PyObject* self, PyObject* args)
|
||||||
}
|
}
|
||||||
for(int j = 0; j < na; ++j)
|
for(int j = 0; j < na; ++j)
|
||||||
{
|
{
|
||||||
b[j] = b[j] + a[j]*pow(pha,j+1)*pow(phd,lineToGet);
|
b[j] = b[j] + a[j]*pow(pha,j+1.0f)*pow(phd,lineToGet*1.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(eofReached)
|
if(eofReached)
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
integer i, j, k
|
integer i, j, k
|
||||||
integer int_az_off
|
integer int_az_off
|
||||||
integer i_na
|
integer i_na
|
||||||
integer ith, thnum
|
integer ith, thnum, ithorig
|
||||||
|
|
||||||
integer ii, jj
|
integer ii, jj
|
||||||
integer chipi, chipj
|
integer chipi, chipj
|
||||||
|
@ -82,6 +82,7 @@
|
||||||
!$OMP END MASTER
|
!$OMP END MASTER
|
||||||
!$OMP END PARALLEL
|
!$OMP END PARALLEL
|
||||||
|
|
||||||
|
ithorig = ith
|
||||||
ith = min(ith,8)
|
ith = min(ith,8)
|
||||||
print *, 'Number of threads: ', ith
|
print *, 'Number of threads: ', ith
|
||||||
call omp_set_num_threads(ith)
|
call omp_set_num_threads(ith)
|
||||||
|
@ -283,6 +284,8 @@
|
||||||
deallocate(rout)
|
deallocate(rout)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
!Reset number of threads
|
||||||
|
call omp_set_num_threads(ithorig)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,7 @@ if __name__ == '__main__':
|
||||||
print('Lines: ' + str(min_LinePixel[0]) + '\t' + str(max_LinePixel[0]))
|
print('Lines: ' + str(min_LinePixel[0]) + '\t' + str(max_LinePixel[0]))
|
||||||
print('Pixels: ' + str(min_LinePixel[1]) + '\t' + str(max_LinePixel[1]))
|
print('Pixels: ' + str(min_LinePixel[1]) + '\t' + str(max_LinePixel[1]))
|
||||||
|
|
||||||
print('gdalwarp -to SRC_METHOD=NO_GEOTRANSFORM -of envi -te ' + str(min_LinePixel[1]) + ' ' + str(min_LinePixel[0]) + ' ' + str(max_LinePixel[1]) + ' ' + str(max_LinePixel[0]) + ' FILE FILE_NEW')
|
print('gdalwarp -to SRC_METHOD=NO_GEOTRANSFORM -of envi -te ' + str(min_LinePixel[1]) + ' ' + str(min_LinePixel[0]) + ' ' + str(max_LinePixel[1]) + ' ' + str(max_LinePixel[0]) + ' ')
|
||||||
# print('gdalwarp -to SRC_METHOD=NO_GEOTRANSFORM -of envi -co INTERLEAVE=BIP -te ' + str(min_LinePixel[1]) + ' ' + str(min_LinePixel[0]) + ' ' + str(max_LinePixel[1]) + ' ' + str(max_LinePixel[0]))
|
# print('gdalwarp -to SRC_METHOD=NO_GEOTRANSFORM -of envi -co INTERLEAVE=BIP -te ' + str(min_LinePixel[1]) + ' ' + str(min_LinePixel[0]) + ' ' + str(max_LinePixel[1]) + ' ' + str(max_LinePixel[0]))
|
||||||
print('gdal_translate -srcwin ' + str(min_LinePixel[1]) + ' ' + str(min_LinePixel[0]) + ' ' + str(max_LinePixel[1]-min_LinePixel[1]) + ' ' + str(max_LinePixel[0]-min_LinePixel[0]) + ' -of envi -co INTERLEAVE=BIP ' )
|
print('gdal_translate -srcwin ' + str(min_LinePixel[1]) + ' ' + str(min_LinePixel[0]) + ' ' + str(max_LinePixel[1]-min_LinePixel[1]) + ' ' + str(max_LinePixel[0]-min_LinePixel[0]) + ' -of envi -co INTERLEAVE=BIP ' )
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue