Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#167 closed enhancement (fixed)

Spectrum baseline removing: running fit

Reported by: EttoreCarretti Owned by: Malte Marquarding
Priority: normal Milestone: ASAP 2.4
Component: General Version: 2.0
Severity: normal Keywords: baseline, fit.
Cc:

Description

To implement spectrum baseline estimate (and removing) by a polynomial running fit.

It is similar to a running median (or running mean), but, for any channel, a polynomial fit is performed over a narrow range of channels centred on the channel itself. The baseline estimate is then the fit evaluated in the position of the channel. Both range width and polynomial degree should be set by the user. The polynomial degree default value could be 2 (quadratic fit) which I usually found very effective in other applications.

I implemented this method for other applications and found it very effective with complex baselines, which otherwise would require high degree polynomials if fit over the whole range with poor performances.

Change History (3)

comment:1 by Malte Marquarding, 16 years ago

Owner: changed from Malte Marquarding to Malte Marquarding
Status: newassigned

comment:2 by Malte Marquarding, 15 years ago

Resolution: fixed
Status: assignedclosed

I have added this in changesets [1570,1571,1574].

It is available via

scantable.smooth(kernel='poly', order=2)

The order keyword argument is new.

comment:3 by Malte Marquarding, 15 years ago

To use it for baselining simply do:

s = scantable('xyz.rpf')
polyfitted = s.smooth('poly', order=3, insitu=False)
baselined = s-polyfitted
Note: See TracTickets for help on using tickets.