PDL::McIDAS -- PDL interface to McIDAS. use PDL; use PDL::McIDAS; ($level,$rows,$columns,$year,$day,$hour,$validity, $num_grid,$maptype,$proj_34,$proj_35,$proj_36, $proj_37,$proj_38,$proj_39, $num_grids,$pfile,$gridname, $levelunits,$gridorigin)= PDL::McIDAS::grdlist('GRID0101'); $data=PDL::McIDAS::grd2pdl('GRID0101',5); PDL::McIDAS::mcimagrgb($ir,$ig,$ib,{TRANSFORM=>$tr}); PDL::McIDAS allows you to read into PDL the McIDAS GRID files. There is also a function to plot RGB images. Xavier Calbet and Javier Garcia-Pereda (xcalbet@yahoo.es, javierpereda@yahoo.com) Copyright (c) 2003 Xavier Calbet and Javier Garcia-Pereda (xcalbet@yahoo.es, javierpereda@yahoo.com). All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

grdlist
PDL::McIDAS::grdlist is equivalent to the GRDLIST command from McIDAS and shows the various header parameters of the McIDAS GRID file. It accepts as argument a McIDAS GRID file name. As output it gives an array of PDLs, each one of them containing a different parameter of the GRID header. As an example, if a McIDAS GRID file called "GRID0101" is to be read into PDL we will proceed as follows: ($level,$rows,$columns,$year,$day,$hour,$validity, $num_grid,$maptype,$proj_34,$proj_35,$proj_36, $proj_37,$proj_38,$proj_39, $num_grids,$pfile,$gridname, $levelunits,$gridorigin)= PDL::McIDAS::grdlist('GRID0101'); $cgridname=PDL::Char->new(PDL::copy($gridname)); print "level ",$level,"\n"; print "rows ",$rows,"\n"; print "columns ",$columns,"\n"; print "year ",$year,"\n"; print "day ",$day,"\n"; print "hour ",$hour,"\n"; print "validity ",$validity,"\n"; print "num_grid ",$num_grid,"\n"; print "maptype ",$maptype,"\n"; print "proj_34 ",$proj_34,"\n"; print "proj_35 ",$proj_35,"\n"; print "proj_36 ",$proj_36,"\n"; print "proj_37 ",$proj_37,"\n"; print "proj_38 ",$proj_38,"\n"; print "proj_39 ",$proj_39,"\n"; print "num_grids ",$num_grids,"\n"; print "pfile ",$pfile,"\n"; print "gridname ",$gridname,"\n"; print "cgridname ",$cgridname,"\n"; print "levelunits ",$levelunits,"\n"; print "gridorigin ",$gridorigin,"\n";

grd2pdl
PDL::McIDAS::grd2pdl reads the data from a McIDAS grid and transfers it to a PDL. As arguments it accepts a McIDAS GRID file name and the grid number to be read. As output, a PDL is given containing the data from the GRID file. The grid number can be found with the grdlist function in the $num_grid PDL header parameter of the McIDAS GRID file (see the description of the grdlist function in this man page). As an example: $data=PDL::McIDAS::grd2pdl('GRID0101',5);

mcimagrgb
PDL::McIDAS::mcimagrgb draws an RGB image with PGPLOT, composing colors with the RGB data. As input it accepts three two dimensional PDLs with ranges between 0 and 255 which correspond to the red, green and blue colors and the modifiers to the PGPLOT imag function. As an example: $ir=pdl(byte,[[255,255],[255,255]]); $ig=pdl(byte,[[0,255],[255,0]]); $ib=pdl(byte,[[0,0],[255,255]]); dev('/xserve'); env(-0.5,1.5,-0.5,1.5); $tr=pdl( [ 0, 1, 0, 0, 0, 1 ]); env(0,1,0,1); PDL::McIDAS::mcimagrgb($ir,$ig,$ib,{TRANSFORM=>$tr});

h_grdlist
Signature: ([o]level(3000);[o]rows(3000);[o]columns(3000);[o]year(3000);[o]day(3000);[o]hour(3000);[o]validity(3000);[o]num_grid(3000);[o]maptype(3000);[o]proj_34(3000);[o]proj_35(3000);[o]proj_36(3000);[o]proj_37(3000);[o]proj_38(3000);[o]proj_39(3000);[o]num_grids();byte file(256,1);byte [o]gridname(4,3000);byte [o]levelunits(4,3000);byte [o]gridorigin(4,3000)) Inner function (not oriented to the end user) used to lists the grid headers of the McIDAS grid file defined in grid_file.

h_grd2pdl
Signature: ([o]data(elements); num_grid(); byte file(256,1)) Inner function (not intended for end users) which copies a given grid from a McIDAS grid file to a pdl matrix.