Class: SciYAG::Backends::MDBEIS

Inherits:
MDBBackend show all
Defined in:
lib/SciYAG/Backends/mdb.rb

Constant Summary

Constants inherited from MDBBackend

SciYAG::Backends::MDBBackend::COL_SEP, SciYAG::Backends::MDBBackend::MDB_EXPORT, SciYAG::Backends::MDBBackend::SUBSET_RE

Instance Attribute Summary

Attributes inherited from MDBBackend

#current_database, #data_set_name_col, #data_set_table_name, #data_set_x_col, #data_set_y_col, #data_set_z_col

Instance Method Summary collapse

Methods inherited from MDBBackend

#expand_sets, #get_data, #mdb_export_table, #mdb_table_to_hash, #query_xy_data, #read_mdb_file, #safe_float, #sets_available, #string_to_set, #turn_header_into_hash

Methods inherited from Backend

#base_line=, #clear_xy_filters, default_state, describe, #expand_sets, #get_cached_entry, #has_set?, list_backends, list_descriptions, logger=, #meta_data, #pop_xy_filter, #push_xy_filter, #query_xy_data, #set_type, #sets_available, #xy_data, #xyz_data

Methods included from MetaBuilder::DescriptionExtend

#base_description, #create_factory, #describe, #description, #factory_class, #factory_description, #factory_description_hash, #factory_description_list, #group, #has_factory?, #inherit_parameters, #param, #param_accessor, #param_reader, #param_writer, #register_class, #set_description

Methods included from MetaBuilder::DescriptionInclude

#description, #get_param, #get_param_raw, #long_name, #option_parser_banner, #option_parser_fill, #option_parser_options, #parameter, #restore_state, #save_state, #set_param, #set_param_raw

Constructor Details

#initializeMDBEIS

Returns a new instance of MDBEIS.



414
415
416
417
418
419
420
421
422
# File 'lib/SciYAG/Backends/mdb.rb', line 414

def initialize
  super
  @data_set_table_name = "ImpDataPoints_20"
  @data_set_x_col = "Freq"
  @data_set_y_col = "Zre"
  @data_set_z_col = "Zim"

  @type = :wzm
end

Instance Method Details

#internal_to_external(x, y, z) ⇒ Object

Returns the set wanted. (x = Freq, y = Zre, z = Zim);



438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
# File 'lib/SciYAG/Backends/mdb.rb', line 438

def internal_to_external(x,y,z)
  case @type
  when :wzm
    return Function.new(x,y.pow(2).add!(z.pow(2)).sqrt)
  when :wzi
    return Function.new(x,z)
  when :wzr
    return Function.new(x,y)
  when :zrzi
    return Function.new(y,z)
  when :wphi
    return Function.new(x,z.div(y).atan!)
  when :yryi
    # We need to compute real and imaginary part of admittance
    den = y**2 + z**2
    return Function.new(y.div(den), 
                        z.div(den))
  end
end