Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queries for very narrow time spans sometime fail to return data when data is expected. #111

Open
matthewdahmer opened this issue Oct 1, 2015 · 0 comments

Comments

@matthewdahmer
Copy link
Contributor

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])
@matthewdahmer matthewdahmer changed the title Queries for very narrow time spans sometimes fail to return data. Queries for very narrow time spans sometime fail to return data when data is expected. Oct 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants