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
Warning generated on empty ~Parameter section #226
Comments
I think this specific error has to do with how sections are read rather than a regex error. It appears that lasio looks for lines that start with a In the case of your LAS file, |
Thanks. It is just a warning and the routine reads the log. My thought is that lasio should be OK that is OK with LAS Certify.
Brandon Nuttall
Sent from my iPhone
… On Mar 2, 2018, at 3:43 PM, Dan H. ***@***.***> wrote:
I think this specific error has to do with how sections are read rather than a regex error.
It appears that lasio looks for lines that start with a ~ and adds any subsequent non-commented lines to the sect_lines list of the read_file_contents OrderedDict (see line 289 of reader.py).
sect_lines remains empty though because lasio doesn't find any lines to add before it hits the next ~, so if sect_lines: (line 290) evaluates to False. Thus the ~P section is never added to the OrderedDict.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Thanks for the issue! Thanks also Dan, I'll work out a way to distinguish between empty and missing sections. The latter certainly needs a warning, the former probably not as it's pretty common. |
something along these lines could at least ensure empty sections are added to the OrderedDict (based loosely on lashead):
This assumes |
I think ~A is typically the last section in LAS 2.0. However, it is possible that some of the LAS 3.0 sections that are data tables similar to ~A could follow.
As far as I remember the CWLS 2.0 standard, the ~V section is required to be first. After that, the ~W, ~P, ~C, and ~O sections are defined, but not necessarily ordered. I think only ~W and ~C are required. You have to have the STRT, STOP, and STEP parameters and the curve descriptions. The others can be missing or empty. LAS 3.0 basically introduced optional sections for recording other types of downhole data. They kind of expand the specification of the old free form ~O section.
Brandon Nuttall
Sent from my iPhone
… On Mar 5, 2018, at 2:18 PM, Dan H. ***@***.***> wrote:
something along these lines could at least ensure empty sections are added to the OrderedDict (based loosely on lashead):
line = file_obj.readline().strip()
line_number = 0
while not line.upper().startswith('~A'):
if line.startswith('~'):
sect_title_line = line
sect_lines = []
sect_line_nos = []
sect_title_line = None
while True:
line = file_obj.readline().strip()
line_number += 1
if line.startswith('~'):
sections[sect_title_line] = {
"section_type": "header",
"title": sect_title_line,
"lines": sect_lines,
"line_nos": sect_line_nos,
}
break
elif not line.startswith("#"):
sect_lines.append(line)
sect_line_nos.append(line_number)
if line.upper().startswith('~A'):
# use existing code
This assumes ~A is the final section encountered though, which I'm not sure is always the case.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Yep I want to avoid wherever possible assuming that only data follow ~A.. otherwise LAS 3 support will never happen! I've fixed this by only raising the warning when the ~ line of a section is actually missing, instead of also when it is empty. |
Thanks. Several examples in the LAS 3.0 documentation show optional sections following ~A.
Brandon Nuttall
Sent from my iPhone
… On Mar 18, 2018, at 2:18 AM, Kent Inverarity ***@***.***> wrote:
Yep I want to avoid wherever possible assuming that only data follow ~A.. otherwise LAS 3 support will never happen!
I've fixed this by only raising the warning when the ~ line of a section is actually missing, instead of also when it is empty.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
A warning is generated concerning an empty ~Parameter section: "Header section Parameter regexp=~P was not found." The LAS files in question pass the current version of LAS Certify. There is a ~Parameter section, but there are no parameter lines, only some comment lines. I imagine this issue is related to the regular expression for recognizing the ~Parameter section. I have attached a zipped archive version of an LAS file that illustrates this.
UT311012308500.zip
The text was updated successfully, but these errors were encountered: