home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Science / Science.zip / fblnk224.zip / consts.h < prev    next >
C/C++ Source or Header  |  1999-01-28  |  4KB  |  145 lines

  1. /*  consts.h  for Fitsblink 2.0 */
  2. #ifndef _blink_consts
  3. #define _blink_consts
  4. #include "version.h"
  5. #define NGAMMA 5
  6. #define FALSE 0
  7. #define TRUE 1
  8.  
  9. /*  Conversion factor from degrees to radians  */
  10. #define DEGRAD 1.74532925199e-2
  11. #define RADDEG 57.2957795132
  12. /*  Initial number of frames  */
  13. #define FRAME_MAX 8
  14. /*  Number of bins in a grey level histogram  */
  15. #define HISTOGRAM_WIDTH 64
  16. #define ERROR_MAX 6
  17. /*  A maximal number of objects attached to an image  */
  18. #define OBJECT_NUM 1000
  19. /*  SHAPE indexes  */
  20. #define OBJ_CIRCLE 0
  21. #define OBJ_BOX 1
  22. #define OBJ_DIAMOND 2
  23. #define OBJ_UPTRIANGLE 3
  24. #define OBJ_DOWNTRIANGLE 4
  25.  
  26. /*  Wanted number of grey levels  */
  27. #define GREY_WANTED 128
  28. #ifndef min
  29. #define min(a,b) ((a) > (b)) ? (b) : (a)
  30. #endif
  31. #ifndef max
  32. #define max(a,b) ((a) > (b)) ? (a) : (b) 
  33. #endif
  34. #define DEFAULT_DELAY 0,2
  35. #define DEFAULT_AUTOLEVEL_HIGH 0.01
  36.  
  37. /*  Menu item numbers from the Astrometry menu  */
  38. /*==============================================*/
  39. #define EDIT_PARAMETERS 1
  40. #define DETECT_STARS 2
  41. #define MATCH_STARS 3
  42. #define SAVE_STAR_LIST 4
  43. #define LOAD_STAR_LIST 5
  44. #define DO_ASTROMETRY 6
  45. #define EMPTY_ITEM1 7
  46. #define OPTIONS 8
  47. #define CATALOGS 9
  48. #define SAVE_SETTINGS 10
  49. #define SEND_MAIL 11
  50. #define SHOW_REPORT 12
  51.  
  52.  
  53. /*  Constant definitions for functions which access USNO catalog */
  54. /*===============================================================*/
  55. /*  Width of the declination zone for USNO catalog  */
  56. #define USNO_DECWIDTH 7.5
  57. /*  Distance between two accelerator lines in decimal hours  */
  58. #define USNO_RADIST 0.25
  59. /*  Record length in bytes  */
  60. #define USNO_RECORDLENGTH 12
  61. /*  Maximal allowed number od stars */
  62. #define MAXSTARNUM 33546
  63. /*  buffer size  */
  64. #define BUFSIZE 1000
  65.  
  66. /*  Constant definitions for functions which access GSC  catalog */
  67. /*===============================================================*/
  68. /*  Width of the declination zone for GUIDE catalog  */
  69. #define GUIDE_DECWIDTH 7.5
  70.  
  71.  
  72. /*  Default values  */
  73. #define DEFAULT_RAWIDTH   1.92
  74. #define DEFAULT_DECHEIGHT 1.92
  75. #define DEFAULT_WIDTH     512.0
  76. #define DEFAULT_HEIGHT    512.0
  77. #define DEFAULT_ROTATION  0.0
  78. #define DEFAULT_MINMAG    -2.0
  79. #define DEFAULT_MAXMAG    18.0
  80.  
  81. /*  FITSIO related constants  */
  82. /*============================*/
  83. #define CARDLENGTH 81
  84.  
  85. /*  General constants about catalogs  */
  86. /*====================================*/
  87. /*  Total number of catalogs  */
  88. #define NUMBER_OF_CATALOGS 4
  89.  
  90. /*  Catalog numbers  */
  91. #define PATHLENGTH 256
  92. #define CAT_USNO 0
  93. #define CAT_PPM 1
  94. #define CAT_GUIDE 2
  95. #define CAT_GUIDE_SOUTH 3
  96.  
  97.  
  98. /*  Constants for the starcount functions  */
  99. /*=========================================*/
  100.  
  101. #define PI 3.1415927 
  102. /* stack size for star counting */
  103. #define STACKMAX 40000
  104. /* initial object array size */
  105. #define NSTAR 2500;
  106. /* assumed maximum star area  */
  107. #define DEFAULT_STAR_AREA 50
  108. /* Default size of a subimage where average background is calculated  */
  109. #define DEFAULT_MAXSIZE 30
  110. /* Default sensitivity threshold in background variation (sigma) units  */
  111. #define DEFAULT_SGNUM 5.0
  112. /*  Minimum object brightness above the background  */
  113. #define DEFAULT_MINBRIGHT 50
  114. /*  Minimum star size in pixels  */
  115. #define DEFAULT_MINSTAR 2
  116. /*  Size of the exclusion zone on the image edge where no stars are detected */
  117. #define DEFAULT_BORDER 0
  118. /*  Do we use aperture photometry? */
  119. #define DEFAULT_APERTURE 1
  120. /*  Radius of the inner circle for the aperture photometry */
  121. #define DEFAULT_INNER 3.0
  122. /*  Radius of the outer circle for the aperture photometry */
  123. #define DEFAULT_OUTER 10.0
  124.  
  125. /*  Constants for the star matching functions  */
  126. /*=============================================*/
  127. /*  Default number of bright stars taken into account in initial matching  */
  128. #define FIRSTBRIGHT 40
  129. /*  Minimum acceptable number of stars for the initial matching */
  130. #define MINFIRSTBRIGHT 6
  131. /*  Maximum number of candidates for a constellation star  */
  132. #define CANDIDATE_MAX 100
  133. /*  Maximum allowed positional error for stars in constellation  */
  134. #define POSERRMAX 6.0
  135. /*  Maximum allowed magnitude error for stars in constellation  */
  136. #define MAGERRMAX 100
  137. /*  Minimum value of constellation to be accepted  */
  138. #define CONSTMIN 15.0
  139. /*  Number of stars in constellation  */
  140. #define CONSTSTAR 12
  141. /*  Maximal allowed residual (in arcseconds)  */
  142. #define MAXRES 1.0
  143.  
  144. #endif
  145.