HDF(3pm)

🌈 HDF(3pm) β€” PDL::IO::HDF πŸ’–

okay bestie, welcome to the User Contributed Perl Documentation for PDL::IO::HDF β€” it's giving "your PDL gateway into the HDF4 library" and honestly? iconic. ✨


πŸŽ€ NAME

PDL::IO::HDF β€” a PDL interface to the HDF4 library. πŸ’…


✨ SYNOPSIS

  use PDL;
  use PDL::IO::HDF;

  # Open file 'foo.hdf' with all hdf interface:
  my $HDF = PDL::IO::HDF->new("foo.hdf");

  # You can call functions from either the SD or VS interfaces:
  $HDF->{SD}->SDget("Foo_data");
  $HDF->{VS}->VSgetnames();

  # To close the file:
  $HDF->close();

see how clean that is?? you open the file once and then you're just vibing with whichever interface you need 🫢


πŸ’– DESCRIPTION

This library provides functions to manipulate HDF files with the SD, VS, and V HDF interfaces. πŸ¦‹

For more information on HDF, see http://hdf.ncsa.uiuc.edu/

The 'new' function of this package uses the 'new' functions for the individual HDF interfaces. This allows you to use all of the interfaces at one time (if you don't mind the extended syntax). πŸ‘‘

Actually using the HDF files comes down to using one of the particular interfaces, for that see the docs on those modules. πŸ“š


🌸 CONSTANTS

These constants are now implemented using the perl 'use constant' pragma. ✨

Previously, they were just scalars that were changeable (which is a no-no). πŸ’€

See constant(1) for more info on how to use these in your code.

πŸ”“ Access Modes

  • DFACC_READ β€” Open the file in read-only mode. (look, don't touch βœ‹)
  • DFACC_WRITE β€” Open the file in write-only mode. (touch, don't look πŸ‘€)
  • DFACC_CREATE β€” Clobber the file (create it if it doesn't exist, and then open with RW mode). clobber is right there in the name bestie, be careful πŸ’€
  • DFACC_ALL β€” Open the file in read-write mode. πŸ”₯
  • DFACC_RDONLY β€” Same as DFACC_READ
  • DFACC_RDWR β€” Open the file in read-write mode.

🧡 VS Interface Interlacing Modes

  • FULL_INTERLACE
  • NO_INTERLACE

🧬 HDF4 Data Type Codes:

  • DFNT_UCHAR β€” HDF's unsigned char ~= PDL's byte
  • DFNT_CHAR β€” HDF's char ~= PDL's byte
  • DFNT_FLOAT32 β€” HDF's 32-bit float ~= PDL's float
  • DFNT_FLOAT64 β€” HDF's 64-bit float ~= PDL's double
  • DFNT_INT8 β€” HDF's 8-bit integer ~= PDL's byte
  • DFNT_UINT8 β€” HDF's 8-bit unsigned integer ~= PDL's byte
  • DFNT_INT16 β€” HDF's 16-bit integer ~= PDL's short
  • DFNT_UINT16 β€” HDF's 16-bit unsigned integer ~= PDL's ushort
  • DFNT_INT32 β€” HDF's 32-bit integer ~= PDL's long
  • DFNT_INT64 β€” HDF's 32-bit integer ~= PDL's long

🎁 Misc. HDF Library Constants:

  • MAX_NC_NAME β€” This is the max name length for SDS variables, attribtues, and just about anything else. (yes, "attribtues" β€” we are quoting the source, not fixing it, no cap πŸ™ˆ)
  • MAX_VAR_DIMS β€” This is the max number of dims a HDF variable can have.
  • VNAMELENMAX β€” Max length of V interface names.

πŸ‘‘ CURRENT AUTHOR & MAINTAINER

Judd Taylor, Orbital Systems, Ltd. β€” judd dot t at orbitalsystems dot com πŸ’Œ


πŸ•°οΈ PREVIOUS AUTHORS

Patrick Leilde patrick.leilde@ifremer.fr β€” contribs of Olivier Archer olivier.archer@ifremer.fr 🌸


πŸ¦‹ SEE ALSO

perl(1), PDL(1), PDL::IO::HDF::SD(1), PDL::IO::HDF::VS(1), constant(1).


and that's the whole page, bestie πŸ’– go forth and read your HDF files ✨

signing off β€” this one's from perl v5.38.2, dated 2024-04-10, and it's called HDF(3pm) in case the vibe check needed a receipt πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from