A federal judge today refused to overrule the honor code at Yarmouth High, in the case of a 16-year-old Yarmouth lacrosse player  suspended from sports for admitting to drinking a beer in a photo on Facebook.

The girl, a minor whom The Portland Press Herald is not naming, must continue to undergo substance abuse counseling by the school’s social worker as a stipulation under the school’s honor code.

Judge D. Brock Hornby denied the girl’s request for a temporary restraining order just before 5 p.m.

She is suspended from games and a team trip next week, but can resume play after completing the suspension.

The girl’s parents challenged the constitutionality of the school’s extracurricular honor code in a civil suit filed last week.

“I’m not surprised,” said David Ray, chairman of the Yarmouth School Committee. “This is one of those examples where the law is what your common sense would be.”

The girl’s attorney said his client decided she did not want any special treatment, and agreed to the three-week suspension from lacrosse, dropping a request to be reinstated while the matter plays out in court.

“I’m a little disappointed,” said Michael J. Waxman, her attorney who has a practice in Portland. “I was hoping at the very least the judge would permit this family to choose an appropriate mental health worker.”