splat.classifyByTemplate fails due to lack of Spectrum.dof attribute
brackham opened this issue · comments
splat.classifyByTemplate()
raises AttributeError: 'Spectrum' object has no attribute 'dof'
Here's a minimal example reproducing the problem:
In splat/splat/core.py
it looks like self.dof
was commented out on line 511 at some point when instrument-specific information was removed from that class.
Line 511 in 5ee0da8
Simply removing dof=sp.dof
from line 6389 of splat/splat/core.py
fixed the problem for me because utilities.weightedMeanVar()
calculates a dof
if none is provided.
Offending line:
Line 6389 in 5ee0da8
Suggested fix:
mean,var = weightedMeanVar(sspt,stat,method='ftest')
fixed!