Political scientists are trying to measure the ideology of candidates for mayor of San Francisco in an effort to give voters a better guide as to who most closely shares their views. San Francisco’s crowded field of 16 candidates and a ranked-choice voting system, which some find baffling, seemed to be the ideal testing ground for a project that measures mayoral hopefuls positions by surveying them on past actions at the Board of Supervisors and on current policy debates. Voters aren’t always as well informed as they can be for city elections, which tend to attract less attention than national races and also lack the party labels that help distinguish each candidate, said Christopher S. Elmendorf, a professor of law at the University of California, Davis, and a visiting professor at U.C. Hastings College of the Law in San Francisco.