lkilcher / dolfyn

A library for oceanographic doppler instruments such as Acoustic Doppler Profilers (ADPs, ADCPs) and Acoustic Doppler Velocimeters (ADVs).
BSD 3-Clause "New" or "Revised" License
42 stars 25 forks source link

Read NTK files with python #83

Open bfanch opened 2 years ago

bfanch commented 2 years ago

Hello, I try to read an ntk file with python and the library dolfyn but I failed. I do not understand where is the problem. I tried with others ntk files but it ends always bad. It loops trying to find a valid cfgid value. I do not understand the error (copied after the message), could you help me? I join the file I try to read. It's a file recored in the air so values are very bad... The aim is juste to learn to read the data.

https://wetransfer.com/downloads/72a01009e17cc8f971e4611059e61c0920220131101040/7194a7c81869dd7d8c7f5a0126d7ad1420220131101058/155e59

Thanks a lot, François

f1=dolfyn.read(file1)

Reading file SIG500_SW.208.21.SIG500_SW.00000.ntk ... Still looking for valid cfgid at file position 1000 ... Still looking for valid cfgid at file position 2000 ... Still looking for valid cfgid at file position 3000 ... .... Still looking for valid cfgid at file position 97000 ... Still looking for valid cfgid at file position 98000 ... Still looking for valid cfgid at file position 99000 ... Traceback (most recent call last):

File "", line 1, in f1=dolfyn.read(file1)

File "c:\scripts\lecture_adcp\dolfyn-master\dolfyn-master\dolfyn\io\api.py", line 35, in read dat = func(fname, userdata=userdata, nens=nens)

File "c:\scripts\lecture_adcp\dolfyn-master\dolfyn-master\dolfyn\io\rdi.py", line 38, in read_rdi with adcp_loader(fname) as ldr:

File "c:\scripts\lecture_adcp\dolfyn-master\dolfyn-master\dolfyn\io\rdi.py", line 834, in init self.read_hdr()

File "c:\scripts\lecture_adcp\dolfyn-master\dolfyn-master\dolfyn\io\rdi.py", line 702, in read_hdr nextbyte = fd.read_ui8(1)

File "c:\scripts\lecture_adcp\dolfyn-master\dolfyn-master\dolfyn\io_read_bin.py", line 171, in read_ui8 return self.read(n, 'B')

File "c:\scripts\lecture_adcp\dolfyn-master\dolfyn-master\dolfyn\io_read_bin.py", line 163, in read raise eofException

eofException

lkilcher commented 2 years ago

Hi @bfanch, DOLfYN doesn't currently support reading .ntk files. From your email it sounds like you're trying to read these files in realtime? This adds to the complexity, and I'm not sure how much help DOLfYN can be for this. It's something we might be interested in implementing at some point, but I don't have time to tackle it now. Also, I'm not sure that the .ntk format is published, which also adds to the complexity. I wonder if @jmcvey3 has any insight here?

jmcvey3 commented 2 years ago

@bfanch I'm assuming you are using the Nortek Midas software? Is it possible to accomplish what you are doing in Nortek's Signature Deployment software? It can save ADCP data live into .ad2cp files, which can be subsequently read by dolfyn.