Lab::Moose::DataFile::Read - Read a gnuplot-style 2D data file
version 3.791
use Lab::Moose::DataFile::Read; # Read gnuplot ASCII datafile and return each column as a 1D PDL my @columns = read_gnuplot_format( type => 'columns', file => 'data.dat', num_columns => 2, ); # Read block structured 3D gnuplot ASCII datafile and return # 2D PDL for each parameter (column) my @pixel_maps = read_gnuplot_format( type => 'maps', file => '3d_data.dat', num_columns => 3, ); # Read 3D gnuplot ASCII datafile and return 3D PDL with dimensions # [column, line, block] my $pdl = read_gnuplot_format( type => 'bare', file => '3d_data.dat', num_columns => 3, );
Exported by default. Allowed parameters:
type
Either 'columns', 'maps', or 'bare'.
'columns'
'maps'
'bare'
file
fh
Provide an open file handle instead of a filename.
num_columns (mandatory)
Number of columns in the datafile. Used for a consistency check.
This software is copyright (c) 2021 by the Lab::Measurement team; in detail:
Copyright 2016 Simon Reinhardt 2017 Andreas K. Huettel, Simon Reinhardt 2018 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.
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.