-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfourier_zeta_correction.pro
35 lines (33 loc) · 2.04 KB
/
fourier_zeta_correction.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
;----------------------------------------------------------------------------------------
function fourier_zeta_correction, kernel, eta
;----------------------------------------------------------------------------------------
; calculate the corrective factor to apply to the measured compact fraction due to flux
; loss as a result of overlapping peaks
; NOTE: this is the method presented in Hygate (2019) and is depreciated in favour of
; fourier_overlap_correction.pro
;--(dependencies)------------------------------------------------------------------------
; *** none
;--(input)-------------------------------------------------------------------------------
; *** kernel = the kernel with which to filter to filter
; *** * 'gaussian'
; *** * 'butterworth'
; *** * 'ideal'
; *** eta = the evolutionary phase lifetime adjusted filling factor
; *** equations 33 and 34 (Hygate 2019)
;--(output)-----------------------------------------------------------------------------
; *** qeta = the compact fraction corrective factor to account for
; *** overlapping peaks as caculated based on eta
;----------------------------------------------------------------------------------------
compile_opt idl2, strictarrsubs ; enforce strict array indexing, i.e. only use of [] and not () to index and use 32bit integers rather than 16bit as defaults ; give error when subscripting one array using another array as the source of array indices that has out-of-range indices, rather than clipping into range
if kernel eq 'butterworth' || kernel eq 'b' then begin
qzeta = 1.0 ; not yet implemented
endif else if kernel eq 'gaussian' || kernel eq 'gauss' || kernel eq 'g' then begin
intercept = 1.0439514d0
slope = -1.1516489d0
qzeta = (slope * eta) + intercept
if qzeta gt 1.0d0 then qzeta = 1.0d0
endif else if kernel eq 'ideal' || kernel eq 'i' then begin
qzeta = 1.0 ; not yet implemented
endif
return, qzeta
end