Get the world coordinate of the reference pixel.

        @rtype: float, float
764752
def crval(self):
        
        try:
            return self.wcs.crval1, self.wcs.crval2
        except Exception as ex:
            logging.debug("Couldn't get CRVAL from WCS: {}".format(ex))
            logging.debug("Trying RA/DEC values")

        try:
            return (float(self['RA-DEG']),
                    float(self['DEC-DEG']))
        except KeyError as ke:
            KeyError("Can't build CRVAL1/2 missing keyword: {}".format(ke.args[0]))
1271662
def _get_value(self):
        
        x, y = self._point.x, self._point.y
        self._px, self._py = self._item_point.canvas.get_matrix_i2i(self._item_point,
                                                                    self._item_target).transform_point(x, y)
        return self._px, self._py
379966
def get_transform(self):
        
        return self.aux_transform + \
            self.ref_offset_transform + \
            self.dpi_transform + \
            self.offset_transform
424421
def _get_y_axis(self):
        """"""
        # 0,0 is top/left top top/left pixel. Actual x/y coord of that pixel are (.5,.5).
        y_centers = np.linspace(.5, self.y_size - .5, self.y_size)
        x_centers = y_centers * 0
        return (self.geotransform[3]
                + self.geotransform[4] * x_centers
                + self.geotransform[5] * y_centers)
689826
def nonzero_pixels(self):
        
        nonzero_px = np.where(np.sum(self.raw_data, axis=2) > 0)
        nonzero_px = np.c_[nonzero_px[0], nonzero_px[1]]
        return nonzero_px
208773
def getPixelValue(self, x, y):
        """"""
        assert x < self.size, "x: %d<%d" % (x, self.size)
        assert y < self.size, "y: %d<%d" % (y, self.size)
        # Same as calcOffset, inlined for performance reasons
        offset = x + self.size * (self.size - y - 1)
        #print offset
        value = self.data[offset]
        if value == -32768:
            return -1 # -32768 is a special value for areas with no data
        return value
692898
def pixel(self, coord_x, coord_y):
        # type: (int, int) -> Pixel
        

        try:
            return self.pixels[coord_y][coord_x]  # type: ignore
        except IndexError:
            raise ScreenShotError(
                "Pixel location ({}, {}) is out of range.".format(coord_x, coord_y)
            )
360357
def coordinates(self, reference=None):
        
        coordinates = [i._coordinates for i in self.get_trace(reference)]
        return functools.reduce(lambda a, b: a + b, coordinates)
419205
def _get_bottom_line_coordinates(self):
        """"""

        rect_x, rect_y, rect_width, rect_height = self.rect

        start_point = rect_x, rect_y + rect_height
        end_point = rect_x + rect_width, rect_y + rect_height

        return start_point, end_point
666082
def getBottomRight(self):
        
        return (float(self.get_x()) + float(self.get_width()), float(self.get_y()))
143938
function xtr($x_world) {
  //Translate world coordinates into pixel coordinates
  //The pixel coordinates are those of the ENTIRE image, not just the plot_area
    //$x_pixels =  $this->x_left_margin + ($this->image_width - $this->x_tot_margin)*(($x_world - $this->plot_min_x) / ($this->plot_max_x - $this->plot_min_x)) ;
    //which with a little bit of math reduces to ...
    if ($this->xscale_type == "log") {
      $x_pixels =  $this->plot_origin_x + log10($x_world) * $this->xscale ;
    } else {
      $x_pixels =  $this->plot_origin_x + $x_world * $this->xscale ;
    }
    return($x_pixels);
  }
992930
def _get_pos(self):
        
        if self._canvas.height >= self._max_height:
            return 0
        else:
            return self._canvas.start_line / (self._max_height - self._canvas.height + 1)
1290350
def get_position(self):
        
        with self._lock:
            return self.x, self.y, self.angle
669501
def get_location(self):
        
        origin = self._frame.canvas.origin
        return (self._x + origin[0] + self._offset,
                self._y + origin[1] - self._frame.canvas.start_line)
388241
def bounding_box(self):
        
        if self.world_coords:
            return self.world_obj.findSolid().BoundingBox()
        return self.local_obj.findSolid().BoundingBox()
294042
def C(self):
        '''
        

        '''
        try:
            return self._C
        except AttributeError:
            pass
        self._C = Point(0, 1)
        return self._C
893881
def nan_pixels(self):
        
        nan_px = np.where(np.isnan(np.sum(self.raw_data, axis=2)))
        nan_px = np.c_[nan_px[0], nan_px[1]]
        return nan_px