#!/usr/bin/perl
#
# Make perfect data

$amp = 1.0;
$duration = 1.0;

$start_t = 0;
$end_t = 50.0;
$dt = 0.1;
for ($t = $start_t; $t < $end_t; $t += $dt) {

  if (rand() > 0.02) {
    $voltage = 0.0;
    printf " %8.3f  %8.3f \n", $t, $voltage;
  }
  else {
    $duration_t = 0;
    while ($duration_t < $duration) {
      $voltage = 1.0;
      printf " %8.3f  %8.3f \n", $t + $duration_t, $voltage;
      $duration_t += $dt;
    }
    $t += $duration;
  }
    

}


exit 0;

