Skip to content

Problem making ASD when units are not recognized

Created by: areeda

Notebook view https://ldas-jobs.ligo.caltech.edu/~areeda/python/UnitProblem.html Notebook https://ldas-jobs.ligo.caltech.edu/~areeda/python/UnitProblem.ipynb

When making ASD of channel with units of "Meters/s" we get: WARNING: UnitsWarning: 'Meters/S' did not parse as unit: At col 0, Meters is not a valid unit. Did you mean meter? [astropy.units.core] ...

     49         raise ValueError("Unknown scaling: %r" % scaling)
     50     if tsunit:
---> 51         specunit = tsunit ** 2 / baseunit
     52     else:
     53         specunit = baseunit ** -1

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/astropy/units/core.pyc in _unrecognized_operator(self, *args, **kwargs)
   1736         raise ValueError(
   1737             "The unit {0!r} is unrecognized, so all arithmetic operations "
-> 1738             "with it are invalid.".format(self.name))
   1739 
   1740     __pow__ = __div__ = __rdiv__ = __truediv__ = __rtruediv__ = __mul__ = \

ValueError: The unit u'Meters/S' is unrecognized, so all arithmetic operations with it are invalid.```