Straightforward, apart from the transformation into the photon space. The model is readily available in this space, but the data have to be transformed. This can only be done approximately, using:
where the channel model is the result of folding the photon space model through the instrument response. Note that the photon space data derived from the same spectrum via different models will be different. The transformation is strictly correct only if the model is correct. Hence photon space plots obtained from poorly fitting models are suspect.photon space data = channel data * photon model / channel model
Data errors are transformed into the photon space in exactly the same way as the data.