Closed nick-falco closed 5 years ago
I think we have discussed this before. The fdsn miniseed is actually incorrect. The fdsn miniseed is shifted. The PH5 miniseed is correct. There is no sample at 2016,193,00:00:00.000000. The data starts at microsecond 839999 and is continuous, so PH5 is correct in that the closest sample is at microsecond 999999.
Months back I went through and checked to make sure against the raw data. The e-mail chain should be there. PH5 grabs the closest sample to the time asked. That can be just before, exactly at or just after the time asked for.
Looking back it was last May when we discussed this via e-mail. The FDSN miniseed data is correct only on the first day of the data. At midnight of the first day in the fdsn data the data becomes shifted and is incorrect from that point forward (for the nodes)
I can probably make PH5 cut to the closest sample on or after. This is pretty much a problem that is unique to the nodes, since as far as I know they are the only datalogger in common use that doesn't start recording on the second.
Would Mustang still have issues if it is trying to look at a day of data and expects the data to start at say 00:00:00.00000 but since that is between 2 samples the data for that day would really start at 00:00:00.003999? In this case you would have to expect 1 less sample than expected in a day.
Pinging @gillian-iris for an answer to your Mustang question
MUSTANG will have no issue if the first sample starts at 00:00:00.003999. For the example I looked at, a request for 00:00:00 - 00:00:00 returned 23:59:59.999999-59:59.999998 for a total of 21600001 samples (one extra sample). Returning 00:00.003999-59:59.999998 would give the expected 21600000 samples. Are there other examples where this would not be the case?
The only cases I know of are the nodes. They are the ones that have odd recording start times. There will be a significant amount of node data coming in from now on, but they will mostly be like the example above though some may actually start recording at a time that lines up normally.
I will work on getting PH5 cut to cut to the closest sample after the requested time, to line up with what MUSTANG and web services expect.
Describe the bug Ph5ws subtracts a microsecond from the sample timestamps (the sample values returned are the same). This causes MUSTANG to return a start time earlier than the requested day boundary, depending on the metric.
To Reproduce FDSNWS: http://service.iris.edu/fdsnws/dataselect/1/query?net=YW&sta=5002&loc=--&cha=DPZ&starttime=2016-07-11&endtime=2016-07-12&format=miniseed&nodata=404
PH5WS: http://service.iris.edu/ph5ws/dataselect/1/query?reqtype=FDSN&format=mseed&net=YW&sta=5002&loc=--&cha=DPZ&starttime=2016-07-11&endtime=2016-07-12&nodata=404
Additional context We need the PH5 dataselect service to match the behavior of the FDSN dataselect for Mustang metrics to work properly.