I took that line of code and put in into a try/except block and it works beautifully, really clears up the code. Thanks.

On Aug 5, 2013, at 2:05 PM, Simon Liedtke <notifications@github.com> wrote:

> In sunpy/net/hek2vso/hek2vso.py:
> 
> > +    Designed to discover the units of the wavelength passed in and convert
> > +    it into angstroms.
> > +
> > +    wavelength: The integer that contains the wavelength value.
> > +    units: The string that contains the units of the wavelength.
> > +    """
> > +    if units == 'nm':
> > +        return u.nm.to(u.angstrom, wavelength)
> > +    elif units == 'mm':
> > +        return u.mm.to(u.angstrom, wavelength)
> > +    elif units == 'cm':
> > +        return u.cm.to(u.angstrom, wavelength)
> > +    elif units == 'm':
> > +        return u.m.to(u.angstrom, wavelength)
> > +    elif units == 'angstrom':
> > +        return u.angstrom.to(u.angstrom, wavelength)
> Lines 32-41 can be simplified to (not tested):
> 
> if units in ('nm', 'mm', 'cm', 'm', 'angstrom'):
>     return getattr(u, units).to(u.angstrom, wavelength)
> —
> Reply to this email directly or view it on GitHub.
>