ALOFT UiB BGO Instrument response matrices
收藏资源简介:
# CALCULATE_RESP_MATRIX_FOR_BINNING.m This MATLAB function calculates a response matrix and related efficiency data for provided parameters: - Energy bins (`BINS`) in keV - Altitude (`alt`) in km - Radial distance (`rd`) in km - Minimum energy threshold (`MINE`) in keV ## Functionality 1. Loads raw response data (database_RESP_MATRIX.mat), if not already loaded. 2. Calculates the nadir angle from 'alt' and 'rd' and identifies the nearest precomputed nadir angles. 3. Calculates the two closest response matrices surrounding the given nadir angle. 4. Computes a weighted average (interpolation) of two closest response matrices based on the proximity to the calculated nadir angle, to get the response matrix. 5. Also calculates effective area, and efficiency across provided energy bins. The function optimizes performance through caching. If a previous calculation for a specific set of inputs exists, the function quickly retrieves and returns this cached data. ## Output The output structure contains: - `energy_grid`: Midpoints of the provided energy bins. - `effective_area`: Effective detection area (cm²) for given Radial distance and Altitude (and the TGF/FGF spectrum after atmospheric propagation) - `efficiency`: Detection efficiency relative to geometric area (between 0 and 1). - `RESP_MATRIX`: Interpolated response matrix. Cached responses matrices for given {energy bins, altitude, radial distance} are stored as `.mat` files in a temporary directory for efficient reuse in subsequent calculations. # database_RESP_MATRIX.mat Contains raw data used for `CALCULATE_RESP_MATRIX_FOR_BINNING.m` 'alt' and 'rd' are used to calculate an incident angle. database_RESP_MATRIX.mat contains raw photon energy deposit data for various initial energies and incoming (nadir) angles. # LOAD_RESP_MATRIX_DATA.m Function to load `database_RESP_MATRIX.mat`, used by `CALCULATE_RESP_MATRIX_FOR_BINNING.m`



