The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Lab::Data::Analysis::TekTDS

VERSION

Version 0.01

SYNOPSIS

Analysis routine for Tektronix TDS1000/TDS2000/etc. scopes

SUBROUTINES/METHODS

new

my $a = Lab::Data::Analysis::TekTDS->new(stream=>$stream);

create a new TekTDS analysis object; for use by Lab::Data::Analysis code

Analyze

my $event = $a->Analyze($event[, optionshash]);

Do TekTDS analysis on an event (passed by hashref); the results of the analysis are stored in the hashref, and the hashref is returned.

If there is an error, "undef" is returned.

The analysis results can be found in

$event->{CHAN}->{$channel}->{

            CHAN => channel name,

            X => [ ... x values ... typically times ],

            Yunit => unit for Y scale,

            Xunit => unit for X scale,

            ID => ID string describing waveform,

            START => $jstart        ... $X->[$jstart] is first sample
 
            STOP => $jstop          ... $X->[$jstop] is last sample

            two options:

           Y => [ ... y values... typically voltages ],

            or 

           YMIN => [ ... min y values ...], YMAX=> [... max y values..],
 

The YMIN,YMAX arrays are returned for 'envelope' type waveforms.

To get the usual time/voltage pairs:

      for ($j = $ev->{CHAN}->{CH1}->{START};
 
        $j <= $ev->{CHAN}->{CH1}->{STOP}; $j++) {

        $t = $ev->{CHAN}->{CH1}->X->[$j];

        $v = $ev->{CHAN}->{CH1}->Y->[$j];

      }

Analysis options:

    dropraw => [def: 0]    ... drop the raw analysis intermediate results
    interpolate => [def: 1] ... create a Yfunc interpolation function
    print_summary => [def: 0] ..print a summary of waveform info