ioos / pyoos

A Python library for collecting Met/Ocean observations
GNU Lesser General Public License v3.0
34 stars 33 forks source link

Hads parser enhancement, plus a utility function #37

Closed emiliom closed 9 years ago

emiliom commented 9 years ago
  1. Hads parser (_parse_data()) enhancement:
    • Made dt timezone aware (as utc). datetime filters failed otherwise, due to a colliding behavior of the hads collector start_time and end_time setters inherited from the base pyoos Collector object (and its its set_start_time() and set_end_time() methods)
    • Catching "NaN" strings in observed values, and converting them to numpy nan (for convenient behavior with float values)
    • Converting observed values from string to float
  2. Added function (flatten_elements) for generic, useful data reorganization, in new utility file (utils/dataorg.py). Code/approach originally from Dave Foster. Very useful across pyoos; have used it with ioos sos, hads and nerrs collectors.

Ignore the commits related to the nerrs collector; my last commit reverted to a version before all my changes.

emiliom commented 9 years ago

Have you had a chance to look at this pull request? @daf ? Thanks.

kwilcox commented 9 years ago

@daf @emiliom I merged these as part of https://github.com/ioos/pyoos/pull/39. Thanks for the improvements!

emiliom commented 9 years ago

Great! Thank you, @kwilcox