How is the diameter of a gas giant calculated? As we know atmospheres of celestial bodies don't just stop at a given distance. They gradually become less dense as you move away from the center. 

I understand that the diameter of stars is typically given to be that of their photosphere (i.e. the boundary where a laser shined from behind the star toward an observer would just barely be visable). 

I assumed that a similar method using optical depth also applied to gas giants. However wikipedia currently has the somewhat confusing explanation:


  As Jupiter has no surface, the base of its atmosphere is usually
  considered to be the point at which atmospheric pressure is equal to 1
  MPa (10 bar), or ten times surface pressure on Earth.


Which isn't quite the same thing as diameter, but it got me thinking: When wikipedia or a textbook or whatever lists a diameter for a gas giant how is that figure arrived at?
I won't argue with the wikipedia definition (although the NASA Jupiter fact sheet lists it as the radius at 1 bar), but just to point out that the scale height of the atmosphere of Jupiter is given by, $h \sim kT/m g$, where $T$ is the temperature, $m$ is the mean molecular mass and $g$ is local gravity. Putting in some numbers: $ g \simeq 24.8 m/s^2$, $m \simeq 2.2 m_u$, $T \simeq 165K$, gives $h \simeq 25\ km$. Thus the pressure changes extremely rapidly compared with the actual radius of a gas giant,and is very small compared to the difference for instance between the polar and equatorial radius for a gas giant (like Jupiter) with significant rotation.

So, whether you give a planet's radius at 1 bar or 10 bar isn't going to make a lot of difference $&lt;100\ km$.

However your comment about whether the definition is analogous to the photosphere of a star does raise an interesting question. The effective opacity radius of a gas giant can vary with the wavelength of light. It is this property that can be used in conjunction with transiting exoplanetary systems to learn something about their atmospheres. For instance, it requires less physical depth of a gas to block wavelengths corresponding to the strong 589nm sodium doublet and thus the exoplanet is opaque at larger radii at this wavelength and thus has a (slightly) deeper transit. This provides the opportunity for transit transmission spectroscopy. e.g. http://adsabs.harvard.edu/abs/2012MNRAS.426.1663S

Another example is that at UV and X-ray wavelengths there have been observations suggesting that hot Jupiters have very extended (and opaque to high energy photons) atmospheres and may be being photoevaporated. e.g. http://adsabs.harvard.edu/abs/2013ApJ...773...62P

EDIT: So this raises an important distinction. A definition based on the radius at a particular pressure is mostly used by theorists and solar system scientists. However, we still don't know what the atmospheric structures of exoplanets are and can't measure pressures. The radii quoted for exolanets are more akin to how the radius of a star is measured - based on its opacity at the wavelengths being observed.