Converting OM grism spectra for use in XSPEC


OM grism spectral files produced by the XMM-Newton pipeline, and by omgchain, are standard FITS files but they are not compliant with the XSPEC spectral fitting package. This thread explains how to convert them into XSPEC compliant files, along with the generation of the required response files.

Expected Outcome

The user should be able to take a SAS-generated grism spectrum FITS file and create an output file and response file, that are compatible with XSPEC.

SAS Tasks to be Used


Useful Links


Last Reviewed: 02 december 2021, for SAS v20.0

Last Updated: 30 September 2020




The SAS task, omgrismresp, has superseded an earlier routine, grismresp, for the purposes of making XSPEC-ready spectral files. We use omgrismresp here to generate XSPEC-compliant spectral data, along with the necessary grism response information.

After setting up the SAS (following the SAS startup thread), run the omgrismresp task as,

    omgrismresp inputspec={inputfile} outputspec={outputfile} responsefile={output_response_file}


    omgrismresp inputspec=P0810242101OMS027SPECTR0000.FIT outputspec=spectrum.pha responsefile=response.rsp

The output spectrum.pha file should be immediately readable by XSPEC and the response file should also be automatically recognized by XSPEC.