Both {{{Parser.getCoordinates}}} and {{{Parser.getPAZ}}} use the following code to check if a channel response is available for a certain time:
{{{ channel = [cha for cha in channel \ if float(cha.split('/')[1]) < datetime.timestamp \ and float(cha.split('/')[2]) > datetime.timestamp] }}}
This is however prone to precision errors, because the timestamp string is generally not precise up to the seconds, and the conversion to float may introduce other rounding effects.
This gives problems if one needs PAZ or coordinates for a time which is close (or equal) to the start or end time of the response information.
I attach an example to test this behavior.
I also attach a patch which uses datetime comparison instead of float comparison to check the date. The patch also improves the warning ('None or more than one channel with the given description') by splitting it for "none" and "more than one"
该提问来源于开源项目:obspy/obspy