def orient(mag_azimuth, field_dip, or_con):
    """
    uses specified orientation convention to convert user supplied orientations
    to laboratory azimuth and plunge
    """
    or_con = str(or_con)
    if mag_azimuth == -999:
        return '', ''
    if or_con == '1':
        return mag_azimuth, -field_dip
    if or_con == '2':
        return mag_azimuth - 90.0, -field_dip
    if or_con == '3':
        return mag_azimuth, 90.0 - field_dip
    if or_con == '4':
        return mag_azimuth, field_dip
    if or_con == '5':
        return mag_azimuth, field_dip - 90.0
    if or_con == '6':
        return mag_azimuth - 90.0, 90.0 - field_dip
    if or_con == '7':
        return mag_azimuth - 90.0, 90.0 - field_dip
    print('Error in orientation convention')
