How to use Median Filtering to Enhance the Accuracy of your Pointing Checks

First I should note that Greg's documentation (the first link under
"Computers" menu item) is superb.  This short document is not a
replacement for Greg's documentation, but is rather meant as a very
specific set of instructions that are written for Paolo to use for the
specific purpose of median filtering his pointing check photometry

(1) Review:

To fit a gaussian to data in one of your folders (e.g. rcw108_050957),
just go to that folder then do:

map = sparomap

[fwhm, x, y] = sparocenter(map)

(2) Median filtering:

but what if the s/n you get from the above process is not good enough?  
then you want to use *many* such folders, and median filtering, as

first, create a new folder within the "daily folder".  In this
example, we will call this new folder "/data/yymmdd.sparo/paolofit".  
next, use a filemanager utility to "copy" all the folders that contain
data that you want to include in your fit into the folder "paolofit".  
now you are ready to do a median filter to all this data and fit a
gaussian to it, as follows:

from within matlab...

"cd" to the directory "/data/yymmdd.sparo"

type: dirs = sparodirs('paolofit')

    (this step makes a variable that is a list of the directories)

type: maps = sparomaps(dirs)

    (this step makes all the maps in these directories)

type: sparoimages(maps) 

    (this optional step plots all of these maps as images)

type: median = sparomedian(maps)

    (this step creates the median filtered image, using all the maps)

type: sparoimage(median)

    (this step displays the median filtered image)

type: [fwhm, x, y] = sparocenter(median)

    (this step fits a gaussian to the median filtered image)

written by Giles on March 26, 2003