Lab::Moose::DataFile::Gnuplot - Text based data file.
use Lab::Moose; my $folder = datafolder(); my $file = datafile( type => 'Gnuplot', folder => $folder, filename => 'gnuplot-file.dat', columns => [qw/gate bias current/] ); $file->log_comment(comment => "some extra comment"); $file->log_newline(); $file->log(gate => 1, bias => 2, current => 3); $block = [1, 2, 3, 4, 5, 6]; $file->log_block( prefix => {gate => 1, bias => 2}, block => $block );
Requires a 'column' attribute in addition to the Lab::Moose::DataFile requirements.
$file->log(column1 => $value1, column2 => $value2, ...);
Log one line of data.
$file->log_block( prefix => {column1 => $value1, ...}, block => $block, add_newline => 0 );
Log a 1D or 2D PDL or array ref. The first dimension runs over the datafile rows. You can add prefix columns, which will be the same for each line in the block. E.g. when using a spectrum analyzer inside a voltage sweep, one would log the returned PDL prefixed with the sweep voltage.
$file->log_newline();
print "\n" to the datafile.
$file->log_comment(comment => $string);
log a comment string, which will be prefixed with '#'. If $string contains newline characters, several lines of comments will be written.
$string
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.