- 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
- In the middle of changing everything to conform with the netCDF file format discussed with Robert L
- Now unpacking heave/pitch/roll for each ping and save them in different channels separately, in case the heave/pitch/roll data are only fed in to one channel??? --> check sample data from Robert L --> all heave/pitch/roll data are 0.0
- Cleaned up
first_ping_metadata
and get rid of the need of BaseEnum class from mi-instruments load_ek60_raw
now returnsangle_data_dict
andmotion_data_dict
- Alongship and athwarthship are stored in
angle_data_dict[channel#]['along']
andangle_data_dict[channel#]['athwart']
- Heave, pitch, and roll are stored in
motion_data_dict[channel#]['heave']
,motion_data_dict[channel#]['pitch']
, andmotion_data_dict[channel#]['roll']
- Alongship and athwarthship are stored in
- First try implement SONAR-netCDF4 format --> goal is to make
raw2nc
functions. - Have a first set of questions sent to Gavin.
- Add additional variables to the SONAR-netCDF4 convention:
/Sonar/Beam_group1
beamwidth_alongship
,beamwidth_athwartship
gain_correction
is used to storegain
unpaked from EK60 filesangle_sensitivity_alongship
,angle_sensitivity_athwartship
angle_offset_alongship
,angle_offset_athwartship
- Move
ping_time
to top-level group and directly use it for those variables that need this dimension underSonar/Beam_group1
.
- Transfer ownership to oceanhackweek organization for group project.
- change
raw2hdf5
functions toraw2netcdf
functions - Save temperature??
- Need to revive error catch code
- write a method in the model class to convert electronic angle to mechanical angle
This keeps tracks of which parameters in the common sonar netCDF format are from where in the original Echolab unpacked structure.
Below 'X' indicates not available in the netCDF file.
These data are stored in config_header
and unpacked once per file.
Echolab | Common netCDF | Example/Description |
---|---|---|
sunder_name | sensor_model | ER60 |
survey_name | deployment_info | DY1801_EK60 |
transect_name | X | |
version | firmware_info | 2.4.3 |
transducer_count | X |
These data are stored in config_transducer
and unpacked once per file.
Echolab | Common netCDF | Example/Description |
---|---|---|
channel_id | sensor_model | GPT 18 kHz 009072034d45 1-1 ES18-11 |
beam_type | beam_type | 1 |
frequency | frequency | 18000.0 |
gain | gain | |
equiv_beam_angle | equiv_beam_angle | |
beam_width_alongship | beam_width_alongship | |
beam_width_athwartship | beam_width_athwartship | |
angle_sensitivity_alongship | angle_sensitivity_alongship | |
angle_sensitivity_athwartship | angle_sensitivity_athwartship | |
angle_offset_alongship | angle_offset_alongship | |
angle_offset_athwart | angle_offset_athwartship | |
pos_x | pos_x | |
pos_y | pos_y | |
pos_z | pos_z | |
dir_x | dir_x | |
dir_y | dir_y | |
dir_z | dir_z | |
pulse_length_table | X --> only keep pulse_length | |
gain_table | X --> only keep gain | |
gpt_software_version | software_info | |
sa_correction_table | X --> only keep sa_correction |
These data are stored in sample_data
and unpacked per ping.
Echolab | Common netCDF | Example/Description |
---|---|---|
transducer_depth | transducer_depth | |
transmit_power | transmit_power | |
pulse_length | pulse_length | |
bandwidth | bandwidth | |
sample_interval | sample_interval | |
sound_velocity | sound_velocity | |
absorption_coeff | absorption_coeff | |
temperature | temperature | |
channel_number | channel_number | numerical sequence of channel |