ResidImage

class sherpa.image.ResidImage[source] [edit on github]

Bases: Image

The data - model image.

Methods

close()

Stop the image viewer.

delete_frames()

Delete all the frames open in the image viewer.

get_region(coord)

Return the region defined in the image viewer.

image([shape, newframe, tile])

Send the data to the image viewer to display.

open()

Start the image viewer.

prepare_image(data, model)

Create the data to display.

set_region(reg, coord)

Set the region to display in the image viewer.

set_wcs(eqpos, sky, name)

Send the WCS information to the image viewer.

xpaget(arg)

Return the result of an XPA call to the image viewer.

xpaset(arg[, data])

Return the result of an XPA call to the image viewer.

See also

RatioImage

Methods Summary

close()

Stop the image viewer.

delete_frames()

Delete all the frames open in the image viewer.

get_region(coord)

Return the region defined in the image viewer.

image([shape, newframe, tile])

Send the data to the image viewer to display.

open()

Start the image viewer.

prepare_image(data, model)

Create the data to display.

set_region(reg, coord)

Set the region to display in the image viewer.

set_wcs(eqpos, sky, name)

Send the WCS information to the image viewer.

xpaget(arg)

Return the result of an XPA call to the image viewer.

xpaset(arg[, data])

Return the result of an XPA call to the image viewer.

Methods Documentation

static close() → None [edit on github]

Stop the image viewer.

static delete_frames() → None [edit on github]

Delete all the frames open in the image viewer.

static get_region(coord: str) → str [edit on github]

Return the region defined in the image viewer.

Parameters:
coordstr

The name of the coordinate system (the empty string means to use the current system).

Returns:
regionstr

The region, or regions, or the empty string.

image(shape: tuple[int, ...] | None = None, newframe: bool = False, tile: bool = False) → None[source] [edit on github]

Send the data to the image viewer to display.

Parameters:
shapetuple or None, optional

The shape of the data (optional).

newframebool, optional

Should the pixels be displayed in a new frame?

tilebool, optional

Should the display be tiled?

static open() → None [edit on github]

Start the image viewer.

prepare_image(data: Data2D, model: Model) → None[source] [edit on github]

Create the data to display.

Parameters:
data

The Sherpa data object to display.

model

The model to evaluate on the data grid.

static set_region(reg: str, coord: str) → None [edit on github]

Set the region to display in the image viewer.

Parameters:
regstr

The region to display.

coordstr

The name of the coordinate system (the empty string means to use the current system).

static set_wcs(eqpos: WCS | None, sky: WCS | None, name: str) → None [edit on github]

Send the WCS information to the image viewer.

Changed in version 4.19.0: This is now a static method and the arguments have changed.

Parameters:
eqpos, skyWCS | None

The transforms, if available.

namestr

The name to display.

static xpaget(arg: str) → str [edit on github]

Return the result of an XPA call to the image viewer.

Send a query to the image viewer.

Parameters:
argstr

A command to send to the image viewer via XPA.

Returns:
returnvalstr
static xpaset(arg: str, data: str | bytes | None = None) → None [edit on github]

Return the result of an XPA call to the image viewer.

Send a command to the image viewer.

Parameters:
argstr

A command to send to the image viewer via XPA.

dataoptional

The data for the command.