>>> from gwcs.wcs import WCS as gWCS
>>> from gwcs import coordinate_frames as cf
>>> from astropy.modeling import models
>>> from astropy import units as u
>>> input_frame = cf.CoordinateFrame(naxes=1, axes_type=('SPATIAL',),
... axes_order=(0,), name="pixels",
... unit=(u.pix,), axes_names=('x',))
>>> output_frame = cf.SpectralFrame(unit=(u.nm,), axes_names=('lambda',))
>>> wave_model = models.Scale(0.1) | models.Shift(500)
>>> wcs = gWCS([(input_frame, wave_model),
... (output_frame, None)])
>>> wcs([0,1,2], with_units=False)
array([500. , 500.1, 500.2])
>>> wcs([0,1,2], with_units=True)
<SpectralCoord 500. nm>
>>> wcs([0,1,2], with_units=True)
<SpectralCoord [500. , 500.1, 500.2] nm>