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
|
#define RAD(x) ((x)*PI_180)
#define DEG(x) ((x)/PI_180)
#define ARCSECONDS_PER_RADIAN (DEG(1)*3600)
#define input_nybble(infile) input_nbits(infile,4)
typedef float Angle; /* in radians */
enum
{
/*
* parameters for plate
*/
Pppo1 = 0,
Pppo2,
Pppo3,
Pppo4,
Pppo5,
Pppo6,
Pamdx1,
Pamdx2,
Pamdx3,
Pamdx4,
Pamdx5,
Pamdx6,
Pamdx7,
Pamdx8,
Pamdx9,
Pamdx10,
Pamdx11,
Pamdx12,
Pamdx13,
Pamdx14,
Pamdx15,
Pamdx16,
Pamdx17,
Pamdx18,
Pamdx19,
Pamdx20,
Pamdy1,
Pamdy2,
Pamdy3,
Pamdy4,
Pamdy5,
Pamdy6,
Pamdy7,
Pamdy8,
Pamdy9,
Pamdy10,
Pamdy11,
Pamdy12,
Pamdy13,
Pamdy14,
Pamdy15,
Pamdy16,
Pamdy17,
Pamdy18,
Pamdy19,
Pamdy20,
Ppltscale,
Pxpixelsz,
Pypixelsz,
Ppltra,
Ppltrah,
Ppltram,
Ppltras,
Ppltdec,
Ppltdecd,
Ppltdecm,
Ppltdecs,
Pnparam,
};
typedef struct Plate Plate;
struct Plate
{
char rgn[7];
char disk;
Angle ra;
Angle dec;
};
typedef struct Header Header;
struct Header
{
float param[Pnparam];
int amdflag;
float x;
float y;
float xi;
float eta;
};
typedef long Type;
typedef struct Image Image;
struct Image
{
int nx;
int ny; /* ny is the fast-varying dimension */
Type a[1];
};
int nplate;
Plate plate[2000]; /* needs to go to 2000 when the north comes */
double PI_180;
double TWOPI;
int debug;
struct
{
float min;
float max;
float del;
double gamma;
int neg;
} gam;
char* hms(Angle);
char* dms(Angle);
double xsqrt(double);
Angle dist(Angle, Angle, Angle, Angle);
Header* getheader(char*);
char* getword(char*, char*);
void amdinv(Header*, Angle, Angle, float, float);
void ppoinv(Header*, Angle, Angle);
void xypos(Header*, Angle, Angle, float, float);
void traneqstd(Header*, Angle, Angle);
Angle getra(char*);
Angle getdec(char*);
void getplates(void);
Image* dssread(char*);
void hinv(Type*, int, int);
int input_bit(Biobuf*);
int input_nbits(Biobuf*, int);
void qtree_decode(Biobuf*, Type*, int, int, int, int);
void start_inputing_bits(void);
Bitmap* image(Angle, Angle, Angle, Angle);
int dogamma(int);
|