-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add temperature response for Si detectors #62
base: master
Are you sure you want to change the base?
Conversation
Hi @LinErinG created a pull request with @DanRyanIrish's direction! |
In foxsi2_count_spectrum.pro, line 74: eff_fudge = (1-0.05) Can you explain what this is with a comment? I also am not sure if this line is important because I did not find eff_fudge called later in the file, but I might be wrong because I looked very quickly. |
You are right Sophie. This is not important. I think I was trying to introduce some fudge factor, later dropped that idea. May be I can comment that line out with a note. |
Hi Athiray, Can you implement these changes? |
Hi Sophie,
Yes I will implement the changes.
Thanks and regards
…On Wed, Apr 3, 2019 at 10:48 AM somusset ***@***.***> wrote:
Hi Athiray,
Yes I think you should comment this since it is not currently use
Also, I think when the temperature response is calculated, the save file
should not be in spec but in the calibration data folder, since in spec we
have only procedures, not data files. I would do something like this:
data_dir = 'calibration_data/'
save,logte,dem_resp_overarea_ppixel,filename='$FOXSIPKG' + '/' + data_dir
+'foxsi_Si_temperature_response.sav'
Can you implement these changes?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#62 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AZbavUH7K7yXbfFHCcZOBkGyZyksfn_Mks5vdM09gaJpZM4bpizv>
.
--
________________________________________
*P. S. Athiray*
*Phone : +91 - 9901818170*
*Skype id : athiray*
|
spec/gen_foxsi_tresponse.pro
Outdated
al_legend, ['4.5 keV','5.5 keV','6.5 keV','7.5 keV','8.5 keV','9.5 keV'], $ | ||
textcol=[2,3,4,5,6,7], thick=6, charsi=1.2, box=0, /bottom, /right | ||
|
||
save,logte,dem_resp_overarea_ppixel,filename='foxsi_Si_temperature_response.sav' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here the temperature response is save in the current folder, would it make more sense to save it in the calibration folder of the FOXSI distribution?
|
||
; fold flux with FOXSI response | ||
eff_fudge = (1-0.05) | ||
counts = flux*area.eff_area_cm2 ; now the units are counts per second per keV | ||
|
||
; Smear to account for imperfect energy resolution (~0.5 keV). | ||
if keyword_set(smear) then begin | ||
i=where( emid gt 3. and emid lt 30. ) | ||
nbins = 0.5 / average(ewid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a keyword for the energy resolution? Then this function could be used for CdTe also.
;finding counts at mid ponit of each E bin using interpol | ||
counts_smear_coarse = interpol(counts_smear, emid, emid_smear_coarse) ; units still in counts / sec / keV | ||
counts_smear_coarse = counts_smear_coarse*time ; Now units are counts / keV | ||
y_err_smear_raw = sqrt(counts_smear_coarse) ; units also in counts / keV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think y_err_smear_raw should be:
y_err_smear_raw = sqrt(counts_smear_coarse/binsize)
Otherwise the units don't work out. This also applies to y_err_avg_smear_raw, y_err_raw, and y_err_avg_raw.
(emid le e1_coarse[avg_ct]))]) ; units still in counts / sec / keV | ||
counts_avg_coarse = counts_avg_coarse*time ; Now units are counts / keV | ||
y_err_avg_raw = sqrt(counts_avg_coarse) | ||
endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you include this option in the code (averagects but no smear), you should also include a way to save this information in "result".
;The following function computes expected AVERAGE foxsi2 counts in 1 keV energy bands | ||
;including smear in detector (0.5 keV fwhm) | ||
f=foxsi2_count_spectrum( em,te[i_te],time=1.,binsize=1.,module=i_det,offaxis=0,/smear,/averagects) | ||
dem_resp[i_det, *, i_te ] = f.counts[4:9] ;counts/s/(10^49cm-3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the units for "counts" from foxsi2_count_spectrum counts/keV?
|
||
|
||
;Plot FOXSI temperature response for Si Detector 6 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe for more general use, we could set a keyword for detector number so that the response for any detector could be plotted?
Changed the path of output temperature response file to store inside calibration_data
No description provided.