-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmap2reg.xml
145 lines (135 loc) · 4.87 KB
/
map2reg.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cxchelptopics SYSTEM "CXCHelp.dtd">
<cxchelptopics>
<ENTRY
context="tools"
key="map2reg"
refkeywords="map mask bin group region convert display"
seealsogroups="dmimgtools"
displayseealsogroups="regiontools"
>
<SYNOPSIS>
Convert a map file into a region file.
</SYNOPSIS>
<DESC>
<PARA>
This script creates a polygon region around each
unique set of pixel values in the input map file.
The `dmimglasso' tool is used to identify the
polygons. The polgyons may contain multiple components
if there is a hole in the interior (eg a separate
group completely surrounded by another group).
</PARA>
<PARA>
This script assumes that all groups are contiguous. If
a group is split into multiple disjoint sections then
only 1 of those sub-groups will be processed.
</PARA>
<PARA>
Only pixel values greater than zero (>0) are considered.
Pixel values equal to zero are considered as being ungrouped.
</PARA>
<PARA>
This script runs in parallel; though for a large number of unique
map IDs it can still be slow.
</PARA>
<PARA>
The map values in the infile are not the same as the
COMPONENT values in the output region file.
</PARA>
</DESC>
<QEXAMPLELIST>
<QEXAMPLE>
<SYNTAX>
<LINE>
% map2reg hex.map hex.reg
% ds9 hex.map -region hex.reg
</LINE>
</SYNTAX>
<DESC>
<PARA>
Convert the map file, hex.map, into an ASC-FITS format
region file, hex.reg. We then use ds9 to display
the results.
</PARA>
</DESC>
</QEXAMPLE>
</QEXAMPLELIST>
<PARAMLIST>
<PARAM name="infile" type="file" filetype="input" reqd="yes">
<SYNOPSIS>
Input map file.
</SYNOPSIS>
<DESC>
<PARA>
The map file should contain integer pixel values which
represent which pixels are grouped together.
Pixel values equal to 0 are ignored (treated as being
ungrouped).
</PARA>
</DESC>
</PARAM>
<PARAM name="outfile" type="file" filetype="output" reqd="yes">
<SYNOPSIS>Output region file</SYNOPSIS>
<DESC>
<PARA>
The output is stored as an ASC-FITS format region
file. Each map ID in the input image will be output
as one or more polygons. The map ID is
not stored (it is not guaranteed to be the COMPONENT
value). Each component may have interior polygons
excluded if they completely surround another
group (or an ungrouped area).
</PARA>
</DESC>
</PARAM>
<PARAM name="parallel" type="boolean" def="yes" reqd="no">
<SYNOPSIS>Run code in parallel using multiple processors?</SYNOPSIS>
<DESC>
<PARA>
If multiple processors are available, then
this parameter controls whether the tool should
run various underlying tools in parallel.
</PARA>
</DESC>
</PARAM>
<PARAM name="nproc" type="integer" def="INDEF" min="1" reqd="no">
<SYNOPSIS>Number of processors to use</SYNOPSIS>
<DESC>
<PARA>
If parallel=yes, then this controls the number of
processes to run at once. The default, INDEF,
will use all available processors. The value
cannot be larger than the number of processors.
</PARA>
</DESC>
</PARAM>
<PARAM name="verbose" type="integer" def="1" min="0" max="5">
<SYNOPSIS>
Amount of chatter from the tool.
</SYNOPSIS>
</PARAM>
<PARAM name="clobber" type="boolean" def="no">
<SYNOPSIS>
Delete outfile if it already exists?
</SYNOPSIS>
</PARAM>
</PARAMLIST>
<ADESC title="About Contributed Software">
<PARA>
This script is not an official part of the CIAO release but is
made available as "contributed" software via the
<HREF link="https://cxc.harvard.edu/ciao/download/scripts/">CIAO scripts page</HREF>.
Please see this page for installation instructions.
</PARA>
</ADESC>
<BUGS>
<PARA>
See the
<HREF link="http://cxc.harvard.edu/ciao/bugs/index.html">CIAO
website</HREF> for an up-to-date listing of known bugs.
</PARA>
</BUGS>
<LASTMODIFIED>August 2023</LASTMODIFIED>
</ENTRY>
</cxchelptopics>