Class: SciYAG::Backends::MDBCyclicVoltammogram

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

Direct Known Subclasses

MDBPStep

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

#initializeMDBCyclicVoltammogram

Returns a new instance of MDBCyclicVoltammogram.



349
350
351
352
353
354
355
356
357
358
# File 'lib/SciYAG/Backends/mdb.rb', line 349

def initialize
  super
  @data_set_table_name = "CVDataPoints_280"
  @data_set_x_col = "E"
  @data_set_y_col = "I"
  @data_set_z_col = "T"

  @type = :cv
  @neg = true
end

Instance Method Details

#internal_to_external(x, y, z) ⇒ Object

Returns the set wanted. (x = E, y = I, z = T);



374
375
376
377
378
379
380
381
382
383
384
385
386
# File 'lib/SciYAG/Backends/mdb.rb', line 374

def internal_to_external(x,y,z)
  if @neg
    y = y.neg
  end
  case @type
  when :cv
    return Function.new(x,y)
  when :et
    return Function.new(z.sub(z.min).mul!(86400),x)
  when :it
    return Function.new(z.sub(z.min).mul!(86400),y)
  end
end