______________________________________________________________________________

			       RG

      RADGAL is a module which performs a nonlinear least squares fit to 
 surface brightness data in a file of type 1 and derives the parameters of
 a chosen surface brightness formula and their errors.  It can take into
 account blurring from the atmosphere by using the actual point spread 
 function of a star (or averge of many stars).  

 ______________________________________________________________________________

 Enter an option:                              22-OCT-1991 13:59:32.32
 OPTION=RG                                                           
 RADGAL, Version 1
 Open the data file
 Enter the file name:  (default = last entry)
 FILE_21=R022152	    ....This the data file of type 1 which was
				produced by option PR.
 Enter the ID of the object:  (default = last galaxy entry)
 ID=129			    ....The data file can hold many different 
				galaxies
 Do you wish to plot the first estimate of the Hubble "a" against radius?
 (default = N)		    ....This is quick way to get a rough value for
				the radius parameter
 PLOT=
 F
 Enter the surface brightness law:
      G  = Gaussian
      H  = Hubble
      HV = Hubble with variable power in denominator
      I  = Inverse radius
      K  = Constant
      L  = Straight line
      M  = Modified Hubble (default)
      MC = Modified Hubble plus modified Hubble for cluster
      ML = Fixed modified Hubble with color gradient, linear in log(r)
      MR = Fixed modified Hubble with color gradient,  linear in r
      SI = Sum of K/r and K'/r**2
      T  = Tapered Hubble
      V  = de Vaucouleurs
      VC = de Vaucouleurs plus de Vaucouleurs for cluster
      E3 = Extrafocal photometry of E3 galaxies
			    ....There are lots of choices  
 CHOICE=V
 Do you wish to solve for the sky level also?  (default = Y)
 SOLVE=
 T			    ....Normally, one does not know the sky ahead 
				of time.  Obtaining an accurate sky level
				is important for getting an accurate 
				total magnitude.
 Do you wish to convolve the surface brightness law with a smearing 
 distribution?
 (default = Y)
 CONVOLVE=
 T			    ....It is essential to do this for most images.
 Open the file containing the smearing function
 Enter the file name:  (default = last entry)
 FILE_22=S022152	    ....This was prepared with option PR on stars
				in the field
 Enter the ID of the smearing object:  (default = last smearing entry)
 ID=STARS		    ....Several stars were added together for more
				accuracy with option ED
 Enter the convolving factor:  (default = 75.0)
 CONVOLVE_FACTOR=
   75.0000    		    ....This factor controls the stepsize for 
				convolution.  A large factor produces
				a smaller stepsize near the center of the 
				galaxy.  This gives more accuraccy, but takes
				longer to compute.  We choose the default here.
 Enter the starting and ending radii for the least squares fit:
 (default = the entire range of the data file)
 RADII=
  0.000000E+00
   90.0000    
 Enter the outer radius to where convolution is to be done:
 (default = previous fitting outer radius
 RADIUS=40		    ....By not convolving out to the edge of the
				data file we save computing time and do
				not loose accuracy.
 Enter the estimates for the surface brightness at 1/2 the total light
 (ADU), the corresponding radius (pixels), and the sky level (ADU):
  
 PARAMETERS=100 10 491	    ....A reasonable guess
 Select the weighting scheme:
      R = Weight equal to circumference/(noise)**2 (default)
      S = Weight equal to the square root of the circumference
      N = Weight equal to 1/(noise)**2
      P = Weight equal to weight from file/(constant*noise**2)
  
 WEIGHT_SCHEME=
 R
 Enter the readout noise in electrons and the gain in electrons per ADU:
 (defaults = 63.9 21.3)
 NOISE_PARAMETERS=
   63.9000    
   21.3000    		    ....These will depend on the instrument
 Select the iteration scheme:
      M = Manual (default)
      A = Automatic selection of fractional increment with
          maximum searching
      B = Automatic selection of fractional increment with
          minimum searching
      C = Automatic selection of fractional increment with
          no searching
  
 ITERATION_SCHEME=
 M		    ....We choose M here so as to illustrate the behavior
			of the iteration.  Normally, this operation can
			be submitted as a batch job and A (for good data)
			or B (for noisier data) chosen.
 Enter the fractional increment:  (default = 1.0)
 FRACTIONAL_INCREMENT=
   1.00000    	    ....If the answer starts to oscillate, we can decrease
			this value.  When A is chosen, the increment is
			adjusted downward as needed automatically.
 For the initial guess:
 Mean error for an observation of average weight = 
       27.9963       +-       2.11030    
  
 For the solution:
 Mean error for an observation of average weight = 
       4.21510       +-      0.317725    
                         and in magnitudes it is = 
       1.35730       +-      0.102310    
 Effective surface brightness =         52.48601   +-         4.79713
 Effective radius =          8.78313   +-         0.31946
 Sky surface brightness =        490.70779   +-         0.47116
 Do you wish to iterate 1 more time?  (default = Y)
 ITERATE=
 T
 Enter the fractional increment:  (default = 0.67xlast value)
 FRACTIONAL_INCREMENT=1		    ....We'll try keeping this high for now
 Enter the new estimates:  (default = best values)
 PARAMETERS=
   52.4860    
   8.78313    
   490.708    
  
 For the solution:
 Mean error for an observation of average weight = 
       1.01237       +-      0.763099E-01
                         and in magnitudes it is = 
       1.32065       +-      0.995480E-01
 Effective surface brightness =         58.41388   +-         1.37615
 Effective radius =          6.91855   +-         0.14996
 Sky surface brightness =        490.73038   +-         0.11192
 Do you wish to iterate 1 more time?  (default = Y)
 ITERATE=
 T
 Enter the fractional increment:  (default = 0.67xlast value)
 FRACTIONAL_INCREMENT=1
 Enter the new estimates:  (default = best values)
 PARAMETERS=
   58.4139    
   6.91855    
   490.730    
  
 For the solution:
 Mean error for an observation of average weight = 
      0.886601       +-      0.668301E-01
                         and in magnitudes it is = 
       1.30982       +-      0.987316E-01
 Effective surface brightness =         69.91505   +-         1.67909
 Effective radius =          6.10233   +-         0.12451
 Sky surface brightness =        490.79819   +-         0.09649
 Do you wish to iterate 1 more time?  (default = Y)
 ITERATE=
 T
 Enter the fractional increment:  (default = 0.67xlast value)
 FRACTIONAL_INCREMENT=
  0.670000    		    ....To prevent the solution from bouncing around
				too much, we'll let the fractional increment
				decrease on each iteration.
 Enter the new estimates:  (default = best values)
 PARAMETERS=
   69.9151    
   6.10233    
   490.798    
  
 For the solution:
 Mean error for an observation of average weight = 
      0.821715       +-      0.619391E-01
                         and in magnitudes it is = 
       1.22094       +-      0.920321E-01
 Effective surface brightness =         74.94466   +-         1.86721
 Effective radius =          5.88179   +-         0.09985
 Sky surface brightness =        490.83908   +-         0.08886
 Do you wish to iterate 1 more time?  (default = Y)
 ITERATE=
 T
 Enter the fractional increment:  (default = 0.67xlast value)
 FRACTIONAL_INCREMENT=
  0.448900    
 Enter the new estimates:  (default = best values)
 PARAMETERS=
   74.9447    
   5.88179    
   490.839    
  
 For the solution:
 Mean error for an observation of average weight = 
      0.887865       +-      0.669254E-01
                         and in magnitudes it is = 
       1.20830       +-      0.910789E-01
 Effective surface brightness =         77.77221   +-         2.13163
 Effective radius =          5.75739   +-         0.10164
 Sky surface brightness =        490.85941   +-         0.09585
 Do you wish to iterate 1 more time?  (default = Y)
 ITERATE=
 T
 Enter the fractional increment:  (default = 0.67xlast value)
 FRACTIONAL_INCREMENT=
  0.300763    
 Enter the new estimates:  (default = best values)
 PARAMETERS=
   74.9447    
   5.88179    
   490.839    
  
 For the solution:
 Mean error for an observation of average weight = 
      0.846092       +-      0.637766E-01
                         and in magnitudes it is = 
       1.22517       +-      0.923505E-01
 Effective surface brightness =         76.83912   +-         2.03134
 Effective radius =          5.79844   +-         0.09685
 Sky surface brightness =        490.85269   +-         0.09134
	.
	.
	.	
	.	
	.
	.	    ....We have let it iterate a few more times
 Do you wish to iterate 1 more time?  (default = Y)
 ITERATE=
 T
 Enter the fractional increment:  (default = 0.67xlast value)
 FRACTIONAL_INCREMENT=
  0.606071E-01
 Enter the new estimates:  (default = best values)
 PARAMETERS=
   74.9447    
   5.88179    
   490.839    
  
 For the solution:
 Mean error for an observation of average weight = 
      0.822191       +-      0.619750E-01
                         and in magnitudes it is = 
       1.22255       +-      0.921532E-01
 Effective surface brightness =         75.32642   +-         1.97396
 Effective radius =          5.86499   +-         0.09412
 Sky surface brightness =        490.84183   +-         0.08876
 Do you wish to iterate 1 more time?  (default = Y)
 ITERATE=N		    ....The solution seems to have converged
 For a perfect fit:
 Mean error for an observation of average weight = 
      0.337123       +-      0.254116E-01
  
 Covariance(1,1) =        3.8965144    
 Covariance(1,2) =      -0.18082026        ....This is expected to be negative
 Covariance(2,2) =       0.88583706E-02
 Covariance(1,3) =       0.28629743E-01
 Covariance(2,3) =      -0.16628597E-02
 Covariance(3,3) =       0.78780372E-02
 The average weight =        0.019394
 The reduced chi squared =     5.9480
  
 The integral from radius =    0.0 to radius =   90.0 =         44849.835182
 In magnitudes it is   18.370598
 The integral from radius =  91.0 to the limit of      2212.5 =       718.027778
 In magnitudes it is   22.859648
 The total is         45567.862960 and in magnitudes it is   18.353354

			    ....Note that the total magnitude is only slightly
				brighter than the aperture magnitude out to
				90 pixels.  
 Do you wish to plot the residuals?  (default = Y)
 PLOT=
 T			    ....This is a good way to see how good the fit
				actually is.
 Enter the plot devices:
      G  = Graphics terminal (VT100/Retrographics and Visual 550, default)
      G1  = Graphics terminal (GraphOn)
      G2  = Graphics terminal (Codonics)
      G3  = Graphics terminal (Micro-term)
      F   = File
      T   = Tektronix 4662 flat bed plotter (1200 baud)
  
 DEVICES=
 G                             
			    ....The first plot is in linear units
 Enter the plot devices:
      G  = Graphics terminal (VT100/Retrographics and Visual 550, default)
      G1  = Graphics terminal (GraphOn)
      G2  = Graphics terminal (Codonics)
      G3  = Graphics terminal (Micro-term)
      F   = File
      T   = Tektronix 4662 flat bed plotter (1200 baud)
  
 DEVICES=
 G                             
			    ....This plot is in logarithmic units
 Do you wish to store the results?  (default = N)
 STORE=Y
 Add the results to an existing file?  (default = N)
 OLD=
 F
 Enter the file name:  (default = last entry)
 FILE_24=RESULTS_FILE
 More objects to analyze in this file?   (default = N)
 MORE=
 F

 Enter an option:                              22-OCT-1991 14:08:47.06
 OPTION=EX                                         
 ______________________________________________________________________________