Dst (AverageAlgorithm) should produce output even with missing data
To Do:
- make AverageAlgorithm.process() generate a value even if all intended inputs are not available
- add new trace to the output Stream that holds the number of input observatories for each time step of dst_tot array
Details:
Given recent and persistent issues with HON, and to a lesser extent SJG, real time data streams, it was decided that the Dst algorithm should be more flexible when stations drop out. Currently, a Dst index is not produced if any of the inputs are missing.
The principal change might be as simple as changing the AverageAlgorithm.process() method to use numpy.nanmean() instead of numpy.mean(). However, this should be checked carefully, even considering the possibility of no valid inputs.
As for the new trace, I suspect this will require the numpy.isnan() method, but there might be something better. The channel name for this trace should be channel+'_count' (we'll need to come up with a good SNCL code for this new channel before we can put it in Edge, but this is a start).
AverageAlgorithm_test.py, in the geomag-algorithms test folder, will need to be updated/augmented.