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

Input data validation could be better #116

Closed
2 tasks done
fpavogt opened this issue Apr 16, 2024 · 0 comments · Fixed by #118
Closed
2 tasks done

Input data validation could be better #116

fpavogt opened this issue Apr 16, 2024 · 0 comments · Fixed by #118
Labels
enhancement New feature or request
Milestone

Comments

@fpavogt
Copy link
Member

fpavogt commented Apr 16, 2024

Is there already an issue for this?

  • I found no existing issue for this bug.

Describe the bug

A code user reported the error in #119.

When looking at it, it was noticed that the DataFrame being fed to ampycloud contained something like:

#id, dt, alt, type, ceilo
…
177,-30.0,1020.0,1,ceiloX
178,-30.0,,0,ceiloX
179,-30.0,,0,ceiloX

All lines are correct on their own, but l.178 and l.179 (no cloud base detected at dt=-30) are directly inconsistent with l. 177 (1 cloud base detected at dt=-30). Lines 178 and 179 are also redundant.

Currently, the function check_data_consistency() in src/ampycloud/utils.py does not check for these elements (duplicated hits or inconsistent hits). This was not directly related to the error of #119, but it's not ideal nonetheless.

The solution is to enhance check_data_consistency() to cover these cases, and issue a meaningful error to inform the user.

Screenshot

No response

Steps to reproduce

No response

Relevant log output

No response

Environment

The problem was seen is both ampycloud v1.0.0 and v2.0.0.dev.

Code of Conduct

  • I agree to follow the ampycloud Code of Conduct.
@fpavogt fpavogt added bug Something isn't working enhancement New feature or request labels Apr 16, 2024
@fpavogt fpavogt added this to the v0.2.0 milestone Apr 16, 2024
fpavogt added a commit that referenced this issue Apr 16, 2024
@fpavogt fpavogt mentioned this issue Apr 16, 2024
7 tasks
@fpavogt fpavogt removed the bug Something isn't working label Apr 17, 2024
@fpavogt fpavogt changed the title [Bug]: AmpycloudError: Cloud base calculation got an empty array.Maybe check lookback percentage (is set to 100) Input data validation could be better Apr 17, 2024
@fpavogt fpavogt mentioned this issue Apr 23, 2024
7 tasks
fpavogt added a commit that referenced this issue Apr 23, 2024
fpavogt added a commit that referenced this issue Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant