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