Name
       strehl - Strehl ratio computation

Synopsis
       strehl [options] <cubes...>

Description
       strehl computes the Strehl ratio for every plane in every cube given on
       command line. See ALGORITHM to know how it is computed.   strehl  needs
       to  know some parameters about the mirror and observation wavelength to
       generate the ideal PSF. Defaults for these  parameters  are  taken  for
       NACO,  use  the options to feed other values.  strehl accepts jokers on
       command line :
       > strehl *.fits

       ATTENTION! The input image must be square (same size in x and  y),  and
       this  size  shall  be a power of 2! This to allow a correct PSF genera-
       tion.

Algorithm
       For each image in each cube (candidate image), the following  algorithm
       is applied:

       1.  Generate  a PSF for a given telescope configuration and observation
       wavelength.

       2. Compute the PSF flux and the PSF peak.

       3. Detect the brightest star (if not provided on the command line).

       4. Compute the star peak and the star flux. This step requires  a  very
       precise  background estimation. A tiny error on the background can have
       a strong effect on the computed strehl.

       5. Strehl = (star_peak/star_flux) / (psf_peak/pasf_flux)

       6. Compute the error on the Strehl

       Attention: the theoretical PSF is generated only once  per  call!  When
       giving  several  cubes  on  command-line, it is up to the user to check
       that the same parameters are valid  for  all  files  (check  the  wave-
       length).

Options
       -g     An  ideal  PSF  is generated for Strehl ratio computation. Using
              this option, a FITS file named ’psf1.fits’ is generated  in  the
              current directory, containing the generated ideal PSF (of Strehl
              ratio equal to 1). Use it to cross-check that the generated  PSF
              fits your computation.

       -p diameter
              Primary  mirror  diameter in meters. Default to 8. This value is
              actually 8.2 meters, corrected to take into account the  central
              obscuration ratio.

       -d diameter
              Secondary mirror diameter in meters. Default to 1.1.

       -l ’lambda0 dlambda’
              Do not forget the simple quotes around the 2 values. First value
              is the central wavelength of observation. Second  value  is  the
              filter width. Values are given in microns.
              Defaults to 5 and 0.1.

       -s pixelscale
              Pixel Scale in arc seconds. Defaults to 0.05.

       -P ’x y’
              x  and  y are the pixel position of the star used to compute the
              strehl. If not provided, an automatic bright star detection pro-
              cedure is applied.

       -r radius
              radius  is the star radius in arcsecond used to compute the star
              flux.  default is 2.0 arcsec.

       -R ’rad_in rad_out’
              These radii define a ring around the star. This ring is used  to
              compute the background. If these values are not provided, a dif-
              ferent background estimation method will be used. As  the  back-
              ground estimation accuracy is an issue in the strehl ration com-
              putation, it is far better to use this option.

       -b bg  Used to provide the backgound value.

       -S size
              Size in pixels of the square  used  to  compute  the  PSF  flux.
              Default  is  64 pixels.  -T tel Used to define defaults for sup-
              ported telescopes. Supportes ones are "3.60" and "ut4".  Default
              is "ut4".

Example
       To compute the strehl ratio over 10 cubes named S001.fits to S010.fits,
       on an 8 meter telescope with a 1.5 meter secondary  mirror,  a  central
       wavelength of 5.0 um and filter width of 0.1 um, a pixel scale of 0.05,
       use:

       strehl -p 8 -d 1.5 -l ’5 0.1’ -s 0.05 S*.fits

Files
       Files shall all comply with FITS format

See Also
       stcube