-
Notifications
You must be signed in to change notification settings - Fork 152
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
LAS file with more curves defined in ~C section than available in ~A section #83
Comments
Yes I like the suggestion and will add :
|
Did anyone ever come up with any ideas regarding this one? I'm finding it difficult to come up with an obvious solution. Potentially could it be possible to add an option read mnemonic names from the '~A' line if present? |
Hey @harry-allerston thanks for bringing this back to our attention! Turns out lasio is a bit of a mess in this situation: For this test file:
My ideas:
However, I have a feeling you are referring to the opposite situation? Where the data section has more curves than the ~Curves definition section? In that case, lasio works fairly well but its functionality is undocumented 😬 - see #477 |
That's interesting, my problem is the same as in your example above only that the ~A line also contains the column names. Your example seems to get further than mine though.. I get a 'cannot reshape array' error on even running lasio.read(), I can't even get as far as you did with it. |
What version of lasio are you using? |
Looks like 0.24.1 |
OK try upgrading, you should get 0.29. There has been quite a bit of development in the last year. |
Thanks for looking at this so quickly - need to look at the code changes, but how would this deal with the case where the 'empty' column isn't the first or last and there's nothing in the ascii header line to label the columns? Is there a risk that assuming sequential allocation means that the wrong data gets assigned to the wrong mnemonic? |
We rely on the sequence of mnemonics in the ~C section as the definition - that's how the LAS format is defined and basically all LAS files have a ~C section even if it is not always properly used by non-conforming software... so the issues you rightly raise probably fall under a different one: if we parse any mnemonics which exist in the ~A line, what we do in the case that they conflict with those defined in the ~C section? At the moment lasio does not parse the mnemonics in the ~A section - adding that is something's that been long outstanding: #30. |
That makes sense, I guess that this might be dangerous as implemented however.. for example in one of my files the curve section defines: curve_a but the ascii section defines curve_a curve_c curve_d in this case would the mnemonics not be assigned incorrectly on load? |
Yep, something to discuss under #30 |
I think It might be best to make this behavior optional due to the potential mess it could cause, would you agree? |
What behaviour are you referring to? |
- Add kinverarity1#83 to reference links - Add lasio.default module to lasio.rst so it can be found in doc references - Add Numpy to intersphinx configuration so that Numpy doc reference will link to Numpy docs
* Docs: Add a few newer API functions * Fixes for sphinx-build errors - Add #83 to reference links - Add lasio.default module to lasio.rst so it can be found in doc references - Add Numpy to intersphinx configuration so that Numpy doc reference will link to Numpy docs * Fix broken links and update permanent redirects
Current exception:
Suggestion:
The text was updated successfully, but these errors were encountered: