Closed hughesadam87 closed 10 years ago
Printout issue actually is for any series. Same with slicing:
see related #101
If I do end up making a Series class, would area.plot() now work correctly, or still need transpose()?
Created Spectrum
and MetaSeries
Wavelength slices and boxcar both use transfer. I think pvutils should be modified to return obj.__class() instead of DataFrame and problem will be solved.
For wavelength slices, a new object must be generated using _transfer. Messing with this, I've determined _transfer is necessary because it converts all the important attributes etc...
However, transfer is returning a TimeSpectra. TimeSpectra is supposed to have strict index, strict columns, but these are ignored. Thus, since the index is "u[430.1:680]", index.full_specunit fails. This failure is because _transfer construction doesn't use _strict_index. I tried putting _strict_index in _cnsvd_attr and got an error. In any case, it's not even important for this use case to be strict, but repr_html will not print this out correctly. There's nothing wrong with area, just that it it doesn't have the correct column type to have full_specunit.
A couple solutions come to mind:
area
Area is technically not a timespectra, so shouldn't hack this to make it quack like a timespectra. But the area should carry through... hmm maybe just resorting to our custom plots is the best approach afterall, at least until a suitable new object can be created.