def create_index(hdf_data, table_name='groundparticles', progress=False):
    """Create a completely sorted index for the x column

    This can speed up queries to select data based on the x column.

    """
    table = hdf_data.get_node('/', table_name)
    if progress:
        print('Ensuring the x column for table %s is indexed.' % table_name)
    try:
        table.cols.x.create_csindex()
    except ValueError:
        table.reindex_dirty()
