-
Notifications
You must be signed in to change notification settings - Fork 3
/
SPECIFICATION
202 lines (140 loc) · 7.66 KB
/
SPECIFICATION
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
Aflak: Attempt at a formal specification
========================================
1. Important features
1.1. Open and display FITS files
1.1.1. FITS standard
Though FITS is a standard [1], there are variations in how the file is encoded
depending on the tool used to create it. Some files are not-compliant.
Aflak shall open and display without issues FITS files fully compliant with the
standard. Non-compliant files will be opened through heuristics, however, there
is no guarantee that the displayed result, if any, will be faithful to the
data. On opening a non-compliant file potentially interfering with rendering,
a warning shall be shown. If heuristics fail to open the fail, the program will
terminate with an error explaining the issue. The details of the heureristics
are, unless specifically specified in this document, implementation-defined.
A history of recent files shall be kept. FITS header should be viewable as
plain text from the program's menu.
1.1.2. About FITS data
A single FITS file may contain one or several kinds of data, depending on the
field of astronomy. A single plage of data is called an "HDU".
Most FITS files contain a 3 dimensional dataset composed of two dimentional
coordinates on several frames.
1.1.2.1. Supported types of coordinates
Aflak shall support the following kind of coordinates:
- Equatorial coordinates
- Ecliptic coordinates
- Galactic coordinates
The third dimension shall may contain any of:
- Wavelength
- Astral velocity
- Unspecified quantity (in that case, only the raw data will be shown, without
assumption regarding the content)
1.1.2.2. Handling of HDUs
Aflak will attempt to decide that kind of FITS file open as follows:
- I: Aflak shall locate the first `IMAGE' HDU whose `EXTNAME' is labelled
`FLUX'. If such an HDU is found, The light flux data will be displayed. If
not, go to `II'. If a third dimension is present in the
dataset, the data can be then be animated. If a unidimentional `WAVE' HDU is
present, Aflak will use this value to tick the third-dimension line. Else,
Aflak will infer the third dimension's ticks from the `FLUX' HDU headers.
- II: Aflak will open the primary HDU if it contains a two-or-three-dimensional
image. If it does not, go to `third'.
It will infer the content of the image from the primary HDU's header.
- III: Abort with an error saying that no displayable image data was found.
* Support for 4th dimension for time-dependant data may be considered for
applications in solar physics.
1.1.3. Basic display features
Aflak interface shall look as follows:
|===============================|
| + | |
| 2D IMAGE | | A* = Configurable color LUT including
| | A* | histogram
| | |
|-------------------------------|
| | |
| Third-dimension line | |
|===============================|
| Footer ^------ Vertical line to control which frame is
|===============================| displayed.
+: North-East Compass, only shown for equatorial coordinates.
2D IMAGE: Image shown with axes centered on reference pixel found in FITS
header from which world coordinates are computed. Absolute and
relative coordinates (in pixels and world coordinates) will both be
displayed.
Footer: Shall contain the name of the currently open file, as well as the
world coordinates the mouse is currently hovering on.
Vertical line: Used to control which frame is displayed. Can be moved with
keyboard or mouse. Vertical line can be duplicated. In such a
case, the sum of all images in the interval between the two
lines will be shown. Can be hidden.
A*: Color LUT can be changed with right-click of the mouse. Min and max
threshold can be set with the left-click of the mouse.
1.1.4. Additional hideable dockable components
These components can be toggled.
Components to concurrently show several subplanes of the image shall be
implemented. These components are as follows:
- X-Z plane shown as a frame with Y as a moving parameter, aligned on the top
of the main 2D image, or as a separate window.
- Y-Z plane shown as a frame with X as a moving parameter, aligned on the right
of the main 2D image, or as a separate window.
Each of images in the displayed components shall share the same LUT.
By clicking on any point in any image, the user can select which area is drawn
on the other figures, i.e. concretely, if the user clicks on a point (x0, y0)
of the X-Y figure, the X parameter of the Y-Z's figure will be set to x0, while
the Y parameter of the X-Z figure will be set to y0.
The `cut' area thus selected shall be indicated, respectively, by a vertical
rule for the horizontal axis, and a horizontal rule for the vectical axis.
1.2. Analysis support
A graphical language for analysis, which can be exported or imported as plain
text, shall be implemented. This language shall allow to create and compose
selections, filters and sections.
Contrary to the state-of-the-art, no direct knowledge nor use of a scripting
language shall be required.
A transformation implemented using the visual programming environment shall
have its result included in the visualization pipeline and immediately visible
to the end user, thus creating a feedback loop.
The output shall be displayed in the image area, replaing the previous image.
The visual programming environment shall have its own independent window,
dockable to the main UI.
A script exported from this visual programming environment shall be sufficient
to reproduce the history of the analysis given than the original raw data is
provided. Seeing a screenshot of the visual environment shall be sufficient for
an astronomer to understand the important steps of the analysis.
Allow to open/close several FITS files (concurrently).
Can do operations on FITS files.
Set output as a file, or as a screen.
1.2.1. Selections (ROI)
When a ROI is defined, the sum of the value of the selected pixels shall be
plotted in the area where the third-dimension line is.
If no ROI is drawn, by default, all pixels are deemed selected.
1.2.1.1. Single-celled contour lines
- Choose a pixel with the mouse.
- Select a contour threshold.
All points above this threshold in the vincinity of the pixel shall be
selected.
1.2.1.2. Multi-cell contour lines
- Select a contour threshold
All points above this threshold shall be selected.
1.2.1.3. Elliptic / Rectangular / Polygonal ROIs
Provide typical types of ROI (drawn with the mouse) to select a specific
region.
1.2.2. Filters
Several kinds of filters shall be included. These includes gaussian fitting,
scaling, smoothing, base-line computing, etc. A specific list shall be made.
/* TODO */
/* In this section, contributions from professional astronomers are NEEDED */
/* Current tools include STSDAS or IRAF: */
/* http://stsdas.stsci.edu/cgi-bin/gethelp.cgi?splot.hlp */
/* However, I was not able to find a complete documentation online */
1.2.3. Sections
- P-V diagrams
- Channel map
/* TODO for astronomers: Expand this section */
1.3. Export analysis results
1.3.1. Export as FITS files
Shall save a conforming FITS file. Add a comment line in the header of the
primary HDU indicating who saved what when, and on what workstation.
1.3.2. Export as Matplotlib-usable data for publication
Shall include a feature to export the current graphical output (image) in a
data format usable by Matplotlib to make publication-quality figures.
[1] http://archive.stsci.edu/fits/fits_standard/