section of routines in spydr_various.i

functions in spydr_various.i -

 
 
 
apod


             apod(length,degree)  
 
  Returns apodization functions for 1D Fourier transforms.  
  degree = 1 to 3 : apodization functions for the FTS  
  degree = 4      : sinc  
  degree = 5      : Bartlett filter (cf NR p 547)  
  degree = 6      : Hann filter  
  degree = 7      : Welch filter  
SEE ALSO:
 
 
 
axisLegend


             axisLegend(xtext,ytext,xyoff=,yxoff=)  
 
  plot the axis captions. works for myboxed.gs graphic style.  
  F.Rigaut, 2001/11/10.  
 
 
 
calcpsf


             calcpsf(pupil,phase,init=)  
 
  Compute psfs from pupil and phase using FFT.  
  F.Rigaut, 2001/11/10.  
SEE ALSO: fft,   rfftconvol  
 
 
 
clmfit


             clmfit(y,x,&a,function,&yfit)  
 
  Useful wrapper for the lmfit procedure (here, spydr_lmfit).  
  y = the data to fit vs x  
  a = the output coefficients (may have initial value on input)  
  function = a string containing the function definition where  
  x and a must be used as variable and coefficients name  
  e.g. "a(1)+a(2)*cos(x)"  
  yfit = optional output. Best fit.  
SEE ALSO: spydr_lmfit,   lmfit  
 
 
 
convol2d


             convol2d(image,kernel)  
 
  For small kernel. Not FT based. Really slow ! use only for small images.  
  you can use convVE if you are running yao on a mac (see yao_veclib/yao_fast.i)  
  F.Rigaut, 2001  
  NOTE: name changed as of yorick-1.6.01. used to be named convol  
SEE ALSO: rfftconvol  
 
 
 
decimal_time


             decimal_time(str,delim)  
 
   Returns the decimal time (in hours) from string like "20:33:12"  
   or "21&32&01" or "06 55 32". You can specify a delimiter.  
   F.Rigaut 2001/10  
   OBSOLETE. THIS ROUTINE IS SUPERSEEDED BY "ParseTime".  
SEE ALSO:
 
 
 
doc


 doc  
 
SEE doc  
 
 
 
docyo


             doc and docyo  
 
  Spawns ghostview (actually, gv) to display the short doc and  
  extended yorick doc ps files. gv has to be in the path.  
SEE ALSO:
 
 
 
ds9


             ds9(image)  
 
  Writes the input image on disk and start ds9 to view it.  
  this is rather an ugly hack but ds9 is sometimes useful  
  to look at large image of have a display of the pixel value.  
  Of course, ds9 has to be in the path.  
SEE ALSO:
 
 
 
extractImage


             extractImage(image,dimx,dimy,method=)  
 
  Interactively extract a subimage from a larger one.  
  dimx[,dimy] are the dimensions of the subimage (not used for method 2)  
  method = 1 center is selected with mouse  
  method = 2 use mouse to click and drag to define subimage  
  NOTE: The image has to be displayed before calling the rountine.  
  This allows the user to arrange cuts and zoom level.  
SEE ALSO:
 
 
 
factoriel


             factoriel(arg)  
 
  Return factoriel of the argument      
SEE ALSO:
 
 
 
fft2dfit


             fftfit(yin,fraccut,nsig)  
 
  routine of iterative fit by FT, discarding aberrant points  
  yin = input vector to fit  
  fraccut = cut in the fourier plane in fraction of cut-off frequency  
  nsig = number of sigma for rejection of aberrant points  
  F.Rigaut 2001/10  
  ON GOING WORK  
SEE ALSO:
 
 
 
fftfit


             fftfit(yin,fraccut,nsig)  
 
  routine of iterative fit by FT, discarding aberrant points  
  yin = input vector to fit  
  fraccut = cut in the fourier plane in fraction of cut-off frequency  
  nsig = number of sigma for rejection of aberrant points  
  F.Rigaut 2001/10  
SEE ALSO:
 
 
 
fftrebin


             fftrebin(image,nreb)  
 
  Returns "image" rebinned nreb times (nreb should be an integer,  
  power of 2, i.e. 2, 4, 8, ...) using a Fourier technique (basically,  
  extention of the support in the Fourier plane by zero values.  
  F.Rigaut, 2001/11/10.  
SEE ALSO: fft,   fft_setup,   fft_inplace  
 
 
 
fftshift


             fftshift(image,xs,ys)  
 
  Shift the input array by an arbitrary amount (xs,ys) in pixel units.  
  Of course xs and ys can be fractional. This rountine shift the  
  image by passing in the Fourier plane. All the usual restrictions  
  apply:  
     - The image should be well sampled (Nyquist)  
     - There should not be discontinuities at the edges, etc...  
  The input array can be 1D or 2D  
SEE ALSO: fftrebin  
 
 
 
gamma


             gamma(arg)  
 
  Gamma function.  
SEE ALSO: gamma,   i,   in,   yorick/i/  
 
 
 
jpg_write_color


             jpg_write_color(im,filename,cmin=,cmax=,quality=,noflip=)  
 
  Wrapper for the jpg_write procedure.  
  Reads out the current palette and uses it as color table to write  
  the image "im" in a jpg file.  
  Flags and keywords as in jpeg_write.  
SEE ALSO: jpg_write,   jpg_read,   jpg_info  
 
 
 
log00


             log00() and log11()  
 
  Shortcuts for logxy,0,0 and logxy,1,1      
SEE ALSO: logxy  
 
 
 
log11


 log11  
 
SEE log00  
 
 
 
medianCube


             medianCube(cube)  
 
  Returns a 2D array which elements are the median along the  
  3rd dimension of the input variable "cube".  
  F.Rigaut, 2001/11/10.  
SEE ALSO: median  
 
 
 
mrot


             mrot(angle)  
 
  returns the matrix of rotation for a given angle.  
  It has to be used as follow:  
  If you want to rotate a vector of two coefficients xy=[x,y],  
  You should do rotated vector = mrot(+,)*xy(+,);  
  Angle is in degrees.  
SEE ALSO:
 
 
 
oldclip


             pli, clip(arg, mini, maxi);  
 
  Returns the argument, which has been "clipped" to mini  
  and maxi, i.e. in which all elements lower than "mini"  
  have been replaced by "mini" and all elements greater  
  than "maxi" by "maxi". Array is converted to float.  
  Either "mini" and "maxi" can be ommited, in which case  
  the corresponding mini or maxi is not clipped.  
  Equivalent to the IDL ">" and "<" operators.  
  F.Rigaut, 2001/11/10.  
SEE ALSO:
 
 
 
png_write_color


             png_write_color(im,filename)  
 
  Wrapper for the png_write procedure.  
  Reads out the current palette and uses it as color table to write  
  the image "im" in a png file.  
SEE ALSO:
 
 
 
prepzernike


             prepzernike(size,diameter,xc,yc)  
 
  Call this function to set up the geometry for subsequent calls  
  to the zernike function.  
  size : size of the 2d array on which future "zernike" will be returned  
  diameter : diameter of the pupil in pixel in the array  
  xc, yc (optional) : Coordinates (in pixels of the center of the pupil)  
  Example:  
  > prepzernike,128,100  
  > pli,zernike(6)  
SEE ALSO: zernike,   zernike_ext,   zernumero  
 
 
 
psd


             psd(s, length, step=, filter=, samp=, db=,noplot=,overplot=,  
 
     sqrt=,roddier=,xtitre=,ytitre=)  
  Procedure PSD : Compute the Power Spectral Density of a vector  
  s	   = variable on which the PSD has to be computed  
  length  = length of the subsample for FFTs  
  step	   = shift in pixels between subsamples  
  filter  = apodization function as in apod.pro (usually 6)  
  samp	   = sampling time  
  db      = plots in dB :10*alog10(dsp)  
  noplot  = do not plot  
  overplot= over plot  
  sqroot  = returns the sqrt of the dsp  
  roddier = plots the psd roddier style      
SEE ALSO:
 
 
 
rfftconvol


             rfftconvol(image,kernel)  
 
  Not specialy optimized fft convolution.  
  Inputs are two real positive arrays (images) of identical size.  
  Output is a real array. The output is Normalized in flux.  
  F.Rigaut, 2002/04/04  
SEE ALSO: convol  
 
 
 
sinc


             sinc(ar)  
 
  Return the sinus cardinal of the input array  
  F.Rigaut, 2002/04/03  
SEE ALSO: Eric,   Thiebault,   wrote,   a,   sinc,   which,   is,  
probably,   better  
 
 
 
str2float


             str2number(string_array)  
 
   convenience function. wrapper for sread.  
   returns float array.  
SEE ALSO:
 
 
 
strInt


             strInt(ivec,nchar);  
 
  Create a string array which elements are the string  
  equivalent of each elements of "ivec", with as many   
  heading "0" added to fill a string of length nchar.  
  example:   
  print,strInt(indgen(10:12),4)   
  ["0010","0011","0012"]  
  F.Rigaut, 2001/11/10.  
SEE ALSO: str,   routines,   in,   string,   i  
 
 
 
surface


             surface(image,shade=)  
 
  Simple wrapper to get a simple mesh (or shaded) of the input array.  
SEE ALSO:
 
 
 
uint


             uint(arg)  
 
  Return the unsigned version of an integer of long argument.  
  Sorry, I neede this for some fits files. There is a uint type  
  in yorick-mb, beware.  
  F.Rigaut, 2001/10  
SEE ALSO:
 
 
 
window2


             window2()  
 
  Create a window with style "myboxed.gs"  
  F.Rigaut 2002/04/03  
SEE ALSO: window,   window3  
 
 
 
zernike


             zernike(zn)  
 
  Returns the zernike number zn, defined on a 2D array as per  
  the prepzernike function.  
  These zernikes follow the Noll (JOSA, 1976) numbering and  
  definition (rms of 1 over the pupil)  
  Example:  
  > prepzernike,128,100  
  > pli,zernike(6)  
SEE ALSO: prepzernike,   zernumero  
 
 
 
zernike_ext


             zernike_ext(zn)  
 
  Same as the zernike function, except that the function is not masked  
  at R=1. This might be useful for some WFS codes where the derivative  
  of the wavefront is needed (and therefore a pixel outside of the  
  pupil is used to compute the derivatives).  
  These zernikes follow the Noll (JOSA, 1976) numbering and  
  definition (rms of 1 over the pupil)  
  Example:  
  > prepzernike,128,100  
  > pli,zernike(6)  
SEE ALSO: zernike,   prepzernike,   zernumero  
 
 
 
zernumero


             zernumero(zn)  
 
  Returns the radial degree and the azimuthal number of zernike  
  number zn, according to Noll numbering (Noll, JOSA, 1976)  
SEE ALSO: prepzernike,   zernike