Closed jtvievering closed 5 years ago
In file "get_foxsi_deteff.pro" you say in the header that the detector type can be either 'si', 'czt', or 'cdte'. However, the IF which starts inline 44 only considers the 'cdte' option. I understand that we don't have yet CZT detectors, but what happens if you wnat to analyze data from the Si detectors?
Also, what the purpose of having the "pt_atten_len.dat" and "au_atten_len.dat" files? Is not clear for me the combination that you do of AU and PT with the existing "cdte_atten_len.dat" file.
@pymilo I think you probably just saw the changes I made to the file. If you look at the whole file for get_foxsi_deteff.pro, the Si option starts on line 30 and the CZT option starts on line 37.
The Pt and Au attenuation is incorporated later in the function, on line 83 (when the keyword 'cdte' is set).
Oh right! I see it now. The only thing that is still a little ambiguous is what happens when you have a keyword other than "cdte", i.e. "czt" or "si". Also, please correct me if I'm wrong, but it seems that you could set any word other than "cdte", "czt" or "si", and the code would run as it was Si.
You're right that there's an issue with setting a 'type' other than the three listed! It does not run as Si, but you get an error later in the code that does not point back to the real issue. I'll add a line that gives an error message when picking a type that is not allowed.
I've made changes to get_foxsi_deteff.pro to account for absorption by the platinum and gold electrodes on the sunward side of the CdTe detectors. The electrodes cover ~5/6 of the detector area, which is incorporated into the calculation of the efficiency.
Along with the changes to the code, I've also uploaded two files containing attenuation lengths for Pt and Au, which are utilized in this new version.