write_ds9

regions.write_ds9(regions, filename, coordsys='fk5', fmt='.6f', radunit='deg')[source]

Converts a list of Region to DS9 string and write to file.

See Reading/writing to DS9 region files

Parameters:
regions : list

List of regions.Region objects

filename : str

Filename in which the string is to be written.

coordsys : str, optional #TODO

Coordinate system that overrides the coordinate frames of all regions. Default is ‘fk5’.

fmt : str, optional

A python string format defining the output precision. Default is .6f, which is accurate to 0.0036 arcseconds.

radunit : str, optional

This denotes the unit of the radius. Default is deg (degrees)