For a station not in the metadata, get_coordinates would return None which wasn't checked for.
This includes a test for a station which is not in metadata.
The station id is no longer passed into the function and used to retrieve the station coordinates, but the id is taken from the vertical stream instead.
If Taupy was disabled, but pstart was larger than zero, the and would lead to the function that modifies starttimes not exiting. This resulted in taupy being used even though it was disabled when the p starttime was above 0.
Accessing a non existing attribute raised a KeyError instead of an AttributeError, breaking methods that relied on the correct error type. Maybe this fixes the __setstate__ bug during event picking from GUI.
Also change order of expected/actual values in test assert methods to improve output of test function.
The first parameter is supposed to be the expected value, the second one the actual result.
Old implementation of autopickstation returned a list containing a dcitionary with results as a first value and a string with the station name as a second value. The new version used to return a single dict with a key/value station name pair, which the calling code could not unpack. The new implementation now also returns a list with picking results and station name.
PickingResults now stores only the actual results of picking, which are returned from the autopickstation function.
To store intermediary results during picking, the new class PickingContainer is used.
This instance attribute holds the current figure,which removes the need for an external function to extract the correct figure from the fig_dict and the need to pass the figure into instance methods (it can now be directly accessed by the attribute).
During picking, intermediary values were saved in p_results or s_results PickingResults instance.
Additionally the PickingResults class contained members that were only used during picking but not when returning the results, thus wasting space after picking, because they stayed in the instance.
Now autopickstation generates a clean PickingResults containing only the members that are expected in the results.
either a missing vertical or missing both vertical traces in the wfstream will fail picking and return None. This is the same behaviour as before refactoring.