Skip to content

Commit

Permalink
bug fix for SeaAndSun and Seabrid Nautilus driver
Browse files Browse the repository at this point in the history
  • Loading branch information
giumas committed Aug 2, 2018
1 parent 4ae4c16 commit c5e773c
Show file tree
Hide file tree
Showing 7 changed files with 3,339 additions and 7 deletions.
3,323 changes: 3,323 additions & 0 deletions data/input/seaandsun/87201650_10.tob

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion hyo/soundspeed/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
log = logging.getLogger(__name__)
log.addHandler(logging.NullHandler())

__version__ = '2018.1.42'
__version__ = '2018.1.43'
__doc__ = "Sound Speed"
__author__ = '[email protected]; [email protected]; [email protected]; ' \
'[email protected]'
Expand Down
12 changes: 9 additions & 3 deletions hyo/soundspeed/formats/readers/sea_and_sun.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,18 @@ def _parse_header(self):
date_string = None

elif line_idx == 7: # vessel
self.ssp.cur.meta.vessel = line.split(':')[1].strip().replace("\"", "")
try:
self.ssp.cur.meta.vessel = line.split(':')[1].strip().replace("\"", "")
except Exception as e:
logger.warning("unable to retrieve vessel name from %s, %s" % (line, e))

elif line_idx == 8: # survey and date
if date_string is None:
self.ssp.cur.meta.survey = line.split()[2].strip().replace("\"", "")
date_string = line.split()[-1].strip()
try:
self.ssp.cur.meta.survey = line.split()[2].strip().replace("\"", "")
date_string = line.split()[-1].strip()
except Exception as e:
logger.warning("unable to retrieve date from %s, %s" % (line, e))

elif line_idx == 9: # latitude and longitude
try:
Expand Down
3 changes: 3 additions & 0 deletions hyo/soundspeed/formats/readers/seabird.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@ def _parse_tsv_header(self):
except Exception as e:
logger.warning("unable to parse longitude: %s (%s)" % (fields[3], e))

if not self.ssp.cur.meta.original_path:
self.ssp.cur.meta.original_path = self.fid.path

self.ssp.cur.init_data(len(self.lines) - 1)

def _parse_body(self):
Expand Down
2 changes: 1 addition & 1 deletion hyo/soundspeedmanager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())

__version__ = '2018.1.42'
__version__ = '2018.1.43'
__doc__ = "Sound Speed Manager"
__author__ = '[email protected]; [email protected]; [email protected]; ' \
'[email protected]'
Expand Down
2 changes: 1 addition & 1 deletion hyo/soundspeedsettings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())

__version__ = '2018.1.42'
__version__ = '2018.1.43'
__doc__ = "Sound Speed Settings"
__author__ = '[email protected]; [email protected]; [email protected]; ' \
'[email protected]'
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def txt_read(*paths):
setup_args = dict()

setup_args['name'] = 'hyo.soundspeed'
setup_args['version'] = '2018.1.42'
setup_args['version'] = '2018.1.43'
setup_args['url'] = 'https://bitbucket.org/ccomjhc/hyo_soundspeed/'
setup_args['license'] = 'LGPLv2.1 or CCOM-UNH Industrial Associate license'
setup_args['author'] = 'Giuseppe Masetti(UNH,CCOM); Barry Gallagher(NOAA,OCS); ' \
Expand Down

0 comments on commit c5e773c

Please sign in to comment.