Ignore:
Timestamp:
Nov 2, 2009 10:55:37 AM (13 years ago)
Author:
srkline
Message:

Added conditional compile instructions to some reduction procedure files that have only minor facility-specific changes. These changes are not significant enough to merit a separate facility file that must be maintained with essentially duplicate functions.

#define SYMBOL was attempted, but did not work since the symbols weren't actually defined until after the compile... and I couldn't figure out how to define - then compile. in additon, the table is static until Igor is quit - so multiple symbols could be defined, and compiling would fail.

So... the method now that appears to work is to put a dummy function for each facility in its facility specific "Includes" file. Then the conditional compilation checks for exists("function").

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/WorkFileUtils.ipf

    r576 r588  
    141141        dscale = 1/(1-deadTime*cntrate) 
    142142 
    143 #ifdef ILL_D22 
     143#if (exists("ILL_D22")==6) 
    144144        Variable tubeSum 
    145145        // for D22 detector might need to use cntrate/128 as it is the tube response 
     
    161161        //update totals by adding RAW values to the local ones (write to work header at end of function) 
    162162        total_mon += raw_reals[0] 
    163 #ifdef ILL_D22 
     163#if (exists("ILL_D22")==6) 
    164164        total_det += sum(data,-inf,inf)                 //add the newly scaled detector array 
    165165#else 
     
    311311        dscale = 1/(1-deadTime*cntrate) 
    312312         
    313 #ifdef ILL_D22 
     313#if (exists("ILL_D22")==6) 
    314314        Variable tubeSum 
    315315        // for D22 detector might need to use cntrate/128 as it is the tube response 
     
    332332        //update totals to put in the work header (at the end of the function) 
    333333        total_mon += realsread[0] 
    334 #ifdef ILL_D22   
     334#if (exists("ILL_D22")==6) 
    335335        total_det += sum(data,-inf,inf)                 //add the newly scaled detector array 
    336336#else 
     
    496496                        // so divide here to get the correct answer (5/22/08 SRK) 
    497497                        if(doEfficiency) 
    498 #ifdef ILL_D22 
     498#if (exists("ILL_D22")==6) 
    499499                                data[ii][jj]  /= DetEffCorrILL(lambda,dtdist,xd)                //tube-by-tube corrections  
    500500                  solidAngle[ii][jj] = DetEffCorrILL(lambda,dtdist,xd) 
Note: See TracChangeset for help on using the changeset viewer.