66
77/*****************************************************************************************************************/
88
9- export type { }
9+ import type { CartesianCoordinate , EquatorialCoordinate } from './common'
10+
1011/*****************************************************************************************************************/
1112
1213// SIP (Simple Imaging Polynomial) is a convention used in FITS (Flexible Image Transport System)
@@ -29,5 +30,84 @@ export const parseSIPTerm = (term: string, prefix: 'A' | 'B'): [number, number]
2930 return match ? [ Number . parseInt ( match [ 1 ] , 10 ) , Number . parseInt ( match [ 2 ] , 10 ) ] : null
3031}
3132
33+ /*****************************************************************************************************************/
34+
35+ export type WCS = {
36+ /**
37+ *
38+ *
39+ * The central or reference pixel for the WCS, e.g., the central pixel of the image.
40+ *
41+ *
42+ */
43+ crpix : CartesianCoordinate
44+ /**
45+ *
46+ *
47+ * The central or reference equatorial coordinate for the WCS, corresponding to the pixel at the central reference pixel.
48+ *
49+ *
50+ */
51+ crval : EquatorialCoordinate
52+ // CD matrix elements for the WCS (correponding to the affine transformation matrix):
53+ /**
54+ *
55+ *
56+ * CD Matrix Element 1,1 for the WCS
57+ *
58+ *
59+ */
60+ cd11 : number
61+ /**
62+ *
63+ *
64+ * CD Matrix Element 1,2 for the WCS
65+ *
66+ *
67+ */
68+ cd12 : number
69+ /**
70+ *
71+ *
72+ * CD Matrix Element 2,1 for the WCS
73+ *
74+ *
75+ */
76+ cd21 : number
77+ /**
78+ *
79+ *
80+ * CD Matrix Element 2,2 for the WCS
81+ *
82+ *
83+ */
84+ cd22 : number
85+ /**
86+ *
87+ *
88+ * Constant term for the right ascension (from the Affine transformation matrix)
89+ *
90+ *
91+ */
92+ E : number
93+ /**
94+ *
95+ *
96+ * Constant term for the declination (from the Affine transformation matrix)
97+ *
98+ *
99+ */
100+ F : number
101+ // Non-linear correction terms (corresponding to SIP corrections):
102+ /**
103+ *
104+ *
105+ * SIP (Simple Imaging Polynomial) parameters for the WCS
106+ *
107+ *
108+ */
109+ SIP ?: SIP2DParameters
110+ }
111+
32112
33113/*****************************************************************************************************************/
0 commit comments