def get_meta_data_index_at_scan_parameter(meta_data_array, scan_parameter_name):
scan_parameter_values = meta_data_array[scan_parameter_name]<EOL>diff = np.concatenate(([<NUM_LIT:1>], np.diff(scan_parameter_values)))<EOL>idx = np.concatenate((np.where(diff)[<NUM_LIT:0>], [len(scan_parameter_values)]))<EOL>index = np.empty(len(idx) - <NUM_LIT:1>, dtype={'<STR_LIT>': [scan_parameter_name, '<STR_LIT:index>'], '<STR_LIT>': ['<STR_LIT>', '<STR_LIT>']})<EOL>index[scan_parameter_name] = scan_parameter_values[idx[:-<NUM_LIT:1>]]<EOL>index['<STR_LIT:index>'] = idx[:-<NUM_LIT:1>]<EOL>return index<EOL>
Takes the analyzed meta_data table and returns the indices where the scan parameter changes

    Parameters
    ----------
    meta_data_array : numpy.recordarray
    scan_parameter_name : string

    Returns
    -------
    numpy.ndarray:
        first dimension: scan parameter value
        second dimension: index where scan parameter value was used first