next up previous
Next: Average the polarisations Up: Baseline fitting Previous: Baseline fitting

Auto-baselining

The function auto_poly_baseline can be used to automatically baseline your data with out having to specify channel ranges for the line free data. It automatically figures out the line-free emission and fits a polynomial baseline to that data. The user can use masks to fix the range of channels or velocity range for the fit as well as mark the band edge as invalid.

Simple example

  ASAP> scans.auto_poly_baseline(order=2,threshold=5)

order is the polynomial order for the fit. threshold is the SNR threshold to use to deliminate line emission from signal. Generally the value of threshold is not too critical, however making this too large will compromise the fit (as it will include strong line features) and making it too small will mean it cannot find enough line free channels.

Other examples:

  # Don't try and fit the edge of the bandpass which is noisier
  ASAP> scans.auto_poly_baseline(edge=(500,450),order=3,threshold=3)

  # Only fit a given region around the line
  ASAP> scans.set_unit('km/s')
  ASAP> msk = scans.create_mask((-60,-20))
  ASAP> scans.auto_poly_baseline(mask=msk,order=3,threshold=3)



Malte Marquarding 2005-11-30