def FnMODE(acqu, proc):
    """
    complex type along F1 for a 2D or 3D
    search FnMODE in acqu
    and if absent, search MC2 in proc
    None    0
    QF      1
    QSEQ    2
    TPPI    3
    States  4
    States-TPPI 5
    Echo-AntiEcho   6
    
    returns either 0 (real) or 1 (complex)
    """
    try:
        mode = acqu['$FnMODE']
    except KeyError:
        try:
            mode = proc['$MC2']
        except KeyError:
            mode = '0'
    if mode in ('4', '5'):
        r = 1
    else:
        r = 0
    return r
