obspy/obspy — pull request #691 by markcwill (2013-12-02 19:47:19+00:00)
Title: Added ComplexWithUncertainties class

Sorry for no tests yet, but here's a possible implementation of `ComplexWithUncertainties`, it is a complex number with complex number uncertainties, but will handle individual uncertainties if instantiated with `FloatWithUncertainties`, and its `real` and `imag` properties return `FloatWithUncertainties`.

Since `complex` does not allow `None` types, storage of uncertainties is done with a complex class that maps `None` to a float, (defaults to "-inf"). For uncertainties in this context, I think this is OK, as technically, uncertainties should always be positive. With this implementation, any floats including negatives will be handled, except of course passing `float("-inf")` as an uncertainty will get you back a `None`.

This is PEP8 checked, just need to add a little doc for classes and `__new__`/`__inits__`, and I'll try to formalize my tests and add them ASAP. Arithmetic functions right now default to the `complex` ones, if we override these, should uncertainties be added during addition, etc?