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

sample1d injects NaNs at supposed interp locations inside gaps. #8684

Open
joa-quim opened this issue Jan 30, 2025 · 0 comments
Open

sample1d injects NaNs at supposed interp locations inside gaps. #8684

joa-quim opened this issue Jan 30, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@joa-quim
Copy link
Member

joa-quim commented Jan 30, 2025

Issue raised in Forum post

If we reduce the input to this short chunk, we can see the gap at 2018-09-21T10:06:00

2018-09-21T09:55:00	-0.152129855223
2018-09-21T09:56:00	-0.149817973129
2018-09-21T09:57:00	-0.149298552235
2018-09-21T09:58:00	-0.149558262682
2018-09-21T09:59:00	-0.151922316424
2018-09-21T10:00:00	-0.153091013436
2018-09-21T10:01:00	-0.153116525363
2018-09-21T10:02:00	-0.155182026871
2018-09-21T10:03:00	-0.155753619413
2018-09-21T10:04:00	-0.152817973129
2018-09-21T10:05:00	-0.153
2018-09-21T10:06:00	-0.150052468372
2018-09-21T10:38:00	-0.185649177209
2018-09-21T10:39:00	-0.184746170218
2018-09-21T10:40:00	-0.185091013436
2018-09-21T10:41:00	-0.18461043433
2018-09-21T10:42:00	-0.184207538799
2018-09-21T10:43:00	-0.185259710447
2018-09-21T10:44:00	-0.186402895531
2018-09-21T10:45:00	-0.186129855223

Now running the command

ample1d trunc_dummy2.dat -gx300s -T2018-09-21T09:55:00/2018-09-21T10:45:00/300s -Fa -V > dummy3.dat
sample1d [INFORMATION]: Processing input table data
sample1d [INFORMATION]: Reading Data Table from File trunc_dummy2.dat
sample1d [INFORMATION]: Data gap detected via -g; Segment header inserted near/at line # 13

we can see a small other issue, which is that the reported line number is in the input file but it reports it as if it was in the output. But the worse is the result where we can see that all interpolated points inside the gap, from 2018-09-21T10:06:00 to 2018-09-21T10:38:00, were printed as NaN instead of simply being skipped.

>
2018-09-21T09:55:00	-0.152129855223
2018-09-21T10:00:00	-0.153091013436
2018-09-21T10:05:00	-0.153
2018-09-21T10:10:00	NaN
2018-09-21T10:15:00	NaN
2018-09-21T10:20:00	NaN
2018-09-21T10:25:00	NaN
2018-09-21T10:30:00	NaN
2018-09-21T10:35:00	NaN
2018-09-21T10:40:00	NaN
2018-09-21T10:45:00	NaN
> Data gap detected via -g; Segment header inserted
2018-09-21T09:55:00	NaN
2018-09-21T10:00:00	NaN
2018-09-21T10:05:00	NaN
2018-09-21T10:10:00	NaN
2018-09-21T10:15:00	NaN
2018-09-21T10:20:00	NaN
2018-09-21T10:25:00	NaN
2018-09-21T10:30:00	NaN
2018-09-21T10:35:00	NaN
2018-09-21T10:40:00	-0.185091013436
2018-09-21T10:45:00	-0.186129855223

A workaround for now seems to be adding the option -s1 to skip the NaNs.

trunc_dummy2.zip

@joa-quim joa-quim added the bug Something isn't working label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant