Class: CWLSLas

Inherits:
Object
  • Object
show all
Includes:
LasReader
Defined in:
lib/las_reader.rb

Constant Summary

Constants included from LasReader

LasReader::VERSION

Instance Attribute Summary

Attributes included from LasReader

#curves, #file_encode, #parameters, #version, #well_info, #wrap

Instance Method Summary collapse

Methods included from LasReader

#get_file_encoding, #load_file, #log_nowrap_data, #log_wrap_data, #set_curve_info, #set_other_info, #set_parameters, #set_version, #set_well_info

Constructor Details

#initialize(filename = nil, file_options = {}) ⇒ CWLSLas

Initialize CWLSLas object passing las file as argument

Example:

>> my_well = CWLSLas.new('my_well.las')
=> #<CWLSLas>

Arguments:

las_file_name: (String)
file_options: (Hash)
  options: encoding


263
264
265
# File 'lib/las_reader.rb', line 263

def initialize(filename=nil, file_options={})
  load_file(filename, file_options) if not filename.nil?
end

Instance Method Details

#company_nameObject

Returns the company name tha owns the well

Example:

>> my_well = CWLSLas.new('my_well.las')
=> #<CWLSLas>
>> my_well.company_name
=> "ANY OIL COMPANY LTD."


317
318
319
# File 'lib/las_reader.rb', line 317

def company_name
  self.well_info.company_name
end

#countryObject

Returns the country described in the file

Example:

>> my_well = CWLSLas.new('my_well.las')
=> #<CWLSLas>
>> my_well.country
=> "US"


436
437
438
# File 'lib/las_reader.rb', line 436

def country
  self.well_info.country
end

#countyObject

Returns the county described in the file

Example:

>> my_well = CWLSLas.new('my_well.las')
=> #<CWLSLas>
>> my_well.county
=> "KENAI"


423
424
425
# File 'lib/las_reader.rb', line 423

def county
  self.well_info.county
end

#curve(curve_name) ⇒ Object

Returns an object representing the curve selected

Example:

>> my_well = CWLSLas.new('my_well.las')
=> #<CWLSLas>
>> my_well.curve('ILD')
=> #<LasReader::Curve:0x7f @description="DEEP RESISTIVITY", @unit="OHMM", @name="ILD", @log_data=[105.6, 105.6, 105.6]>

Arguments:

curve mnemonic: (String)


291
292
293
# File 'lib/las_reader.rb', line 291

def curve(curve_name)
  self.curves[curve_name]
end

#curve_namesObject

Return a list of mnemonics representing the curve names

Example:

>> my_well = CWLSLas.new('my_well.las')
=> #<CWLSLas>
>> my_well.curve_names
=> ["ILD", "ILM", "DT", "NPHI", "RHOB", "SFLA", "SFLU", "DEPT"]


276
277
278
# File 'lib/las_reader.rb', line 276

def curve_names
  self.curves.keys
end

#field_nameObject

Returns the field name described in the file

Example:

>> my_well = CWLSLas.new('my_well.las')
=> #<CWLSLas>
>> my_well.field_name
=> "CAMPOS"


330
331
332
# File 'lib/las_reader.rb', line 330

def field_name
  self.well_info.field_name
end

#locationObject

Returns the location described in the file

Example:

>> my_well = CWLSLas.new('my_well.las')
=> #<CWLSLas>
>> my_well.location
=> "-43.173871636390686 -22.964858960678484"


343
344
345
# File 'lib/las_reader.rb', line 343

def location
  self.well_info.location
end

#log_dateObject

Returns a String with the date described in the file.

Example:

>> my_well = CWLSLas.new('my_well.las')
=> #<CWLSLas>
>> my_well.log_date
=> "25-DEC-1988"


382
383
384
# File 'lib/las_reader.rb', line 382

def log_date
  self.well_info.date_logged
end

#provinceObject

Returns the province described in the file

Example:

>> my_well = CWLSLas.new('my_well.las')
=> #<CWLSLas>
>> my_well.province
=> "RIO DE JANEIRO"


356
357
358
# File 'lib/las_reader.rb', line 356

def province
  self.well_info.province
end

#service_companyObject

Returns the service company that performed the log acquisition

Example:

>> my_well = CWLSLas.new('my_well.las')
=> #<CWLSLas>
>> my_well.service_company
=> "ANY LOGGING COMPANY LTD."


369
370
371
# File 'lib/las_reader.rb', line 369

def service_company
  self.well_info.service_company
end

#stateObject

Returns the state described in the file

Example:

>> my_well = CWLSLas.new('my_well.las')
=> #<CWLSLas>
>> my_well.state
=> "KANSAS"


410
411
412
# File 'lib/las_reader.rb', line 410

def state
  self.well_info.state
end

#uwiObject

Returns the UWI (UNIQUE WELL ID) described in the file

Returns API if UWI not found (for locations outside Canada)

Example:

>> my_well = CWLSLas.new('my_well.las')
=> #<CWLSLas>
>> my_well.uwi
=> "100091604920W300"


397
398
399
# File 'lib/las_reader.rb', line 397

def uwi
  self.well_info.uwi || self.well_info.api
end

#well_nameObject

Return a list of mnemonics representing the curve names

Example:

>> my_well = CWLSLas.new('my_well.las')
=> #<CWLSLas>
>> my_well.well_name
=> "ANY ET AL OIL WELL #12"


304
305
306
# File 'lib/las_reader.rb', line 304

def well_name
  self.well_info.well_name
end