Skip to content

Commit

Permalink
bugfixes for ASVP and DQA
Browse files Browse the repository at this point in the history
  • Loading branch information
giumas committed Mar 11, 2024
1 parent 79d0df4 commit eff440b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion hyo2/ssm2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
logger.addHandler(logging.NullHandler())

name = "Sound Speed"
__version__ = '2024.0.0'
__version__ = '2024.0.1'
__copyright__ = 'Copyright 2024 University of New Hampshire, Center for Coastal and Ocean Mapping'

pkg_info = PkgInfo(
Expand Down
2 changes: 1 addition & 1 deletion hyo2/ssm2/app/gui/soundspeedmanager/dialogs/text_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(self):
# set the tab size
metrics = QtGui.QFontMetrics(font)
# noinspection PyArgumentList
self.setTabStopWidth(3 * metrics.width(' '))
self.setTabStopDistance(3 * metrics.horizontalAdvance(' '))

@property
def dirty(self):
Expand Down
10 changes: 7 additions & 3 deletions hyo2/ssm2/lib/formats/writers/asvp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import logging
import math
import operator
import os

import numpy as np

Expand Down Expand Up @@ -31,7 +32,12 @@ def write(self, ssp, data_path, data_file=None, project=''):
# logger.debug('*** %s ***: start' % self.driver)

self.ssp = ssp
self._write(data_path=data_path, data_file=data_file)
if data_file is None:
asvp_base_name = os.path.basename(self.ssp.cur.meta.original_path)
else:
asvp_base_name = data_file
asvp_file = "%s.asvp" % asvp_base_name
self._write(data_path=data_path, data_file=asvp_file)
self._write_header()
self._write_body()
self.finalize()
Expand All @@ -41,8 +47,6 @@ def write(self, ssp, data_path, data_file=None, project=''):
if (np.sum(self.ssp.cur.sis.temp[ti]) != 0) and (np.sum(self.ssp.cur.sis.sal[ti]) != 0) \
and (np.sum(self.ssp.cur.sis.speed[ti]) != 0):

asvp_base_name = self.fod.basename

# first write the SSP file
s01_file = "%s.ssp" % asvp_base_name
self._write(data_path=data_path, data_file=s01_file)
Expand Down

0 comments on commit eff440b

Please sign in to comment.