def lauegroup_to_lattice(lauegroup):
    """Convert a Laue group representation (from pointless, e.g. I m m m)
    to something useful, like the implied crystal lattice (in this
    case, oI.)"""

    # this has been calculated from the results of Ralf GK's sginfo and a
    # little fiddling...
    #
    # 19/feb/08 added mI record as pointless has started producing this -
    # why??? this is not a "real" spacegroup... may be able to switch this
    # off...
    #                             'I2/m': 'mI',

    lauegroup_to_lattice = {
        "Ammm": "oA",
        "C2/m": "mC",
        "Cmmm": "oC",
        "Fm-3": "cF",
        "Fm-3m": "cF",
        "Fmmm": "oF",
        "H-3": "hR",
        "H-3m": "hR",
        "R-3:H": "hR",
        "R-3m:H": "hR",
        "I4/m": "tI",
        "I4/mmm": "tI",
        "Im-3": "cI",
        "Im-3m": "cI",
        "Immm": "oI",
        "P-1": "aP",
        "P-3": "hP",
        "P-3m": "hP",
        "P2/m": "mP",
        "P4/m": "tP",
        "P4/mmm": "tP",
        "P6/m": "hP",
        "P6/mmm": "hP",
        "Pm-3": "cP",
        "Pm-3m": "cP",
        "Pmmm": "oP",
    }

    updated_laue = ""

    for l in lauegroup.split():
        if not l == "1":
            updated_laue += l

    return lauegroup_to_lattice[updated_laue]