Wednesday, February 2, 2011

Some pretty neat things about delining....

Well, I did the work, so might as well come up with some plots...

I created a gaussian-fitting based delining code that saves all of the fits in a text file! That's a lot of data to play with, and allows me to draw some conclusions:

  1. For the narrow lines, the linewidth (gaussian sigma) is 0.03 Hz. For the wide lines, it is 0.05.


  2. The amplitudes from December 2010 are ENORMOUS compared to others!

  3. The width distributions of the two are similar, though the lines appear to be significantly wider in July 2009

I've also gotten to the point that I'm satisfied with how delining with wing suppression works. Wing suppression is 0.4-2x quicker than fitting directly, depending on... not clear what exactly; it depends on epoch, but that could either be because there are more lines found or because of relative data size. Does delining have to be done on whole timestreams, or can it be done on a scan-by-scan basis? This is not entirely clear... the peaks are less suppressed when done on a scan-by-scan basis (presumably because the S/N is low and peaks are therefore not detected), but incorrect suppression (removing a line that's not there) is reduced. For short scans, the scan-by-scan approach is 10x faster; for longer scans it's ~20% faster. I think the scan-by-scan approach is going to be ideal.


Examples from l089 (0709):
Top row: non-fitted line suppression


Bottom row: fitted line suppression




Examples from Uranus (1012, really really liney):

Top row: non-fitted line suppression


Bottom row: fitted line suppression

Tuesday, February 1, 2011

Delining

Delining refers to the process of removing electronic noise that is aliased to
particular frequencies by the discrete sampling of the data. Typical
electronic noise is at 60 Hz with some width. It gets aliased to these
frequencies:


linefreqs = [10.05+findgen(10)*1.2,10.05-((findgen(7)+1))*1.2]

The 10.05 Hz and 20.10 Hz are the worst in most cases, and they are wider. For
the above lines, we "remove" a bandwidth of 0.09 Hz by averaging over the
neighboring 0.5 Hz on either side. For the wider lines, we remove 0.5 Hz by
averaging over the neighboring 1.5 Hz on either side.



There are a few new things about the delining process that did not exist in James' old version:
  1. The wide-band lines are removed
  2. A check is performed before removing the lines - they are only removed if the line region mean is
    2-sigma above the average region (as computed via median and mad)
  3. The replaced noise is computed via median/mad, and the new noise level is set 5x lower than in the
    neighboring region

Now, some examples:
The timestream (left) and PSD (right) of a "pretty good" bolometer. There is a lot of noise in lines, but note that the peak power is 2-3 orders of magnitude below the PSD peak. In this case the "Power" is in Jy. There is little astrophysical information below ~14" (9 Hz), and there should be none below 7.2" (17 Hz), but there is plausibly information at these scales. It therefore makes sense to save as much information as possible. As can be seen in the delined PSD, the peaks drop by a substantial fraction, but not all the way - that's because these lines are wider than typically observed. Unfortunately, I don't have any really good ideas about how to fix this issue - I think fitting gaussians to each line, while attractive, is going to be prohibitively expensive in both programmer and processor time. However... it would be a very interesting project to undertake. In the timestream, it can be seen that the RMS drops substantially when the lines are filtered out (note that the timestream is strongly dominated by large-scale structure, so 'substantial' is really based on the RMS of the lines removed).
The next two plots look identical to the previous ones. In principle, they include the wide-band delining. However, in this case, the satellite lines to either side of the 10 Hz line are too strong and prevent identification of the 10 Hz line. This is unfortunate, again, but no obvious solution presents itself.
Now we come to a truly problematic bolometer. The lines completely dominate the power spectrum. Narrow line removal fails.
Wide line removal does a much, much better job, dropping the RMS by an order of magnitude.... but the bolometer probably still needs to be removed, since the astrophysical signal is 2-3 orders of magnitude below that.
The 2010 data had much worse line noise and had to be delined. JS accomplished this by throwing out all data above a certain frequency, but I prefer the delining approach. It is clearly effective, but again leaves much to be desired. Should the flagged bandwidth be increased? What about the extra lines around 18 Hz?

Again, the wide line flagging fails because of the satellite lines.

Friday, January 21, 2011

More evidence that downsampling causes problems

The captions are pretty much the same as for the previous post, but this is a larger field and the effects are more serious.




Thursday, January 20, 2011

Downsampling has serious negative effects on the data

Background: Downsampling is performed using Old Pipeline code called
process_ncdf. All BGPS data was downsampled by a factor of 5
before mapping because of data size concerns. I did this 'blindly' (i.e., just
accepted that I should) because James said I could.

However, I had previously noted that the pointing files could not be done with
downsampled data because the beams 'looked funny' or something along those
lines; it may also have been a simple map sampling issue in which not all
pixels were filled with a downsampled image.

Anyway, I decided to go back and quantify the effects. The plots below are from the
single "pointing-style" observation of OMC1 from 2009. The units are volts. 'ds1' indicates
sampling at 0.02 seconds, 'ds5' indicates sampling every 0.1 seconds. The scan rate was
120"/s.


The beam sizes were measured from the autocorrelation maps. However, because there is structure on many scales
in this map, I had to use a rather ad-hoc method to remove the correlated structure. I fitted a gaussian
to the elliptical northwest-southeast structure, removed it, then fitted a gaussian to the remaining circular
thing in the center, which is approximately the beam.

If I fit the "beam" gaussian with an ellipse, I get:
Beamsize 1_1: 36.15,26.23
Beamsize 1_5: 48.39,30.21

With a circle:
Beamsize 1_1: 29.51
Beamsize 1_5: 35.31



The ds1 and ds5 images compared.




The PSDs of the two images (on identical grids). Note that ds5 loses power at small spatial scales, 50% at 40"!




The pixel-pixel plot with a fit that shows a 10% overall flux loss (best-fit).

Thursday, June 24, 2010

v2.0 is to v1.0 as ___ is to v1.0


Apparently v2.0 recovers flux better at all scales than v1.0.  However, it is noisier.  The full comparison is available here.  The trustworthy range of flux scales is 1.2-1.6ish.  The flux is increased at ALL scales in most images.  However, as was noted in comparisons with MAMBO, there may be curvature in the best-fit lines.  Also, l=35 does not appear to scale up linearly... G34 is fainter in v2.0?

In the low S/N fields, the PSD is more reliable than the pixel-pixel comparison.

PPS comparison completed

The PPS scale factor seems to hold for many different (and ridiculous) aperture sizes.  The full results are here.