aboutsummaryrefslogtreecommitdiff
path: root/pkg/images/imutil/doc/sections.hlp
blob: 13579b62192b08d99116e45aa92667358cf6eb06 (plain) (blame)
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
.help sections Dec85 images.imutil
.ih
NAME
sections -- expand an image template
.ih
USAGE
sections images
.ih
PARAMETERS
.ls images
Image template or list of images.  There is no check that the names are
images and any name may be used.  The thing which distinguishes an image
template from a file template is that the special characters '[' and
']' are interpreted as image sections rather than a character class
wildcard unless preceded by the escape character '!'.  To explicitly
limit a wildcard template to images one should use an appropriate
extension such as ".imh".
.le
.ls option = "fullname"
The options are:
.ls "nolist"
Do not print list.
.le
.ls "fullname"
Print the full image name for each image in the template.
.le
.ls "root"
Print the root name for each image in the template.
.le
.ls "section"
Print the section for each image in the template.
.le
.le
.ls nimages
The number of images in the image template.
.le
.ih
DESCRIPTION
The image template list \fIimages\fR is expanded and the images are printed
one per line on the standard output unless the "nolist" option is given.
Other options allow selection of a portion of the image name.  The number
of images in the list is determined and stored in the parameter \fInimages\fR.

This task is used for several purposes:
.ls (1)
To verify that an image template is expanded as the user desires.
.le
.ls (2)
To create a file of image names which include image sections.
.le
.ls (3)
To create a file of new image names using the concatenation feature of the
image templates.
.le
.ls (4)
To determine the number of images specified by the user in a command language
script.
.le

There is no check that the names are images and any name may be used.
The thing which distinguishes an \fIimage template\fR from a \fIfile
template\fR is that the special characters '[' and ']' are interpreted
as image sections rather than a character class wildcard unless
preceded by the escape character '!'.  To explicitly limit a wildcard
template to images one should use an appropriate extension such as ".imh".
.ih
EXAMPLES
1. Calculate and print the number of images in a template:

.nf
	cl> sections fits*.imh opti=no
	cl> = sections.nimages
	cl> 7
.fi

2. Expand an image template:

.nf
	cl> sections fits*![3-9].imh[1:10,*]
	fits003.imh[1:10,*]
	fits004.imh[1:10,*]
	<etc.>
.fi

Note the use of the character class escape, image section appending,
and explicit use of the .imh extension.

3. Create a new list of image names by adding the suffix "new":

.nf
	cl> sections jan18???//new
	jan18001new
	jan18002new
	<etc.>
.fi

Note the use of the append syntax.  Also there is no guarantee that the
files are actually images.

4. Subtract two sets of images:
	
.nf
	cl> sections objs*.imh[100:200,300:400] > objslist
	cl> sections skys*.imh[100:200,300:400] > skyslist
	cl> sections %objs%bck%* > bcklist
	cl> imarith @objslist - @skyslist @bcklist
.fi

Note the use of the substitution syntax.

.ih
TIME REQUIREMENTS
.ih
BUGS
The  image list is not sorted.           
.ih
SEE ALSO
files
.endhelp