paws.core.operations.PROCESSING.ZINGERS package¶
Submodules¶
paws.core.operations.PROCESSING.ZINGERS.EasyZingers1d module¶
-
class
paws.core.operations.PROCESSING.ZINGERS.EasyZingers1d.EasyZingers1d[source]¶ Bases:
paws.core.operations.Operation.OperationOperation for quickly removing zingers from 1d spectral data.
For each point (or “pixel”) in the spectrum, the neighboring points within a specified window width to the right and left are analyzed to determine whether or not the point of interest is part of an exceedingly sharp edge. Points that exceed the sharpness limit are flagged as zingers, and in a second pass these points are subtituted by the average intensity in the same window around the zinger point.
Let pixel_i be a candidate zinger. The analysis is as follows: 1. Take window_width pixels on either side of pixel_i.
Call these pixels_left and pixels_right.- (TODO: finish this)
- (TODO: finish this)
- If either of the results in step (3) is greater than sharpness_limit,
- flag pixel_i as a zinger.
After all zingers are flagged, they are replaced. Going over all pixels again, let pixel_i be a zinger:
- For pixel_i, take the average of all pixels_left and pixels_right,
- counting only pixels that are not flagged as zingers.
- Replace I(pixel_i) with this window-average value.
Note, this will result in unusually “flat” regions where zingers used to be, as the local window-averaging effectively hides the noise.