Index: /mire/functions.py
===================================================================
--- /mire/functions.py	(revision 14)
+++ /mire/functions.py	(revision 15)
@@ -7,3 +7,29 @@
         tmp += comp**2
     return math.sqrt(tmp)
-    
+
+import string
+import sys
+def cat2reg(InputFile,OutFile):
+    x = []
+    y = []
+    fwhm = []
+
+    for line in open(InputFile,'r'):
+        if (line[0] != '#'):
+            spl_line = string.split(line)
+            x.append(float(spl_line[1]))
+            y.append(float(spl_line[2]))
+            fwhm.append(float(spl_line[6]))
+
+    of = open(OutputFile,'w')
+
+    of.write("# Region file format: DS9 version 4.0\n")
+    of.write("# Filename: check.fits\n")
+    of.write("global color=green font=\"helvetica 10 normal\" select=1 highlite=1edit=1 move=1 delete=1 include=1 fixed=0 source\n")
+    of.write("physical\n")
+
+    for i in range(len(x)):
+        outs = "circle(%f,%f,%f)\n" %(x[i],y[i],fwhm[i])
+        of.write(outs)
+        
+    of.close()
Index: /mire/mire.conv
===================================================================
--- /mire/mire.conv	(revision 15)
+++ /mire/mire.conv	(revision 15)
@@ -0,0 +1,5 @@
+CONV NORM
+# 3x3 ``all-ground'' convolution mask with FWHM = 2 pixels.
+1 2 1
+2 4 2
+1 2 1
Index: /mire/mire.param
===================================================================
--- /mire/mire.param	(revision 15)
+++ /mire/mire.param	(revision 15)
@@ -0,0 +1,15 @@
+FLUX_MAX
+
+X_IMAGE
+Y_IMAGE
+
+
+THETA_IMAGE
+
+ELONGATION
+ELLIPTICITY
+
+FWHM_IMAGE
+
+ERRX2_IMAGE
+ERRY2_IMAGE
Index: /mire/mire.sex
===================================================================
--- /mire/mire.sex	(revision 15)
+++ /mire/mire.sex	(revision 15)
@@ -0,0 +1,126 @@
+# Default configuration file for SExtractor 2.5.0
+# EB 2008-05-30
+#
+ 
+#-------------------------------- Catalog ------------------------------------
+ 
+CATALOG_NAME     test.cat       # name of the output catalog
+CATALOG_TYPE     ASCII_HEAD     # NONE,ASCII,ASCII_HEAD, ASCII_SKYCAT,
+                                # ASCII_VOTABLE, FITS_1.0 or FITS_LDAC
+PARAMETERS_NAME  default.param  # name of the file containing catalog contents
+ 
+#------------------------------- Extraction ----------------------------------
+ 
+DETECT_TYPE      CCD            # CCD (linear) or PHOTO (with gamma correction)
+DETECT_MINAREA   5              # minimum number of pixels above threshold
+THRESH_TYPE      RELATIVE       # threshold type: RELATIVE (in sigmas)
+                                # or ABSOLUTE (in ADUs)
+DETECT_THRESH    10            # <sigmas> or <threshold>,<ZP> in mag.arcsec-2
+ANALYSIS_THRESH  10            # <sigmas> or <threshold>,<ZP> in mag.arcsec-2
+ 
+FILTER           N              # apply filter for detection (Y or N)?
+FILTER_NAME      default.conv   # name of the file containing the filter
+FILTER_THRESH                   # Threshold[s] for retina filtering
+ 
+DEBLEND_NTHRESH  32             # Number of deblending sub-thresholds
+DEBLEND_MINCONT  0.005          # Minimum contrast parameter for deblending
+ 
+CLEAN            Y              # Clean spurious detections? (Y or N)?
+CLEAN_PARAM      1.0            # Cleaning efficiency
+ 
+MASK_TYPE        CORRECT        # type of detection MASKing: can be one of
+                                # NONE, BLANK or CORRECT
+ 
+#-------------------------------- WEIGHTing ----------------------------------
+
+WEIGHT_TYPE      NONE           # type of WEIGHTing: NONE, BACKGROUND,
+                                # MAP_RMS, MAP_VAR or MAP_WEIGHT
+WEIGHT_IMAGE     weight.fits    # weight-map filename
+WEIGHT_GAIN      Y              # modulate gain (E/ADU) with weights? (Y/N)
+WEIGHT_THRESH                   # weight threshold[s] for bad pixels
+
+#-------------------------------- FLAGging -----------------------------------
+
+FLAG_IMAGE       flag.fits      # filename for an input FLAG-image
+FLAG_TYPE        OR             # flag pixel combination: OR, AND, MIN, MAX
+                                # or MOST
+
+#------------------------------ Photometry -----------------------------------
+ 
+PHOT_APERTURES   20              # MAG_APER aperture diameter(s) in pixels
+PHOT_AUTOPARAMS  2.5, 3.5       # MAG_AUTO parameters: <Kron_fact>,<min_radius>
+PHOT_PETROPARAMS 2.0, 3.5       # MAG_PETRO parameters: <Petrosian_fact>,
+                                # <min_radius>
+PHOT_AUTOAPERS   0.0,0.0        # <estimation>,<measurement> minimum apertures
+                                # for MAG_AUTO and MAG_PETRO
+PHOT_FLUXFRAC    0.5            # flux fraction[s] used for FLUX_RADIUS
+ 
+SATUR_LEVEL      50000.0        # level (in ADUs) at which arises saturation
+ 
+MAG_ZEROPOINT    0.0            # magnitude zero-point
+MAG_GAMMA        4.0            # gamma of emulsion (for photographic scans)
+GAIN             0.0            # detector gain in e-/ADU
+PIXEL_SCALE      0.944          # size of pixel in arcsec (0=use FITS WCS info)
+ 
+#------------------------- Star/Galaxy Separation ----------------------------
+ 
+SEEING_FWHM      16            # stellar FWHM in arcsec
+STARNNW_NAME     default.nnw    # Neural-Network_Weight table filename
+ 
+#------------------------------ Background -----------------------------------
+ 
+BACK_TYPE        AUTO           # AUTO or MANUAL
+BACK_VALUE       0.0            # Default background value in MANUAL mode
+BACK_SIZE        64             # Background mesh: <size> or <width>,<height>
+BACK_FILTERSIZE  3              # Background filter: <size> or <width>,<height>
+ 
+BACKPHOTO_TYPE   GLOBAL         # can be GLOBAL or LOCAL
+BACKPHOTO_THICK  24             # thickness of the background LOCAL annulus
+BACK_FILTTHRESH  0.0            # Threshold above which the background-
+                                # map filter operates
+ 
+#------------------------------ Check Image ----------------------------------
+ 
+CHECKIMAGE_TYPE  OBJECTS        # can be NONE, BACKGROUND, BACKGROUND_RMS,
+                                # MINIBACKGROUND, MINIBACK_RMS, -BACKGROUND,
+                                # FILTERED, OBJECTS, -OBJECTS, SEGMENTATION,
+                                # or APERTURES
+CHECKIMAGE_NAME  check.fits     # Filename for the check-image
+ 
+#--------------------- Memory (change with caution!) -------------------------
+ 
+MEMORY_OBJSTACK  3000           # number of objects in stack
+MEMORY_PIXSTACK  300000         # number of pixels in stack
+MEMORY_BUFSIZE   1024           # number of lines in buffer
+ 
+#------------------------------- ASSOCiation ---------------------------------
+
+ASSOC_NAME       sky.list       # name of the ASCII file to ASSOCiate
+ASSOC_DATA       2,3,4          # columns of the data to replicate (0=all)
+ASSOC_PARAMS     2,3,4          # columns of xpos,ypos[,mag]
+ASSOC_RADIUS     2.0            # cross-matching radius (pixels)
+ASSOC_TYPE       MAG_SUM        # ASSOCiation method: FIRST, NEAREST, MEAN,
+                                # MAG_MEAN, SUM, MAG_SUM, MIN or MAX
+ASSOCSELEC_TYPE  MATCHED        # ASSOC selection type: ALL, MATCHED or -MATCHED
+
+#----------------------------- Miscellaneous ---------------------------------
+ 
+VERBOSE_TYPE     NORMAL         # can be QUIET, NORMAL or FULL
+WRITE_XML        N              # Write XML file (Y/N)?
+XML_NAME         sex.xml        # Filename for XML output
+XSL_URL          file:///usr/local/share/sextractor/sextractor.xsl
+                                # Filename for XSL style-sheet
+NTHREADS         1              # 1 single thread
+
+FITS_UNSIGNED    N              # Treat FITS integer values as unsigned (Y/N)?
+INTERP_MAXXLAG   16             # Max. lag along X for 0-weight interpolation
+INTERP_MAXYLAG   16             # Max. lag along Y for 0-weight interpolation
+INTERP_TYPE      ALL            # Interpolation type: NONE, VAR_ONLY or ALL
+
+#--------------------------- Experimental Stuff -----------------------------
+
+PSF_NAME         default.psf    # File containing the PSF model
+PSF_NMAX         9              # Max.number of PSFs fitted simultaneously
+PSFDISPLAY_TYPE  SPLIT          # Catalog type for PSF-fitting: SPLIT or VECTOR
+SOM_NAME         default.som    # File containing Self-Organizing Map weights
+
