  Gamma-ray burst (GRB) afterglows are well described by synchrotron emission
originating from the interaction between a relativistic blast wave and the
external medium surrounding the GRB progenitor. We introduce a code to
reconstruct spectra and light curves from arbitrary fluid configurations,
making it especially suited to study the effects of fluid flows beyond those
that can be described using analytical approximations. As a check and first
application of our code we use it to fit the scaling coefficients of
theoretical models of afterglow spectra. We extend earlier results of other
authors to general circumburst density profiles. We rederive the physical
parameters of GRB 970508 and compare with other authors
