home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Graphics / Graphics.zip / xfitsvew.zip / XFITSview / helpbox.c < prev    next >
C/C++ Source or Header  |  1998-04-05  |  51KB  |  1,238 lines

  1. /* help dialog box  for XFITSview */
  2. /* adopted from "Power programming Motif" by E. F. Johnson and
  3.    K. Reichard, 1993, MIS Press, New York */
  4. /*-----------------------------------------------------------------------
  5. *  Copyright (C) 1998
  6. *  Associated Universities, Inc. Washington DC, USA.
  7. *  This program is free software; you can redistribute it and/or
  8. *  modify it under the terms of the GNU General Public License as
  9. *  published by the Free Software Foundation; either version 2 of
  10. *  the License, or (at your option) any later version.
  11. *
  12. *  This program is distributed in the hope that it will be useful,
  13. *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. *  GNU General Public License for more details.
  16. *-----------------------------------------------------------------------*/
  17.  
  18. #include <Xm/Xm.h> 
  19. #include <Xm/Form.h> 
  20. #include <Xm/Label.h> 
  21. #include <Xm/List.h> 
  22. #include <Xm/PushB.h> 
  23. #include <Xm/RowColumn.h> 
  24. #include <Xm/Separator.h> 
  25. #include <Xm/Text.h> 
  26. #include <Xm/Text.h> 
  27. #include <Xm/DialogS.h> 
  28. #include <X11/IntrinsicP.h>
  29. #include <stdio.h>
  30. #include "helpbox.h"
  31.  
  32. /* Globals for dialog */
  33. Widget  help_dialog = (Widget)NULL;
  34. Widget  help_topic  = (Widget)NULL;
  35. Widget  help_text   = (Widget)NULL;
  36.  
  37. /* Globals for storing help information max 100 */
  38. Boolean HelpBoxActive = False;
  39. int number_topics;      /* how many topics are there data for */
  40. char* topic_title[100]; /* name of item */
  41. char** topic_text[100]; /* help text, each is an array of strings */
  42.  
  43. /* internal prototypes */
  44. void InitHelpText(void);
  45. void HelpBoxSelectCB(Widget parent, XtPointer clientData, XtPointer callData);
  46.  
  47. /* callback to unmanage dialog */
  48. static void unmanage_helpdialogCB(Widget widget, 
  49.                   XtPointer client_data, 
  50.                   XtPointer call_data) {
  51.   Widget dialog = (Widget)client_data;
  52.  
  53.   if (dialog != (Widget)NULL) {
  54.     if (XtIsManaged(dialog)) XtUnmanageChild(dialog);
  55.   }
  56. } /* end unmanage_helpdialogCB */
  57.  
  58. /* Show Help dialog */
  59. /* returns true if created, else previously existed */
  60. void HelpBoxShow(void) {
  61.   if (!XtIsManaged(help_dialog)) {
  62.   /* clear any previous text, add instructions */
  63.    XmTextReplace(help_text,(XmTextPosition)0, 
  64.          XmTextGetLastPosition(help_text), 
  65.          "     Click topic on left to display help.");
  66.     XtManageChild(help_dialog);
  67.   }
  68. } /* end HelpBoxShow */
  69.  
  70. /* create help box */
  71. /* returns true if created, else previously existed */
  72. Boolean HelpBoxCreate (Widget parent, 
  73.           XtCallbackProc topic_callback,
  74.           XtPointer topic_data,
  75.           XtCallbackProc help_callback,
  76.           XtPointer help_text_data,
  77.           XtPointer help_topic_data) {
  78.   Arg         args[20];
  79.   Cardinal    n;
  80.   Widget      row, sep, dismiss;
  81.   XFontStruct *XFont;
  82.   GC          gc;
  83.   int         chei, cwid;
  84.   Dimension   topicWid, textHei, textWid;
  85.  
  86.   /* If there's a Help box lurking around unseen wake it up instead */
  87.   if (HelpBoxActive) {
  88.     HelpBoxShow();
  89.     return False;
  90.   }
  91.   HelpBoxActive = True; /* soon to be true */
  92.     
  93.   /* see how big characters are to make boxes to size */
  94.   /* create graphics context for box */
  95.   gc = XCreateGC (XtDisplay (parent), 
  96.               DefaultRootWindow (XtDisplay(parent)),
  97.               0, NULL);
  98.  
  99. /* how big are the characters */
  100.   XFont = XQueryFont(XtDisplay (parent), XGContextFromGC(gc));
  101.   chei = XFont->ascent + XFont->descent + 2;
  102.   cwid = XFont->max_bounds.width;
  103.  
  104.   /* text ~80 char x 20 lines, topics ~25 char wide */
  105.   topicWid = 25*cwid;
  106.   textWid = 80*cwid;
  107.   textHei = 20*chei;
  108.  
  109.   if (gc) XFreeGC(XtDisplay(parent), gc);
  110.  
  111.   n = 0;
  112.   XtSetArg(args[n], XmNallowResize, True); n++;
  113.   XtSetArg(args[n], XmNtitle, "FITSview Help"); n++;
  114.   help_dialog = XmCreateFormDialog(parent, "helpbox", args, n);
  115.  
  116.   /* create button area at bottom */
  117.   /* Note: the stuff at the bottom needs to be put in first due to the
  118.      adjustlast policy of the RowColumn widget */
  119.   dismiss = XtVaCreateManagedWidget("dismiss",
  120.                     xmPushButtonWidgetClass, help_dialog,
  121.                     /*XmNtopAttachment,   XmATTACH_WIDGET,
  122.                       XmNtopWidget,       sep,*/
  123.                     XmNleftAttachment,  XmATTACH_FORM,
  124.                     XmNrightAttachment,  XmATTACH_FORM,
  125.                     XmNbottomAttachment, XmATTACH_FORM,
  126.                     NULL);
  127.   XtAddCallback(dismiss, XmNactivateCallback, 
  128.   (XtCallbackProc)unmanage_helpdialogCB, (XtPointer)NULL);
  129.   sep = XtVaCreateManagedWidget("sep",
  130.                 xmSeparatorWidgetClass, help_dialog,
  131.                 XmNbottomAttachment,   XmATTACH_WIDGET,
  132.                 XmNbottomWidget,       dismiss,
  133.                 XmNleftAttachment,  XmATTACH_FORM,
  134.                 XmNrightAttachment, XmATTACH_FORM,
  135.                 NULL);
  136.  
  137.  row = XtVaCreateWidget("row",
  138.             xmFormWidgetClass, help_dialog,
  139.             XmNorientation, XmHORIZONTAL,
  140.             XmNresizeHeight, True,
  141.             NULL);
  142.  
  143.   /* Create scrolled list of help topics */
  144.   n = 0;
  145.   XtSetArg(args[n], XmNselectionPolicy, XmSINGLE_SELECT); n++;
  146.   XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM); n++;
  147.   XtSetArg(args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
  148.   XtSetArg(args[n], XmNheight, textHei); n++;
  149.   XtSetArg(args[n], XmNwidth, topicWid); n++;
  150.   XtSetArg(args[n], XmNresizeHeight, True); n++;
  151.   XtSetArg(args[n], XmNeditable, False); n++;
  152.   help_topic = XmCreateScrolledList(row, "help_topic", args, n);
  153.   XtAddCallback(help_topic, XmNsingleSelectionCallback,
  154.         topic_callback, topic_data);
  155.   XtAddCallback(help_topic, XmNhelpCallback,
  156.         help_callback, help_topic_data);
  157.   XtAddCallback(XtParent(help_topic), XmNhelpCallback,
  158.         help_callback, help_topic_data);
  159.  
  160.   /* Create text Widget to display help */
  161.   n = 0;
  162.   XtSetArg(args[n], XmNeditMode, XmMULTI_LINE_EDIT); n++;
  163.   XtSetArg(args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
  164.   XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM); n++;
  165.   XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++;
  166.   XtSetArg(args[n], XmNleftAttachment, XmATTACH_WIDGET); n++;
  167.   XtSetArg(args[n], XmNleftWidget, help_topic); n++;
  168.   XtSetArg(args[n], XmNheight, textHei); n++; 
  169.   XtSetArg(args[n], XmNwidth, textWid); n++;
  170.   XtSetArg(args[n], XmNresizeHeight, True); n++;
  171.   XtSetArg(args[n], XmNeditable, False); n++;
  172.   help_text = XmCreateScrolledText (row, "help_text", args, n);
  173.   XtAddCallback(help_text, XmNhelpCallback,
  174.         help_callback, help_topic_data);
  175.   XtAddCallback(XtParent(help_text), XmNhelpCallback,
  176.         help_callback, help_topic_data);
  177.  
  178.  
  179.   /* set up scrolled area attachments */
  180.   XtVaSetValues (row,
  181.          XmNtopAttachment,   XmATTACH_FORM,
  182.          XmNleftAttachment,  XmATTACH_FORM,
  183.          XmNrightAttachment, XmATTACH_FORM,
  184.          XmNbottomAttachment, XmATTACH_WIDGET,
  185.          XmNbottomWidget,       sep,
  186.          NULL);
  187.          
  188.   XtManageChild(help_topic);
  189.   XtManageChild(help_text);
  190.   XtManageChild(row);
  191.   return True;
  192. } /* end  HelpBoxCreate */
  193.  
  194. /* Put help text in display */
  195. void HelpBoxSetText (char** text) {
  196.   int next=0;
  197.   if (help_text == (Widget)NULL) return; /* sanity check */
  198.   if (text == NULL) return;
  199.  
  200.   /* hide text until it's redrawn */
  201.   if (XtIsRealized (help_text)) XtUnmapWidget(help_text);
  202.  
  203.   /* clear any previous text */
  204.    XmTextReplace(help_text,(XmTextPosition)0, 
  205.          XmTextGetLastPosition(help_text), "");
  206.  
  207.    /* copy text */
  208.    while (1) { /* loop till done */
  209.      if (!strncmp (text[next], "*** FINISHED ***", 16)) break; /* Finished */
  210.      XmTextInsert(help_text, XmTextGetLastPosition(help_text), text[next++]);
  211.    }
  212.    /* start at top */
  213.    XmTextShowPosition(help_text, (XmTextPosition)0);
  214.  
  215.    /* show text */
  216.    if (XtIsRealized (help_text)) XtMapWidget(help_text);
  217.  
  218. } /* end  HelpBoxSetText */
  219.  
  220. /* adds topic to end of list */
  221. void HelpBoxAddTopic (char* topic) {
  222.   XmString xmstring = NULL;
  223.   if (help_topic == (Widget)NULL) return; /* sanity check */
  224.  
  225.   xmstring = XmStringCreateSimple(topic);
  226.   XmListAddItemUnselected(help_topic, xmstring, 0); /* add to end */
  227.   if (!xmstring) XmStringFree(xmstring); /* release structure */
  228. } /* end HelpBoxAddTopic */
  229.  
  230. /* delete all topics */
  231. void HelpBoxDeleteAllTopics(void) {
  232.   if (help_topic == (Widget)NULL) return; /* sanity check */
  233.  
  234.   XmListDeselectAllItems (help_topic);
  235.   XmListDeleteAllItems (help_topic);
  236. } /* end HelpBoxDeleteAllTopics */
  237.  
  238. /* Help callback on a given topic  */
  239. /* clientData is pointer to topic string */
  240. void HelpBoxTopicCB (Widget w, XtPointer clientData, XtPointer callData) {
  241.   HelpBoxShowTopic ((char *)clientData);
  242. } /* end HelpBoxTopicCB */
  243.  
  244. /* Displays help on a given topic  */
  245. /* find topic in list and select it */
  246. void HelpBoxShowTopic( char* topic) {
  247.   XmString xmstring = NULL;
  248.   char message[100];
  249.  
  250.   /* make sure it exists before proceeding */
  251.   if (!HelpBoxActive || (help_topic == (Widget)NULL)) return; 
  252.  
  253.   /* in case topic is not found */
  254.   /* hide text until it's redrawn */
  255.   if (XtIsRealized (help_text)) XtUnmapWidget(help_text);
  256.  
  257.   sprintf (message, 
  258.        "  Requested topic %s not found\n  Click topic on left to display help.\n",
  259.        topic);
  260.   XmTextReplace(help_text,(XmTextPosition)0, 
  261.         XmTextGetLastPosition(help_text), message);
  262.  
  263.   /* select topic from list */
  264.   xmstring = XmStringCreateSimple(topic);
  265.   XmListSelectItem(help_topic, xmstring, True); /* select to show */
  266.   XmListSetItem(help_topic, xmstring); /* adjust topic list */
  267.  
  268.   /* in case it's not already visible */
  269.   if (!XtIsManaged(help_dialog)) XtManageChild(help_dialog);
  270.   if (XtIsRealized (help_text)) XtMapWidget(help_text);
  271.  
  272.  
  273.   if (!xmstring) XmStringFree(xmstring); /* release structure */
  274. } /* end HelpBoxAddTopic */
  275.  
  276.  
  277. /*********** generic help up to this point, below FITSview specific *********/
  278.  
  279. /* Create/Initialize HelpBox */
  280. void MakeHelpBox(Widget parent, Boolean visible) {
  281.   int topic;
  282.  
  283.   /* Create dialog - if returns false then it already exists*/
  284.   if (!HelpBoxCreate (parent, 
  285.          (XtCallbackProc)HelpBoxSelectCB, 
  286.          (XtPointer)NULL, 
  287.          (XtCallbackProc)HelpBoxTopicCB, 
  288.          (XtPointer)"How to use help", 
  289.          (XtPointer)"How to use help")) return;
  290.  
  291.   /* initialize help table */
  292.   InitHelpText();
  293.  
  294.   /* add topics */
  295.   for (topic=0; topic<number_topics; topic++) {
  296.  
  297.     HelpBoxAddTopic(topic_title[topic]);
  298.   } /* end of loop over topic list */
  299.  
  300.  
  301.   /* show the box if requested */
  302.   if (visible) HelpBoxShow();
  303. } /* end MakeHelpBox */
  304.  
  305. /* HelpBox selection callback*/
  306. void HelpBoxSelectCB(Widget parent, XtPointer clientData, XtPointer callData) {
  307.   XmListCallbackStruct* ptr = (XmListCallbackStruct*)callData;
  308.   char*                 string;
  309.   int                   topic;
  310.  
  311.   /* which item selected */
  312.   XmStringGetLtoR(ptr->item, XmSTRING_DEFAULT_CHARSET, &string);
  313.  
  314.   /* lookup in list */
  315.   for (topic=0; topic<number_topics; topic++) {
  316.     if (!strcmp(string, topic_title[topic])) break;
  317.   } /* end of loop over topic list */
  318.  
  319.   /* did this fall off the end? - if so return */
  320.   if (topic>=number_topics) return;
  321.  
  322.   /* display */
  323.   HelpBoxSetText(topic_text[topic]);
  324.  
  325.   XtFree(string); /* free string */
  326. } /* end MakeHelpBox */
  327.  
  328. /* set help topics and titles */
  329. void InitHelpText(void) {
  330. /* intro to help display */
  331.    static  char *helponhelp_text[] = {
  332. "     Click topic on left to display help.\n",
  333. "*** FINISHED ***"}; /* end of text */
  334.  
  335.    static  char *intro_text[] = {
  336. "                         XFITSview 1.2\n",
  337. "  \n",
  338. "Please relay comments and/or suggestions to Bill Cotton at NRAO \n ",
  339. "(bcotton@nrao.edu) \n",
  340. " \n",
  341. "This program is a viewer for astronomical images in FITS (Flexible \n",
  342. "Image Transport System) format.  Images in normal or gzip compressed \n",
  343. "form may be viewed.  An image can be displayed in a number of ways \n",
  344. "including colorizing the display, zoom and scroll.  In addition, \n",
  345. "celestial positions can be determined for locations in the image by \n",
  346. "clicking the left mouse button when the cursor is over the desired \n",
  347. "feature. \n",
  348. "  \n",
  349. "The FITSview home page is http://www.cv.nrao.edu/~bcotton/fitsview.html\n",
  350. "*** FINISHED ***"}; /* end of text */
  351.  
  352. /* overview of XFITSview */
  353.    static  char *over_text[] = {
  354. "     Overview \n",
  355. "   \n",
  356. "  This viewer will display and manipulate astronomical images in FITS \n",
  357. "format.  The file to view  can be specified as a command line argument \n",
  358. "or using the Open item in the File menu.   Subsequent files can also \n",
  359. "be selected using the Open function.   Information about the displayed \n",
  360. "image can be obtained using the Image info item in the File menu.  \n",
  361. "If the FITS file directory contains an appropriate index, then a \n",
  362. "celestial position can be entered and XFITSview will look up the image \n",
  363. "containing the position (if any) and load this image centered on the \n",
  364. "requested position. \n",
  365. "   \n",
  366. "     The header of a FITS file (or the contents of a text file) may be \n",
  367. "previewed before deciding which image to load.  Once a file is \n",
  368. "displayed it can be manipulated and examined in a number of ways.  If \n",
  369. "the image is larger than the display, the scroll bars on the edge of \n",
  370. "the display will scroll around inside of the image.  Clicking the left \n",
  371. "mouse button in the display will result in the brightness and \n",
  372. "celestial position of the pixel under the cursor being displayed at \n",
  373. "the bottom of the Display control box.  A click on the right mouse \n",
  374. "button is similar except that a point model is fitted to the image \n",
  375. "near the selected pixel; the results are given in the Display control \n",
  376. "box.  These brightness and position displays can be logged to a text \n",
  377. "file by selecting the 'Log positions' option in the file menu. \n",
  378. "   \n",
  379. "     Standard World Coordinate System (WCS) coordinates are\n",
  380. "supported as well as the astrometric plate parameters of the Digitized\n",
  381. "Sky Survey (DSS) and IRAF coordinates.  Positions can be displayed and \n",
  382. "entered in either equinox B1950 or J2000 if the equinox of the image \n",
  383. "is either of these.\n",
  384. "   \n",
  385. "     The brightness and contrast of the image can be adjusted using \n",
  386. "the horizonal scroll bars  at the top of the Display control box. \n",
  387. "Moving the slider to the right will increase the contrast or the \n",
  388. "brightness.  If the range of pixel brightness  of the portion of the \n",
  389. "image of interest is significantly smaller than the total range, \n",
  390. "contrast and brightness adjustments may be insufficient.  In this \n",
  391. "case, a limited range of pixel values can be displayed using the Pixel \n",
  392. "Range items in the Options control box,  Alternately, the nonlinear \n",
  393. "option in the Options menu may display the desired range of \n",
  394. "brightness.  Blanked pixels always appear as black. By default,\n",
  395. "XFITSview will attempt to guess the proper pixel range to display.\n",
  396. "   \n",
  397. "     The image can be displayed in color using one of two color \n",
  398. "schemes, Color Contour and Pseudo Flame in the Colorize menu.  Color \n",
  399. "Contour is an 8 color scheme  which gives a contouring effect and \n",
  400. "Pseudo Flame is a continous color pseudo coloring scheme. giving the \n",
  401. "image a flame like quality.  Option Grayscale is a black and white \n",
  402. "coloring scheme.  The order of the color table (black becomes white \n",
  403. "etc.) is reversed using the Reverse item.   Brightness and contract \n",
  404. "controls also work on colorized images.  The color, contrast and \n",
  405. "brightness can be reset using the Reset item on the Colorize menu. \n",
  406. "   \n",
  407. "     When an image is initially loaded, generally the first plane in \n",
  408. "the file is displayed.  If the image contains multiple frequency or \n",
  409. "polarization planes, other planes can be loaded using the Plane number \n",
  410. "item in the Options control box.  The number and type of planes in the \n",
  411. "file can be determined using the Image Info item in the File menu.  A \n",
  412. "cube can be displayed as a movie (using the 'Movie' item in the Movie \n",
  413. "menu) to show a range of planes in sequence or by selecting planes at \n",
  414. "random. \n",
  415. "   \n",
  416. "     An image can be zoomed in or out using the Zoom menu and \n",
  417. "selecting the desired magnification factor.  Zooming in (factor > \n",
  418. "100%) is done by replicating pixels and zooming out (magnification \n",
  419. "<100%)  by displaying only a subset of the pixels.  Zooming is \n",
  420. "centered on the current scroll position controlled by the image scroll \n",
  421. "bars.  Selecting a zoom factor of 100% undoes the effects of zooming. \n",
  422. "   \n",
  423. "     Celestial positions determined from right mouse clicks will be \n",
  424. "refined by fitting a point model to the position selected.  This will \n",
  425. "fit an accurate position and flux assuming a point object near the \n",
  426. "position of the mouse click.  The results will be displayed in the \n",
  427. "Control Panel.  The Mark Position item in the Position menu will \n",
  428. "bring up a dialog box in which the celestial coordinates of an object \n",
  429. "of interest can be entered; alternately a list of positions can be \n",
  430. "given in a file.  The corresponding location(s) on the image will be \n",
  431. "marked. If the current FITS directory contains a special index \n",
  432. "(named 'findex.txt'), then the Lookup Position item in the Position \n",
  433. "menu can be used to find the FITS image containing that position and \n",
  434. "load it. \n",
  435. "   \n",
  436. "     Two images can be compared using the Blink facility invoked by \n",
  437. "the Blink menu.  Blinking will alternately display one image and then \n",
  438. "the other.  The first image is loaded into the display and desired \n",
  439. "adjustments are made.  It is then copied into the Blink image using \n",
  440. "the 'Swap Blink and Current' item in the Blink menu.  The second image \n",
  441. "is then loaded into the display and adjusted as desired.  The Blink \n",
  442. "images item on the Blink menu will then begin blinking.  The dwell \n",
  443. "time on each image can be controlled using the scroll bar in the blink \n",
  444. "dialog box.  The Quit button on the dialog box ends blinking.  If the \n",
  445. "two images have pixels coincident on the sky, the zoom and scroll used \n",
  446. "are that for the current display (the one visible before the blink \n",
  447. "starts).  If the pixels are not aligned, blinking uses the scroll, \n",
  448. "zoom and display setup for the blink image that were in effect when it \n",
  449. "was copied to the Blink image and the current setup for the second \n",
  450. "(current) (normal display) image before the blink began.  The 'Swap \n",
  451. "Blink and Current' item swaps the current and blink images. \n",
  452. "*** FINISHED ***"} ; /* end of text */   
  453.  
  454. /* file menu */
  455.    static  char *file_text[] = {
  456. "--------------------------- File Menu --------------------------------- \n",
  457. "   \n",
  458. "  \n",
  459. "  This menu includes a number items related to files.  Note: the \n",
  460. "following may read gzip compressed files. \n",
  461. "   \n",
  462. "*** FINISHED ***"} ; /* end of text */   
  463.  
  464.    static char*fileopen_text[] = {
  465. "  Open \n",
  466. "   \n",
  467. "     This item will bring up a file browser dialog box to select the \n",
  468. "FITS file to load.  When a file is loaded, the previous image is \n",
  469. "discarded.  The title bar of the main window gives the name of the \n",
  470. "currently loaded file. \n",
  471. "     Select a FITS image from the browser and click the OK button to \n",
  472. "load the image.  When the file is being loaded to the display, a box \n",
  473. "appears with a progress message and a cancel button.  If the message \n",
  474. "'WARNING: BAD PIXEL RANGE' appears then all of the pixels loaded are \n",
  475. "at one extreme of the range of displayed brightness.  This usually \n",
  476. "indicates inappropriate values in the Set Pixel Range option in the \n",
  477. "Options dialog.  This may be the result of a previous image with a very \n",
  478. "different range of pixel values.  Setting both values to zero will get \n",
  479. "the default display.  \n",
  480. "   \n",
  481. "*** FINISHED ***"} ; /* end of text */   
  482.  
  483.    static char*filepreview_text[] = {
  484. "  Preview \n",
  485. "   \n",
  486. "     This item will display up to about 1000 lines of the header of a \n",
  487. "selected FITS file or text file in a scroll box.  This allows deciding \n",
  488. "which image to load or reading explanatory text.  The first line of \n",
  489. "the header of a FITS header is:  \n",
  490. "  SIMPLE  =                     T     /possibly some comment \n",
  491. " \n",
  492. "  A FITS image file has a line near the beginning of the form: \n",
  493. "  NAXIS1   =              nnn        /possibly some comment \n",
  494. "   \n",
  495. "  where nnn is an integer larger than 0.  The size of the image is \n",
  496. "given by the NAXIS1 and NAXIS2 entries.  Information about the image \n",
  497. "may be contained in HISTORY or COMMENT lines. \n",
  498. "   \n",
  499. "*** FINISHED ***"} ; /* end of text */   
  500.  
  501.    static char*filesaveas_text[] = {
  502. "  Save as \n",
  503. " \n",
  504. "     This item will copy the currently displayed FITS image into a \n",
  505. "FITS file to be specified in a file specification dialog box.  The file \n",
  506. "is written in uncompressed form irregardless of the compression state of \n",
  507. "the input file. \n",
  508. "  \n",
  509. "*** FINISHED ***"} ; /* end of text */   
  510.  
  511.    static char*fileinfo_text[] = {
  512. "  Image info \n",
  513. "   \n",
  514. "     This item will display information about the current image \n",
  515. "including positions, frequencies, observation dates, etc.  The Dismiss \n",
  516. "button clears this display; Refresh updates the display for the \n",
  517. "currently loaded image. \n",
  518. "   \n",
  519. "*** FINISHED ***"} ; /* end of text */   
  520.  
  521.    static char*filelog_text[] = {
  522. "  Log positions \n",
  523. "   \n",
  524. "     This will toggle the logging of brightnesses and positions \n",
  525. "selected by a mouse button click or fitting a point model to the \n",
  526. "image.  When this is turned on, a dialog box will allow selection of \n",
  527. "the text file.  The logging file contains one line per position \n",
  528. "containing 1) the pixel location on the first three axes, 2) the \n",
  529. "celestial position and equinox of the first two axes, 3) the corresponding \n",
  530. "brightness from the image and,  4) the name of the FITS file.  \n",
  531. "If the menu item is labeled 'Start Position Logging' then logging is \n",
  532. "currently disabled and selecting this item will turn it on. \n",
  533. "Conversely, if the item is labeled 'Stop Position Logging' then \n",
  534. "logging is currently active and selecting this item will turn it off. \n",
  535. "   \n",
  536. "*** FINISHED ***"} ; /* end of text */   
  537.  
  538.    static char*filequit_text[] = {
  539. "  Quit \n",
  540. "   \n",
  541. "     This will terminate the program. \n",
  542. " \n",
  543. "*** FINISHED ***"} ; /* end of text */   
  544.  
  545.    static char*filehelp_text[] = {
  546. "  Help \n",
  547. "    Displays information about the file menu. \n",
  548. "*** FINISHED ***"} ; /* end of text */
  549.  
  550. /* Options menu */
  551.    static char *options_text[] = {
  552. "--------------------------- Options Menu ------------------------------ \n",
  553. "   \n",
  554. "  This menu item will bring up the Options control box which contains \n",
  555. "items that control the range of values loaded into the display and the \n",
  556. "plane in the image loaded.  These items are discussed below. \n",
  557. "   \n",
  558. "Pixel Range \n",
  559. "     The range of values that are present in the image plane displayed \n",
  560. "are shown.  The first value entered (labeled 'Minimum pixel value') is \n",
  561. "the minimum pixel value to be displayed and the second ('Maximum pixel \n",
  562. "value') is the maximum to be displayed.  Pixel values below the \n",
  563. "minimum are set to the minimum and above the maximum are set to the \n",
  564. "maximum.  0, 0 means let XFITSview decide the pixel range; the default \n",
  565. "should be adequate for most purposes but uses assumptions about the\n",
  566. "image which are true for many astronomical images but may not be\n",
  567. "valid especially if the features in the image are fainter than the\n",
  568. "'sky' level (e.g. absorption, Stokes Q, U or V or negative images).\n",
  569. "   \n",
  570. "Plane \n",
  571. "     If the image contains multiple planes (frequency, polarization \n",
  572. "etc.) the desired plane number can be specified using this item.  The \n",
  573. "dialog box will initially contain the current plane number and will \n",
  574. "tell the allowed range of values (1 - n).  Information about the \n",
  575. "number and type of planes may be obtained from the Image info item in \n",
  576. "the File menu.  Planes are numbered 1 relative. \n",
  577. "If many planes are to be viewed, use Movie from the Movie menu.\n",
  578. "   \n",
  579. "Linear display (radio button) \n",
  580. "     This option specifies a linear mapping of image pixel values to \n",
  581. "display colors.  \n",
  582. "   \n",
  583. "Nonlinear display (radio button) \n",
  584. "     This option specifies a nonlinear mapping of pixel values to \n",
  585. "display colors; the mapping function is the square root of the pixel \n",
  586. "value.  This option is useful for displaying an image with a large \n",
  587. "range of pixel values and uses more levels to display low brightness \n",
  588. "than the linear mapping. \n",
  589. "   \n",
  590. "Histogram equalization (radio button)\n",
  591. "     This option specifies a histogram equalization of the pixels in\n",
  592. "the relevant pixel range (specified or XFITSview default).  This\n",
  593. "attempts to have equal numbers of pixels (within the range) shown in\n",
  594. "each of the colors of the display.  This option may be useful for\n",
  595. "displaying an image with interesting structure over a wide range of\n",
  596. "brightness. \n",
  597. "  \n",
  598. "OK \n",
  599. "     This reads the current values and saves them for the next image \n",
  600. "load and dismisses the dialog box. \n",
  601. " \n",
  602. "Cancel \n",
  603. "     Dismisses the dialog box with no changes to the loading \n",
  604. "parameters.  \n",
  605. "   \n",
  606. "Reload \n",
  607. "     This option causes the currently selected image to be reloaded \n",
  608. "into the display using the current set of options.  This needs to be \n",
  609. "done after any of the other options in this dialog box have been \n",
  610. "changed in order for these changes to take effect. \n",
  611. "   \n",
  612. "     When the file is being loaded to the display, a box appears with \n",
  613. "a progress message and a cancel button.  If the message 'WARNING: BAD \n",
  614. "PIXEL RANGE' appears then all of the pixels loaded are at one extreme \n",
  615. "of the range of displayed brightness.  This usually indicates \n",
  616. "inappropriate values in the Set Pixel Range in the Options menu.  This \n",
  617. "may be the result of a previous image with a very different range of \n",
  618. "pixel values.  Setting both values to zero will get the default \n",
  619. "display.  Hitting the Cancel button cancels loading the image. \n",
  620. "*** FINISHED ***"} ; /* end of text */   
  621.  
  622.    static char*optionshelp_text[] = {
  623. "  Help \n",
  624. "    Displays information about the options menu. \n",
  625. "   \n",
  626. "*** FINISHED ***" }; /* end of text */
  627.  
  628. /* Zoom menu */
  629.    static char *zoom_text[] = {
  630. "--------------------------- Zoom Menu ------------------------------ \n",
  631. "   \n",
  632. "  This menu controls zooming of the image. \n",
  633. "   \n",
  634. "  25% \n",
  635. "   \n",
  636. "     This will reduce the size of the displayed image to 1/4 of its \n",
  637. "normal size by discarding 3 out of 4 rows and columns. \n",
  638. "   \n",
  639. "  50% \n",
  640. "   \n",
  641. "     This will reduce the size of the displayed image to 1/2 of its \n",
  642. "normal size by discarding alternate rows and columns. \n",
  643. "   \n",
  644. "  100% \n",
  645. "   \n",
  646. "     Resets the zoom to its initial setting. \n",
  647. "   \n",
  648. "  200% \n",
  649. "   \n",
  650. "    This magnifies the image by a factor of two by replicating pixels. \n",
  651. "   \n",
  652. "   \n",
  653. "  400% \n",
  654. "   \n",
  655. "    This magnifies the image by 400%. \n",
  656. "   \n",
  657. "  800% \n",
  658. "   \n",
  659. "     This magnifies the image by 800%. \n",
  660. "   \n",
  661. "  1600% \n",
  662. "   \n",
  663. "    This magnifies the image by 1600%. \n",
  664. "   \n",
  665. "*** FINISHED ***"} ; /* end of text */   
  666.  
  667.    static char*zoomhelp_text[] = {
  668. "  Help \n",
  669. "    Displays information about the zoom menu. \n",
  670. "   \n",
  671. "     \n",
  672. "*** FINISHED ***" }; /* end of text */
  673.  
  674. /* Position menu */
  675.    static char *position_text[] = {
  676. "--------------------------- Position Menu ---------------------------- \n",
  677. "   \n",
  678. "  This menu contains functions related to celestial position. \n",
  679. "  \n",
  680. "*** FINISHED ***"} ; /* end of text */   
  681.  
  682.    static char* positionsetequinox_text[] = {
  683. "  Set Equinox \n",
  684. "    \n",
  685. "   This option allows specifying the equinox (B1950 or J2000) of the \n",
  686. "celestial coordinates displayed or entered.  Thus, if the image is in \n",
  687. "J2000 coordinates and you have a position in B1950, clicking on the \n",
  688. "B1950 button in the Set Equinox dialog box will cause positions \n",
  689. "displayed after a mouse click in the image to be equinox B1950. \n",
  690. "Furthermore, the position specified to Mark Position will be B1950. \n",
  691. "See the 'Source Info' box in the file menu to determine the equinox of \n",
  692. "the image. \n",
  693. "   The dialog box invoked by this menu item has three options: 1) use \n",
  694. "the equinox of the image (default), 2) equinox J2000 and 3) equinox \n",
  695. "B1950.  Note if the image does not specify the equinox then this \n",
  696. "selection has no effect. \n",
  697. "   \n",
  698. "*** FINISHED ***"} ; /* end of text */   
  699.  
  700.    static char* positionmark_text[] = {
  701. "  Mark Position \n",
  702. "   \n",
  703. "     This option lets you mark a particular celestial position in the \n",
  704. "current image. Selecting this option brings up a dialog box into which \n",
  705. "the desired celestial position is entered; optionally, the name of a \n",
  706. "text file can be given with a list of positions.  The selected \n",
  707. "positions are marked in the displayed image by a cross whose inner \n",
  708. "positions are not shown so as not to obscure the image.  The cross is \n",
  709. "marked in the display by replacing the previous values with that of \n",
  710. "the brightest pixel in the image.  These markers will persist until \n",
  711. "the display is reloaded with the same or another image.  Note that the \n",
  712. "cross may not be visible on some reduced zoom displays as the marked \n",
  713. "pixels may not be among those shown.  When the desired values are \n",
  714. "entered into this dialog box, the 'Mark' button will proceed to mark \n",
  715. "the image and set the scroll to center the last position marked.  The \n",
  716. "'cancel' button dismisses the box without marking any positions. \n",
  717. "   \n",
  718. "     The size of the cross can be controlled by the two values in the \n",
  719. "line labeled 'size'.  The first of these is the 'inner' size of the \n",
  720. "cross or the distance from the center in pixels in which the cross is \n",
  721. "not marked.  The second value is the 'outer' size or the distance in \n",
  722. "pixels from the center over which the cross appears. \n",
  723. "   \n",
  724. "     If many positions are to be marked, they can be entered in a \n",
  725. "text file prepared by a text editor (e.g. emacs).   Each line of this \n",
  726. "file should have an entry of the form:  \n",
  727. "   \n",
  728. "  RA:h RA:m RAs  Dec:d Dec:m Dec:s inner outer \n",
  729. "   \n",
  730. "  where RA:h, RA:m, RA:s are the hours, minutes and seconds of the \n",
  731. "Right Ascension and Dec:d, Dec:m, and Dec:s are the degrees (with \n",
  732. "-sign if in the south), minutes, and seconds of the Declination. \n",
  733. "Inner and outer are the inner and outer sizes of the marking cross in \n",
  734. "pixels.   \n",
  735. "  An example is: \n",
  736. "   \n",
  737. "    12 34 23.7898  -15 23 45.634 3 10 \n",
  738. "   \n",
  739. "     To select a file containing positions, hit the 'file' button for \n",
  740. "a directory browser to specify the text file.  If there are positions \n",
  741. "in the file that are out of the image then the number of these \n",
  742. "positions are reported and the remainder marked.  \n",
  743. "   \n",
  744. "*** FINISHED ***"} ; /* end of text */   
  745.  
  746.    static char* positionlookup_text[] = {
  747. "  Lookup Position \n",
  748. " \n",
  749. "    If the current FITS file directory contains a special index, this \n",
  750. "item allows specifying a celestial position and XFITSview will \n",
  751. "determine which image (if any) contains that position, load the image, \n",
  752. "and center the display on that position.  The equinox of the position \n",
  753. "can be specified using the 'Set Equinox' option in this menu.  Once \n",
  754. "the desired position is entered in the dialog, the Lookup button will \n",
  755. "cause XFITSview to attempt to find and load the desired image.  The \n",
  756. "cancel button dismisses the dialog with no change to the current image. \n",
  757. " \n",
  758. "   The index file in the FITS file directory should have name \n",
  759. "'findex.txt' and obey the following rules. \n",
  760. " \n",
  761. "line 1: \n",
  762. "   This line must specify the equinox of the image field centers, e.g. \n",
  763. "equinox 1950. \n",
  764. " \n",
  765. "lines 2...: \n",
  766. "   These lines give the name of the file, the central position, the \n",
  767. "half width (degrees) in RA and Declination and a priority number.  The \n",
  768. "file containing the specified position with the highest priority \n",
  769. "number is the one selected.  Comments may be given by putting an '!' \n",
  770. "in the first column.  The entry is free format (but must be confined \n",
  771. "to a single line) and the structure of a file entry is: \n",
  772. " \n",
  773. "filename hh mm ss.s -dd mm ss.s hw.ra  hw.dec  priority \n",
  774. " \n",
  775. "Examples follow \n",
  776. "! These images are from the long lost Summarian clay tablets \n",
  777. "!name              RA             Dec   delt_ra delt_dec priority \n",
  778. "sky.fit        11 23 56.234  82 17 56.7  1.87     .25      1 \n",
  779. "south.fit.gz   17 23 54.1   -74  4 53    3.65     1        2 \n",
  780. " \n",
  781. "   Note: the half width in RA is half the number of cells in RA times \n",
  782. "the cell spacing divided by the cosine of the declination to account \n",
  783. "for the converging lines of RA towards the poles. \n",
  784. "   \n",
  785. "*** FINISHED ***"} ; /* end of text */   
  786.  
  787.    static char* positionfit_text[] = {
  788. "  Fit Position \n",
  789. " \n",
  790. "    A point model will be fitted near the position of the last left \n",
  791. "mouse button click in the image.  Clicking the right mouse button will\n",
  792. "cause a point model to be fitted at the current position.  In either case,\n",
  793. "the Display control box will show the fitted position to subcell accuracy \n",
  794. "as well as the brightness interpolated to that position.  If the fitting is\n",
  795. "successful 'fitted' will appear in the Display control else 'fit failed'\n",
  796. "is shown.  If logging is enabled then the fitted position is logged.\n",
  797. " \n",
  798. "*** FINISHED ***"} ; /* end of text */   
  799.  
  800.    static char* positionhelp_text[] = {
  801. "  Help \n",
  802. "    Displays information about the position menu. \n",
  803. "   \n",
  804. "    \n",
  805. "*** FINISHED ***" }; /* end of text */
  806.  
  807. /* Blink menu */
  808.    static char *blink_text[] = {
  809. "--------------------------- Blink Menu ---------------------------- \n",
  810. "   \n",
  811. "  This menu controls blinking. \n",
  812. "   \n",
  813. "*** FINISHED ***"} ; /* end of text */   
  814.  
  815.    static char* blinkswap_text[] = {
  816. "  Swap blink and current \n",
  817. "   \n",
  818. "     This will swap the current and blink images.  An image must be \n",
  819. "copied to the blink image for blinking to be effective.  This item \n",
  820. "allows changing the color table of the blink image or examining values \n",
  821. "or positions in that image.  This can be used repeatedly. \n",
  822. "   \n",
  823. "*** FINISHED ***"} ; /* end of text */   
  824.  
  825.    static char* blinkblink_text[] = {
  826. "  Blink images \n",
  827. "   \n",
  828. "     This will bring up a dialog control box and start blinking the \n",
  829. "images.  The dwell time is controlled using a scroll bar and the Quit \n",
  830. "button terminates blinking.  The title bar of the main window gives \n",
  831. "the name of the currently displayed file.  When blinking stops, the \n",
  832. "(previously) current image is displayed.  If the images have aligned \n",
  833. "pixels on the sky (the only case that makes sense) then the zoom and \n",
  834. "scroll of the blink image is forced to that of the current image. \n",
  835. "Otherwise, the zoom and scroll are those set for each of the images \n",
  836. "and there may be no correspondence between the pixels of the two \n",
  837. "images. \n",
  838. " \n",
  839. "*** FINISHED ***"} ; /* end of text */   
  840.  
  841.    static char* blinkhelp_text[] = {
  842. "  Help \n",
  843. "    Displays information about the blink menu. \n",
  844. "     \n",
  845. "*** FINISHED ***" }; /* end of text */
  846.  
  847. /* Movie menu */
  848.    static char *movie_text[] = {
  849. "--------------------------- Movie Menu ---------------------------- \n",
  850. "   \n",
  851. "  Movie \n",
  852. "   \n",
  853. "     This will bring up a dialog box which controls displaying planes \n",
  854. "in a movie-like fashion where the display is periodically updated with \n",
  855. "the next plane.  Planes can be shown as movies or selected manually \n",
  856. "using the scroll bar.  The current plane is indicated by the location \n",
  857. "of the slider in the scroll bar and the text lines under it giving the \n",
  858. "plane number and the value along this axis in the cube.  The movie \n",
  859. "function is controlled by the values in the text boxes labeled \n",
  860. "'planes' (the start plane for the movie), 'to' (the final plane for \n",
  861. "the movie), and 'Dwell (sec)' (the dwell time on each frame in \n",
  862. "seconds).  These values may be modified by clicking on the box and \n",
  863. "typing in new values. The movie is started using the 'Play' button and \n",
  864. "can be stopped prematurely by the 'Stop' button.  The movie proceeds \n",
  865. "through the selected range once.  NB: the speed of the movie may be \n",
  866. "slower than indicated by the 'Dwell' value if it takes longer than \n",
  867. "this to load the next plane from the disk.  The displayed plane can be \n",
  868. "controlled manually using the scroll bar.  The selected plane will \n",
  869. "remain displayed until another plane is selected.  The 'Quit' button \n",
  870. "exits movie mode and resumes the normal display. \n",
  871. "   \n",
  872. "*** FINISHED ***"} ; /* end of text */   
  873.  
  874.    static char* moviehelp_text[] = {
  875. "  Help \n",
  876. "    Displays information about the movie menu. \n",
  877. "   \n",
  878. "*** FINISHED ***" }; /* end of text */
  879.  
  880. /* Colorize menu */
  881.    static char *colorize_text[] = {
  882. "--------------------------- Colorize Menu ---------------------------- \n",
  883. "   \n",
  884. "  This menu controls the colorizing of the image which is \n",
  885. "intrinsically monochromatic.  The brightness and contrast controls \n",
  886. "will modify the color schemes.  Note: blanked pixels are always \n",
  887. "displayed as black. \n",
  888. "   \n",
  889. "*** FINISHED ***"} ; /* end of text */   
  890.  
  891.    static char* colorizecolor_text[] = {
  892. "  Color Contour \n",
  893. "   \n",
  894. "     This scheme uses a small number of colors to represent the image. \n",
  895. "This gives a color contour effect. \n",
  896. "   \n",
  897. "*** FINISHED ***"} ; /* end of text */   
  898.  
  899.    static char* colorizeflame_text[] = {
  900. "  Pseudo Flame \n",
  901. "   \n",
  902. "     This scheme uses a continous set of colors and intensities to \n",
  903. "represent the image with a pseudo coloring scheme giving the image a \n",
  904. "flame like quality.  \n",
  905. "   \n",
  906. "*** FINISHED ***"} ; /* end of text */   
  907.  
  908.    static char* colorizegray_text[] = {
  909. "  Grayscale \n",
  910. "      \n",
  911. "     This function uses shades of gray to represent the image. \n",
  912. "   \n",
  913. "*** FINISHED ***"} ; /* end of text */   
  914.  
  915.    static char* colorizereverse_text[] = {
  916. "  Reverse colors \n",
  917. "      \n",
  918. "     This function reverses the order of the color table causing \n",
  919. "(nearly) black to become white etc. Blanked pixels still appear black. \n",
  920. "   \n",
  921. "*** FINISHED ***"} ; /* end of text */   
  922.  
  923.    static char* colorizereset_text[] = {
  924. "  Reset colors \n",
  925. "   \n",
  926. "     This resets the colors to shades of gray and resets the \n",
  927. "brightness and contrast controls.  \n",
  928. "   \n",
  929. "*** FINISHED ***"} ; /* end of text */   
  930.  
  931.    static char* colorizehelp_text[] = {
  932. "  Help \n",
  933. "    Displays information about the Colorize menu. \n",
  934. "*** FINISHED ***" }; /* end of text */
  935.  
  936. /* Help menu  */
  937.    static char *help_text[] = {
  938. "--------------------------- Help Menu ---------------------------- \n",
  939. "   \n",
  940. "  This menu controls informative displays about the program. \n",
  941. " \n",
  942. "  About XFITSview \n",
  943. "     Gives information about this program. \n",
  944. "   \n",
  945. "  Help \n",
  946. "   \n",
  947. "     Displays this information. \n",
  948. "   \n",
  949. "*** FINISHED ***" }; /* end of text */
  950.  
  951. /* Display control */
  952.    static char *displaycontrol_text[] = {
  953. " \n",
  954. "   Display control \n",
  955. "   \n",
  956. "  The display control contains scroll bars to control the brightness \n",
  957. "and contrast of the displayed image and information about pixels \n",
  958. "selected in the image.  \n",
  959. "   \n",
  960. "*** FINISHED ***" }; /* end of text */
  961.  
  962. /* Image position */
  963.    static char *imageposition_text[] = {
  964. " \n",
  965. "   Image position \n",
  966. "   \n",
  967. "     The celestial position and brightness of a given pixel can be \n",
  968. "determined by clicking the left mouse button when the cursor is on the \n",
  969. "desired position in the image display.  The results are shown at the \n",
  970. "bottom of the Display control.  A more accurate position may be \n",
  971. "obtained for small objects using the right mouse button to select the \n",
  972. "pixel.  The initial position for the fitting must be within two pixels \n",
  973. "of the local maximum (or minimum) being fitted. \n",
  974. "   \n",
  975. "*** FINISHED ***" }; /* end of text */
  976.  
  977. /* Image scrolling */
  978.    static char *imagescrolling_text[] = {
  979. "   \n",
  980. "     Image scrolling       \n",
  981. " \n",
  982. "     If the displayed image is larger than the display area there will \n",
  983. "be scroll bars on the display area.  These scroll bars can be used to \n",
  984. "move the visible area around on the image. \n",
  985. "   \n",
  986. "*** FINISHED ***" }; /* end of text */
  987.  
  988. /* Image enhancement */
  989.    static char *imageenhancement_text[] = {
  990. "   \n",
  991. "    Image enhancement \n",
  992. "   \n",
  993. "     The horizional scroll bars in the Display control box set the \n",
  994. "brightness and contrast of the image.  Moving the slider towards the \n",
  995. "right will increase brightness or contrast.  The scroll bars are \n",
  996. "labeled 'Brightness' and 'Contrast' and the value in parentheses are \n",
  997. "relative values between 0 and 255.   \n",
  998. " \n",
  999. "*** FINISHED ****" }; /* end of text */
  1000.  
  1001. /* Browser */
  1002.    static char *browser_text[] = {
  1003. "    File Browser \n",
  1004. "   \n",
  1005. "File selection uses a standard file browser dialog box.  The selected \n",
  1006. "file should be entered into the item labeled 'Selection'.  This can be \n",
  1007. "done either by clicking on the desired file in the 'Files' box or \n",
  1008. "clicking in the 'Selection' box and entering the name manually.   \n",
  1009. "   The directory displayed can be modified using the 'Directories' box \n",
  1010. "by clicking on the desired subdirectory name (or .. for the parent \n",
  1011. "directory) and hitting the 'Filter' button.  Alternatively, the \n",
  1012. "directory can be changed by modifying the contents of the 'Filter' box \n",
  1013. "to the desired directory and a wildcard match for the file names, e.g. \n",
  1014. "/home/mydir/* \n",
  1015. "selects all files in directory /home/mydir.  Hitting the 'Filter' \n",
  1016. "button will update the contents of the 'Directories' and 'Files' \n",
  1017. "boxes.  The 'filter' box can be used to display only certain files; \n",
  1018. "for example to see only files whose names end in .fits use: \n",
  1019. "/home/myfits/*.fits \n",
  1020. "The 'Filter' button will update the display.  Changing the directory by\n",
  1021. "editing the string in the selection box may NOT have the desired effect.\n",
  1022. "   When the desired file is entered in the 'Selection' box the 'OK' \n",
  1023. "button invokes the requested action.  The 'Cancel' button dismisses \n",
  1024. "the file selection dialog and cancels the requested action.  The \n",
  1025. "'Help' button produces this display. \n",
  1026. " \n", 
  1027. "*** FINISHED ****" }; /* end of text */
  1028.  
  1029. /*  Glossary */
  1030.    static char *glossary_text[] = {
  1031. "--------------------------- Glossary ---------------------------- \n",
  1032. " \n",
  1033. "  Blanked pixels \n",
  1034. "   \n",
  1035. "     If an image has no measured value associated with a given \n",
  1036. "pixel it is said to be blanked or invalid.  XFITSview displays these \n",
  1037. "as black. \n",
  1038. " \n",
  1039. "  Blinking \n",
  1040. "   \n",
  1041. "     Blinking is a technique for comparing images.  If the pixels in \n",
  1042. "two images are aligned and the two are repeatedly displayed one after \n",
  1043. "another, the details of the two can be compared. \n",
  1044. "   \n",
  1045. "  Celestial Position \n",
  1046. "   \n",
  1047. "     Celestial positions on the sky are similar to latitude and \n",
  1048. "longitude used to measure position on the earth.  A celestial position \n",
  1049. "consists of a 'Right Ascension', usually abreviated RA, which \n",
  1050. "corresponds to longitude and a 'Declination', abreviated Dec, \n",
  1051. "corresponds to latitude.  Declination is measured in degrees north \n",
  1052. "and south of the celestial equator, the projection of the earth's \n",
  1053. "equator onto the sky.  Right Ascension is measured in time units, \n",
  1054. "hours, minutes and seconds of sidereal time. \n",
  1055. "     The Earth's rotation axis wobbles with a 25,000 year period due \n",
  1056. "to precession which causes the apparent position of a object to change \n",
  1057. "with time.  Celestial positions are therefore usually expressed in \n",
  1058. "terms of the earth's orientation at a set of standard times called \n",
  1059. "Equinoxes.    The current standard equinoxes are B1950 and J2000 \n",
  1060. "corresponding to the beginnings of the years 1950 and 2000.  The J \n",
  1061. "and B refer to the set of conventions used to 'precess' the \n",
  1062. "coordinates (change them to another time). \n",
  1063. "   \n",
  1064. "   \n",
  1065. "  Color Table \n",
  1066. "   \n",
  1067. "     Image displays show images by representing the value of each \n",
  1068. "pixel by a color or gray shade. The correspondence between the pixel \n",
  1069. "values and the color displayed is called the color table. \n",
  1070. "   \n",
  1071. "   \n",
  1072. "  Image plane \n",
  1073. "   \n",
  1074. "     The simplest images consist of a single two dimensional array of \n",
  1075. "pixels.  An image may contain several (or many) of these 2-D arrays or \n",
  1076. "planes.  Each of the planes can be displayed as an image.  These \n",
  1077. "planes may represent the same region of the sky at different \n",
  1078. "times, frequencies of light, or different polarization states of the \n",
  1079. "light. \n",
  1080. "   \n",
  1081. "  \n",
  1082. "  Pixel \n",
  1083. "   \n",
  1084. "     A pixel is a cell in an image; its value corresponds to the \n",
  1085. "brightness of the image at that position.  In astronomical images a \n",
  1086. "pixel corresponds to a location on the sky.  In images with more than \n",
  1087. "two dimensions, pixels are sometimes called voxels.  \n",
  1088. "   \n",
  1089. " \n",
  1090. "  Precession \n",
  1091. "   \n",
  1092. "     Precession is the wobbling of the earth's rotation axis due to \n",
  1093. "the gravational field of the sun and moon.  This effect is like the \n",
  1094. "wobbling of a top as it slows down.  Earth's rotational axis takes \n",
  1095. "about 25,000 years for each cycle. \n",
  1096. "   \n",
  1097. "   \n",
  1098. "  Scrolling \n",
  1099. "   \n",
  1100. "       If an image is larger than the display, only a portion can be \n",
  1101. "seen at once.  Scrolling is the technique of moving the image in the \n",
  1102. "display so that different parts are visible.  \n",
  1103. "     \n",
  1104. "   \n",
  1105. "  Zooming \n",
  1106. "   \n",
  1107. "     Zooming an image on a display gives the visual impression of \n",
  1108. "getting closer or further from the objects.  In this program, zooming \n",
  1109. "in is done by copying the pixels and zooming out by dropping pixels. \n",
  1110. "This technique either blows up a portion of the image for easier \n",
  1111. "examination or increases the region of the image that can be shown at \n",
  1112. "once on the display.   \n",
  1113. "    \n",
  1114. "*** FINISHED ***" }; /* end of text */
  1115.  
  1116. /* fill in arrays */
  1117.  
  1118.   number_topics = 0;
  1119.  
  1120. /* help on help display */
  1121.   topic_title[number_topics] = "How to use help";
  1122.   topic_text[number_topics++] = helponhelp_text;
  1123.  
  1124. /* intro to help display */
  1125.   topic_title[number_topics] = "Introduction";
  1126.   topic_text[number_topics++] = intro_text;
  1127.  
  1128. /* overview of XFITSview */
  1129.   topic_title[number_topics] = "Overview";
  1130.   topic_text[number_topics++] =  over_text;
  1131.  
  1132. /* Browser  */
  1133.   topic_title[number_topics] = "Browser";
  1134.   topic_text[number_topics++] = browser_text;
  1135.  
  1136. /* file menu */
  1137.   topic_title[number_topics] = "File menu";
  1138.   topic_text[number_topics++] = file_text;
  1139.   topic_title[number_topics] = "File/Open";
  1140.   topic_text[number_topics++] = fileopen_text;
  1141.   topic_title[number_topics] = "File/Preview";
  1142.   topic_text[number_topics++] = filepreview_text;
  1143.   topic_title[number_topics] = "File/Save as";
  1144.   topic_text[number_topics++] = filesaveas_text;
  1145.   topic_title[number_topics] = "File/Image info";
  1146.   topic_text[number_topics++] = fileinfo_text;
  1147.   topic_title[number_topics] = "File/Log position";
  1148.   topic_text[number_topics++] = filelog_text;
  1149.   topic_title[number_topics] = "File/Quit";
  1150.   topic_text[number_topics++] = filequit_text;
  1151.   topic_title[number_topics] = "File/Help";
  1152.   topic_text[number_topics++] = filehelp_text;
  1153.  
  1154. /* Options menu */
  1155.   topic_title[number_topics] = "Options menu";
  1156.   topic_text[number_topics++] = options_text;
  1157.   topic_title[number_topics] = "Options/Help";
  1158.   topic_text[number_topics++] = optionshelp_text;
  1159.  
  1160. /* Zoom menu */
  1161.   topic_title[number_topics] = "Zoom menu";
  1162.   topic_text[number_topics++] = zoom_text;
  1163.   topic_title[number_topics] = "Zoom/Help";
  1164.   topic_text[number_topics++] = zoomhelp_text;
  1165.  
  1166. /* Position menu */
  1167.   topic_title[number_topics] = "Position menu";
  1168.   topic_text[number_topics++] = position_text;
  1169.   topic_title[number_topics] = "Position/Set equinox";
  1170.   topic_text[number_topics++] = positionsetequinox_text;
  1171.   topic_title[number_topics] = "Position/Mark position";
  1172.   topic_text[number_topics++] = positionmark_text;
  1173.   topic_title[number_topics] = "Position/Lookup position";
  1174.   topic_text[number_topics++] = positionlookup_text;
  1175.   topic_title[number_topics] = "Position/Fit position";
  1176.   topic_text[number_topics++] = positionfit_text;
  1177.   topic_title[number_topics] = "Position/Help";
  1178.   topic_text[number_topics++] = positionhelp_text;
  1179.  
  1180. /* Blink menu */
  1181.   topic_title[number_topics] = "Blink menu";
  1182.   topic_text[number_topics++] = blink_text;
  1183.   topic_title[number_topics] = "Blink/Swap";
  1184.   topic_text[number_topics++] = blinkswap_text;
  1185.   topic_title[number_topics] = "Blink/Blink";
  1186.   topic_text[number_topics++] = blinkblink_text;
  1187.   topic_title[number_topics] = "Blink/Help";
  1188.   topic_text[number_topics++] = blinkhelp_text;
  1189.  
  1190. /* Movie menu */
  1191.   topic_title[number_topics] = "Movie menu";
  1192.   topic_text[number_topics++] = movie_text;
  1193.   topic_title[number_topics] = "Movie/Help";
  1194.   topic_text[number_topics++] = moviehelp_text;
  1195.  
  1196. /* Colorize menu */
  1197.   topic_title[number_topics] = "Colorize menu";
  1198.   topic_text[number_topics++] = colorize_text;
  1199.   topic_title[number_topics] = "Colorize/Color Contour";
  1200.   topic_text[number_topics++] = colorizecolor_text;
  1201.   topic_title[number_topics] = "Colorize/Pseudo flame";
  1202.   topic_text[number_topics++] = colorizeflame_text;
  1203.   topic_title[number_topics] = "Colorize/Grayscale";
  1204.   topic_text[number_topics++] = colorizegray_text;
  1205.   topic_title[number_topics] = "Colorize/Reverse colors";
  1206.   topic_text[number_topics++] = colorizereverse_text;
  1207.   topic_title[number_topics] = "Colorize/Reset colors";
  1208.   topic_text[number_topics++] = colorizereset_text;
  1209.   topic_title[number_topics] = "Colorize/Help";
  1210.   topic_text[number_topics++] = colorizehelp_text;
  1211.  
  1212. /* Help menu  */
  1213.   topic_title[number_topics] = "Help menu";
  1214.   topic_text[number_topics++] = help_text;
  1215.  
  1216. /* Display control  */
  1217.   topic_title[number_topics] = "Display control";
  1218.   topic_text[number_topics++] = displaycontrol_text;
  1219.  
  1220. /* Image position  */
  1221.   topic_title[number_topics] = "Image position";
  1222.   topic_text[number_topics++] = imageposition_text;
  1223.  
  1224. /* Image scrolling  */
  1225.   topic_title[number_topics] = "Image scrolling";
  1226.   topic_text[number_topics++] = imagescrolling_text;
  1227.  
  1228. /* Image enhancement  */
  1229.   topic_title[number_topics] = "Image enhancement";
  1230.   topic_text[number_topics++] = imageenhancement_text;
  1231.  
  1232. /*  Glossary  */
  1233.   topic_title[number_topics] = "Glossary";
  1234.   topic_text[number_topics++] = glossary_text;
  1235.  
  1236.  
  1237. } /* end InitHelpText*/
  1238.