++ed by:
AMBA

1 PAUSE user
1 non-PAUSE user.

Andreas K. Hüttel
and 3 contributors

NAME

Lab::Measurement - Log, describe and plot data on the fly

SYNOPSIS

  use Lab::Measurement;
  
  my $measurement=new Lab::Measurement(
      sample            => $sample,
      title             => $title,
      filename_base     => 'qpc_pinch_off',
      description       => $comment,

      live_plot         => 'QPC current',

      columns           => [
          {
              'unit'            => 'V',
              'label'           => 'Gate voltage',
              'description'     => 'Applied to gates via low path filter.',
          },
          {
              'unit'            => 'V',
              'label'           => 'Amplifier output',
              'description'     => "Voltage output by current amplifier set to $amp.",
          }
      ],
      axes              => [
          {
              'unit'            => 'V',
              'expression'      => '$C0',
              'label'           => 'Gate voltage',
              'min'             => ($start_voltage < $end_voltage) ? $start_voltage : $end_voltage,
              'max'             => ($start_voltage < $end_voltage) ? $end_voltage : $start_voltage,
              'description'     => 'Applied to gates via low path filter.',
          },
          {
              'unit'            => 'A',
              'expression'      => "abs(\$C1)*$amp",
              'label'           => 'QPC current',
              'description'     => 'Current through QPC',
          },
          {
              'unit'            => '2e^2/h',
              'expression'      => "(\$A1/$v_sd)/$g0)",
              'label'           => "Total conductance",
          },
          {
              'unit'            => '2e^2/h',
              'expression'      => "(1/(1/abs(\$C1)-1/$U_Kontakt)) * ($amp/($v_sd*$g0))",
              'label'           => "QPC conductance",
              'min'             => -0.1,
              'max'             => 5
          },

      ],
      plots             => {
          'QPC current'    => {
              'type'          => 'line',
              'xaxis'         => 0,
              'yaxis'         => 1,
              'grid'          => 'xtics ytics',
          },
          'QPC conductance'=> {
              'type'          => 'line',
              'xaxis'         => 0,
              'yaxis'         => 3,
              'grid'          => 'ytics',
          }
      },
  );

  $measurement->start_block();

  my $stepsign=$step/abs($step);
  for (my $volt=$start_voltage;$stepsign*$volt<=$stepsign*$end_voltage;$volt+=$step) {
      $knick->set_voltage($volt);
      usleep(500000);
      my $meas=$hp->read_voltage_dc(10,0.0001);
      $measurement->log_line($volt,$meas);
  }

  my $meta=$measurement->finish_measurement();

DESCRIPTION

This module simplifies the task of running a measurement, writing the data to disk and keeping track of necessary meta information that usually later you don't find in your lab book anymore.

If your measurements don't come out nice, it's not because you were using the wrong software.

CONSTRUCTORS

new

  $measurement=new Lab::Measurement(%config);

where %config can contain

  sample        => '',  # see Meta
  title         => '',  # single line
  filename      => '',
  filename_base => '',  # for auto_naming
  description   => '',  # multi line
  
  columns       => [],
  axes          => [],
  plots         => [],  # See Meta
  
  live_plot     => '',  # Name of plot that is to be plotted live
  live_refresh  => '',
  live_latest   => '',
  
  writer_config => {},  # Configuration options for Lab::Data::Writer

METHODS

start_block

  $block_num=$measurement->start_block($label);

log_line

  $measurement->log_line(@data);

finish_measurement

  $meta=$measurement->finish_measurement();

now_string

  $now=$measurement->now_string();

log($datum,$column,$description)

magic log. deprecated.

SEE ALSO

Lab::Data::Meta
Lab::Data::Writer
Lab::Data::Plotter

AUTHOR/COPYRIGHT

 Copyright 2004-2006 Daniel Schröer (L<http://www.danielschroeer.de>)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 435:

Non-ASCII character seen before =encoding in 'Schröer'. Assuming UTF-8