LEFT: Median filter for M103. RIGHT: taylor series fit (25 terms, origin=(0,0))
Attempted to fit up to 100 terms - failed.
Added:
> >
Truncated Histogram:
Aim to make a mode filter over an image by defining a function that returned the mode of a truncated histogram
Stars populate the tail of the histogram with low frequencies --> set threshold frequency for mode filter as 1000/((1530*1020)/65^2) = 2
The mode is the pixel value with the highest frequency
Fit a gaussian to the truncated histogram, the mean of the gaussian corresponds to the mode of the truncated data
If there are not enough bins (less than 25), fit may not be executed, therefore we estimate the mode by finding the bin with the maximum frequency, return single value of mode
Run mode filter using output from truncation algorithm to obtain an array of modal pixel values