Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pseudograms remix #16

Merged
merged 6 commits into from
Mar 28, 2022
Merged

Conversation

jr3cermak
Copy link

This PR addresses most issues in #12 and leaves one item open.

Adding entries to deployment.json enable and disabling of ecometrics/pseudogram processing:

    "extra_kwargs": {
        "enable_pseudograms": true,
        "echosounderRange": 60.0,
        "echosounderRangeBins": 20,
        "echosounderDirection": "up",
        "echosounderRangeUnits": "meters"
    },

The other keywords will need to be passed to the binary to ascii processor. We need a kwargs hook installed there to grab those options and pass to the pseudogram decoder.

pytests for the ecometrics3 set produce variables in the right dimension for the three known profiles. I had to kludge the extras profiles and add a single time element for it to output the sci_echodroid* and pseudogram_* variables. For now, profiles that do not have an overlapping pseudogram end up with a single time element will all missing data. When the profile is missing, the variable is not written.

This PR is incomplete. The ecometrics and ecometrics2 pytests still have signs of pseudogram_* variables. If they are not present, those variables should not be written out. I can finalize this portion hopefully Friday.

 - Add some extra_kwargs to deployment.json
 - Duplicate entries in instrument.json for instrument_acoustics
 - filters.py: extra_kwargs passed to reader.extras()
 - filters.py: trigger adding empty profiles to extras to allow
   writing ecometrics variables with extra dimension to keep
   all the profiles/netCDF files consistent.
 - slocum/__init__.py: refactor using the extra_kwargs passed
   to SlocumReader.extras().  Handle situations where there
   may or may not be a pseudogram and or ecometrics data available.
   In all cases if enable_pseudograms is set to true, ensure
   ecometrics(echodroid) and pseudogram variables use the extras
   dimension.
 - TODO: deployment.json (extra_kwargs) needs to become available
   to SlocumMerger class via watch/binary.py to grab arguments
   for pseudogram processing.
  - remove POSITIONAL_VARS; afterthought for providing geographic information for extras variables
  - misc spacing errors
  - properly spelled a local variable
 - slocum/__init__.py change default echosounderRange to -60.0
   for current deployment.
 - Moved read_attrs() from gutils.nc into gutils.__init__ so SlocumMerge() can
   read deployment.json extra_kwargs.  Requires API additions to SlocumMerge().
 - gutils.filters: move pseudogram arguments into a group; remove stale debug
   print statement
 - gutils.nc: access read_attrs() from gutils.__init__
 - slocum.__init__: Add read_attrs() from gutils.__init__; detect keywords now
   moved to pseudogram group; remove stale debugging code
 - if both pseudogram and ecometrics data is missing, we have to create a single
   element in the extras data frame for it to appear in the netCDF file.
 - in all cases, we need to drop ecometric variables from the data array when
   pseudograms are enabled.
 - SlocumMerger(): add optional arguments deployments_path and template to allow
   detection of pseudogram extra_kwargs.  Loosely based on how it operated in
   gutils.nc.
 - The pseudogram code is no longer active when not enabled.  Added an option to
   turn pseudogram plotting on and off.  Default is off to focus on the data.
 - echosounderRange is now enabled and should be adjustable if the sensor is
   pointed "up" or "down".  At present, these should not changed mid-deployment.
 - Add extra_kwargs to ecometrics2 deployment.json
 - Adjust pytest ecometrics3 deployment.json to reflect grouping of pseudogram
   arguments.
 - Add extra arguments to SlocumMerge() for EcoMetrics tests One to Four.
 - Add EcoMetricsFour test with data.
 - NOTE: EcoMetricsOne deliberately turns pseudograms off to test storage to
   netCDF.  Ecometrics information is stored in the time dimension instead of
   the extras dimension.
 - Added netCDF compliance testing to EcoMetrics One to Four.  They all seem to
   pass.
 - All pytests pass at last check
 - Remove pocean.meta.MetaInterface import from gutils.nc
 - Fix bare 'except' warnings in slocum.__init__
 - Add blank lines in gutils.__init__
 - Fix up exceptions again in slocum.__init__
@kwilcox kwilcox merged commit fdd0811 into SECOORA:pseudograms-remix Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants