tomwalters@0: /* tomwalters@0: Copyright (c) Applied Psychology Unit, Medical Research Council. 1993 tomwalters@0: =========================================================================== tomwalters@0: tomwalters@0: Permission to use, copy, modify, and distribute this software without fee tomwalters@0: is hereby granted for research purposes, provided that this copyright tomwalters@0: notice appears in all copies and in all supporting documentation, and that tomwalters@0: the software is not redistributed for any fee (except for a nominal tomwalters@0: shipping charge). Anyone wanting to incorporate all or part of this tomwalters@0: software in a commercial product must obtain a license from the Medical tomwalters@0: Research Council. tomwalters@0: tomwalters@0: The MRC makes no representations about the suitability of this tomwalters@0: software for any purpose. It is provided "as is" without express or tomwalters@0: implied warranty. tomwalters@0: tomwalters@0: THE MRC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING tomwalters@0: ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL tomwalters@0: THE A.P.U. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES tomwalters@0: OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, tomwalters@0: WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, tomwalters@0: ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS tomwalters@0: SOFTWARE. tomwalters@0: */ tomwalters@0: tomwalters@0: /*------------------------------------------------------------------------*/ tomwalters@0: tomwalters@0: /* tr.h tomwalters@0: * ------ tomwalters@0: * tomwalters@0: * Main include file. tomwalters@0: * tomwalters@0: * MAA Summer 1993. tomwalters@0: * Revised Winter 1994. tomwalters@0: */ tomwalters@0: tomwalters@0: tomwalters@0: /*---------------------------------------------------------------------------*/ tomwalters@0: /*---------------------------------------------------------------------------*/ tomwalters@0: tomwalters@0: tomwalters@0: #define ERROR_INTERVAL 0 /* +/- value that the intervals are tomwalters@0: allowed to be in: in SAMPLES ... */ tomwalters@0: #define ERROR_MAG 10 /* in percent ... +/- */ tomwalters@0: tomwalters@0: tomwalters@0: #define MAX_DATA 6615 /* 0.15 image seconds, 44100 s sec-1*/ tomwalters@0: #define MAX_CHANNELS 300 /* thus size of array is tomwalters@0: * MAX_DATA * this = 1984500 samples*/ tomwalters@0: #define MAX_PEAKS 1000 /* in a single channel */ tomwalters@0: #define MAX_NEXTEVENTS 1000 /* ditto */ tomwalters@0: #define ALIGN_CHANNELS 2 /* Default number of channels to tomwalters@0: * align over */ tomwalters@0: tomwalters@0: #define MAX_STRING_LENGTH 255 /* of a filename, etc */ tomwalters@0: #define NULLSTRING "" tomwalters@0: tomwalters@0: #define MAX_LINES_HEADER 100 /* 69 is what .sai are */ tomwalters@0: #define MAX_LINE_LENGTH 80 /* of a header : width of an xterm */ tomwalters@0: tomwalters@0: #define UNSET 9 /* nextevents definitions */ tomwalters@0: #define RIGHTZERO 10 /* ditto */ tomwalters@0: #define LEFTZERO 11 /* ditto */ tomwalters@0: #define MINIMUM 12 /* ditto */ tomwalters@0: #define END_OF_WIDTH 13 /* ditto */ tomwalters@0: tomwalters@0: #define RIGHTEDGE 21 /* tent definitions */ tomwalters@0: #define LEFTEDGE 22 /* ditto */ tomwalters@0: #define INSIDE 23 /* ditto */ tomwalters@0: #define NOISE 24 /* ditto */ tomwalters@0: #define FIGURE 25 /* ditto */ tomwalters@0: #define TRIGGER 26 /* ditto */ tomwalters@0: tomwalters@0: #define POINT 1 /* output format definitions */ tomwalters@0: #define PEAK 2 /* ditto */ tomwalters@0: #define INTEGRAL 3 /* ditto */ tomwalters@0: #define TENT 4 /* ditto */ tomwalters@0: #define HALF_DOME 5 /* ditto */ tomwalters@0: tomwalters@0: tomwalters@0: #define FIGURE_EXT "figure.sai" /* filename extensions */ tomwalters@0: #define GROUND_EXT "ground.sai" /* ditto */ tomwalters@0: #define OUTPUT_EXT ".sai" /* ditto */ tomwalters@0: #define INPUT_EXT ".sai" /* ditto */ tomwalters@0: #define OUTPUTGROUNDFN "ground.sai" /* default file for ground */ tomwalters@0: tomwalters@0: #define OFF 0 tomwalters@0: #define ON 1 tomwalters@0: tomwalters@0: #define READ 31 /* used in fopen as "rb" */ tomwalters@0: #define WRITE 32 /* used in fopen as "wb" */ tomwalters@0: tomwalters@0: #define SINGLECHANNEL 9999 /* used in copytoouput to indicate tomwalters@0: that the arrays by channel tomwalters@0: DON"T exist */ tomwalters@0: #define THREE 3 tomwalters@0: #define FIVE 5 tomwalters@0: tomwalters@0: #define GLACIERVALUE 0.5 tomwalters@0: tomwalters@0: #define NEW_PWIDTH 0 tomwalters@0: #define NEW_NWIDTH 15 tomwalters@0: #define PWIDTH 20 /* used in napgraph: default */ tomwalters@0: #define NWIDTH 5 /* used in napgraph: default. tomwalters@0: * The minus is added later.*/ tomwalters@0: tomwalters@0: #define NORMAL_WEIGHTING 41 tomwalters@0: #define LOG_WEIGHTING 42 tomwalters@0: tomwalters@0: tomwalters@0: tomwalters@0: /*---------------------------------------------------------------------------*/ tomwalters@0: /*---------------------------------------------------------------------------*/ tomwalters@0: tomwalters@0: tomwalters@0: tomwalters@0: struct Peak { tomwalters@0: int sample; /* where the triangulation point is */ tomwalters@0: int mag; /* its height */ tomwalters@0: int tent; /* whether its been included in figure or ground, tomwalters@0: * or not : see 'tent defs' above*/ tomwalters@0: double weight; tomwalters@0: }; tomwalters@0: tomwalters@0: struct NextEvent { tomwalters@0: int sample; /* the nextevent of a peak: because findpeaksreverse() tomwalters@0: * goes right -> left, this is LEFT*/ tomwalters@0: int type; /* the type of that event: MINIMUM, RIGHTZERO, tomwalters@0: * LEFTZERO, END_OF_WIDTH */ tomwalters@0: int mag; /* its height */ tomwalters@0: }; tomwalters@0: tomwalters@0: tomwalters@0: /* The End ---------------------------------------------------------------*/ tomwalters@0: /*------------------------------------------------------------------------*/