ioos/pyoos — pull request #37 by emiliom (2014-09-13 05:17:29+00:00)
Title: Hads parser enhancement, plus a utility function

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.