sisThickMaps package author: bruce sears released: 3-19-97 This package is used for determining the absolute thickness of a sis detector given the stack location of the sis detector and a point (x, y) on the detector. The stack location is a string of the form "T6-1B", "T3A", "T7-5A", etc. See the comments in parseStackDetectorID.c for more details. There are some mid-sized databases intertwined with these routines. For speed in running, these databases are not read from the text files included in this package. Instead, pre-compiler scripts are run which read the text databases and embed them into C arrays inside the C code prior to compilation. For this reason, some of the .c files are quite long. All of the c code will be near the end of these files (after the arrays.) You do not need to worry about this process, as the .c files have already been generated and are ready to be compiled here. But if you are curious or need to understand the pre-process method, see the section below called PRE-COMPILATION PROCESSING DETAILS. If you will be modifying any of the code in this package, you should probably read it. Most users will only be interested in the .c files here. PRE-COMPILATION PROCESSING DETAILS: Some of the .c files in this package have a .src and a generate script involved with them. The .src file has all of the C code in it with the exception of having tags where constants and arrays will be placed. The scripts (written in perl) parse all the databases in the package and replace the tags in the .src file with values and arrays in order to create the .c file. For this reason, if you are planning on fooling with any of this, be aware that such .c files are automatically generated from the script and the contents of the .src file. Edits of the C code would be done in the .src file, then the generate script would be run, producing the .c file. version 2.02: more small fixes in the .src files that were not propogated from the .c file fixes earlier. no effect on the pre-generated .c files. likely these bugs affected no-one. version 2.01: fixed reversed use of dblAndInt.dbl and dblAndInt.i in getSisThickness.src in the PRE_COMPILATION_SCRIPTS directory. this would have no effect unless you try using the .c files you create yourself from the scripts in version 2.00. the error did not exist in the pre-generated .c files (i must have fixed the bug in the .c file itself and forgot to make the change in the .src file.) likely this bug affected no-one. version 2.00: ported to c from idl (version 1.xx) some declarations (from the header file): struct dblAndInt { double dbl; int i; }; this struct is merely an easy way to return a double and an int struct dblAndInt getSisThickness(char* stackDetectorID, double x, double y); usage: struct dblAndInt thicknessAndExtrapCount; double thickness; int extrapCount; thicknessAndExtrapCount = getSisThickness(stackDetectorID, x, y); thickness = thicknessAndExtrapCount.dbl; extrapCount = thicknessAndExtrapCount.i; stackDetectorID = detector's location in the sis stacks. It is a string of format "T2A", or "T6-2B" for telescope partitions with multiple detectors (partitions 6 & 7). x, y = "bs-coordinates" location on said detector. bs-coords are defined at http://www.srl.caltech.edu/ACE/forum/topics/ACE thickness = thickness at (x, y) in microns extrapCount = the value of thickness at (x, y) is interpolated between the 4 nodes at the corners of 5 mm x 5 mm pixels. The nodes correspond to the points which were measured by the interferometer maps of the sis detectors. At the edges of the detector, the thickness has been extrapolated to the nodes outside of the actual measurments. extrapCount will usually return as 0, but near the edges of the detector may be from 1 to 3. if extrapCount = 4, the point you are looking at is probably not physically on the detector even though get_sis_thickness may return a thickness value using 4 extrapolated nodes. (integer) compiling: edit the Makefile in the main directory as directed therein, and then type "make". if you are not using a unix system, then you will need to get help from your local systems people. make may be available on other systems as well. it is merely a nice utility for compiling and linking sets of code. please contact me if there are any questions or problems here. the end result of this make is a library of compiled object files, libSisThickMaps.a example compilation and use: in the directory USAGE_TEST, there is a sample program which calls getSisThickness. there is also another Makefile there which illustrates how to link in libSisThickMaps.a.