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

NULL value replacing valid value in DEPT #227

Closed
kwinkunks opened this issue Mar 13, 2018 · 4 comments
Closed

NULL value replacing valid value in DEPT #227

kwinkunks opened this issue Mar 13, 2018 · 4 comments
Labels

Comments

@kwinkunks
Copy link
Contributor

Since DEPT is treated as a curve, I guess it gets clobbered by the NULL value:

image

I thought the default NULL value is -999.25, so maybe there are two problems here... Not sure.

I'm on version 0.19.

@kinverarity1
Copy link
Owner

kinverarity1 commented Mar 18, 2018

Thanks for the report.

Yes, lasio is considering 999.25 as a NULL in your case because of the default value for null_policy (lasio.read(..., null_policy='common') - see the documentation). If you use null_policy='strict' that will fix your problem because it will only convert values to nan which match the NULL line in the LAS file (presumably -999.25 in your case).

The whole null_policy framework is new-ish, so any suggestions or help would be welcome in improving it.

From a larger perspective this is tricky to fix because the replacements are done before wrapping is applied - see https://github.com/kinverarity1/lasio/blob/master/lasio/reader.py#L328. If I choose to ignore null substitutions for the first column, that's easy enough, but will only work for unwrapped files. I'd certainly welcome a PR that ignores all substitutions for the true first column in both wrapped and unwrapped files!

@VelizarVESSELINOV
Copy link
Contributor

Suggestion to replace NULL after the reading of the file (wrapped or unwarapped) and skip the index column.

@kinverarity1
Copy link
Owner

Yes that would be ideal... PRs welcome ;-)

@kinverarity1
Copy link
Owner

FYI this is now fixed in master:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants