- Things to be changed in zplsc_b.py
- make a new generic filename matcher to get file date and time
- use default logging module to replace call to
log
- need to deal with
InstrumentDataException
part -- learn how to write error-exception stuff
- Start reading
zplsc_b.py
andzplsc_echogram.py
to see waht can be stripped offset - function
read_header
givesconfig_header
andconfig_transducer
- don't need
ZplscBParticleKey.ECHOGRAM_PATH
, can also take out anything withrelpath
- need to change
from datetime import datetime
tofrom datetime import datetime as dt
and replace alldatetime
todt
in the code - function
process_sample
usesbuild_windows_time
andwindows_to_ntp
- the following block in function
process_sample
should be stored and passed whensample_data['mode'][0] = 1
# Read the athwartship and alongship angle measurements if sample_data['mode'][0] > 1: numpy.fromfile(input_file, dtype=angle_dtype, count=count)
- can do the following to get angle data out:
here
angle_data = np.fromfile(input_file, dtype=angle_dtype, count=count) angle_data_nparray = np.vstack(angle_data)
angle_data
has the same length aspower_data
then the output would look like:array([[( 1, 0)], [( 1, 0)], [( 2, 0)], ..., [(104, 107)], [(-26, 121)], [(111, 127)]], dtype=[('athwart', 'i1'), ('along', 'i1')])
- can do the following to get angle data out:
- in
read_config_header
: in python 3, need to changexrange
torange
, and add byte declaration when usingstrip
function for byte object (invalues[i] = values[i].strip(b'\x00')
) - toward end of
parse_echogram_file
probably don't need to appendnext_time
toparticle_data
particle_data = first_ping_metadata, next_time
- Need to check if temperature is a parameter set by user when initiating echosounder recording, or a feed-in parameters measured in real-time when recording data. If the latter, will have to return a separate variable for all temperature samples from
next_sample
inparse_echogram_file