In [1]: import PyHum In [2]: In [2]: humfile = 'C:\\Users\\Rdebbout\\SideScanData\\R00004\\R00004.DAT' In [3]: sonpath = 'C:\\Users\\Rdebbout\\SideScanData\\R00004\\R00004' In [4]: In [4]: # reading specific settings In [5]: cs2cs_args = "epsg:26791" #Minnesota North In [6]: c = 1450.0 # speed of sound fresh water In [7]: draft = 0.3 # draft in metres In [8]: doplot = 1 #yes In [9]: t = 0.108 # length of transducer In [10]: bedpick = 1 # auto bed pick In [11]: flip_lr = 0 # 1 = flip port and starboard In [12]: model = 1199 # humminbird model In [13]: calc_bearing = 1 #no In [14]: filt_bearing = 0 #no In [15]: cog = 1 # GPS course-over-ground used for heading In [16]: chunk = 'd100' # distance, 100m In [17]: PyHum.read(humfile, sonpath, cs2cs_args, c, draft, doplot, t, bedpick, flip_lr, model, calc_bearing, filt_bearing, cog, chunk) Input file is C:\Users\Rdebbout\SideScanData\R00004\R00004.DAT Son files are in C:\Users\Rdebbout\SideScanData\R00004\R00004 cs2cs arguments are epsg:26791 Draft: 0.3 Celerity of sound: 1450.0 m/s Transducer length is 0.108 m Bed picking is auto Chunks based on distance of 100 m Data is from the 1199 series Heading based on course-over-ground Bearing will be calculated from coordinates Checking the epsg code you have chosen for compatibility with Basemap ... ... epsg code compatible WARNING: Because files have to be read in byte by byte, this could take a very long time ... port sonar data will be parsed into 136.0, 99 m chunks starboard sonar data will be parsed into 136.0, 99 m chunks --------------------------------------------------------------------------- IOError Traceback (most recent call last) in () ----> 1 PyHum.read(humfile, sonpath, cs2cs_args, c, draft, doplot, t, bedpick, f lip_lr, model, calc_bearing, filt_bearing, cog, chunk) C:\Users\Rdebbout\AppData\Local\Continuum\Anaconda\lib\site-packages\PyHum\_pyhu m_read.pyc in read(humfile, sonpath, cs2cs_args, c, draft, doplot, t, bedpick, f lip_lr, model, calc_bearing, filt_bearing, cog, chunk) 424 if data_star!='': 425 --> 426 Zt, ind_star = makechunks_scan(chunkmode, chunkval, metadat, data _star, 1) 427 del data_star 428 C:\Users\Rdebbout\AppData\Local\Continuum\Anaconda\lib\site-packages\PyHum\_pyhu m_read.pyc in makechunks_scan(chunkmode, chunkval, metadat, data, flag) 848 print "high-freq. sonar data will be parsed into %s, %s m chun ks" % (str(nchunks), str(chunkval)) 849 chunkval = chunkval+1 --> 850 Zt, ind = makechunks_simple(data, nchunks) 851 852 elif chunkmode==2: C:\Users\Rdebbout\AppData\Local\Continuum\Anaconda\lib\site-packages\PyHum\_pyhu m_read.pyc in makechunks_simple(dat, numchunks) 900 Ny, Nx = np.shape(dat) 901 # get windowed data --> 902 return humutils.sliding_window(dat,(Ny,Nx/int(numchunks))) 903 904 # ========================================================= C:\Users\Rdebbout\AppData\Local\Continuum\Anaconda\lib\site-packages\PyHum\utils .pyc in sliding_window(a, ws, ss, flatten) 317 318 import PyHum.io as io --> 319 shape_tmp = io.set_mmap_data('', '', '_tmp.dat', 'float32', a) 320 del a 321 a = io.get_mmap_data('', '', '_tmp.dat', 'float32', shape_tmp) C:\Users\Rdebbout\AppData\Local\Continuum\Anaconda\lib\site-packages\PyHum\io.py c in set_mmap_data(sonpath, base, string, dtype, Zt) 16 def set_mmap_data(sonpath, base, string, dtype, Zt): 17 # create memory mapped file for Z ---> 18 with open(os.path.normpath(os.path.join(sonpath,base+string)), 'w+') as ff: 19 fp = np.memmap(ff, dtype=dtype, mode='w+', shape=np.shape(Zt)) 20 fp[:] = Zt[:] IOError: [Errno 22] invalid mode ('w+') or filename: '_tmp.dat'