Replies: 3 comments
-
Are you referring to when you try to index into a spool that has already been selected, or is the error raised on the import dascore as dc
spool = dc.get_example_spool()
# does the unclear error message pop up here?
no_data_spool = spool.select(time=('2030-01-01", None))
# or here?
patch = no_data_spool[0] |
Beta Was this translation helpful? Give feedback.
-
I figured out why this is happening. For some Terra15 data the gitter in the GPS measurements cause subsequent samples to be reported at a early time than the previous sample. Here is an example: The y axis is the time difference between sample n and n +1, the x axis is just sample number. When this happens, the index is no longer treated as a monotonic range but a collection of values and goes screwy. I will look into the terra15 parser and think about how to fix it. |
Beta Was this translation helpful? Give feedback.
-
Here is a snippet to reproduce the import numpy as np
import pandas as pd
index = np.random.rand(100) * 1_000_000 * np.timedelta64(1, 'ns') + np.datetime64('2020-01-10')
dt_index = pd.DatetimeIndex(index, name='time')
time_1 = np.datetime64('2020-01-10')
time_2 = time_1 + np.timedelta64(1, 's')
dt_index.slice_locs(time_1, time_2) |
Beta Was this translation helpful? Give feedback.
-
Current error messages for fetching a time section without data are not very clear.
Beta Was this translation helpful? Give feedback.
All reactions