def callback_save_indices():
    '''Save index from bokeh textinput'''
    import datetime
    import os
    import pylleo
    import yamlord

    if datadirs_select.value != 'None':
        path_dir = os.path.join(parent_input.value, datadirs_select.value)
        cal_yaml_path = os.path.join(path_dir, 'cal.yml')

        param = (param_select.value).lower().replace('-','_')
        region = region_select.value
        start = int(start_input.value)
        end   = int(end_input.value)

        msg = '''
              Updated calibration times for:<br>
              <b>{}/{}</b>
              <br>
              <br>
              star index: {}<br>
              end index:  {}<br>
              '''.format(param, region, start, end)
        output_window.text = output_template.format(msg)

        cal_dict = pylleo.lleocal.read_cal(cal_yaml_path)
        # Generalize for Class-ifying
        cal_dict = pylleo.lleocal.update(data, cal_dict, param, region, start, end)
        yamlord.write_yaml(cal_dict, cal_yaml_path)
    else:
        msg = '''
              You must first load data and select indices for calibration
              regions before you can save the indices to `cal.yml`
              '''
        output_window.text = output_template.format(msg)

    return None
Save index from bokeh textinput