[Git][debian-gis-team/doris][master] Add patch to fix Python 3 support.

Bas Couwenberg gitlab at salsa.debian.org
Mon Jul 22 05:42:22 BST 2019



Bas Couwenberg pushed to branch master at Debian GIS Project / doris


Commits:
c160b9ab by Bas Couwenberg at 2019-07-22T04:41:51Z
Add patch to fix Python 3 support.

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/python3.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+doris (5.0.3~beta+dfsg-9) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * Add patch to fix Python 3 support.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Mon, 22 Jul 2019 06:41:39 +0200
+
 doris (5.0.3~beta+dfsg-8) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/patches/python3.patch
=====================================
@@ -0,0 +1,1175 @@
+Description: Fix support for Python 3.
+Author: Bas Couwenberg <sebastic at debian.org>
+
+--- a/bin/csk_dump_data.py
++++ b/bin/csk_dump_data.py
+@@ -15,26 +15,26 @@ from array import array
+ codeRevision=1.0   # this code revision number
+ 
+ def usage():
+-    print 'INFO    : @(#)Doris InSAR software, $Revision: %s $, $Author: TUDelft $' % codeRevision
+-    print
+-    print 'Usage   : csk_dump_data.py <inputfile> <outputfile> [l0 lN p0 pN] [-res RESFILE]'
+-    print
+-    print '          inputfile         is the input Cosmo-skymed HDF5 filename : master.hd5'
+-    print '          outputfile        is the output filename                  : master.slc'
+-    print '          l0                is the first azimuth line (starting at 1)'
+-    print '          lN                is the last azimuth line'
+-    print '          p0                is the first range pixel (starting at 1)'
+-    print '          pN                is the last range pixel'
+-    print '          RESFILE           DORIS result file that is to be updated for crop metadata (optional)'
+-    print
+-    print '          This software is part of Doris InSAR software package.\n'
+-    print '(c) 1999-2010 Delft University of Technology, the Netherlands.\n'
++    print('INFO    : @(#)Doris InSAR software, $Revision: %s $, $Author: TUDelft $' % codeRevision)
++    print('')
++    print('Usage   : csk_dump_data.py <inputfile> <outputfile> [l0 lN p0 pN] [-res RESFILE]')
++    print()
++    print('          inputfile         is the input Cosmo-skymed HDF5 filename : master.hd5')
++    print('          outputfile        is the output filename                  : master.slc')
++    print('          l0                is the first azimuth line (starting at 1)')
++    print('          lN                is the last azimuth line')
++    print('          p0                is the first range pixel (starting at 1)')
++    print('          pN                is the last range pixel')
++    print('          RESFILE           DORIS result file that is to be updated for crop metadata (optional)')
++    print()
++    print('          This software is part of Doris InSAR software package.\n')
++    print('(c) 1999-2010 Delft University of Technology, the Netherlands.\n')
+ 
+ try:
+     inputFileName  = sys.argv[1]
+     outputFileName = sys.argv[2]
+ except:
+-    print '\nError   : Unrecognized input or missing arguments\n\n'
++    print('\nError   : Unrecognized input or missing arguments\n\n')
+     usage()
+     sys.exit(1)
+ 
+@@ -42,7 +42,7 @@ except:
+ f = h5py.File(inputFileName, 'r')
+ sbi = f.get('/S01/SBI')
+ if f.parent.__contains__('/') == False or f.parent.__contains__('/S01') == False or f.parent.__contains__('/S01/SBI') == False :
+-   print 'ERROR: Wrong HDF5 format!'
++   print('ERROR: Wrong HDF5 format!')
+ data = array('h')
+ data = sbi[:,:,:]
+ Number_of_lines_original = sbi.shape[0]
+--- a/bin/csk_dump_header2doris.py
++++ b/bin/csk_dump_header2doris.py
+@@ -14,18 +14,18 @@ import numpy, h5py, sys, math, time, str
+ codeRevision=1.0   # this code revision number
+ 
+ def usage():
+-    print 'INFO    : @(#)Doris InSAR software, $Revision: %s $, $Author: TUDelft $' % codeRevision
+-    print
+-    print 'Usage   : python csk_dump_header2doris.py csk_HDF5_product > OutputFileName'
+-    print '                               where csk_HDF5_product is the input filename'
+-    print
+-    print '          This software is part of Doris InSAR software package.\n'
+-    print '(c) 1999-2010 Delft University of Technology, the Netherlands.\n'
++    print('INFO    : @(#)Doris InSAR software, $Revision: %s $, $Author: TUDelft $' % codeRevision)
++    print()
++    print('Usage   : python csk_dump_header2doris.py csk_HDF5_product > OutputFileName')
++    print('                               where csk_HDF5_product is the input filename')
++    print()
++    print('          This software is part of Doris InSAR software package.\n')
++    print('(c) 1999-2010 Delft University of Technology, the Netherlands.\n')
+ 
+ try:
+   inputFileName  = sys.argv[1]
+ except:
+-    print '\nError   : Unrecognized input or missing arguments\n\n'
++    print('\nError   : Unrecognized input or missing arguments\n\n')
+     usage()
+     sys.exit(1)
+ 
+@@ -38,7 +38,7 @@ qlk = s01.get('QLK')
+ 
+ 
+ if f.parent.__contains__('/') == False or f.parent.__contains__('/S01') == False or f.parent.__contains__('/S01/SBI') == False or f.parent.__contains__('/S01/B001') == False or f.parent.__contains__('/S01/QLK') == False :
+-   print 'ERROR: Wrong HDF5 format!'
++   print('ERROR: Wrong HDF5 format!')
+ 
+ # reading the attributes  
+ VolumeFile = f.attrs.__getitem__('Product Filename')
+--- a/bin/hhmmss2sec.py
++++ b/bin/hhmmss2sec.py
+@@ -2,20 +2,20 @@
+ import os,sys,time
+ 
+ def usage():
+-    print '\nUsage: python hhmmss2sec.py time'
+-    print '  where time in the form HH:MM:SS.sss .'
+-    print ' '
+-    print ' Example '
+-    print ' ./hhmmss2sec.py 16:36:40.393 '
+-    print '    59800.393000 '
+-    print ' '
+-    print ' See Also'
+-    print ' sec2hhmmss.py'
++    print('\nUsage: python hhmmss2sec.py time')
++    print('  where time in the form HH:MM:SS.sss .')
++    print(' ')
++    print(' Example ')
++    print(' ./hhmmss2sec.py 16:36:40.393 ')
++    print('    59800.393000 ')
++    print(' ')
++    print(' See Also')
++    print(' sec2hhmmss.py')
+     
+ try:
+     timeOfDay  = sys.argv[1] 
+ except:
+-    print 'Unrecognized input'
++    print('Unrecognized input')
+     usage()
+     sys.exit(1)
+ 
+@@ -25,4 +25,4 @@ mm  = float(timeOfDay[1]);
+ ss  = float(timeOfDay[2]);
+ 
+ secOfDay=hh*3600+mm*60+ss
+-print "%f" %(secOfDay)
++print( "%f" %(secOfDay))
+--- a/bin/rs2_dump_data.py
++++ b/bin/rs2_dump_data.py
+@@ -18,26 +18,26 @@ import xml.etree.ElementTree as etree  #
+ 
+ codeRevision=1.1   # this code revision number
+ def usage():
+-    print 'INFO    : @(#)Doris InSAR software, $Revision: %s $, $Author: TUDelft $' % codeRevision
+-    print
+-    print 'Usage   : rs2_dump_data.py <inputfile> <outputfile> [l0 lN p0 pN] [-res RESFILE]'
+-    print 
+-    print '          inputfile         is the input Radarsat-2 geotiff filename : master.tif'
+-    print '          outputfile        is the output filename                   : master.slc'
+-    print '          l0                is the first azimuth line (starting at 1)'
+-    print '          lN                is the last azimuth line'
+-    print '          p0                is the first range pixel (starting at 1)'
+-    print '          pN                is the last range pixel'
+-    print '          RESFILE           DORIS result file that is to be updated for crop metadata (optional)'
+-    print
+-    print '          This software is part of Doris InSAR software package.\n'
+-    print '(c) 1999-2010 Delft University of Technology, the Netherlands.\n'
++    print('INFO    : @(#)Doris InSAR software, $Revision: %s $, $Author: TUDelft $' % codeRevision)
++    print()
++    print('Usage   : rs2_dump_data.py <inputfile> <outputfile> [l0 lN p0 pN] [-res RESFILE]')
++    print()
++    print('          inputfile         is the input Radarsat-2 geotiff filename : master.tif')
++    print('          outputfile        is the output filename                   : master.slc')
++    print('          l0                is the first azimuth line (starting at 1)')
++    print('          lN                is the last azimuth line')
++    print('          p0                is the first range pixel (starting at 1)')
++    print('          pN                is the last range pixel')
++    print('          RESFILE           DORIS result file that is to be updated for crop metadata (optional)')
++    print()
++    print('          This software is part of Doris InSAR software package.\n')
++    print('(c) 1999-2010 Delft University of Technology, the Netherlands.\n')
+ 
+ try:
+     inputFileName  = sys.argv[1] 
+     outputFileName = sys.argv[2]
+ except:
+-    print '\nError   : Unrecognized input or missing arguments\n\n'
++    print('\nError   : Unrecognized input or missing arguments\n\n')
+     usage()
+     sys.exit(1)
+ 
+@@ -49,7 +49,7 @@ for element in range(len(sys.argv)):
+     option = sys.argv[element];
+     if option == '-res':
+         resFile = str(sys.argv[element+1])
+-#        print resFile
++#        print(resFile)
+         del sys.argv[element+1]
+         del sys.argv[element]
+         break
+@@ -66,7 +66,7 @@ elif len(sys.argv) > 3 and len(sys.argv)
+     outputWinFirstPix  = int(sys.argv[5])    # Firstpix
+     outputWinLastPix   = int(sys.argv[6])    # Lastpix
+ elif len(sys.argv) > 3 and len(sys.argv) < 7:
+-    print '\nError   : Unrecognized input or missing arguments\n\n'
++    print('\nError   : Unrecognized input or missing arguments\n\n')
+     usage()
+     sys.exit(1)
+ else:
+@@ -98,8 +98,8 @@ else:
+     print('INFO     : Adjusting first line and last line ') 
+     outputWinFirstLine = Nlines-in_LastLine+1
+     outputWinLastLine  = Nlines-in_FirstLine+1
+-    print Nlines, Npixls
+-    print outputWinFirstLine,outputWinLastLine,outputWinFirstPix,outputWinLastPix
++    print(Nlines, Npixls)
++    print(outputWinFirstLine,outputWinLastLine,outputWinFirstPix,outputWinLastPix)
+ 
+ if pixl_order == 'Increasing':
+     print('INFO     : Detected a imagery %s pixel time order' % pixl_order) 
+@@ -108,8 +108,8 @@ else:
+     print('INFO     : Adjusting first pixel and last pixel ') 
+     outputWinFirstPix = Npixls-in_LastPix+1
+     outputWinLastPix  = Npixls-in_FirstPix+1
+-    print Nlines, Npixls
+-    print outputWinFirstLine,outputWinLastLine,outputWinFirstPix,outputWinLastPix
++    print(Nlines, Npixls)
++    print(outputWinFirstLine,outputWinLastLine,outputWinFirstPix,outputWinLastPix)
+ 
+ 
+ # GDAL Extract image matrix using gdal_translate
+@@ -129,11 +129,11 @@ if outputWinFirstPix is not None:
+     #                                         xoff                  yoff                  xsize = width                     ysize= height
+     #                                        1 --> 0               1 --> 0
+     cmd = cmd + (' -srcwin %s %s %s %s' % (outputWinFirstPix-1,outputWinFirstLine-1,outputWinLastPix-outputWinFirstPix+1,outputWinLastLine-outputWinFirstLine+1))
+-    print cmd 
++    print(cmd)
+ 
+ failure = os.system(cmd)
+ if failure:
+-    print '%s: running %s failed' % (sys.argv[0],cmd)
++    print('%s: running %s failed' % (sys.argv[0],cmd))
+     sys.exit(1)
+ #else:
+ #    os.rename(os.path.splitext(outputFileName)[0]+'.j00',outputFileName)
+@@ -161,7 +161,7 @@ else:
+ 
+ failure = os.system(cmd)
+ if failure:
+-    print '%s: running %s failed' % (sys.argv[0],cmd)
++    print('%s: running %s failed' % (sys.argv[0],cmd))
+     sys.exit(1)
+ else:
+     os.remove(outputFileName+'.noflip')
+@@ -172,7 +172,7 @@ else:
+ # check whether the file exist!!!
+ if resFile is not None:
+ 
+-    print resFile
++    print(resFile)
+ 
+     # load header
+     #headerFileStream = open(os.path.splitext(outputFileName)[0]+'.hdr','r')
+@@ -181,7 +181,7 @@ if resFile is not None:
+         pair = line.split()
+         if len(pair) > 1:
+             vars()[pair[0]] = pair[2]   # set IMAGE_LINES and LINE_SAMPLES
+-#            print vars()[pair[0]]
++#            print(vars()[pair[0]])
+ 
+     # check whether the file exist
+     outStream = open(resFile,'a')
+--- a/bin/rs2_dump_header2doris.py
++++ b/bin/rs2_dump_header2doris.py
+@@ -30,20 +30,20 @@ from datetime import datetime
+ codeRevision=1.2   # this code revision number
+ 
+ def usage():
+-    print 'INFO    : @(#)Doris InSAR software, $Revision: %s $, $Author: TUDelft $' % codeRevision
+-    print
+-    print 'Usage   : python rs2_dump_header2doris.py rs2_XML_product > outputfile'
+-    print '                           where rs2_XML_product is the input filename'
+-    print
+-    print '          This software is part of Doris InSAR software package.\n'
+-    print '(c) 1999-2010 Delft University of Technology, the Netherlands.\n'
++    print('INFO    : @(#)Doris InSAR software, $Revision: %s $, $Author: TUDelft $' % codeRevision)
++    print()
++    print('Usage   : python rs2_dump_header2doris.py rs2_XML_product > outputfile')
++    print('                           where rs2_XML_product is the input filename')
++    print()
++    print('          This software is part of Doris InSAR software package.\n')
++    print('(c) 1999-2010 Delft University of Technology, the Netherlands.\n')
+ 
+ try:
+     inputFileName  = sys.argv[1]
+ #    outputFileName = sys.argv[2]
+ #    outStream      = open(outputFileName,'w')
+ except:
+-    print '\nError   : Unrecognized input or missing arguments\n\n'
++    print('\nError   : Unrecognized input or missing arguments\n\n')
+     usage()
+     sys.exit(1)
+ 
+@@ -184,7 +184,7 @@ if container['sceneBeam'] != 'S3': # Hac
+ 
+ # ---------------------------------------------------------------------------------------------------------
+ 
+-#print container['mission']
++#print(container['mission'])
+ #exit()
+ 
+ dummyVar = 'DUMMY'
+--- a/bin/sec2hhmmss.py
++++ b/bin/sec2hhmmss.py
+@@ -2,17 +2,17 @@
+ import os,sys,time
+ 
+ def usage():
+-    print '\nUsage: python sec2hhmmss.py time'
+-    print '  where time is the time of day in seconds.'
+-    print ' '
+-    print ' Example '
+-    print ' sec2hhmmss.py 59800.445398'
+-    print ' 16:36:40.393'
++    print('\nUsage: python sec2hhmmss.py time')
++    print('  where time is the time of day in seconds.')
++    print(' ')
++    print(' Example ')
++    print(' sec2hhmmss.py 59800.445398')
++    print(' 16:36:40.393')
+ 
+ try:
+     timeOfDay  = sys.argv[1] 
+ except:
+-    print 'Unrecognized input'
++    print('Unrecognized input')
+     usage()
+     sys.exit(1)
+ 
+@@ -22,4 +22,4 @@ hh = timeOfDay//3600
+ timeOfDay = timeOfDay%3600
+ mm = timeOfDay//60
+ ss = timeOfDay%60
+-print "%d:%d:%f" %(hh,mm,ss)
++print("%d:%d:%f" %(hh,mm,ss))
+--- a/bin/tsx_dump_data.py
++++ b/bin/tsx_dump_data.py
+@@ -2,20 +2,20 @@
+ import os,sys,time
+ 
+ def usage():
+-    print '\nUsage: python tsx_dump_data.py tsx_COSAR_product outputfile [l0 lN p0 pN] -res RESFILE'
+-    print '  where tsx_COSAR_product is the input filename'
+-    print '        outputfile        is the output filename'
+-    print '        l0                is the first azimuth line (starting at 1)'
+-    print '        lN                is the last azimuth line'
+-    print '        p0                is the first range pixel (starting at 1)'
+-    print '        pN                is the last range pixel'
+-    print '        RESFILE           DORIS result file that is to be updated for crop metadata'
++    print('\nUsage: python tsx_dump_data.py tsx_COSAR_product outputfile [l0 lN p0 pN] -res RESFILE')
++    print('  where tsx_COSAR_product is the input filename')
++    print('        outputfile        is the output filename')
++    print('        l0                is the first azimuth line (starting at 1)')
++    print('        lN                is the last azimuth line')
++    print('        p0                is the first range pixel (starting at 1)')
++    print('        pN                is the last range pixel')
++    print('        RESFILE           DORIS result file that is to be updated for crop metadata')
+ 
+ try:
+     inputFileName  = sys.argv[1]; 
+     outputFileName = sys.argv[2]
+ except:
+-    print 'Unrecognized input'
++    print('Unrecognized input')
+     usage()
+     sys.exit(1)
+ 
+@@ -27,7 +27,7 @@ for element in range(len(sys.argv)):
+     option = sys.argv[element];
+     if option == '-res':
+         resFile = str(sys.argv[element+1])
+-#        print resFile
++#        print(resFile)
+         del sys.argv[element+1]
+         del sys.argv[element]
+         break
+@@ -43,7 +43,7 @@ elif len(sys.argv) > 3 and len(sys.argv)
+     outputWinFirstPix  = int(sys.argv[5])-1    # gdal srcwin starting at 0
+     outputWinLastPix   = int(sys.argv[6])      # Lastpix  --> yoff  (later)
+ elif len(sys.argv) > 3 and len(sys.argv) < 7:
+-    print 'Unrecognized input'
++    print('Unrecognized input')
+     usage()
+     sys.exit(1)
+ else:
+@@ -63,11 +63,11 @@ cmd = '%s %s -ot %s -of %s %s' % (gdalCa
+ 
+ if outputWinFirstPix is not None:
+     cmd = cmd + (' -srcwin %s %s %s %s' % (outputWinFirstPix,outputWinFirstLine,outputWinLastPix-outputWinFirstPix,outputWinLastLine-outputWinFirstLine))
+-    #print cmd 
++    #print(cmd)
+ 
+ failure = os.system(cmd)
+ if failure:
+-    print '%s: running %s failed' % (sys.argv[0],cmd)
++    print('%s: running %s failed' % (sys.argv[0],cmd))
+     sys.exit(1)
+ else:
+     os.rename(os.path.splitext(outputFileName)[0]+'.j00',outputFileName)
+@@ -76,7 +76,7 @@ else:
+ # check whether the file exist!!!
+ if resFile is not None:
+ 
+-    print resFile
++    print(resFile)
+ 
+     # load header
+     headerFileStream = open(os.path.splitext(outputFileName)[0]+'.hdr','r')
+@@ -84,7 +84,7 @@ if resFile is not None:
+         pair = line.split()
+         if len(pair) > 1:
+             vars()[pair[0]] = pair[2]   # set IMAGE_LINES and LINE_SAMPLES
+-#            print vars()[pair[0]]
++#            print(vars()[pair[0]])
+ 
+     # check whether the file exist
+     outStream = open(resFile,'a')
+--- a/bin/tsx_dump_header2doris.py
++++ b/bin/tsx_dump_header2doris.py
+@@ -12,16 +12,16 @@ import string, time, sys
+ #import types
+ 
+ def usage():
+-    print '\nUsage: python tsx_dump_header2doris.py tsx_XML_product > outputfile'
+-    print '  where tsx_XML_product is the input filename'
+-#    print '        outputfile      is the output DORIS resultfile'
++    print('\nUsage: python tsx_dump_header2doris.py tsx_XML_product > outputfile')
++    print('  where tsx_XML_product is the input filename')
++#    print('        outputfile      is the output DORIS resultfile')
+ 
+ try:
+     inputFileName  = sys.argv[1]
+ #    outputFileName = sys.argv[2]
+ #    outStream      = open(outputFileName,'w')
+ except:
+-    print 'Unrecognized input'
++    print('Unrecognized input')
+     usage()
+     sys.exit(1)
+ 
+--- a/bin/tsx_dump_header2doris_noxpath.py
++++ b/bin/tsx_dump_header2doris_noxpath.py
+@@ -12,16 +12,16 @@ import string, time, sys
+ #import types
+ 
+ def usage():
+-    print '\nUsage: python tsx_dump_header2doris.py tsx_XML_product > outputfile'
+-    print '  where tsx_XML_product is the input filename'
+-#    print '        outputfile      is the output DORIS resultfile'
++    print('\nUsage: python tsx_dump_header2doris.py tsx_XML_product > outputfile')
++    print('  where tsx_XML_product is the input filename')
++#    print('        outputfile      is the output DORIS resultfile')
+ 
+ try:
+     inputFileName  = sys.argv[1]
+ #    outputFileName = sys.argv[2]
+ #    outStream      = open(outputFileName,'w')
+ except:
+-    print 'Unrecognized input'
++    print('Unrecognized input')
+     usage()
+     sys.exit(1)
+ 
+--- a/doris_stack/functions/ESD_functions.py
++++ b/doris_stack/functions/ESD_functions.py
+@@ -262,7 +262,7 @@ def apply_ESD_Nida(diffBursts, Df_DC, PR
+             ph_res = ph_esd - ph_est
+ 
+             ph_test[k] = np.nanmean(np.angle(exp(1j * ph_res[:]))) # should be ph_test(k) = np.nanmean(exp(1i*ph_res[:]))
+-            #print ph_test
++            #print(ph_test)
+ 
+         ind = np.argmin(abs(ph_test))
+         D_az_min.append(D_azs[ind])
+@@ -278,7 +278,7 @@ def apply_ESD_Nida(diffBursts, Df_DC, PR
+         D_azs = np.linspace(D_azs[ind]-D_az_span, D_azs[ind]+D_az_span,num=7)
+         del ph_test
+ 
+-    #print 'amount of loops in iteration ' + str(c)
++    #print('amount of loops in iteration ' + str(c))
+ 
+     pix_offset = offset / (PRF/(2*np.pi*np.nanmean(Df_DC[:])))
+ 
+--- a/doris_stack/functions/do_deramp_SLC.py
++++ b/doris_stack/functions/do_deramp_SLC.py
+@@ -8,25 +8,25 @@ import sys
+ 
+ 
+ def usage():
+-    print '\nUsage: python do_deramp_SLC_nom.py dataFilename  resFilename plotFlag'
+-    print '  where dataFilename     is the name of burst you want to deramp'
+-    print '        resFilename      is the .res file of burst'
+-    print '        plotFlag         is a boolean var, to plot only'
+-    print '                         default of doPlot is false'
+-    print ' This function removes the phase ramp (Doppler centroid variations) from single burst of' 
+-    print ' RS2 or S1 TOPS acquisition. The original binary image at path '
+-    print " DATAFILENAME is saved in 'DATAFILENAME'.orig, whereas the new instance " 
+-    print ' will be characterized by baseband spectrum. The function also requires '
+-    print ' the .res file RESFILENAME.                                             '     
+-    print '  for example                                                           '
+-    print ' python  do_deramp_SLC.py   20140821_iw_2_burst_1.raw slave.res False   '
+-    print ' created by Gert Mulder'
+-    print ' Part of code adapted from Lorenzo Iannini and Wu Wenhao'
++    print('\nUsage: python do_deramp_SLC_nom.py dataFilename  resFilename plotFlag')
++    print('  where dataFilename     is the name of burst you want to deramp')
++    print('        resFilename      is the .res file of burst')
++    print('        plotFlag         is a boolean var, to plot only')
++    print('                         default of doPlot is false')
++    print(' This function removes the phase ramp (Doppler centroid variations) from single burst of')
++    print(' RS2 or S1 TOPS acquisition. The original binary image at path ')
++    print(" DATAFILENAME is saved in 'DATAFILENAME'.orig, whereas the new instance " )
++    print(' will be characterized by baseband spectrum. The function also requires ')
++    print(' the .res file RESFILENAME.                                             ')
++    print('  for example                                                           ')
++    print(' python  do_deramp_SLC.py   20140821_iw_2_burst_1.raw slave.res False   ')
++    print(' created by Gert Mulder')
++    print(' Part of code adapted from Lorenzo Iannini and Wu Wenhao')
+ try:
+     dataFilename = sys.argv[1]
+     resFilename = sys.argv[2]
+ except:
+-    print 'Unrecognized input'
++    print('Unrecognized input')
+     usage()
+     sys.exit(1)
+ 
+@@ -78,4 +78,4 @@ else:  # cpxint16
+ fid.write(slc_dat)
+ fid.close()
+ 
+-print "\nDeramp operation completed\n"
++print("\nDeramp operation completed\n")
+--- a/doris_stack/functions/do_reramp_SLC.py
++++ b/doris_stack/functions/do_reramp_SLC.py
+@@ -7,24 +7,24 @@ from doris.doris_stack.main_code.resdata
+ import sys
+ 
+ def usage():
+-    print '\nUsage: python  do_reramp_SLC.py dataFilename resFilename resampled'
+-    print '  where dataFilename        is the name of burst you want to deramp'
+-    print '        resFilename         is the .res file of burst              '
+-    print ' This python applies the inverse phase ramp to the burst pointed by DATAFILENAME (slc)'
+-    print ' and RESFILENAME (res) that was deramped by deramp_SLC.m. The phase screen'
+-    print ' must account for the new resampled grids PIXRGGRID and PIXAZGRID    '
+-    print ' [Nlines_mst x Nsamples_mst] that contain the time coordinates of the'
+-    print ' resampled image into the master grid:                               '
+-    print '  for example                                                        '
+-    print ' python   do_reramp_SLC.py slave_rsmp.raw slave.res False            '
+-    print ' created by Gert Mulder'
+-    print ' Part of code adapted from Lorenzo Iannini and Wu Wenhao'
++    print('\nUsage: python  do_reramp_SLC.py dataFilename resFilename resampled')
++    print('  where dataFilename        is the name of burst you want to deramp')
++    print('        resFilename         is the .res file of burst              ')
++    print(' This python applies the inverse phase ramp to the burst pointed by DATAFILENAME (slc)')
++    print(' and RESFILENAME (res) that was deramped by deramp_SLC.m. The phase screen')
++    print(' must account for the new resampled grids PIXRGGRID and PIXAZGRID    ')
++    print(' [Nlines_mst x Nsamples_mst] that contain the time coordinates of the')
++    print(' resampled image into the master grid:                               ')
++    print('  for example                                                        ')
++    print(' python   do_reramp_SLC.py slave_rsmp.raw slave.res False            ')
++    print(' created by Gert Mulder')
++    print(' Part of code adapted from Lorenzo Iannini and Wu Wenhao')
+ try:
+     dataFilename = sys.argv[1]
+     resFilename = sys.argv[2]
+      
+ except:
+-    print 'Unrecognized input'
++    print('Unrecognized input')
+     usage()
+     sys.exit(1)
+ if len(sys.argv) == 3:
+@@ -32,7 +32,7 @@ if len(sys.argv) == 3:
+ elif len(sys.argv) == 4:
+     resampled = sys.argv[3]
+ else:
+-    print 'Unrecognized input'
++    print('Unrecognized input')
+     usage()
+     sys.exit(1)
+ 
+@@ -96,4 +96,4 @@ else:  # cpxint16
+ fid.write(slc_dat)
+ fid.close()
+ 
+-print "\nReramp operation completed\n"
++print("\nReramp operation completed\n")
+--- a/doris_stack/functions/get_ramp.py
++++ b/doris_stack/functions/get_ramp.py
+@@ -67,7 +67,7 @@ def get_ramp(res_file, resampled=0, type
+             os.remove(Link_DATA)
+ 
+         RAW_DATA_ABSOLUTE_PATH=os.path.abspath(Link_rsmp_orig_slave_pixel)
+-        print "RAW_DATA_ABSOLUTE_PATH=", RAW_DATA_ABSOLUTE_PATH
++        print("RAW_DATA_ABSOLUTE_PATH=", RAW_DATA_ABSOLUTE_PATH)
+         os.symlink(RAW_DATA_ABSOLUTE_PATH,Link_DATA)
+ 
+         outStream      = open(Path_MFF_HDR,'w')
+@@ -99,7 +99,7 @@ def get_ramp(res_file, resampled=0, type
+ 
+ 
+         RAW_DATA_ABSOLUTE_PATH=os.path.abspath(Link_rsmp_orig_slave_line)
+-        print "RAW_DATA_ABSOLUTE_PATH=", RAW_DATA_ABSOLUTE_PATH
++        print("RAW_DATA_ABSOLUTE_PATH=", RAW_DATA_ABSOLUTE_PATH)
+         os.symlink(RAW_DATA_ABSOLUTE_PATH,Link_DATA)
+ 
+         outStream      = open(Path_MFF_HDR,'w')
+@@ -137,7 +137,7 @@ def get_ramp(res_file, resampled=0, type
+         TazGrid = np.tile(Tvect_az, (1, Nrg_res))
+         
+     else:
+-        print 'variable resampled can only be 0 or 1!'
++        print('variable resampled can only be 0 or 1!')
+         return
+ 
+     #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@@ -200,7 +200,7 @@ def get_ramp(res_file, resampled=0, type
+     elif type == 'DC':
+         data = Df_AzCtr + Taz_vec * DR_est 
+     else:
+-        print 'Choose either chirp or DC for type'
++        print('Choose either chirp or DC for type')
+         return
+ 
+     return data
+@@ -260,23 +260,23 @@ def freadbk(path_file,line_start=1, pixe
+     gdal.AllRegister()
+     thisBurstData_file=gdal.Open(path_file,GA_ReadOnly)
+     if thisBurstData_file is None:
+-        print 'Could not open'+Path_MFF_HDR
++        print('Could not open'+Path_MFF_HDR)
+         sys.exit(1)
+-    #print 'Driver: ', thisBurstData_file.GetDriver().ShortName,'/', \
+-    #      thisBurstData_file.GetDriver().LongName
+-    #print 'Size is ',thisBurstData_file.RasterXSize,'x',thisBurstData_file.RasterYSize, \
+-    #      'x',thisBurstData_file.RasterCount
+-    #print 'Projection is ',thisBurstData_file.GetProjection()
++    #print('Driver: ', thisBurstData_file.GetDriver().ShortName,'/', \
++    #      thisBurstData_file.GetDriver().LongName)
++    #print('Size is ',thisBurstData_file.RasterXSize,'x',thisBurstData_file.RasterYSize, \
++    #      'x',thisBurstData_file.RasterCount)
++    #print('Projection is ',thisBurstData_file.GetProjection())
+     geotransform = thisBurstData_file.GetGeoTransform()
+     if not geotransform is None:
+-        print 'Origin = (',geotransform[0], ',',geotransform[3],')'
+-        print 'Pixel Size = (',geotransform[1], ',',geotransform[5],')'
++        print('Origin = (',geotransform[0], ',',geotransform[3],')')
++        print('Pixel Size = (',geotransform[1], ',',geotransform[5],')')
+ 
+     cint_srd=thisBurstData_file.GetRasterBand(1)
+-    #print 'Band Type=',gdal.GetDataTypeName(cint_srd.DataType)
++    #print('Band Type=',gdal.GetDataTypeName(cint_srd.DataType))
+ 
+     if cint_srd.GetOverviewCount() > 0:
+-            print 'Band has ', cint_srd.GetOverviewCount(), ' overviews.'
++            print('Band has ', cint_srd.GetOverviewCount(), ' overviews.')
+     thisBurstData= cint_srd.ReadAsArray(int(pixels_start-1),int(line_start-1),nofPixels1,nofLines1)
+     return thisBurstData
+ ##################################################################################
+--- a/doris_stack/functions/get_winpos.py
++++ b/doris_stack/functions/get_winpos.py
+@@ -6,15 +6,15 @@ from gdalconst import *
+ from scipy import ndimage
+ 
+ def usage():
+-    print '\nUsage: python get_winpos.py dataFile resFile Nwin outFile                        '
+-    print 'where   dataFile           is the name of burst you want to deramp                 '
+-    print '        resFile            is the .res file of burst                               '
+-    print '        Nwin               number of windows to be distributed over the total image'
+-    print '        outFile            output file name                                        '
+-    print '  for example                                                                      '
+-    print ' python get_winpos.py 20141003_iw_1_burst_1.raw 20141003_iw_1_burst_1.res 2001 winpos_fine.asc'
+-    print ' matlab: TU Delft                                                                  '
+-    print ' Python: Wu Wenhao   Wuhan QQ:460249274                                            '
++    print('\nUsage: python get_winpos.py dataFile resFile Nwin outFile                        ')
++    print('where   dataFile           is the name of burst you want to deramp                 ')
++    print('        resFile            is the .res file of burst                               ')
++    print('        Nwin               number of windows to be distributed over the total image')
++    print('        outFile            output file name                                        ')
++    print('  for example                                                                      ')
++    print(' python get_winpos.py 20141003_iw_1_burst_1.raw 20141003_iw_1_burst_1.res 2001 winpos_fine.asc')
++    print(' matlab: TU Delft                                                                  ')
++    print(' Python: Wu Wenhao   Wuhan QQ:460249274                                            ')
+ try:
+     dataFile   = sys.argv[1]
+     resFile    = sys.argv[2]
+@@ -22,7 +22,7 @@ try:
+     outFile    = sys.argv[4]
+   
+ except:
+-    print 'Unrecognized input'
++    print('Unrecognized input')
+     usage()
+     sys.exit(1)
+ 
+@@ -79,23 +79,23 @@ def freadbk(path_file,line_start=1, Pixe
+     gdal.AllRegister()
+     thisBurstData_file=gdal.Open(path_file,GA_ReadOnly)
+     if thisBurstData_file is None:
+-        print 'Could not open'+Path_MFF_HDR
++        print('Could not open'+Path_MFF_HDR)
+         sys.exit(1)
+-    #print 'Driver: ', thisBurstData_file.GetDriver().ShortName,'/', \
+-    #      thisBurstData_file.GetDriver().LongName
+-    #print 'Size is ',thisBurstData_file.RasterXSize,'x',thisBurstData_file.RasterYSize, \
+-    #      'x',thisBurstData_file.RasterCount
+-    #print 'Projection is ',thisBurstData_file.GetProjection()
++    #print('Driver: ', thisBurstData_file.GetDriver().ShortName,'/', \
++    #      thisBurstData_file.GetDriver().LongName)
++    #print('Size is ',thisBurstData_file.RasterXSize,'x',thisBurstData_file.RasterYSize, \
++    #      'x',thisBurstData_file.RasterCount)
++    #print('Projection is ',thisBurstData_file.GetProjection())
+     geotransform = thisBurstData_file.GetGeoTransform()
+     #if not geotransform is None:
+-    #    print 'Origin = (',geotransform[0], ',',geotransform[3],')'
+-    #    print 'Pixel Size = (',geotransform[1], ',',geotransform[5],')'
++    #    print('Origin = (',geotransform[0], ',',geotransform[3],')')
++    #    print('Pixel Size = (',geotransform[1], ',',geotransform[5],')')
+ 
+     cint_srd=thisBurstData_file.GetRasterBand(1)
+-    #print 'Band Type=',gdal.GetDataTypeName(cint_srd.DataType)
++    #print('Band Type=',gdal.GetDataTypeName(cint_srd.DataType))
+ 
+     if cint_srd.GetOverviewCount() > 0:
+-            print 'Band has ', cint_srd.GetOverviewCount(), ' overviews.'
++            print('Band has ', cint_srd.GetOverviewCount(), ' overviews.'))
+     thisBurstData= cint_srd.ReadAsArray(int(Pixels_start-1),int(line_start-1),nofPixels1,nofLines1)
+     return thisBurstData
+ ###############################################################################
+@@ -135,8 +135,8 @@ else:#original data
+ # Image size
+ Nlines = lN-l0+1;
+ Npixels = pN-p0+1;
+-print "Nlines =",Nlines 
+-print "Npixels =",Npixels
++print("Nlines =",Nlines)
++print("Npixels =",Npixels)
+ 
+ 
+ Ngrid = float(Nwin)/NwinGrid;
+@@ -180,7 +180,7 @@ outStream.close()
+ if (os.path.exists(Link_CINT_SRD)):
+     os.remove(Link_CINT_SRD)
+ RAW_CINT_SRD_ABSOLUTE_PATH=os.path.abspath(RAW_CINT_SRD)
+-print "RAW_CINT_SRD_ABSOLUTE_PATH=", RAW_CINT_SRD_ABSOLUTE_PATH
++print("RAW_CINT_SRD_ABSOLUTE_PATH=", RAW_CINT_SRD_ABSOLUTE_PATH)
+ os.symlink(RAW_CINT_SRD_ABSOLUTE_PATH,Link_CINT_SRD)
+ 
+ 
+@@ -211,8 +211,8 @@ for v in range(1,int(Ngrid_az)+1):
+ fidRes        = open(outFile,'w')
+ cols = winpos.shape[1]
+ rows = winpos.shape[0]        
+-#print "cols = ",cols
+-print "rows = ", rows
++#print("cols = ",cols)
++print("rows = ", rows)
+ for i_temp in range(0,rows):       
+     fidRes.write( '%d   %d\n' % (winpos[i_temp,0]+1,winpos[i_temp,1]+1))      
+ fidRes.close()
+--- a/doris_stack/functions/orbit_coordinates.py
++++ b/doris_stack/functions/orbit_coordinates.py
+@@ -181,7 +181,7 @@ def intrp_orbit(line,container,burst_num
+     acc_x = np.kron(np.ones(len(container['orbitTime'])),np.polyder(np.polyder(coef_x)))
+     acc_y = np.kron(np.ones(len(container['orbitTime'])),np.polyder(np.polyder(coef_y)))
+     acc_z = np.kron(np.ones(len(container['orbitTime'])),np.polyder(np.polyder(coef_z)))
+-    #print 'acc_x.shape=',acc_x.shape
++    #print('acc_x.shape=',acc_x.shape)
+ 
+     # interpolated orbit
+     norm_orbit = np.array([orbit_time, orbit_x,orbit_y,orbit_z,vel_x,  vel_y,  vel_z,acc_x,  acc_y,  acc_z]);
+@@ -223,4 +223,4 @@ def hms2sec(hmsString,convertFlag='float
+     elif convertFlag == 'float' :
+         return float(secString)
+     else:
+-        return int(secString)
+\ No newline at end of file
++        return int(secString)
+--- a/doris_stack/functions/precise_read.py
++++ b/doris_stack/functions/precise_read.py
+@@ -19,7 +19,7 @@ def orbit_read(input_EOF_FileName):
+             from lxml import etree
+         except:
+             #import xml.etree.ElementTree as etree
+-            print 'Failed to load lxml.etree or xml.etree.cElementTree'
++            print('Failed to load lxml.etree or xml.etree.cElementTree')
+             sys.exit(1)
+ 
+     inTree = etree.parse(input_EOF_FileName)
+@@ -152,4 +152,4 @@ def hms2sec(hmsString,convertFlag='float
+     elif convertFlag == 'float' :
+         return float(secString)
+     else:
+-        return int(secString)
+\ No newline at end of file
++        return int(secString)
+--- a/doris_stack/functions/resdata.py
++++ b/doris_stack/functions/resdata.py
+@@ -76,7 +76,7 @@ class ResData(object):
+                         temp[name] = [line]
+ 
+                 except:
+-                    print 'Error occurred at line: ' + line
++                    print('Error occurred at line: ' + line)
+ 
+     def process_reader(self,processes = ''):
+         # This function reads random processes based on standard buildup of processes in res files.
+@@ -171,7 +171,7 @@ class ResData(object):
+                             row += 1
+ 
+                 except:
+-                    print 'Error occurred at line: ' + line
++                    print('Error occurred at line: ' + line)
+ 
+     def process_spacing(self,process=''):
+ 
+@@ -401,4 +401,4 @@ class ResData(object):
+                 warnings.warn('This variable does not exist: ' + str(variable))
+                 return
+ 
+-        return data
+\ No newline at end of file
++        return data
+--- a/doris_stack/functions/sentinel_dump_data_function.py
++++ b/doris_stack/functions/sentinel_dump_data_function.py
+@@ -22,7 +22,7 @@ def dump_data(input_file,res_file, outpu
+ 
+     if not coordinates:
+         if res_vars.process_control['crop'] == '0':
+-            print 'There is no information available about how to crop this file!'
++            print('There is no information available about how to crop this file!')
+             return
+         else:
+             outputWinFirstPix = int(res_vars.processes['crop']['First_pixel (w.r.t. original_image)'])
+@@ -58,7 +58,7 @@ def dump_data(input_file,res_file, outpu
+ 
+     failure = os.system(cmd)
+     if failure:
+-        print '%s: running %s failed' % (sys.argv[0],cmd)
++        print('%s: running %s failed' % (sys.argv[0],cmd))
+         sys.exit(1)
+     else:
+         os.rename(os.path.splitext(output_file)[0]+'.j00',output_file)
+--- a/doris_stack/functions/xml_query.py
++++ b/doris_stack/functions/xml_query.py
+@@ -13,7 +13,7 @@ def xml_query(input_xml):
+             from lxml import etree
+         except:
+             #import xml.etree.ElementTree as etree
+-            print 'Failed to load lxml.etree or xml.etree.cElementTree'
++            print('Failed to load lxml.etree or xml.etree.cElementTree')
+             sys.exit(1)
+ 
+     inTree = etree.parse(input_xml)
+--- a/doris_stack/main_code/doris_parameters.py
++++ b/doris_stack/main_code/doris_parameters.py
+@@ -81,28 +81,28 @@ class DorisParameters():
+         # Print parameters, check if paths exist
+         #
+ 
+-        print 'self.shape_dat: ' + self.shape_dat
++        print('self.shape_dat: ' + self.shape_dat)
+         # self._check_path_exists(self.shape_dat)
+-        print 'self.track_dir:	' + self.track_dir
++        print('self.track_dir:	' + self.track_dir)
+         self._check_path_exists(self.track_dir)
+-        print 'self.stack_path:	' + self.stack_path
++        print('self.stack_path:	' + self.stack_path)
+         # self._check_path_exists(self.stack_path)
+-        print 'self.precise_orbits:	' + self.precise_orbits
++        print('self.precise_orbits:	' + self.precise_orbits)
+         self._check_path_exists(self.precise_orbits)
+-        print 'self.input_files:	' + self.input_files
++        print('self.input_files:	' + self.input_files)
+         # self._check_path_exists(self.input_files)
+-#        print 'self.main_code_folder:	' + self.main_code_folder
++#        print('self.main_code_folder:	' + self.main_code_folder)
+ #        self._check_path_exists(self.main_code_folder)
+-#        print 'self.script_folder:	' + self.script_folder
++#        print('self.script_folder:	' + self.script_folder)
+ #        self._check_path_exists(self.script_folder)
+-        print 'self.nr_of_jobs:	' + str(self.nr_of_jobs)
+-        print 'self.initialize_flag:	' + str(self.initialize_flag)
+-        print 'self.jobHandlerScript:	' + self.job_handler_script
++        print('self.nr_of_jobs:	' + str(self.nr_of_jobs))
++        print('self.initialize_flag:	' + str(self.initialize_flag))
++        print('self.jobHandlerScript:	' + self.job_handler_script)
+         self._check_path_exists(self.job_handler_script)
+ 
+     def _check_path_exists(self, path):
+         if not(os.path.exists(path)):
+-            print 'Error Doris_Parameters: path ' + path + ' does not exist'
++            print('Error Doris_Parameters: path ' + path + ' does not exist')
+             
+     def _settings_get(self, string):
+         return self.settings.find('*/' + string).text
+--- a/doris_stack/main_code/doris_parameters_path.py
++++ b/doris_stack/main_code/doris_parameters_path.py
+@@ -7,6 +7,6 @@ class DorisParameters_Path(object):
+     def set(self, doris_parameters_path):
+             if(os.path.exists(doris_parameters_path)):
+                 sys.path.append(os.path.split(doris_parameters_path)[0])
+-                print 'dorisparameter path: ' + doris_parameters_path
++                print('dorisparameter path: ' + doris_parameters_path)
+             else:
+-                print 'dorisparameter path: ' + doris_parameters_path + ' not a valid path'
++                print('dorisparameter path: ' + doris_parameters_path + ' not a valid path')
+--- a/doris_stack/main_code/doris_sentinel_1.py
++++ b/doris_stack/main_code/doris_sentinel_1.py
+@@ -14,7 +14,7 @@ class DorisSentinel1(object):
+ 
+     def run(self, doris_parameters_path, start_date, end_date, master_date):
+ 
+-        print 'start sentinel 1 processing'
++        print('start sentinel 1 processing')
+ 
+         #Set your input variables here. You should use absolute paths.
+         dorisParameters = DorisParameters(doris_parameters_path)
+@@ -175,5 +175,5 @@ class DorisSentinel1(object):
+ 
+         profile.log_time_stamp('end')
+ 
+-        print 'end sentinel 1 processing'
++        print('end sentinel 1 processing')
+ 
+--- a/doris_stack/main_code/dorisparameters.py
++++ b/doris_stack/main_code/dorisparameters.py
+@@ -88,27 +88,27 @@ class DorisParameters():
+         # Print parameters, check if paths exist
+         #
+ 
+-        print 'self.shape_dat: ' + self.shape_dat
++        print('self.shape_dat: ' + self.shape_dat)
+         # self._check_path_exists(self.shape_dat)
+-        print 'self.track_dir:	' + self.track_dir
++        print('self.track_dir:	' + self.track_dir)
+         self._check_path_exists(self.track_dir)
+-        print 'self.stack_path:	' + self.stack_path
++        print('self.stack_path:	' + self.stack_path)
+         # self._check_path_exists(self.stack_path)
+-        print 'self.precise_orbits:	' + self.precise_orbits
++        print('self.precise_orbits:	' + self.precise_orbits)
+         self._check_path_exists(self.precise_orbits)
+-        print 'self.input_files:	' + self.input_files
++        print('self.input_files:	' + self.input_files)
+         # self._check_path_exists(self.input_files)
+-#        print 'self.main_code_folder:	' + self.main_code_folder
++#        print('self.main_code_folder:	' + self.main_code_folder)
+ #        self._check_path_exists(self.main_code_folder)
+-#        print 'self.script_folder:	' + self.script_folder
++#        print('self.script_folder:	' + self.script_folder)
+ #        self._check_path_exists(self.script_folder)
+-        print 'self.nr_of_jobs:	' + str(self.nr_of_jobs)
+-        print 'self.jobHandlerScript:	' + self.job_handler_script
++        print('self.nr_of_jobs:	' + str(self.nr_of_jobs))
++        print('self.jobHandlerScript:	' + self.job_handler_script)
+         self._check_path_exists(self.job_handler_script)
+ 
+     def _check_path_exists(self, path):
+         if not(os.path.exists(path)):
+-            print 'Error Doris_Parameters: path ' + path + ' does not exist'
++            print('Error Doris_Parameters: path ' + path + ' does not exist')
+             
+     def _settings_get(self, string):
+         return self.settings.find('*/' + string).text
+--- a/doris_stack/main_code/jobs.py
++++ b/doris_stack/main_code/jobs.py
+@@ -109,11 +109,11 @@ class Jobs(object):
+         self._start_jobs()
+         while len(self.jobs_active):
+             if(self.verbose):
+-                print time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()) + "jobs busy"
++                print(time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()) + "jobs busy")
+             time.sleep(self.between_sleep_time)
+             self._check_active_jobs()
+             self._start_jobs()
+         if (self.verbose):
+-            print time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()) + "jobs finished"
++            print(time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()) + "jobs finished")
+         time.sleep(self.end_sleep_time)
+         self._cleanup_flag_dir()
+--- a/doris_stack/main_code/resdata.py
++++ b/doris_stack/main_code/resdata.py
+@@ -76,7 +76,7 @@ class ResData(object):
+                         temp[name] = [line]
+ 
+                 except:
+-                    print 'Error occurred at line: ' + line
++                    print('Error occurred at line: ' + line)
+ 
+     def process_reader(self,processes = ''):
+         # This function reads random processes based on standard buildup of processes in res files.
+@@ -171,7 +171,7 @@ class ResData(object):
+                             row += 1
+ 
+                 except:
+-                    print 'Error occurred at line: ' + line
++                    print('Error occurred at line: ' + line)
+ 
+     def process_spacing(self,process=''):
+ 
+@@ -401,4 +401,4 @@ class ResData(object):
+                 warnings.warn('This variable does not exist: ' + str(variable))
+                 return
+ 
+-        return data
+\ No newline at end of file
++        return data
+--- a/doris_stack/main_code/single_master_stack.py
++++ b/doris_stack/main_code/single_master_stack.py
+@@ -122,7 +122,7 @@ class SingleMaster(object):
+         self.master_key = self.master_date[:4] + self.master_date[5:7] + self.master_date[8:10]
+ 
+         if not master_date in self.stack.keys():
+-            print 'Master date is not part of the datastack. If you do not need to initialize anymore this is not a problem.'
++            print('Master date is not part of the datastack. If you do not need to initialize anymore this is not a problem.')
+ 
+     def baseline(self):
+         # Create baseline plot of datastack. Usefull to select the right master
+@@ -1238,7 +1238,7 @@ class SingleMaster(object):
+                 x1.append(int(self.stack[date][burst][type].processes['readfiles']['Last_pixel (w.r.t. output_image)']))
+ 
+             for b1 in range(len(bursts)):
+-                print 'hello'
++                print('hello')
+ 
+     def esd(self, esd_type='ps', max_baseline='200'):
+ 
+@@ -1858,7 +1858,7 @@ class SingleMaster(object):
+ 
+             # First create an phase input file for unwrapping
+             pixels = self.full_swath[date]['ifgs'].processes['filtphase']['Number of pixels (multilooked)']
+-            print pixels
++            print(pixels)
+             pha = ' -w ' + pixels + ' -q phase -o float -M 1/1 -f cr4 -l1 ' \
+                                     '-p1 -P' + pixels + ' cint_filt_ml.raw > unwrap_input.raw'
+             os.system(self.cpxfiddle + pha)
+--- a/doris_stack/main_code/stack.py
++++ b/doris_stack/main_code/stack.py
+@@ -121,7 +121,7 @@ class StackData(object):
+             if os.path.exists(precise_dir):
+                 self.precise_orbits = precise_dir
+             else:
+-                print 'Precise orbit path does not exist'
++                print('Precise orbit path does not exist')
+ 
+     def add_path(self,path):
+         # This function adds the output path.
+@@ -584,7 +584,7 @@ class StackData(object):
+                         read['Number_of_lines_output_image'] = str(max_line)
+                         self.datastack[date][swath]['burst_' + str(burst+1)].processes['readfiles'] = read
+                     else:
+-                        print 'No resfile available, so information is not added to resfile'
++                        print('No resfile available, so information is not added to resfile')
+ 
+     def write_stack(self,write_path='',no_data=False):
+         # This function writes the full datastack to a given folder using the dates / swaths / bursts setup. This
+--- a/doris_stack/main_code/swath.py
++++ b/doris_stack/main_code/swath.py
+@@ -58,8 +58,8 @@ class SwathMeta(object):
+             data = [os.path.join(path,'measurement',x) for x in data if x[12:14] in pol and x[6] == swath_no]
+ 
+         # Check if the data is there and if the filenames coincide.
+-        # print xml + str(len(xml))
+-        # print data + str(len(data))
++        # print(xml + str(len(xml)))
++        # print(data + str(len(data)))
+ 
+         if type(xml) is str:
+             xml = [xml]
+--- a/prepare_stack/create_dem.py
++++ b/prepare_stack/create_dem.py
+@@ -436,7 +436,7 @@ class CreateDem:
+             latlim = [min(lat), max(lat)]
+             lonlim = [min(lon), max(lon)]
+         else:
+-            print 'format not recognized! Pleas creat either a .kml or .shp file.'
++            print('format not recognized! Pleas creat either a .kml or .shp file.')
+             return []
+ 
+         return latlim, lonlim
+@@ -580,9 +580,9 @@ class CreateDem:
+ 
+             conn = requests.get(server + '/' + folder, auth=(username, password))
+             if conn.status_code == 200:
+-                print "status200 received ok"
++                print("status200 received ok")
+             else:
+-                print "an error occurred during connection"
++                print("an error occurred during connection")
+ 
+             data = conn.text
+             parser = parseHTMLDirectoryListing()
+@@ -691,7 +691,7 @@ class CreateDem:
+ # https://svn.openstreetmap.org/applications/utils/import/srtm2wayinfo/python/srtm.py
+ class parseHTMLDirectoryListing(HTMLParser):
+     def __init__(self):
+-        # print "parseHTMLDirectoryListing.__init__"
++        # print("parseHTMLDirectoryListing.__init__")
+         HTMLParser.__init__(self)
+         self.title = "Undefined"
+         self.isDirListing = False
+@@ -702,7 +702,7 @@ class parseHTMLDirectoryListing(HTMLPars
+         self.currHref = ""
+ 
+     def handle_starttag(self, tag, attrs):
+-        # print "Encountered the beginning of a %s tag" % tag
++        # print("Encountered the beginning of a %s tag" % tag)
+         if tag == "title":
+             self.inTitle = True
+         if tag == "a":
+@@ -713,7 +713,7 @@ class parseHTMLDirectoryListing(HTMLPars
+                     self.currHref = attr[1]
+ 
+     def handle_endtag(self, tag):
+-        # print "Encountered the end of a %s tag" % tag
++        # print("Encountered the end of a %s tag" % tag)
+         if tag == "title":
+             self.inTitle = False
+         if tag == "a":
+@@ -727,9 +727,9 @@ class parseHTMLDirectoryListing(HTMLPars
+     def handle_data(self, data):
+         if self.inTitle:
+             self.title = data
+-            print "title=%s" % data
++            print("title=%s" % data)
+             if "Index of" in self.title:
+-                # print "it is an index!!!!"
++                # print("it is an index!!!!")
+                 self.isDirListing = True
+         if self.inHyperLink:
+             # We do not include parent directory in listing.
+--- a/prepare_stack/download_sentinel_data_orbits.py
++++ b/prepare_stack/download_sentinel_data_orbits.py
+@@ -68,7 +68,7 @@ def sentinel_available(start_day='', end
+     try:
+         dat = urllib2.urlopen(request)
+     except:
+-        print 'not possible to connect this time'
++        print('not possible to connect this time')
+         return [], [], []
+ 
+     html_dat = ''
+@@ -115,7 +115,7 @@ def load_shape_info(shapefile):
+             st = st + str(p[0]) + ' ' + str(p[1]) + ','
+         st = st[:-1] + ')'
+     else:
+-        print 'format not recognized! Pleas creat either a .kml or .shp file.'
++        print('format not recognized! Pleas creat either a .kml or .shp file.')
+         return []
+ 
+     return st
+@@ -128,7 +128,7 @@ def sentinel_check_validity(products=[],
+     invalid_files = []
+ 
+     if not products:
+-        print 'Nothing to check'
++        print('Nothing to check')
+         return
+ 
+     for product in products:
+@@ -183,7 +183,7 @@ def sentinel_download(products=[], xml_o
+     # Download the files which are found by the sentinel_available script.
+ 
+     if not products:
+-        print 'No files to download'
++        print('No files to download')
+         return
+ 
+     wget_base = 'wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 --continue --tries=20 --no-check-certificate --user=' + user + ' --password=' + password + ' '
+@@ -297,7 +297,7 @@ def sentinel_quality_check(filename, uui
+     try:
+         dat = urllib2.urlopen(request)
+     except:
+-        print 'not possible to connect this time'
++        print('not possible to connect this time')
+         return False
+ 
+     html_dat = ''


=====================================
debian/patches/series
=====================================
@@ -5,3 +5,4 @@
 0005-fix-build.patch
 0006-remove-osr-from-dependencies.patch
 0007-drop-the-install-package.patch
+python3.patch



View it on GitLab: https://salsa.debian.org/debian-gis-team/doris/commit/c160b9abaca565038a82a30691cb2bc095e70132

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/doris/commit/c160b9abaca565038a82a30691cb2bc095e70132
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20190722/8cebdf4d/attachment-0001.html>


More information about the Pkg-grass-devel mailing list