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
|
# AT_MWSHOW -- Print a quick summary of the current wcs.
procedure at_mwshow (mwim, ltv, ltm, w, r, cd, ndim)
pointer mwim # pointer to the current wcs
double ltv[ARB] # the lterm offsets
double ltm[ndim,ARB] # the lterm rotation matrix
double w[ARB] # the fits crval parameters
double r[ARB] # the fits crpix parameters
double cd[ndim,ARB] # the fits rotation matrix
int ndim # the dimension of the wcs
int i,j
pointer sp, str
errchk mw_gwattrs()
begin
# Allocate working space.
call smark (sp)
call salloc (str, SZ_LINE, TY_CHAR)
# Print the axis banner.
call printf (" AXIS ")
do i = 1, ndim {
call printf ("%8d ")
call pargi (i)
}
call printf ("\n")
# Print the crval parameters.
call printf (" CRVAL ")
do i = 1, ndim {
call printf ("%8g ")
call pargd (w[i])
}
call printf ("\n")
# Print the crpix parameters.
call printf (" CRPIX ")
do i = 1, ndim {
call printf ("%8g ")
call pargd (r[i])
}
call printf ("\n")
# Print the cd matrix.
do i = 1, ndim {
call printf (" CD %d ")
call pargi (i)
do j = 1, ndim {
call printf ("%8g ")
call pargd (cd[j,i])
}
call printf ("\n")
}
# Print the ltv parameters.
call printf (" LTV ")
do i = 1, ndim {
call printf ("%8g ")
call pargd (ltv[i])
}
call printf ("\n")
# Print the ltm matrix.
do i = 1, ndim {
call printf (" LTM %d ")
call pargi (i)
do j = 1, ndim {
call printf ("%8g ")
call pargd (ltm[i,j])
}
call printf ("\n")
}
# Print the transformation type.
call printf (" WTYPE ")
do i = 1, ndim {
iferr (call mw_gwattrs (mwim, i, "wtype", Memc[str], SZ_LINE))
Memc[str] = EOS
call printf ("%8s ")
call pargstr (Memc[str])
}
call printf ("\n")
# Print the axis type.
call printf (" AXTYPE ")
do i = 1, ndim {
iferr (call mw_gwattrs (mwim, i, "axtype", Memc[str], SZ_LINE))
Memc[str] = EOS
call printf ("%8s ")
call pargstr (Memc[str])
}
call printf ("\n")
# Print the units.
call printf (" UNITS ")
do i = 1, ndim {
iferr (call mw_gwattrs (mwim, i, "units", Memc[str], SZ_LINE))
Memc[str] = EOS
call printf ("%8s ")
call pargstr (Memc[str])
}
call printf ("\n")
# Print the label.
call printf (" LABEL ")
do i = 1, ndim {
iferr (call mw_gwattrs (mwim, i, "label", Memc[str], SZ_LINE))
Memc[str] = EOS
call printf ("%8s ")
call pargstr (Memc[str])
}
call printf ("\n")
# Print the format.
call printf (" FORMAT ")
do i = 1, ndim {
iferr (call mw_gwattrs (mwim, i, "format", Memc[str], SZ_LINE))
Memc[str] = EOS
call printf ("%8s ")
call pargstr (Memc[str])
}
call printf ("\n")
call printf ("\n")
call sfree (sp)
end
|