def to_ds9(self, free='box',fixed='cross',frame='fk5',color='green',header=True):
        """Returns a list of ds9 region definitions
        Parameters
        ----------
        free: bool
            one of the supported ds9 point symbols, used for free sources, see here: http://ds9.si.edu/doc/ref/region.html

        fixed: bool
            as free but for fixed sources
        
        frame: str
            typically fk5, more to be implemented
        
        color: str
            color used for symbols (only ds9 compatible colors)
        
        header: bool
            if True, will prepend a global header line.

        Returns
        -------
        lines : list
            list of regions (and header if requested)
        """
        # todo: add support for extended sources?!
        allowed_symbols = ['circle','box','diamond','cross','x','arrow','boxcircle']
        # adding some checks.
        assert free in allowed_symbols, "symbol %s not supported"%free
        assert fixed in allowed_symbols, "symbol %s not supported"%fixed
        lines = []
        if header:
            lines.append("global color=%s"%color)
        for src in self.get_sources():
            # self.get_sources will return both Source, but also IsoSource and MapCube, in which case the sources
            # should be ignored (since they are by construction all-sky and have no corresponding ds9 region string)
            if not isinstance(src, Source): continue
            # otherwise get ra, dec
            ra, dec = src.radec
            line = "%s; point( %1.5f, %1.5f) # point=%s text={%s} color=%s"%(frame,ra, dec,
                                                                                free if src.is_free else fixed,
                                                                                src.name,
                                                                                color)
            lines.append(line)
        return lines