alchem0x2A / py-wdf-reader

Python package for read-only accessing the wdf Raman spectroscopy from Ranishaw WiRE software
MIT License
40 stars 16 forks source link

[Bug] switch matrix row and column when reading mapping data #7

Closed alchem0x2A closed 4 years ago

alchem0x2A commented 4 years ago

The current code seems to output mapped spectra data with wrong row and column order.

alchem0x2A commented 4 years ago

The problem comes from function WDFReader._reshape_spectra

Proposed solution:

  1. Series and multi-entry single point data --> spectra.shape == (counts, pps)
  2. Line scene (w == 1 or h == 1) --> spectra.shape == (counts, pps)
  3. Mapped data spectra.shape == (h, w, pps)