;+ ;Name: ; f_pileup_mod ;PURPOSE: ; This pseudo function always returns an array of 0s. Parameters are varied ; during fit and used to add pileup effects to the model on the fly. ; ; ;CATEGORY: ; SPECTRA, XRAY ; ;INPUTS: ; E energy vector in keV, 2XN edges or N mean energies ; a[0] - coefficient to increase or decrease probability of pileup for energies < cutoff ; a[1] - average fractional energy from piled up photon ; a[2] - smoothing parameter in keV (sigma) ; a[3] - cutoff energy in keV that defines two regions ; a[4] - effectiveness ratio for pileup for energy loss less than Ecut ; a[5] - sine-modulated fraction of flux ; ; Written: Kim Tolbert, 27-Jun-2006 ; 16-Jan-2008, Kim & Richard - changed # and meaning of params to use modified pileup_countrate ;- function f_pileup_mod, e, apar, _extra=_extra if (size(e))(0) eq 2 then edge_products, e, mean=em else em=e return, fltarr(n_elements(em)) end