Library for reading and analyzing astrophysical spectral data cubes