Ejemplo n.º 1
0
 def setup_callbacks(self):
     self._wcs_set = False
     self._changing_slice_requires_wcs_update = None
     self.axes.set_adjustable('datalim')
     self.state.add_callback('x_att', self._set_wcs)
     self.state.add_callback('y_att', self._set_wcs)
     self.state.add_callback('slices', self._on_slice_change)
     self.state.add_callback('reference_data', self._set_wcs)
     self.axes._composite = CompositeArray()
     self.axes._composite_image = imshow(self.axes, self.axes._composite, aspect='auto',
                                         origin='lower', interpolation='nearest')
     self._set_wcs()
Ejemplo n.º 2
0
 def setup_callbacks(self):
     self._wcs_set = False
     self._changing_slice_requires_wcs_update = None
     self.axes.set_adjustable('datalim')
     self.state.add_callback('x_att', self._set_wcs)
     self.state.add_callback('y_att', self._set_wcs)
     self.state.add_callback('slices', self._on_slice_change)
     self.state.add_callback('reference_data', self._set_wcs)
     self.axes._composite = CompositeArray()
     self.axes._composite_image = imshow(self.axes,
                                         self.axes._composite,
                                         aspect='auto',
                                         origin='lower',
                                         interpolation='nearest')
     self._set_wcs()
Ejemplo n.º 3
0
    def __init__(self, axes, viewer_state, layer_state=None, layer=None):

        super(ImageSubsetLayerArtist, self).__init__(axes, viewer_state,
                                                     layer_state=layer_state, layer=layer)

        self.subset_array = ImageSubsetArray(self._viewer_state, self)

        self.image_artist = imshow(self.axes, self.subset_array,
                                   origin='lower', interpolation='nearest',
                                   vmin=0, vmax=1, aspect=self._viewer_state.aspect)

        self._line_x = self.axes.axvline(0)
        self._line_x.set_visible(False)

        self._line_y = self.axes.axhline(0)
        self._line_y.set_visible(False)

        self.mpl_artists = [self.image_artist, self._line_x, self._line_y]
Ejemplo n.º 4
0
    def __init__(self, axes, viewer_state, layer_state=None, layer=None):

        super(ImageSubsetLayerArtist, self).__init__(axes, viewer_state,
                                                     layer_state=layer_state, layer=layer)

        self.subset_array = ImageSubsetArray(self._viewer_state, self)

        self.image_artist = imshow(self.axes, self.subset_array,
                                   origin='lower', interpolation='nearest',
                                   vmin=0, vmax=1, aspect=self._viewer_state.aspect)

        self._line_x = self.axes.axvline(0)
        self._line_x.set_visible(False)

        self._line_y = self.axes.axhline(0)
        self._line_y.set_visible(False)

        self.mpl_artists = [self.image_artist, self._line_x, self._line_y]