Warning, /education/kstars/doc/fitsviewer.docbook is written in an unsupported language. File is not indexed.

0001 <sect1 id="tool-fitsviewer">
0002 <title><acronym>FITS</acronym> Viewer Tool</title>
0003 <indexterm><primary>Tools</primary>
0004 <secondary>FITS Viewer</secondary>
0005 </indexterm>
0006 
0007 <para>The Flexible Image Transport System (FITS) is the standard format for representing images and data in Astronomy.</para>
0008 
0009 <para>The &kstars; FITS Viewer tool is automatically invoked when new images are received from the camera.
0010 It is primarily used to view and examine FITS data. It is not designed for editing of FITS Images.
0011 To open a FITS file, select the <menuchoice><guimenu>File</guimenu>
0012 <guimenuitem>Open Image...</guimenuitem></menuchoice> menu item, or press 
0013 <keycombo action="simul">&Ctrl;<keycap>O</keycap></keycombo>.</para>
0014 
0015 <screenshot>
0016   <screeninfo>The FITS Viewer Tool</screeninfo>
0017   <mediaobject>
0018     <imageobject>
0019       <imagedata fileref="fitsviewer.png" format="PNG"/>
0020     </imageobject>
0021     <textobject>
0022       <phrase>FITS Viewer Tool</phrase>
0023     </textobject>
0024   </mediaobject>
0025 </screenshot>
0026 
0027 <para>The above diagram illustrates the FITS Viewer work area and window. The tool provides basic functions for image display. FITS data depth is preserved throughout all processing, open, and save functions. While the tool adhere to the FITS standard, it does not support all possible FITS features:</para>
0028 <itemizedlist>
0029   <listitem><para>Support for only <emphasis>one</emphasis> image per file.</para></listitem>
0030   <listitem><para>Support for only 2D and 3D data. 1D data are discarded.</para></listitem>
0031 </itemizedlist>
0032 <para>The FITS Viewer window is divided into the following regions:</para>
0033 <orderedlist>
0034     <listitem><para>Main Menu</para>
0035         <itemizedlist>
0036             <listitem><para>File</para>
0037             <itemizedlist>
0038                 <listitem><para>Standard Open, Save, and Save As actions.</para></listitem>
0039                 <listitem><para>FITS Header: Display FITS header table data.</para></listitem>
0040                 <listitem><para>Debayer: Covert RAW image to RGB.</para></listitem>
0041             </itemizedlist>
0042             </listitem>
0043             <listitem><para>Edit</para>
0044             <itemizedlist>
0045                 <listitem><para>Undo: Undo last action.</para></listitem>
0046                 <listitem><para>Redo: Redo last action.</para></listitem>
0047                 <listitem><para>Copy: Copy image to clipboard.</para></listitem>
0048             </itemizedlist>
0049             </listitem>
0050             <listitem><para>View</para>
0051                 <itemizedlist>
0052                 <listitem><para>Zoom Controls: Zoom in, Zoom out, standard Zoom.</para></listitem>
0053                 <listitem><para>Filters: Auto Stretch, Contrast, High Pass, Rotate, Flip.</para></listitem>
0054                 <listitem><para>Mark Stars: Detect and mark stars in the image.</para></listitem>
0055             </itemizedlist>
0056             </listitem>
0057         </itemizedlist>
0058     </listitem>
0059     <listitem><para>Main Toolbar</para>
0060             <itemizedlist>
0061                 <listitem><para>Open File.</para></listitem>
0062                 <listitem><para>Save File: Save FITS data. Any filters applied to the image will be saved.</para></listitem>
0063                 <listitem><para>Save File As.</para></listitem>
0064                 <listitem><para>Undo last action.</para></listitem>
0065                 <listitem><para>Redo last action.</para></listitem>
0066                 <listitem><para>Zoom In: Zoom in up to a maximum of 400%. For large images this operation can be very memory intensive. Turn on Limited Resource Mode to save memory.</para></listitem>
0067                 <listitem><para>Zoom Out.</para></listitem>
0068                 <listitem><para>View in Actual Size.</para></listitem>
0069                 <listitem><para>Zoom to fit.</para></listitem>
0070                 <listitem><para>Rotate Right.</para></listitem>
0071                 <listitem><para>Rotate Left.</para></listitem>
0072                 <listitem><para>Flip Horizontal.</para></listitem>
0073                 <listitem><para>Flip Vertical.</para></listitem>
0074                 <listitem><para>Show Cross Hairs: Toggles crosshairs in the center of the image.</para></listitem>
0075                 <listitem><para>Show Pixel Gridlines: Toggles pixel grid.</para></listitem>
0076                 <listitem><para>Show Equatorial Gridlines: Toggles Equatorial Grid if FITS contains a valid WCS header.</para></listitem>
0077                 <listitem><para>Show Objects in Image: Identifies objects such as stars, galaxies, and nebulae within the image.</para></listitem>
0078                 <listitem><para>Center Telescope: Toggle Center Telescope mode. When active and if the image contains a valid WCS header, clicking anywhere in the image triggers the telescope slewing to the clicked point.</para></listitem>
0079                 <listitem><para>Histogram: Toggle histogram view in the side panel.</para></listitem>
0080                 <listitem><para>Statistics: Toggle FITS Statistic view in the side panel.</para></listitem>
0081                 <listitem><para>Auto Stretch: Apply Auto Stretch filter to the image.</para></listitem>
0082                 <listitem><para>Toggle Selection Rectangle: Toggle selection rectangle for statistics of a region of interest.</para></listitem>
0083             </itemizedlist>
0084     </listitem>
0085     <listitem><para>Side Panel: The side panel can be opened by dragging the separator to the right. When dragged to the left, the side panel can also be closed.</para>
0086             <itemizedlist>
0087                 <listitem><para>Statistics: Displays image statistics including Minimum, Maximum, Average, and Median values.</para></listitem>
0088                 <listitem><para>Histogram: Displays image histogram with controls to adjust the minimum and maximum values for each channel. Both linear and logarithmic scalings are available to apply to the image.</para></listitem>
0089                 <listitem><para>FITS Header: Displays a table for FITS header keywords, values, and comments.</para></listitem>
0090                 <listitem><para>Recent Images: Displays recently opened images. Clicking on any image will load it.</para></listitem>
0091             </itemizedlist>
0092     </listitem>
0093     <listitem><para>Image Display Area. Hovering over the image will update the status bar values accordingly.</para>
0094     </listitem>
0095     <listitem><para>Status Bar: From right to left, the following status indicators are available:</para>
0096             <itemizedlist>
0097                 <listitem><para>Loading Indicator: The LED becomes yellow when an image is getting loaded and turns green after loading is successfully done. If there are problems with loading the image, it turns red.</para></listitem>
0098                 <listitem><para>Resolution: Image resolution in pixels.</para></listitem>
0099                 <listitem><para>Cartesian Coordinates: Displays and updates the current mouse position as you hover over the image. It include the X and Y position in addition to the current value.</para></listitem>
0100                 <listitem><para>Equatorial Coordinates: If the image contains a valid WCS header, the J2000 Right Ascension (RA) and declination (DE) values are displayed.</para></listitem>
0101             </itemizedlist>
0102     </listitem>
0103 </orderedlist>
0104 <para>
0105     In addition to image display, the viewer can process World-Coordinate-System (WCS) header if present within the FITS file and provides useful information regarding the objects found within the image, equatorial grid overlay, popup menu, and the ability to slew the mount (if connected) to any point within the image.
0106 </para>
0107 <para>
0108     Several filters can be applied to enhance the image include auto stretch and high contrast. Depending on the image size, these operations can take a few seconds to complete. The bottom status bar displays the current pixel value and current X &amp; Y coordinates of the mouse pointer within the image. Furthermore, it includes the current zoom level and the image resolution.
0109 </para>
0110 <para>
0111     When loading a bayered image, the viewer can automatically debayer the image if <emphasis>Auto Debayer</emphasis> is checked in the FITS Settings. The debayering operation fetches the bayer pattern (&eg; RGGB) from the FITS header. If none exists, you can alter the debayering algorithm and pattern from the <guimenu>File</guimenu> menu or by using the <keycombo>&Ctrl; <keycap>D</keycap></keycombo> shortcut.
0112 </para>
0113 <para>
0114     Since operations such as auto debayering and auto WCS are computationally expensive and stress the processor on low-powered embedded devices, you can toggle their behavior in <link linkend="fits-configure">&kstars; Settings FITS page</link>.
0115 </para>
0116 <screenshot>
0117     <screeninfo>
0118         FITS Settings
0119     </screeninfo>
0120     <mediaobject>
0121         <imageobject>
0122             <imagedata fileref="fits_settings.png" format="PNG"/>
0123         </imageobject>
0124         <textobject>
0125             <phrase>FITS Settings</phrase>
0126         </textobject>
0127     </mediaobject>
0128 </screenshot>
0129 <para>
0130     Hovering over any option shall display a detailed tooltip that explains its function.
0131 </para>
0132 <sect2 id="fits-viewer-features">
0133     <title>Features</title>
0134     <itemizedlist>
0135         <listitem>
0136             <para>
0137                 Support for 8, 16, 32, IEEE-32, and IEEE-64 bits formats.
0138             </para>
0139         </listitem>
0140         <listitem>
0141             <para>
0142                 Support Color FITS images (3D Cubes) and Bayered FITS images.
0143             </para>
0144         </listitem>
0145         <listitem>
0146             <para>
0147                 Histogram with linear, logarithmic, and square-root scales.
0148             </para>
0149         </listitem>
0150         <listitem>
0151             <para>
0152                 Brightness/Contrast controls.
0153             </para>
0154         </listitem>
0155         <listitem>
0156             <para>
0157                 Pan and Zoom.
0158             </para>
0159         </listitem>
0160         <listitem>
0161             <para>
0162                 Auto levels.
0163             </para>
0164         </listitem>
0165         <listitem>
0166             <para>
0167                 Statistics.
0168             </para>
0169         </listitem>
0170         <listitem>
0171             <para>
0172                 Statistics for a region of interest(Rectangle).
0173             </para>
0174         </listitem>
0175         <listitem>
0176             <para>
0177                 Rectangular and Equatorial Grids (if WCS info is present).
0178             </para>
0179         </listitem>
0180         <listitem>
0181             <para>
0182                 Detection and highlight of stars.
0183             </para>
0184         </listitem>
0185         <listitem>
0186             <para>
0187                 FITS header query.
0188             </para>
0189         </listitem>
0190         <listitem>
0191             <para>
0192                 Undo/Redo.
0193             </para>
0194         </listitem>
0195     </itemizedlist>
0196     <variablelist>
0197         <varlistentry>
0198             <term>Histogram</term>
0199             <listitem>
0200                 <screenshot>
0201                     <screeninfo>
0202                         Histogram
0203                     </screeninfo>
0204                     <mediaobject>
0205                         <imageobject>
0206                             <imagedata fileref="fitsviewer_histogram.png" format="PNG"/>
0207                         </imageobject>
0208                         <textobject>
0209                             <phrase>Histogram</phrase>
0210                         </textobject>
0211                     </mediaobject>
0212                 </screenshot>
0213                 <para>
0214                     Displays multi-channel FITS histogram. The user can rescale the image by optionally defining an upper and lower limit for the cutoff region. The rescaling operation (linear, logarithmic, or square-root) may then be applied to the region enclosed by the upper and lower limits.
0215                 </para>
0216             </listitem>
0217         </varlistentry>
0218         <varlistentry>
0219             <term>FITS Header</term>
0220             <listitem>
0221                 <para>
0222                     Displays a read-only table listing FITS header keywords and values.
0223                 </para>
0224             </listitem>
0225         </varlistentry>
0226         <varlistentry>
0227             <term>Statistics</term>
0228             <listitem>
0229                 <para>
0230                     Provides simple statistics for minimum and maximum pixel values and their respective locations. FITS depth, dimension, mean, and standard deviation.
0231                 </para>
0232             </listitem>
0233         </varlistentry>
0234         <varlistentry>
0235             <term>Statistics of region of interest</term>
0236             <listitem>
0237                 <screenshot>
0238                     <screeninfo>
0239                       FITSViewer 
0240                     </screeninfo>
0241                     <mediaobject>
0242                         <imageobject>
0243                             <imagedata fileref="fitsviewer_selstat.png" format="PNG"/>
0244                         </imageobject>
0245                         <textobject>
0246                             <phrase>Selection Statistics</phrase>
0247                         </textobject>
0248                     </mediaobject>
0249                 </screenshot>
0250                 <para>
0251                 Provides simple statistics average mean, average standard deviation and average median of the selected region by the user in a tooltip.
0252                 </para>
0253                 <para>
0254                 The user can either set the selection region by <keycombo>&Shift;<keycap>Left Click</keycap></keycombo> dragging or by choosing an entry from the drop down menu of the Toggle Selection Rectangle button. In addition to this, the user can translate the region by simple <keycap>Left Click</keycap> drag of the mouse. The statistics of the region are shown as a tooltip once the cursor is brought over the selection region. For smaller images, the statistics are updated instantly, and for larger images, the statistics are updated once the user releases the <keycap>Left Click</keycap> button after modification of the region.
0255                 </para>
0256             </listitem>
0257         </varlistentry>
0258     </variablelist>
0259 </sect2>
0260 
0261 <sect2 id="fits-viewer-embedded">
0262     <title>Embedded FITS Viewer</title>
0263     <screenshot>
0264         <screeninfo>
0265             FITS Viewer embedded
0266         </screeninfo>
0267         <mediaobject>
0268             <imageobject>
0269                 <imagedata fileref="fitsviewer_embedded.png" format="PNG"/>
0270             </imageobject>
0271             <textobject>
0272                 <phrase>FITS Viewer embedded</phrase>
0273             </textobject>
0274         </mediaobject>
0275     </screenshot>
0276     <para>
0277         In Ekos <link linkend="ekos-focus">Focus</link>, <link linkend="ekos-guide">Guide</link>, and <link linkend="ekos-align">Align</link> modules, captured images are displayed in the embedded FITS Viewer. The embedded viewer includes a <emphasis>floating bar</emphasis> that can be used to perform several functions:
0278     </para>
0279     <itemizedlist>
0280         <listitem>
0281             <para>
0282                 Zoom Out
0283             </para>
0284         </listitem>
0285         <listitem>
0286             <para>
0287                 Zoom In
0288             </para>
0289         </listitem>
0290         <listitem>
0291             <para>
0292                 Default Zoom
0293             </para>
0294         </listitem>
0295         <listitem>
0296             <para>
0297                 Zoom To Fit
0298             </para>
0299         </listitem>
0300         <listitem>
0301             <para>
0302                 Toggle Cross Hairs
0303             </para>
0304         </listitem>
0305         <listitem>
0306             <para>
0307                 Toggle Pixel Gridlines
0308             </para>
0309         </listitem>
0310         <listitem>
0311             <para>
0312                 Toggle Detected Stars: Highlight detected stars with red circles.
0313             </para>
0314         </listitem>
0315         <listitem>
0316             <para>
0317                 Star Profile: View detailed 3D star profile.
0318             </para>
0319         </listitem>
0320     </itemizedlist>
0321     <para>
0322         The floating bar is automatically hidden once the mouse leaves the embedded viewer area. You can use the mouse to pan and zoom just like the standalone FITS Viewer tool. The green tracking box can be used to select a specific star or region within the image, for example, to select a guide star.
0323     </para>
0324 </sect2>
0325 
0326 <sect2 id="fits-viewer-3d-star-profile">
0327 <title>3D Star Profile &amp; Data Visualization Tool</title>
0328 <screenshot>
0329         <screeninfo>
0330             Star Profile main page
0331         </screeninfo>
0332         <mediaobject>
0333             <imageobject>
0334                 <imagedata fileref="star_profile_main.png" format="PNG"/>
0335             </imageobject>
0336             <textobject>
0337                 <phrase>Star Profile main page</phrase>
0338             </textobject>
0339         </mediaobject>
0340     </screenshot>
0341     <para>
0342         The 3D data visualization tool can plot 3D graphs of the selected region of the image. This is particularly useful for astrophotographers who want to visualize the profile of a star they are considering focusing or guiding on. For scientists, it enables them to examine a cross-section of the data to understand the relative brightness of different objects in the image. Additionally, it empowers imagers who want to visually see what is going on in their data collection in a new way.
0343     </para>
0344     <para>
0345         To use the new feature, the user needs to select the <guiicon>View Star Profile</guiicon> icon in one of the Ekos Module Views, or in the FITS Viewer. Then, the region selected in the green tracking box will show up in the 3D graph as shown above. The user will then have one of the following toolbars at the bottom.
0346     </para>
0347     <screenshot>
0348         <screeninfo>
0349             Star Profile toolbar 1
0350         </screeninfo>
0351         <mediaobject>
0352             <imageobject>
0353                 <imagedata fileref="star_profile_toolbar1.png" format="PNG"/>
0354             </imageobject>
0355             <textobject>
0356                 <phrase>Star Profile toolbar 1</phrase>
0357             </textobject>
0358         </mediaobject>
0359     </screenshot>
0360     <screenshot>
0361         <screeninfo>
0362             Star Profile toolbar 2
0363         </screeninfo>
0364         <mediaobject>
0365             <imageobject>
0366                 <imagedata fileref="star_profile_toolbar2.png" format="PNG"/>
0367             </imageobject>
0368             <textobject>
0369                 <phrase>Star Profile toolbar 2</phrase>
0370             </textobject>
0371         </mediaobject>
0372     </screenshot>
0373     <para>
0374         At the far left, the sample size combo box will let the user select the size of the image crop shown in the graph. This option is only available in the <guilabel>Summary Screen</guilabel>, the <link linkend="ekos-align">Align Module</link>, and the FITS Viewer. The second combo box lets the user control whether they are selecting an individual item, or a row, or a column of pixels. The slice button will be enabled if the user selects <guimenuitem>Row</guimenuitem> or <guimenuitem>Column</guimenuitem>. It will put the graph in slice mode so that the user can see a cross-section view of the image. Third, is a checkbox that will open up two sliders that will let the user drag the slider to change the selection. This is extremely useful in the slide mode to change the selected point and to move the cross section around the graph. It is also useful in the normal view when in <guilabel>Explore Mode</guilabel> so that the user can zoom around the image examining the pixels.
0375     </para>
0376     <screenshot>
0377         <screeninfo>
0378             Star Profile, examine pixels
0379         </screeninfo>
0380         <mediaobject>
0381             <imageobject>
0382                 <imagedata fileref="star_profile_examine_pixels.png" format="PNG"/>
0383             </imageobject>
0384             <textobject>
0385                 <phrase>Star Profile, examine pixels</phrase>
0386             </textobject>
0387         </mediaobject>
0388     </screenshot>
0389     <para>
0390         Then the user has the <guilabel>Zoom To</guilabel> combo box, which the user can use to zoom the graph to different preset locations. Next is the combo box that lets the user select the color scheme of the graph. Then are the HFR and the Peak checkboxes, which will both turn on the HFR and Peak labels on each found star in the image, but will also display one of them at the bottom of the screen. And finally comes the Scaling checkbox, which enables the <guilabel>Scaling</guilabel> Side Panel. There are three sliders in that panel, one to control the minimum value displayed on the graph or <quote>black point</quote>, one to control the maximum value displayed in the graph or the <quote>white point</quote>, and a third that is disabled by default that lets the user control the cutoff value for data displayed on the graph.
0391     </para>
0392     <screenshot>
0393         <screeninfo>
0394             Star Profile vertical page
0395         </screeninfo>
0396         <mediaobject>
0397             <imageobject>
0398                 <imagedata fileref="star_profile_vertical.png" format="PNG"/>
0399             </imageobject>
0400             <textobject>
0401                 <phrase>Star Profile vertical</phrase>
0402             </textobject>
0403         </mediaobject>
0404     </screenshot>
0405     <para>
0406         This third slider is very useful to get really big peaks out of the way so you can study the finer details in the image. There is a checkbox at the top to enable/disable the cutoff slider. And finally at the bottom of the sliders is the <guibutton>Auto scale</guibutton> button. This will auto scale the sliders as you sample different areas in the image. It will not only optimize the display of the data but will also affect the minimum and maximum points of the slider. If you disable auto scale, then as you sample different parts of the image, they will be displayed at the same scale. A particularly useful way to use this is to select an area of your image using auto scale, tweak the min, max, and cutoff sliders to your liking, and then turn off the auto scale feature to explore other areas of the graph.
0407     </para>
0408     <screenshot>
0409         <screeninfo>
0410             Star Profile final page
0411         </screeninfo>
0412         <mediaobject>
0413             <imageobject>
0414                 <imagedata fileref="star_profile_final.png" format="PNG"/>
0415             </imageobject>
0416             <textobject>
0417                 <phrase>Star Profile final page</phrase>
0418             </textobject>
0419         </mediaobject>
0420     </screenshot>
0421 </sect2>
0422 </sect1>