NAME
Lab::Moose::Instrument::DisplayXY - Display with y vs x traces Role for Lab::Moose::Instrument
VERSION
version 3.822
DESCRIPTION
Basic commands to grab and display XY traces
NAME
Lab::Moose::Instrument::DisplayXY - Role of Generic XY display
METHODS
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
-
timeout for the sweep operation. If this is not given, use the connection's default timeout.
- trace
-
number of the trace (1..3) and similar.
get_traceX
$data = $sa->traceX(timeout => 10);
Return X points of a trace in a 1D PDL:
get_traceY
$data = $inst->get_traceY(timeout => 1, trace => 2, precision => 'single');
Return Y points of a given trace in a 1D PDL:
- timeout
-
timeout for the sweep operation. If this is not given, use the connection's default timeout.
- trace
-
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. - precision
-
floating point type. Has to be 'single' or 'double'. Defaults to 'single'.
get_traces_data
$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.
[
[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],
.............................
]
display_trace_data
$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
[
[x_1, x_2, x_3, ..., x_N],
[y_1, y_2, y_3, ..., y_N],
]
display_trace
$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
$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]
]
display_traces
$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.
Return the traces data as a 2D PDL in order of appearance in traces
array.
[
[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],
.............................
]
get_StartX and get_StopX
Returns start and stop values of X.
get_Xpoints_number
Returns number of points in the trace.
COPYRIGHT AND LICENSE
This software is copyright (c) 2022 by the Lab::Measurement team; in detail:
Copyright 2018 Eugeniy E. Mikhailov, Simon Reinhardt
2020 Andreas K. Huettel
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.