Constructors

Most of the arguments of the methods are optional. Those that have to be supplied are marked 'mandatory'. The pair colour => "red" indicates that the contructors may also be used to set SCAN attributes. The complete list of attributes can be found in section 7.4.3.

use Spectra; 
use GQE; 

$s1 = SCAN->create( name  => "ScanName",   # mandatory
                    start => $start_value, # default: 0
                    stop  => $stop_value,  # default: 1
                    np    => $np,          # default: 1001
                    delta => $delta        # instead of np
                    y_default => $y_d,     # the default y-value
                    title => "title",      # titel of the plot
                    xlabel => "x-desc.",   # description of the x-axis
                    ylabel => "y-desc.",   # description of the y-axis
                    comment => "...",      # creates a comment text string
                    date => "no",          # suppresses the date text
                    colour => "red",       # 
                    ...)

$s1 = SCAN->create( name  => "ScanName",   # mandatory
                    x_ptr => \@arr_x,      # arr_x and arr_y are copied to   
                    y_ptr => \@arr_y,      # the internal data structures
                    title => "title",      # titel of the plot
                    xlabel => "x-desc.",   # description of the x-axis
                    ylabel => "y-desc.",   # description of the y-axis
                    comment => "...",      # creates a comment text string
                    ...);

$s1 = SCAN->copy(   from => $ScanPtr,      # a pointer to a SCAN object or
                    from => "ScanName",    # a name of a SCAN
                    src => ...,            # synonym for 'from' 
                    to => "DestName"       # mandatory
                    title => "title",      # titel of the plot
                    xlabel => "x-desc.",   # description of the x-axis
                    ylabel => "y-desc.",   # description of the y-axis
                    comment => "...",      # creates a comment text string
                      ...);

$s1 = SCAN->read( name  => "whatever",     # mandatory
  	            format => "fio",       # fio, asc, gqe, def.: fio
                    x => "...",            # x-column, default 1
                    y => "...",            # y-column, default 2
                    file_name => "...",    # default: name
                    title => "title",      # titel of the plot
                    xlabel => "x-desc.",   # description of the x-axis
                    ylabel => "y-desc.",   # description of the y-axis
                    comment => "...",      # creates a comment text string
                  ...);

$s1 = SCAN->locate( name  => "whatever",  # mandatory
                    colour => "red",
                    ...)

The method create() has the parameter NP, which stands for the number of points, not the number of intervalls, as for the create command in .gra-speak.

So far read() supports the formats ascii, gqe and fio.

The method locate() works for existing SCAN GQEs only. They could have been created by a restore operation or by some other command that was executed outside the script.