-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Narrow fetch_eng queries sometimes fail to return data, yet expanding the time range of the query returns data as expected, including data within the original time span. Shifting the start and stop time of the query by a constant value (while keeping the delta time the same) can result in a nominal query.
from Ska.engarchive import fetch_eng as fetch
fetch.add_logging_handler()
This fails to return any data:
tstart = 559331997.0973421
tstop = 559331997.8655365
data = fetch.Msid('airu2bt', tstart, tstop, stat=None)
data.times
Returns:
array([], dtype=float64)
The time span is larger than the 0.256 resolution this MSID is stored at.
tstop - tstart
Returns:
0.768194317817688
If the pad time is increased by an additional 0.256 seconds, the expected data is returned:
data = fetch.Msid('airu2bt', tstart-0.256, tstop, stat=None)
Returns:
array([ 5.59331997e+08, 5.59331997e+08, 5.59331997e+08, 5.59331998e+08])
The times relative to the start time are:
data.times - tstart
Returns:
array([-0.1354481 , 0.12080193, 0.37705195, 0.63330197])
You can see that several of these points occur after the original start time, which should have been returned in the original query.
If the original start and stop times are shifted by say 10 seconds, the expected behavior is observed:
tstart = 559331997.0973421 + 0
tstop = 559331997.8655365 + 0
data = fetch.Msid('airu2bt', tstart, tstop, stat=None)
data.times
Returns:
array([ 5.59332007e+08, 5.59332007e+08, 5.59332008e+08])