azcam_ds9/ds9display.py
def _get_ds9_rois(self, coordinate_type=""):
        """
        Returns all regions as a list of lists, each as [firstcol,lastcol,firstrow,lastrow].
        Ds9 regions are converted to [firstcol,lastcol,firstrow,lastrow] as close as possible.

        :param str coordinate_type: Type of coords as defined by the display server ['image','detector', 'amplifier']
        :return list: List of ROI's
        """

        if coordinate_type == "":
            coordinate_type = self.coordinate_type

        Rois = self.get_regions(
            coordinate_type
        )  # this is a list of roi's, each [shape, roi]
        if not Rois:
            return []

        rois = []
        for roi in Rois:
            if roi[0] == "box":  # box is the only shape supported at this time
                xcenter = roi[1]
                ycenter = roi[2]
                width = roi[3]
                length = roi[4]
            else:
                return []

            firstcol = xcenter - width / 2.0
            lastcol = xcenter + width / 2.0
            firstrow = ycenter - length / 2.0
            lastrow = ycenter + length / 2.0
            r = [firstcol, lastcol, firstrow, lastrow]
            rois.append(r)

        return rois

        Returns all regions as a list of lists, each as [firstcol,lastcol,firstrow,lastrow].
        Ds9 regions are converted to [firstcol,lastcol,firstrow,lastrow] as close as possible.

        :param str coordinate_type: Type of coords as defined by the display server ['image','detector', 'amplifier']
        :return list: List of ROI's
        
Returns all regions as a list of lists, each as [firstcol,lastcol,firstrow,lastrow].
Ds9 regions are converted to [firstcol,lastcol,firstrow,lastrow] as close as possible.
Returns all regions as a list of lists each as [ firstcol lastcol firstrow lastrow ] . Ds9 regions are converted to [ firstcol lastcol firstrow lastrow ] as close as possible .
def _get_ds9_rois(self, coordinate_type=""):
        if coordinate_type == "":
            coordinate_type = self.coordinate_type
        Rois = self.get_regions(
            coordinate_type
        )  
        if not Rois:
            return []
        rois = []
        for roi in Rois:
            if roi[0] == "box":  
                xcenter = roi[1]
                ycenter = roi[2]
                width = roi[3]
                length = roi[4]
            else:
                return []
            firstcol = xcenter - width / 2.0
            lastcol = xcenter + width / 2.0
            firstrow = ycenter - length / 2.0
            lastrow = ycenter + length / 2.0
            r = [firstcol, lastcol, firstrow, lastrow]
            rois.append(r)
        return rois
def _get_ds9_rois ( self , coordinate_type = "" ) : if coordinate_type == "" : coordinate_type = self . coordinate_type Rois = self . get_regions ( coordinate_type ) if not Rois : return [ ] rois = [ ] for roi in Rois : if roi [ 0 ] == "box" : xcenter = roi [ 1 ] ycenter = roi [ 2 ] width = roi [ 3 ] length = roi [ 4 ] else : return [ ] firstcol = xcenter - width / 2.0 lastcol = xcenter + width / 2.0 firstrow = ycenter - length / 2.0 lastrow = ycenter + length / 2.0 r = [ firstcol , lastcol , firstrow , lastrow ] rois . append ( r ) return rois
Returns all regions as a list of lists, each as [firstcol,lastcol,firstrow,lastrow].
Returns all regions as a list of lists each as [ firstcol lastcol firstrow lastrow ] .
"""
        Returns all regions as a list of lists, each as [firstcol,lastcol,firstrow,lastrow].
        Ds9 regions are converted to [firstcol,lastcol,firstrow,lastrow] as close as possible.

        :param str coordinate_type: Type of coords as defined by the display server ['image','detector', 'amplifier']
        :return list: List of ROI's
        """ # this is a list of roi's, each [shape, roi] # box is the only shape supported at this time
List of ROI's
List of ROI ' s
list
self
coordinate_type
Type of coords as defined by the display server ['image','detector', 'amplifier']
Type of coords as defined by the display server [ ' image ' ' detector ' ' amplifier ' ]