section of routines in astro_util1.i

functions in astro_util1.i -

 
 
 
autocuts


             autocuts(image,&sigma,p=)  
 
  Often, the interesting information in astronomical images is burried  
  in intensity levels that will not appear if you do a simple "pli,image".  
  "autocuts" does a quick estimation of the cut levels needed to  
  display a fraction "p" of the pixel intensity distribution.  
  It then filters the image within these limits (using clip) and  
  returns it.  
SEE ALSO: clip,   sky  
 
 
 
ct2lst


            NT func ct2lst(lng,tz,julian day)  
 
     PURPOSE:  
     To convert from Local Civil Time to Local Mean Sidereal Time.  
     CALLING SEQUENCE:  
     CT2LST(Lng, dummy, JD)  
     INPUTS:  
     Lng  - The longitude in degrees (east of Greenwich) of the place for   
     which the local sidereal time is desired, scalar.   The Greenwich   
     mean sidereal time (GMST) can be found by setting Lng = 0.  
     Tz  - The time zone of the site in hours.  Use this to easily account   
     for Daylight Savings time (e.g. 4=EDT, 5 = EST/CDT), scalar  
     This parameter is not needed (and ignored) if Julian date is   
     supplied.  
     JD  -  Julian date of time in question, scalar or vector  
     use jdcnv to get the Julian date from the year, month and day  
     OUTPUTS:  
     Lst   The Local Sidereal Time for the date/time specified in hours.  
     PROCEDURE:  
     The Julian date of the day and time is question is used to determine  
     the number of days to have passed since 0 Jan 2000.  This is used  
     in conjunction with the GST of that date to extrapolate to the current  
     GST; this is then used to get the LST.    See Astronomical Algorithms  
     by Jean Meeus, p. 84 (Eq. 11-4) for the constants used.  
     MODIFICATION HISTORY:  
     Adapted from the FORTRAN program GETSD by Michael R. Greason, STX,   
     27 October 1988.  
     Use IAU 1984 constants Wayne Landsman, HSTX, April 1995, results   
     differ by about 0.1 seconds    
     Converted to IDL V5.0   W. Landsman   September 1997  
     Longitudes measured *east* of Greenwich   W. Landsman    December 1998  
     Converted to Yorick, 2003jan31, F.Rigaut. Restricted to Julian date input  
      
SEE ALSO:
 
 
 
deadpix


             func deadpix(image,bad pixel map,silent=)  
 
   Correction of bad pixels in an image by averaging the (good) neighbors.  
   image	= 2D array  
   bpm   = 2D array  
   bad pixel map has the same dimension as image, and is 1 at the   
   location of a bad pixel  
   F.Rigaut 2001/10  
SEE ALSO: sigma_filter  
 
 
 
fwhmfit


             func fwhmfit(image,boxsize=,saturation=,pixsize=,funtype=,magswitch=,  
                          nwindow=,silent=,airmass=,disp=,oneshot=,dpi=)  
 
   image      = 2D image  
   boxsize    = Specify the size of the box of sub-images  
                (usually 4-10 times the fwhm)  
   saturation = Saturation value (prevents picking saturated stars)  
   pixsize    = Specify the image pixel size  
   funtype    = function to use for fit (gaussian,special,moffat)  
   magswitch  =  Output flux in magnitude (zp=25 is used)  
   nwindow    = Number of window for UI (default 2)  
   silent     = don't display the numbers on screen  
   airmass    = airmass. Outputs airmass corrected FWHM values  
   disp       = 0: no display at all  
                1: normal behavior (set up window + displays)  
                2: display only the fit & residual  
   oneshot    = if set, exits after processing the first object  
   dpi        = dpi of the created window (disp has to be = 1)  
 
 
 
fwhmfitres


 fwhmfitres  
 
struct fwhmfitres { double xpos, xposerr, ypos, yposerr, xfwhm, xfwhmerr, yfwhm, yfwhmerr, flux, fluxerr, sky, skyerr, ell, ellerr, angle, peak;};  
 
 
 
jdcnv


            NT   
 
     NAME:  
     JDCNV  
     PURPOSE:  
     Converts Gregorian dates to Julian days     
     
     CALLING SEQUENCE:  
     JDCNV, YR, MN, DAY, HR  
     
     INPUTS:  
     YR = Year (integer)    
     MN = Month (integer 1-12)  
     DAY = Day  (integer 1-31)   
     HR  = Hours and fractions of hours of universal time (U.T.)  
      	  
     OUTPUTS:  
     JULIAN = Julian date (double precision)   
     
     EXAMPLE:  
     To find the Julian Date at 1978 January 1, 0h (U.T.)  
     
     JDCNV, 1978, 1, 1, 0., JULIAN  
     will give JULIAN = 2443509.5  
     NOTES:  
     (1) JDCNV will accept vector arguments   
     (2) JULDATE is an alternate procedure to perform the same function  
     REVISON HISTORY:  
     Converted to IDL from Don Yeomans Comet Ephemeris Generator,  
     B. Pfarr, STX, 6/15/88  
     Converted to IDL V5.0   W. Landsman   September 1997  
     Converted to Yorick F.Rigaut, 2003jan31  
     
SEE ALSO:
 
 
 
makebias


             function makebias(biasfiles)  
 
   Build bias image from a serie of biasfiles (string containing   
   the file names). Does NOT save the resulting bias.  
   F.Rigaut, 2001/11/10.  
SEE ALSO: makeflat  
 
 
 
makeflat


             function makeflat(biasfile,flatfiles)  
 
   Build flat field from a biasfile (single file name) and  
   a serie of flat fields (string containing the file names).  
   Does NOT save the resulting flat.  
   F.Rigaut, 2001/11/10.  
SEE ALSO: makebias  
 
 
 
sigmaFilter


             func sigma_filter(image,nsigma,iter=,silent=)  
 
   Filter out the pixels that deviate from the local statistics.  
   The mean and rms of the 8 (the minimum and maximum of these  
   8 neighbors are excluded in the mean and rms computation) is  
   computed. All pixels that deviates more than "nsigma" rms  
   from the mean are flagged as bad pixels. The image and newly  
   created bad pixel map are passed to the routine "deadpix"  
   for correction. The processus can be iterated.  
   image	: input image  
   nsigma: number of rms about the local mean out of which is  
   pixel is considered aberrant. nsigma >= 5 recommended.  
   iter  : Keyword, number of iterations. Recommended value : 3-5  
   silent: No verbose  
   F.Rigaut 2001/10  
SEE ALSO: deadpix  
 
 
 
sky


            NT sky(image,&sigma)  
 
     returns the mode and the standard deviation of the sky in an  
     image  
SEE ALSO: autocuts  
 
 
 
starsep


             starsep(image,type,pixsize=,disp=,boxsize=,nwindow=)  
 
   Use this function to interactively determine the separation of 2  
   objects in a stellar image.  
   Type:  
   > starsep,image,0  
   and click on a star.  
   This star will be the (x,y) zero point for further measurements  
   Then type  
   > starsep,image,1  
   and click on another star.  
   This will print the (X,Y) separation between this new object and  
   the reference.  
   Calling this function as a function does not print anything but  
   returns the triplet (xsep,ysep,separation)  
   Use pixsize=some_value to get the separation in arcsec.  
   Use disp=1 to get the default behavior of fwhmfit (set up the  
     windows and display the image)  
   Use disp=2 to just set up the small fit/residual window)  
   boxsize,nwindow: see fwhmfit manpage  
     
SEE ALSO: fwhmfit