hk_unfold

To unfold an HK matrix, use the hk_unfold program. Calling the program with -help as argument will list the arguments to the program, which at the time this documentation was written were:
$Id: hk_unfold.c,v 1.20 2000/06/07 21:13:56 tl Exp $
__running on Wed Jul 19 09:07:09 2000
$Id: hk_unfold.c,v 1.20 2000/06/07 21:13:56 tl Exp $

-k_rsp s       ; k response matrix
-h_rsp s       ; h response matrix
-hk s          ; hk matrix to unfold
-mhk #         ; hk matrix multiplications factor
-ite #         ; number of itterations
-ns  #         ; # times to smooth the result HK before reuse
-cf_first  #   ; collect fraction first itteration
-cf_rest   #   ; collect fraction other itterations
-nf  #         ; number of times to fold matrix

-v          ; version
-help       ; help

A typical script file to run the program will look like this
hk_unfold \
-k_rsp k_rsp_true.mascii \
-h_rsp h_rsp_true.mascii  \
-hk hk_th500.mascii \
-mhk 1 \
-ite 15 \
-ns 1

make sure the matrix to unfold, in this case hk_th500.mascii, has a reasonable number of counts 1000-10000, by scaling it either with the -mhk option or using the ar2 utility. The matrices should be in ascii format, i.e., the hk_th500.mascii file should contain lines like:
2 0 6.000000
2 1 3.000000
2 2 1.000000
2 6 1.000000
3 0 6.000000
3 1 17.000000
3 2 12.000000
3 3 9.000000
3 4 3.000000
3 5 6.000000
3 6 4.000000
3 7 2.000000
3 8 2.000000
3 9 1.000000
.
.
.
17 18 3.000000
17 19 3.000000
17 20 1.000000
18 16 1.000000
18 18 3.000000
18 19 2.000000
18 20 1.000000
19 19 1.000000
19 20 1.000000
20 19 1.000000
Notice that zeros are suppressed. The accompanying description file, hk_th500.mascii.dm, should contain this information
256
256
sun
ascii
destribing how the data in hk_th500.mascii should be read, in this case: x-dim=256, y-dim=256, date in 'sun' format, and values are in ascii.

The response functions, h_rsp_true.mascii and k_rsp_true.mascii, should have the exact same formats.

You can display the matrices with the 2dplot utility.

the unfolded matrices will be called

  hk_unf_nn.mascii
where nn is the itteration number. A number of other matrices are written out as well...

The idea of this Monte Carlo unfolding is due to Ph.~Benet, "These Docteur de L'Universite Louis Pasteur de Strasbourg", CRN/PN 88-29 (1988).

[email protected]