ZSHTR-29 Sky emission components#9
Conversation
| for gamma in gammas: | ||
| kernel += Moffat2DKernel(gamma=gamma, alpha=self.alpha, x_size=ksize, y_size=ksize).array | ||
| kernel /= len(gammas) | ||
| kernel /= np.sum(kernel) |
There was a problem hiding this comment.
This will create flux if the the kernel size is too small. Since ksize is parameterized to 4x the fwhm its small and (nearly) constant, but technically the part of the sum less than unity are photons that are sent elsewhere. I'd suggest adding a check to make sure its less than .1% or some such and warning if not.
There was a problem hiding this comment.
This comment is not clear to me. Can you put the check you're suggesting in the comments here?
There was a problem hiding this comment.
if the sum of the kernel differs from the sum of the analytic, infinite extent integrals of the Moffat's by more than some small percentage then there is an issue.
ideally the kernel should be normalized by the sum of the analytic integrals. You can probably skip this step by setting the amplitude of the moffat kernel such that a pdf is returned.
There was a problem hiding this comment.
so the Moffat2DKernel already returns a normalized kernel that sums to 1
There was a problem hiding this comment.
This was sorted as a move from Moffat2DKernel to ->Moffat2DModel, right?
There was a problem hiding this comment.
Yes, commits incoming shortly
| return make_interp_spline(wave_array, fwhm_array) # returns bspline instance | ||
|
|
||
| @property | ||
| def zenith_angle(self): |
There was a problem hiding this comment.
This seems more like a helper than something that is a property of a PSF
There was a problem hiding this comment.
Noted. I'll make this consistent with sky effects and remove the property tag
There was a problem hiding this comment.
zenith_angle should not be a method of a PSF, no?
There was a problem hiding this comment.
I'll either put it in the init or make it an internal method
There was a problem hiding this comment.
I mean that the PSF should be computing it via a helper in a util file or pulling/fetching from some global or have it passed.
… obs info grabbing to utils for streamlining
Added effect for getting airglow emission from PALACE and astronomical continuum emission from SkyCalc.
Added wavelength dependent Moffat PSF effect
Added AD and ADC shift effects