class xspec.RModel(resp, parNames, rmodName)

Response Model class.

Response models are functions which act upon the detector RMF. XSPEC currently has just one response model: gain, which is a built-in attribute of the Response class. RModel objects are not intended for stand-alone creation: its __init__ function should be considered private.


  • <parameters>

    When RModel is ON, it contains an attribute of type Parameter for every parameter in the model. An RModel is turned ON by a 'set' operation on ANY of its parameters. For example with the gain RModel:

    >>> resp.gain.offset = .03

    automatically creates offset AND slope parameters if they don't already exist (slope would be initialized to its default value of 1.0). The shift is then applied immediately to the Response object resp.

    When RModel is OFF (see the RModel.off() method), the parameters are not accessible.

  • isOn

    Boolean flag showing the On/Off status of the RModel (get only).

  • parameterNames

    List of the response model's parameter names (get only).


Remove response parameters and turn the model OFF.

The Response is restored to its original state.

property isOn

On/Off indicator for RModel object.