How is the diameter of a non-circular (effective) aperture actually measured?

An f-number is determined as the ratio of the focal length to the diameter of the entrance pupil. But the actual aperture diaphragm is usually not a perfect circle. Its shape is determined by the number of diaphragm blades and their edge (curved or straight). Depending on those the aperture might be a pentagon, hexagon, octagon… and with straight or curved edges. So how is the diameter actually determined? Is it for example twice the distance between the center and the widest point at an intersection of the blades? Twice the distance between the center and the nearest point on an edge?