Skip to content

jfoster17/rampsclean

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rampsclean

Code to remove baselines and glitches from RAMPS spectra.

RAMPS spectra have incompletely subtracted baselines and (at least in the first year) spikes from the VEGAS backend. Since the spectra are oversampled we median filter to eliminate spikes and use the local-standard-deviation (i.e. the standard deviation calculated in rolling windows) to identify regions of signal, mask those regions for fitting a smooth baseline, and return the final cleaned spectrum.

Here is a synthetic spectrum simulating an NH3 (1-1) line profile as seen by RAMPS.

Synthetic

After median filtering and downsampling to remove the spikes, we identify portions of the spectrum where the local-standard-deviation is much higher than typical. This approach works much better than identifying signal based on the intensity/strength of the signal in the case where the amplitude of the baseline is large (at least in parts of the spectrum).

Synthetic

We mask out the regions where we have identified signal and fit a smooth baseline to the r est of the spectrum. In this case we are using a spline fit.

Synthetic

We can use the same local-standard-deviation to identify regions of real signal in the cleaned spectrum. The procedure is tested by comparing the integrated intensity of this signal against the true integrated intensity of the injected/synthetic signal.

Synthetic

About

Code to remove baselines and de-glitch RAMPS spectra

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages