def fastScan(scanjob, station):
    """ Returns whether we can do a fast scan using an awg 

    Args:
        scanjob

    Returns
        f (int): 0: no fast scan possible, 1: scan2Dfast, 2: all axis

    """

    if not 'awg' in station.components:
        return 0

    awg = getattr(station, 'awg')
    if awg is None:
        return False

    if not awg.awg_gate(scanjob['sweepdata']['param']):
        # sweep gate is not fast, so no fast scan possible
        return 0
    if 'stepdata' in scanjob:
        if awg.awg_gate(scanjob['stepdata'].get('param', None)):
            return 2
    return 1