Create Xref-Html Frames                    Remove All Frames
file:d:/code/LRC/Splicer/splicer_code_ver2.2/splicer_defs.h        (Mon Jan 26 11:46:06 2004 )


   1: #include <stdio.h>
   2: /*
   3:   splicer_defs.h
   4: */
   5: 
   6: #define MAXBUF    (500)
   7: #define ALLOC_INT (100)
   8: #define CHAR_SIZE sizeof(char)
   9: 
  10: /*max array size for 'dummy' cleaned up core data
  11:   used for plotting and correlation and array
  12:   sizes for structs defined in this file.
  13: */
  14: #define MAXHOLE         10            /* maximun number of holes */
  15: #define MAXCORE        200            /* maximun number of cores per hole */
  16: #define MAXSPCORE      500            /* maximum number of cores in a splice record */
  17: #define MAXPERCORE    2000            /* maximum number of points per core */
  18: #define MAXCORR       1000            /* maximum number of correlations; lead + lag + 1*/
  19: #define MAXAGE        1000
  20: #define NDATASET         9
  21: 
  22: #define SHIP      1
  23: #define SHORE     2
  24: int whereami;
  25: 
  26: typedef struct  _MessageInfo
  27: {
  28:   char  *label;
  29:   int fatal,
  30:     error,
  31:     caller;
  32:   unsigned char type,
  33:       default_button;
  34: } MessageInfo;
  35: 
  36: /* caller functions */
  37: #define OPENOK      (0)
  38: #define BADMEMALLOC   (1)
  39: #define OUTPUTDATA    (2)
  40: #define SPREADMST95REPORT (3)
  41: #define SPINPUTDATA   (4)
  42: #define SPREADAFFINETABLE (5)
  43: #define SPWRITEAFFINETABLE  (6)
  44: #define SPVIEWLOG   (7)
  45: #define SPREADTKREPORT    (8)
  46: #define SPREADCULLTABLE   (9)
  47: #define SPCULLTABLE   (10)
  48: #define SPMANAGEWARNINGBOX  (11)
  49: #define SPREADOTHERODP    (12)
  50: #define SPFILESELECTIONBOXCB  (13)
  51: #define SPSMOOTH    (14)
  52: #define SPREADJANUS             (15)
  53: 
  54: typedef struct  _HashInfo
  55: {
  56:   int leg;
  57:   char  subleg;
  58:   int site;
  59:   int value2;
  60:   char  hole;
  61:   int core;
  62:   char  coretype;
  63:   char  section[3];
  64:   float top_int;
  65:   int value;
  66: } HashInfo;
  67: 
  68: typedef struct  _SplicerTableInfo
  69: {
  70:         int     site;
  71:   char    hole;
  72:   int     core;
  73:   char    core_type;
  74:   char  section[3]; 
  75:         char    type_of_splice[10];
  76:   float   top_int,
  77:     bot_int,
  78:     mbsf,  
  79:     mcd;
  80: } SplicerTableInfo;
  81: 
  82: 
  83: typedef struct  _SplicerTableFile
  84: {
  85:   char  *filename;
  86:   char  *dirname;
  87:   int alloc_cnt,
  88:     data_cnt;
  89:   SplicerTableInfo  *data;
  90: } SplicerTableFile;
  91: 
  92: typedef struct  _ODPKey
  93: {
  94:   int leg,
  95:                 subleg,
  96:                 site,
  97:                 core,
  98:                 in_affine,
  99:                 aff_map_hole,
 100:                 aff_map_core;
 101:   char  section[3],
 102:     hole,
 103:                 coretype;
 104:   float interval,
 105:     sb_depth,
 106:     offset;
 107: } ODPKey;
 108: 
 109: typedef struct  _StratData
 110: {
 111:   char  name[100],
 112:     code[20];
 113:         int     type,
 114:                 x_pix_loc_edit,
 115:                 y_pix_loc_edit,
 116:                 x_pix_loc_view,
 117:                 y_pix_loc_view,
 118:                 x_pix_loc_agedepth,
 119:                 y_pix_loc_agedepth,
 120:                 x_pix_loc_splicetoage,
 121:                 y_pix_loc_splicetoage,
 122:                 hole_is_in_dataset,
 123:                 agemodel_maptostratfile,
 124:                 agemodel_maptodatum;       
 125:   float top_age,
 126:     bot_age,
 127:                 aveage,
 128:                 tunedage,
 129:                 avembsf,
 130:                 avemcd,
 131:                 sedrate;
 132:   ODPKey  top,
 133:     bot;
 134: } StratData;
 135: 
 136: typedef struct  _StratFile
 137: {
 138:   char  *filename,
 139:     *dirname;
 140:   int type,
 141:     alloc_cnt,
 142:     data_cnt;
 143:   StratData *data;
 144: } StratFile;
 145: 
 146: typedef struct  _ReportFile
 147: {
 148:   char  *name;
 149:   int saveflag, 
 150:     /* true if report file is to be saved */
 151:     savecurrent;  
 152:   /* true if report save from current position 
 153:                      rather than start of report */
 154:   FILE  *ptr;
 155:   int lineno;
 156: } ReportFile;
 157: 
 158: typedef struct  _AffineFile
 159: {
 160:   char  *filename,
 161:     *dirname;
 162:   int usetable;
 163: } AffineFile;
 164: 
 165: typedef struct  _AffineCore
 166: {
 167:   int    numhole;
 168:   int    leg;
 169:   int    site;
 170:   int    name;
 171:   char   type[2];
 172:   float  mbsf;
 173:   int    did_offset;
 174:   int    data_map_to_core[NDATASET];
 175:   float  cum_depth_offset;
 176: } AffineCore;
 177: 
 178: typedef struct  _AffineHole
 179: {
 180:   int         numcore;
 181:   char        name[2];
 182:   int         data_map_to_hole[NDATASET];
 183:   AffineCore  core[MAXCORE];
 184: } AffineHole;
 185: 
 186: typedef struct  _AffineTable
 187: {
 188:   int         numhole;
 189:   AffineHole  hole[MAXHOLE];
 190: } AffineTable;
 191: 
 192: typedef struct _CompositeTable
 193: {
 194:   char map[100][50];
 195:   float accum_depth_offset[100];
 196: } CompositeTable;
 197: 
 198: typedef struct _Smooth
 199: {
 200:   int method,
 201:     plot,
 202:     width,
 203:     width_units;
 204:   float *weight;
 205: } Smooth;
 206: 
 207: typedef struct  _Equation
 208: {
 209:   float value1,
 210:     value2;
 211:   int sign1,
 212:     sign2,
 213:     join;
 214: } Equation;
 215: 
 216: typedef struct  _Cull
 217: {
 218:   int method;
 219:   char  *filename,
 220:     *dirname;
 221:   float top,
 222:     pwave_signal_max;
 223:   int by_core_num,
 224:     max_core;
 225:   Equation  grape,
 226:       pwave,
 227:       susceptibility,
 228:       naturalgamma,
 229:       reflectance,
 230:       otherodp;
 231: } Cull;
 232: 
 233: typedef struct  _Grapedata
 234: {
 235:   float density,
 236:     b_corr_density;
 237:   int gamma_counts;
 238: } Grapedata;
 239: 
 240: typedef struct  _Pwavedata
 241: {
 242:   float velocity;
 243:   int sig_strength,
 244:     travel_time,
 245:     displacement;
 246: } Pwavedata;
 247: 
 248: typedef struct  _Natgammadata
 249: {
 250:   int sample_time;
 251:         float   total_cnt,
 252:     seg1_cnt,
 253:     seg2_cnt,
 254:     seg3_cnt,
 255:     seg4_cnt,
 256:     seg5_cnt;
 257: } Natgammadata;
 258: 
 259: typedef struct  _Susceptibility
 260: {
 261:   float observed,
 262:     corrected;
 263: } Susceptibility;
 264: 
 265: typedef struct  _ReflectanceMST
 266: {
 267:   float L,
 268:     a,
 269:     b;
 270:   char  munsell_hue[7],
 271:     munsell_value[10];
 272:   float nm_value[31];
 273: } ReflectanceMST;
 274: 
 275: typedef struct  _ReflectanceOSU
 276: {
 277:   int    qual_mark,
 278:          landing[9];
 279:   float  mid_sect_dep,
 280:          uv,
 281:          blue,
 282:          red,
 283:          nir;
 284: } ReflectanceOSU;
 285: 
 286: typedef struct  _Value
 287: {
 288:   char  type;
 289:   char  section[3];
 290:   float top_int,
 291:     bot_int,
 292:     sb_depth,
 293:     sm_data,
 294:     *data;
 295:   Grapedata *grape;
 296:   Pwavedata *pwave;
 297:   Natgammadata  *naturalgamma;
 298:   Susceptibility  *susceptibility;
 299:   ReflectanceMST  *reflectanceMST;
 300:         ReflectanceOSU  *reflectanceOSU;
 301:   float otherodp;
 302:   int run_num,
 303:     quality,
 304:                 smooth_ok;
 305: } Value;
 306: 
 307: typedef struct  _Core
 308: {
 309:   int num,
 310:     numvalues,
 311:     allocvalues,
 312:                 affine_map_to_core,
 313:                 core_map_to_affine,
 314:                 did_offset,
 315:                 smooth_status;
 316:         float   cum_dep_offset;
 317:   Value **value;
 318: } Core;
 319: 
 320: typedef struct  _Hole
 321: {
 322:   char  name;
 323:         int     affine_map_to_hole,
 324:                 hole_map_to_affine;
 325:   int numcores;
 326:   Core  **core;
 327: } Hole;
 328: 
 329: typedef struct _DataFile
 330: {
 331:   char  **name;
 332:   int type,
 333:     in_format,
 334:     out_format,
 335:     numfiles,
 336:     readerrors,
 337:     leg;
 338:   char  subleg;
 339:   int site;
 340:   int numholes;
 341:         int     decimate_value;
 342:   char  *holes_used;
 343:         float   min,
 344:                 max;
 345:   Hole  **holes;
 346: } DataFile;
 347: 
 348: typedef struct _TimeSeries
 349: {
 350:         char    *filename;
 351:         char    *dirname;
 352:         int    n;
 353:         float  *age;
 354:         float  *val;
 355:         float  valperpix;
 356:         float  minval;
 357:         float  maxval;
 358:         float  MaConvert;
 359: } TimeSeries;
 360: 
 361: 
 362: /* Program name tag */
 363: #define SPLICER_VERSION "Splicer V. Motif/Demo"
 364: 
 365: /* Data types */
 366: #define NUM_DATA_TYPES  (6)
 367: #define GRAPE   (0)
 368: #define PWAVE   (1)
 369: #define SUSCEPTIBILITY  (2)
 370: #define NATURALGAMMA  (3)
 371: #define REFLECTANCEMST  (4)
 372: #define REFLECTANCEOSU  (5)
 373: #define OTHERTYPE       (6)
 374: 
 375: /* default mins and maxs */
 376: #define GRAPEMIN        (1.0)
 377: #define GRAPEMAX        (3.0)
 378: #define PWAVEMIN        (1500.0)
 379: #define PWAVEMAX        (5000.0)
 380: #define SUSCMIN         (-10.0)
 381: #define SUSCMAX         (1000.0)
 382: #define NGAMMAMIN       (0.0)
 383: #define NGAMMAMAX       (1000.0)
 384: #define REFLECTMIN      (0.0)
 385: #define REFLECTMAX      (100.0)
 386: #define OTHERMIN        (0.0)
 387: #define OTHERMAX        (100.0)
 388: 
 389: static  char  *type[]={"GRAPE","PWAVE","SUSCEPTIBILITY","NATURAL GAMMA","REFLECTANCE", "OTHER"};
 390: 
 391: static  char  *output_type[]={"grfix","pwfix","susfix","ngfix","refl","other"};
 392: 
 393: /* Data Formats */
 394: #define NUM_FORMATS (7)
 395: #define MST95REPORT (0)
 396: #define TKREPORT  (1)
 397: #define OSUSCAT         (2)
 398: #define JANUS           (3)
 399: #define JANUSCLEAN      (4)
 400: #define JANUSORIG       (5)
 401: #define ODPOTHER        (6)
 402: #define ODPOTHER1 (7)
 403: #define ODPOTHER2       (8)
 404: #define ODPOTHER3       (9)
 405: #define ODPOTHER4       (10)
 406: #define ODPOTHER5       (11)
 407: 
 408: typedef struct _OpenFileInfo
 409: {
 410:     char  **in_file_names;
 411:     int   in_data_type;
 412:     int   in_data_format;
 413:     int   num_in_files;
 414:     int   other_format_value_col;
 415:     char  other_format[100];
 416: } OpenFileInfo;
 417: 
 418: static  char    *format[]={"MST95 REPORT","TK REPORT","OSU/SCAT","JANUS","JANUSCLEAN","JANUSORIG","ODP OTHER","ODP OTHER1","ODP OTHER2","ODP OTHER3","ODP OTHER4","ODP OTHER5"};
 419: 
 420: /* open */
 421: #define FILE_FILTER (0)
 422: #define DIRECTORIES (1)
 423: 
 424: /* smoothing*/
 425: #define NONE    (0)
 426: #define GAUSSIAN  (1)
 427: #define OTHER   (2)
 428: 
 429: 
 430: #define UNSMOOTHED  (0)
 431: #define SMOOTHED  (1)
 432: #define SMOOTHEDBOTH  (2)
 433: #define SMOK            (1)
 434: #define SMTAIL          (2)
 435: #define SMBADDATA       (-1)
 436: #define SMTOOFEWPTS     (-2)
 437: #define SMBADCALC       (-3)
 438: #define TOOFEWSMOOTHED  (5)    /* don't use smooth if have less than this number in a core */
 439: 
 440: #define MINSMOOTHWIDTH         (3)   /* 3 points or 3 * ave. depth step cms */
 441: #define MAXSMOOTHWIDTHDEPTH  (400)   /* cms */
 442: #define MAXSMOOTHWIDTHPOINTS (100)   /* points */
 443: 
 444: static  char  *plot_display[]={"Unsmoothed Only","Smoothed Only",
 445:     "Both Smoothed and Unsmoothed"};
 446: 
 447: #define DEPTH (0)
 448: #define POINTS  (1)
 449: 
 450: static  char  *smooth_units[]={"Depth (cm)","Points"};
 451: 
 452: /* culling */
 453: #define LESS_THAN     (0)
 454: #define LESS_THAN_OR_EQUAL_TO   (1)
 455: #define GREATER_THAN      (2)
 456: #define GREATER_THAN_OR_EQUAL_TO  (3)
 457: #define EQUAL_TO      (4)
 458: 
 459: #define OR  (1)
 460: #define ONLY  (2)
 461: 
 462: #define CULL_PARAMETERS          (1)
 463: #define CULL_TABLE           (2)
 464: #define CULL_PARAMETER_AND_TABLE (3)
 465: 
 466: #define CULLTABLEDEPTHCHECK      (1.0)   /* section cm depth to use for whether to cull a value using cull table*/
 467:                                          /* is the sample this close to cull table */
 468: #define TOOMANYCULLED            (95)    /* stop read if cull more than this percent */
 469: #define WARNCULL                 (50)    /* cull warn if more than this percent were culled */ 
 470: 
 471: /* data quality flags */
 472: #define GOOD      (0)
 473: #define BAD_TOP     (1)
 474: #define BAD_CULL1   (2)
 475: #define BAD_CULL2   (4)
 476: #define DECIMATED   (8)
 477: #define BAD_PWAVE_SIGNAL  (16)
 478: #define BAD_SB_DEPTH    (32)
 479: #define BAD_CORE_NUM    (64)
 480: #define BAD_CULLTABLE   (128)
 481: #define BAD_REFLECTANCE         (256)
 482: 
 483: #define BAD_CODE        -999.99
 484: 
 485: #define TOOMANYOUTOFORDER   (100)
 486: 
 487: #define MEAN_DETREND     (1)
 488: #define LINEAR_DETREND   (2)
 489: 
 490: /* hash values */
 491: #define CREATE_HASH (1)
 492: #define DESTROY_HASH  (2)
 493: 
 494: /* strat types */
 495: static  char  *strat_type[]={"Diatoms","Radiolaria","Foraminifera","Nannofossils","Paleomag"};
 496: #define DIATOMS   (0)
 497: #define RADIOLARIA  (1)
 498: #define FORAMINIFERA  (2)
 499: #define NANNOFOSSILS  (3)
 500: #define PALEOMAG  (4)
 501: #define HANDPICK        (5)
 502: #define TIME            (6)
 503: 
 504: /* clean up types */
 505: #define NUM_CLEANUP_TYPES (5)
 506: static  char  *cleanup_type[]={"All","Data","Strat","Splicer","TimeSeries","Exit"};
 507: #define ALL     (0)
 508: #define INPUTDATA   (1)
 509: #define INPUTSTRAT    (2)
 510: #define INPUTSPLICERTABLE (3)
 511: #define TIMESERIES              (4)
 512: #define EXIT      (5)
 513: #define CANCEL                 (99)
 514: 
 515: /* input/output types
 516: */
 517: int         fileselection;
 518: #define     SAVE             (1)
 519: #define     OPEN             (2)
 520: #define     PREVIEWINPUT     (1)
 521: #define     OPENDATA         (2)
 522: #define     OPENSTRAT        (3)
 523: #define     OPENSPLICETABLE  (4)
 524: #define     OPENAFFINE       (5)
 525: #define     OPENCULLTABLE    (6)
 526: #define     OPENAGEMODEL     (7)
 527: #define     OPENTIMESERIES   (8)
 528: #define     SAVECULLTABLE    (9)
 529: #define     SAVEAFFINE      (10)
 530: #define     SAVESPLICETABLE (11)
 531: #define     SAVESTRAT       (12)
 532: #define     SAVEDATA        (13)
 533: #define     SAVESPLICEDATA  (14)
 534: #define     SAVEAGEMODEL    (15)
 535: #define     SAVESPLICEVSAGE (16)
 536: 
 537: 
 538: /* the drawing area's graphic contexts
 539: */
 540: GC        gc_drawingAreaEdit;
 541: GC        gc_drawingAreaView;
 542: GC        gc_drawingAreaTieCorrelation;
 543: GC        gc_drawingAreaSpliceCorrelation;
 544: GC        gc_drawingAreaDepthOffset;
 545: GC        gc_drawingAreaAgeDepth;
 546: GC        gc_drawingAreaAgeModel;
 547: GC        gc_drawingAreaSpliceToAge;
 548: GC        gc_drawingAreaTieToTimeSeriesCorr;
 549: 
 550: /* the cursor used in age-depth drawing area for dragging plot
 551: */
 552: Cursor drag_cursor;
 553: int    are_dragging;
 554: int    last_x_agedepth;
 555: int    last_y_agedepth;
 556: 
 557: #define  DEFINEWAITCURSOR       0
 558: #define  FREEWAITCURSOR         1
 559: 
 560: /* drawing constraints 
 561: */
 562: #define OFF                     50    /*pixels;  offset of axis from top left corner*/
 563: #define YAXIS_ANNOT_OFF         25    /*pixels; offset of depth axis numbers*/
 564: #define SPACE                   20    /*pixels; space between holes*/
 565: #define VAR_AXIS_LEN           120    /*pixels; initial width of variable axis*/
 566: #define SCALE_VALUE              0    /*meters; initial top value of scale widget*/
 567: #define SCALE_MULT               2    /*meters; initial value scale widget will 'jump'*/
 568: #define MINDEP                 0.0    /*meter; minimum depth*/
 569: #define MAXDEP               100.0    /*meter; initial maximum depth*/
 570: #define DEPTIC                 2.0    /*meters; depth tick*/
 571: #define DEPMETERDISPLAYED     20.0    /*meter initial number of meters displayed*/
 572: #define DEPPERPIX             0.01    /*meters; initial scale, meters per pixel*/
 573: #define GAP                   1.00    /*meter; not used yet*/
 574: #define CHECKSPLICEOFFSET     0.05    /*meter; splicing unconstrained check; warning if tie changes depth more than*/
 575: #define CLOSE                    5    /*pixel check for cursor position close enough to real data*/
 576: #define TOOFEWCORRPAIRS          5    /*discard correlatiions with fewer than this n*/
 577: #define CHECKVALUEDIFF         0.1    /*check for value difference of good tie; fraction of std*/
 578: #define ROUNDCHECK         0.00001    /*for equating two values same or not.*/
 579: #define NCORESSTD                5    /*number of cores(from top, every hole) to find std in; to set var axis min & max*/
 580: #define PLUSMINUSSTD           3.0    /*number of std awy from mean to set variable axis min & max*/
 581: #define DEPTHCHANGE           10.0    /*initial percent depth change of composited cores for depth offset plot*/
 582: #define AVEDEPTHSTEP             5    /*default average depth step (cm) for any one core*/
 583: #define POINTSIZE                5    /*tie point size in pixels */
 584: #define AGEDISPLAYED           1.0    /* display 1 million years */
 585: #define AGETIC                 0.2
 586: #define AGESCALEBARINC        0.05    /* percent of age displayed represented by one increment of age scale bar */
 587: #define MINAGESINGLEDATUM     0.02    /* min age allowed(for calc-plot) if only have one datum in age model */
 588: #define TOOMANYREADERRORS       50    /* limit of how many readerrors. if exceed; stop read */
 589: #define ALLOWAPPENDOVERLAP    0.05    /* allow a core to be appended if overlap <= 5cm */
 590: 
 591: /* on,off's for whether have stuff or have done something
 592: */
 593: #define DO            1
 594: #define DONT          0
 595: #define YES           1
 596: #define NO            0
 597: #define TIE1          1    /* TIE1 and TIE2 used to assign which core was the last to be picked */
 598: #define TIE2          2    /* this is to know what core to act on if button move or arrows used */
 599: #define CONSTRAINED   1    /* splicing constrained */
 600: #define UNCONSTRAINED 2    /* splicing unconstrained */
 601: #define REAL          1    /* when splicing constrained, is corresponding point on core to splice a real point*/
 602: #define INTERPOLATED  2    /* or was it interpolated */
 603: #define APPEND        3    /* or was the core appended */
 604: #define ONECORE       1    /* when compositing, was last core shifted the only one shifted*/
 605: #define ALLCORES      2    /* or were all cores below it also shifted */
 606: #define ERR          -1
 607: #define OVERLAPAPPEND 2    /* core to splice slightly overlaps; allow append */
 608: 
 609: #define MBSF          1
 610: #define MCD           2
 611: 
 612: #define SPL_MISSING_HOLE   -1 /**/
 613: #define SPL_MISSING_CORE   -2 /**/
 614: #define SPL_NO_CORE_VALUES -3 /**/
 615: 
 616: #define SPL_UNDO_MISSING_CORE  -1
 617: #define SPL_UNDO_TAILING_CORE  -2
 618: 
 619: /* reasons for redrawing
 620: */
 621: #define DRAW_EVERYTHING       1    /* whatever happened; everyting in the window must be drawn */
 622: #define DRAW_CLEAR            2    /* whatever happened; the window is being cleared */
 623: 
 624: #define DRAW_TIES             3    /* something has happened concerning tie(s); just draw area effected */
 625: #define DRAW_DEPTHSHIFT       4    /* a core or cores have been depth shifted */
 626: #define DRAW_DEPTHSHIFTUNDO   5    /* a core has been undepth shifted */
 627: #define DISPLAY_CHANGE        6    /* something(s) in the display has been changed */
 628: 
 629: #define DRAW_COREGRABBED      7    /* a core to splice has been selected */
 630: #define DRAW_CORECLEARED      8    /* a core to splice has been cleared */
 631: #define DRAW_SPLICED          9    /* a core to splice has been spliced */
 632: #define DRAW_APPEND          10    /* a core to splice has been appended */
 633: #define DRAW_UNDONE          11    /* a splice has been undone */
 634: 
 635: #define DRAW_CLEARTIE        12    /* a tie has been cleared */
 636: 
 637: #define EDIT                  1
 638: #define VIEW                  2
 639: #define CLIP                  0    /* if no defaults file found; let clip be set to no */
 640: 
 641: int clip;
 642: short int clip_x, clip_y;
 643: unsigned short int clip_width, clip_height;
 644:  
 645: int    dataset_cnt;
 646: int    dset;
 647: int    have_data;
 648: int    have_affine;
 649: int    have_tie;
 650: int    have_tie1;
 651: int    have_tie2;
 652: int    have_shift;
 653: int    have_corr;
 654: int    have_splice;
 655: int    have_sp_tie1;
 656: int    have_sp_tie2;
 657: int    have_spcorr;
 658: int    have_core_to_splice;
 659: int    have_splice_tie;
 660: int    have_splice_shift;
 661: int    have_strat;
 662: int    have_splicetoage;
 663: int    have_time_series;
 664: int    have_splicetoage_tie;
 665: int    have_splicetoage_corr;
 666: int    have_timeseries_tie;
 667: int    draw_offsets;          /* draw in depth offset drawing area; Y-N. is it popped up */
 668: int    are_compositing;
 669: int    did_affine;
 670: int    saved_affine;
 671: int    are_splicing;
 672: int    did_splicing;
 673: int    write_report;
 674: int    open_dataform_is_up;
 675: int    saved_splice;
 676: int    splice_overlap;        /* does the selected core to splice overlap the splice record; Y-N */
 677: int    average_depth_step;    /* average depth step(cm) of entire site; used to check smooth filter width if by depth */
 678: int    agemodel_cnt;
 679: int    are_agemodelling; 
 680: int    did_agemodel;
 681: int    saved_agemodel;
 682: int    agemodelling_depth_type;
 683: int    agedepth_use_type[MAXAGE];
 684: int    clear_what;
 685: 
 686: /*default lead,lag, depth step and window length
 687: */
 688: #define LEADLAG    1.0     /* meters*/
 689: #define LEADLAGMYR 0.025   /* Myrs */
 690: #define WINLEN     2.0     /* meters*/
 691: #define WINLENMYR  0.05    /* Myrs*/
 692: #define DEPSTEP    0.1     /* meters*/
 693:  
 694: /* things will need in many functions regarding splice
 695:    'ties' and correlation info
 696: */
 697: int    tie1holenum;
 698: int    tie1corenum;
 699: int    tie1arraynum;
 700: int    tie2holenum;
 701: int    tie2corenum;
 702: int    tie2arraynum;
 703: int    tie_corr_num;
 704: int    best_corr_num;
 705: int    lastshiftwho;
 706: int    lastdidoffsetstate;
 707: int    spliceholenum;
 708: int    splicecorenum;
 709: int    splicearraynum;
 710: int    spcompcorenum;
 711: int    spcomparraynum;
 712: int    splicetoagecorenum;
 713: int    splicetoagearraynum;
 714: int    timeseriesarraynum;
 715: int    lead_lag;
 716: int    last_tie;
 717: int    last_sp_tie;
 718: int    last_splicetoage_tie;
 719: int    splice_how;
 720: int    reason_for_redraw;
 721: int    lastaffinehole;
 722: int    lastaffinecore;
 723:  
 724: float  tiedepoffset;
 725: float  splicedepoffset;
 726: float  best_corr;
 727: float  lastdepoffset;
 728: float  interpsplice_val;
 729: float  interpsplice_sm_val;
 730: float  interpsplice_sb_depth;
 731: float  interpsplice_spl_depth;
 732: float  agemodel_handpick_depth;
 733: float  agemodel_handpick_age;
 734: float  agemodel_avesedrate;
 735: 
 736: double  leadlagmeters;
 737: double  winlen;
 738: double  depstep;
 739:  
 740: /*frequently used drawing variables like scales and such
 741: */
 742: int    top_off_edit;
 743: int    top_off_view;
 744: int    top_off_agedepth_depth;
 745: int    top_off_agedepth_age;
 746: int    top_off_splicetoage;
 747: int    scale_val;
 748: int    scale_mult;
 749: int    last_scale_val_edit;
 750: int    last_scale_val_view;
 751: int    lastagescaleval;
 752: int    varaxislen;
 753: 
 754: float  maxdep;
 755: float  top_meter_edit;
 756: float  top_meter_view;
 757: float  top_meter_agedepth;
 758: float  top_age_agedepth;
 759: float  top_age_splicetoage;
 760: float  varperpix;
 761: float  depperpix;
 762: float  depperpixsp;
 763: float  lagperpix;
 764: float  corrperpix;
 765: float  ageperpix;
 766: float  depperpixagemodel;
 767: float  offsetdepperpix;
 768: float  depthoffsetperpix;
 769: float  spliceageperpix;
 770: float  sedrateperpix;
 771: float  agedisplayed;
 772: 
 773: double minvar;
 774: double maxvar;
 775: double realminvar;
 776: double realmaxvar;
 777: double deptic;
 778: double depmeterdisplayed;
 779: 
 780: float maxagedepdepth;
 781: float maxagedepage;
 782: 
 783: /* data struct for the correlation values
 784: */
 785: typedef struct _CorrelationTable
 786: {
 787:   int    lag,
 788:          lead,
 789:          num_lead_lag[NDATASET], 
 790:          n[MAXCORR], 
 791:          leadlag[NDATASET][MAXCORR];
 792:   float  coef[NDATASET][MAXCORR],
 793:          depoffset[MAXCORR],
 794:          depleadlag[NDATASET][MAXCORR];
 795: } CorrelationTable;
 796: 
 797: /* data struct for the splice 'composite'
 798: */
 799: typedef struct _SpliceComp
 800: {
 801:   char   interpolated_section[MAXSPCORE][3];
 802:   int    numcores,
 803:          numpercore[MAXSPCORE],
 804:          hole[MAXSPCORE],
 805:          core[MAXSPCORE],
 806:          splice_how[MAXSPCORE],
 807:          MapToOrig[MAXSPCORE][MAXPERCORE],
 808:          map_to_table[MAXSPCORE];
 809: 
 810:   float  Depthoffset[MAXSPCORE],
 811:          sb_depth[MAXSPCORE][MAXPERCORE],
 812:          interpolated_top_int[MAXSPCORE],
 813:          interpolated_bot_int[MAXSPCORE],
 814:          interpolated_sb_depth[MAXSPCORE],
 815:          interpolated_spl_depth[MAXSPCORE],
 816:          interpolated_value[MAXSPCORE],
 817:          interpolated_sm_value[MAXSPCORE],
 818:          var[MAXSPCORE][MAXPERCORE],
 819:          age[MAXSPCORE][MAXPERCORE],
 820:          sedrate[MAXSPCORE][MAXPERCORE];
 821: 
 822: } SpliceComp;
 823: 
 824: /* handles to the different types of lines and symbols
 825:    that can be displayed in selected colors
 826: */
 827: #define NCOLOR                36
 828: #define BG_COLOR               0
 829: #define LABEL_COLOR            1
 830: #define MBSF_COLOR             2
 831: #define MCD_COLOR              3
 832: #define SMOOTH_COLOR           4
 833: #define SPLICE_COLOR           5
 834: #define SPLICELOCATION_COLOR   6
 835: #define TIEPTFIXED_COLOR       7
 836: #define TIEPTSHIFT_COLOR       8
 837: #define TIELINE_COLOR          9
 838: #define OVERLAYINCORR_COLOR   10
 839: #define OVERLAYOUTCORR_COLOR  11
 840: #define PALEOMAG_COLOR        12
 841: #define DIATOM_COLOR          13
 842: #define RAD_COLOR             14
 843: #define FORAM_COLOR           15
 844: #define NANNO_COLOR           16
 845: #define CORRCOEF_COLOR        17
 846: #define BESTCORR_COLOR        18
 847: #define DEPOFFLINE_COLOR      19
 848: #define DEPOFFHOLE1_COLOR     20
 849: #define DEPOFFHOLE2_COLOR     21
 850: #define DEPOFFHOLE3_COLOR     22
 851: #define DEPOFFHOLE4_COLOR     23
 852: #define DEPOFFHOLE5_COLOR     24
 853: #define DEPOFFHOLE6_COLOR     25
 854: #define DEPOFFHOLE7_COLOR     26
 855: #define DEPOFFHOLE8_COLOR     27
 856: #define DEPOFFHOLE9_COLOR     28
 857: #define DEPOFFHOLE10_COLOR    29
 858: #define DEPOFFHOLE11_COLOR    30 
 859: #define AGEDEPHANDPICK_COLOR  31
 860: #define AGEDEPLINE_COLOR      32
 861: #define SEDRATE_COLOR         33
 862: #define DATUMLOC_COLOR        34
 863: #define TIMESERIES_COLOR      35
 864: 
 865: #define LOGO_BG     "gainsboro"
 866: #define LOGO_FG     "red"
 867: 
 868: /* Colormap and Pixel array to hold the pixel values
 869:    for foreground colors
 870: */
 871: Colormap   cmap;
 872: Pixel      fgPixel[NCOLOR];
 873: Pixel      tempfgPixel[NCOLOR];
 874: Pixel      bgPixel;
 875: Pixel      tempbgPixel;
 876: 
 877: char prgfgcolor[50];
 878: char prgbgcolor[50];
 879: int  prgfg;             /* was foreground color read on command line args */
 880: int  prgbg;             /* was background color read on command line args */
 881: 
 882: 
 883: #define NCUSTOMECOLORBUTT     35
 884: 
 885: /* the color sets
 886: */
 887: int colorset;
 888: 
 889: #define  EARTH_COLORSET      1
 890: #define  CORPORATE_COLORSET  2
 891: #define  SANTAFE_COLORSET    3
 892: #define  ODP_COLORSET        4
 893: #define  MARITIME_COLORSET   5
 894: #define  CUSTOME_COLORSET    6
 895: 
 896: 
 897: #define TOPLEFT   1
 898: #define BOTLEFT   2
 899: #define TOPRIGHT  3
 900: #define BOTRIGHT  4
 901: 
 902: typedef struct _ErrRecord
 903: {
 904:   int     n_errs;
 905:   int     err_line[TOOMANYREADERRORS];
 906: } ErrRecord;
 907: 








































Html form generated by Xrefactory version 1.6.7 on Fri Sep 03 17:18:59 2004