Lab::Moose::Instrument::DisplayXY - Display with y vs x traces Role for Lab::Moose::Instrument
version 3.681
Basic commands to grab and display XY traces
Lab::Moose::Instrument::DisplayXY - Role of Generic XY display
Driver assuming this role must implements the following high-level method:
get_traceXY
$data = $sa->traceXY(timeout => 10, trace => 2);
Perform a single sweep and return the resulting spectrum as a 2D PDL:
[ [x1, x2, x3, ..., xN], [y1, y2, y3, ..., yN], ]
I.e. the first dimension runs over the sweep points.
This method accepts a hash with the following options:
timeout for the sweep operation. If this is not given, use the connection's default timeout.
number of the trace (1..3) and similar.
$data = $sa->traceX(timeout => 10);
Return X points of a trace in a 1D PDL:
$data = $inst->get_traceY(timeout => 1, trace => 2, precision => 'single');
Return Y points of a given trace in a 1D PDL:
number of the trace 1, 2, 3 and so on. Defaults to 1. It is hardware depended and validated by validate_trace_papam, which need to be implemented by a specific instrument driver.
validate_trace_papam
floating point type. Has to be 'single' or 'double'. Defaults to 'single'.
$inst->get_traces_data(timeout => 1, traces => [1, 2, 3], precision => 'single');
Return the traces data as a 2D PDL in order of appearance in traces array.
traces
[ [x_1, x_2, x_3, ..., x_N], [y1_1, y1_2, y1_3, ..., y1_N], [y2_1, y2_2, y2_3, ..., y2_N], [y3_1, y3_2, y3_3, ..., y3_N], ............................. ]
$inst->display_trace_data(timeout => 1, trace => 2, traceXY => $data, precision => 'single');
Display a given trace data. traceXY is 2D pdl with trace X and Y values
traceXY
[ [x_1, x_2, x_3, ..., x_N], [y_1, y_2, y_3, ..., y_N], ]
$inst->display_trace(timeout => 1, trace => 2, precision => 'single');
Displays a single trace data on a computer screen. It adds a new trace to the plot.
The function internally calls display_traces, so it is equivalent to
display_traces
$inst->display_traces(timeout => 1, traces => [ 2 ], precision => 'single');
Return the trace data as a 2D PDL in order of appearance in traces array.
[ [x_1, x_2, x_3, ..., x_N], [y_1, y_2, y_3, ..., y_N] ]
$inst->display_traces(timeout => 1, traces => [1, 2, 3], precision => 'single');
Displays required traces data on a computer screen. It adds plots if called several times.
Returns start and stop values of X.
Returns number of points in the trace.
This software is copyright (c) 2019 by the Lab::Measurement team; in detail:
Copyright 2018 Eugeniy E. Mikhailov, Simon Reinhardt
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Lab::Measurement, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lab::Measurement
CPAN shell
perl -MCPAN -e shell install Lab::Measurement
For more information on module installation, please visit the detailed CPAN module installation guide.