Ds9 region files




















Global properties affect all regions unless a local property is specified. Multiple global property lines may be used within a region file. Local properties start with a after a region description and only affect the region it is specified with. For each region, it is important to specify the coordinate system used to interpret the region, i.

For this purpose, the following keywords are recognized:. While some coordinate systems are unique across mosaic images, others coordinate systems, such as image , or physical , are valid on a per segment basis. In this case, use tile to specify which header to use in all coordinate conversions.

The default is the first header, or tile 1. If an image has multiple wcs's defined, use wcs to specify which wcs to use for all wcs references.

Valid values are wcs, wcsa, wcsb, wcsc The arguments to region shapes can be floats or integers describing positions and sizes. They can be specified as pure numbers or using explicit formatting directives:. When a "pure number" i. In general, the rule is:. Otherwise, for all systems other than linear, pure numbers are degrees. This rule covers both positions and sizes. The input values to each shape can be specified in several coordinate systems including:.

The coordinate system specifier should appear at the beginning of the region description, on a separate line in a file , or followed by a new-line or semicolon; e. Thus, if the world coordinate system of the reference image is J , then. Note that by using units as described above, you may mix coordinate systems within a region specifier; e. For WCS systems with no rotation, this obviously is not an issue. However, some images do define an implicit rotation e.

In such case, a region specification such as:. The angle is relative to WCS axes in the first case, and relative to physical x,y axes in the second. A Composite Region is a region which is a collection of other regions, which share common properties.

Artist objects. The first item is a list of matplotlib. Patch , and the second one is other kinds of artists usually Text. It is your responsibility to add these to the axes. Source code , png , hires. By default, it uses pyregion. However, the colors and other attributes of some complex shapes are not correctly handled as shown in above example, and you need to manually adjust the associated attributes of patches.

The ShapeList. The returned filter has a mask method that creates a 2d mask. You can create the mask directly from the ShapeList object. As a result, TweakReg will not find sources in the "exclude" regions as shown in Figure 2 Right. In this example we show how to use both include and exclude regions using DS9 nomenclature. The use of "include" regions is particularly useful for images that have few good sources that can be used for image alignment and all other sources not contained within these regions should be ignored.

The format of the "exclusions" file is essentially the same, the only difference being that now we have to add the text [ConformDS9] at the end of each line containing region files which we want to be interpreted in this more advanced way.

For example, now the 'exclusions. NOTE: [ConformDS9] should not follow each region file but rather it must be specified only once at the end of the line for each input file. To make a region to be an 'exclude' region we write it with a negative sign - in the DS9 region file following the DS9 convention.

For example, let's consider the rectangular 'box' region in the previous example to be a region of "exclude" type. NOTE: the order of include and exclude regions is important! The regions are applied in the order in which they appear in the DS9 region file. If in the last example we switch the order of the include region circle with the exclude region -box , then the result will be different from the result shown fin Figure 3 Middle see the Right panel in Figure 3.



0コメント

  • 1000 / 1000