The distances to objects far beyond our Galaxy can be determined from how fast they are moving away from us , which can be measured by looking at the redshifts of their spectra.
More distant objects have spectra in which features are shifted to longer, redder, wavelengths.
The UVOT has a grism which can produce spectra of objects above 17 th magnitude. However, most GRB afterglows will rapidly fade below this limit. At cosmological distances, the Swift measurements will be more accurate than the currently known conversion between redshift and distance, so the reduced precision will have little scientific impact. The amount of absorbing material is often parameterized by the column density, N H , the number of hydrogen atoms in a 1 cm square column between the observer and the source. Since hydrogen is not always the material which absorbs the photons, this is adjusted using estimates for the number of heavier atoms and dust particles per hydrogen atom, and these depend on qualities of the interstellar medium.