Worked on reducing the Arecibo continuum data. There were some serious problems with the off positions previously, in particular generating weird slopes.
I suspect the problem was with these lines
sorted1 = sort(totals[0:-1:2])
sorted2 = sort(totals[1:-1:2])
since the indexing is wrong, but I'm not sure yet. I re-wrote the whole off-position measurement to average over all scans. Still in progress, but the fitting works now. Here's an example:
