def acquire_single_linear_frequency_span(file_name, start_freq=None,
                                         stop_freq=None, center_freq=None,
                                         span=None, nr_avg=1, sweep_mode='auto',
                                         nbr_points=101, power=-20,
                                         bandwidth=100, measure='S21',
                                         options_dict=None):
    """
    Acquires a single trace from the VNA.
    Inputs:
            file_name (str), name of the output file.
            start_freq (float), starting frequency of the trace.
            stop_freq (float), stoping frequency of the trace.
            center_freq (float), central frequency of the trace.
            span (float), span of the trace.
            nbr_points (int), Number of points within the trace.
            power (float), power in dBm.
            bandwidth (float), bandwidth in Hz.
            measure (str), scattering parameter to measure (ie. 'S21').
    Output:
            NONE

    Beware that start/stop and center/span are just two ways of configuring the
    same thing.
    """
    # set VNA sweep function
    if start_freq != None and stop_freq != None:
        MC_instr.set_sweep_function(swf.ZNB_VNA_sweep(VNA_instr,
                                                      start_freq=start_freq,
                                                      stop_freq=stop_freq,
                                                      npts=nbr_points,
                                                      force_reset=True))
    elif center_freq != None and span != None:
        MC_instr.set_sweep_function(swf.ZNB_VNA_sweep(VNA_instr,
                                                      center_freq=center_freq,
                                                      span=span,
                                                      npts=nbr_points,
                                                      force_reset=True))

    # set VNA detector function
    MC_instr.set_detector_function(det.ZNB_VNA_detector(VNA_instr))

    # VNA settings
    # VNA_instr.average_state('off')
    VNA_instr.bandwidth(bandwidth)

    # hack to measure S parameters different from S21
    str_to_write = "calc:par:meas 'trc1', '%s'" % measure
    print(str_to_write)
    VNA_instr.visa_handle.write(str_to_write)

    VNA_instr.avg(nr_avg)
    VNA_instr.number_sweeps_all(nr_avg)
    VNA_instr.average_mode(sweep_mode)

    VNA_instr.power(power)
    VNA_instr.timeout(10**4)

    t_start = ma.a_tools.current_timestamp()
    MC_instr.run(name=file_name)
    t_stop = ma.a_tools.current_timestamp()
    t_meas = ma.a_tools.get_timestamps_in_range(t_start, t_stop, label=file_name)

    assert len(t_meas) == 1, "Multiple timestamps found for this measurement"
    t_meas = t_meas[0]
    # ma.Homodyne_Analysis(auto=True, label=file_name, fitting_model='hanger')
    # ma.VNA_analysis(auto=True, label=file_name)
    ma2.VNA_analysis(auto=True, t_start=None, options_dict=options_dict)