[SciPy-user] [half OT?] best way to store a spectrum
Wed May 27 13:50:20 CDT 2009
On Wed, May 27, 2009 at 11:34 AM, Davide Cittaro <
> Hi all,I have a bunch of spectra listed within a file (mass/intensity
> values). I'm planning to analyze them and match with theoretical spectra...
> In you opinion, which is the best way to store them for an efficient
> In the past this has been done with python arrays (i.e. a spectrum was an
> array of arrays, each peak was a mass/intensity array)...
> Davide Cittaro
I note that you specifically ask about storage.
I store spectra, too. Each one has 5,000 - 10,000 data points, and I have
sequences of them. Up until recently I was simply storing them in numpy
arrays. When the length of the sequence got up to several hundred I
switched to hdf5/PyTables. The greatest advantage is that I don't worry so
much about the structure of my saved datasets. I was starting to lose
sleep. I can also more conveniently store the small bits of metadata, and
other data. Now I'm looking into h5py to lower (?) the overhead. My
primary need is storage, and I don't need PyTables rich abilites.
> Cogentech - Consortium for Genomic Technologies
> via adamello, 16
> 20139 Milano
> tel.: +39(02)574303007
> e-mail: firstname.lastname@example.org
> SciPy-user mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-user