Identifier sm_airy Purpose Smooth SPD or AAR using a lorentzian filter Synopsis out = sm_airy(in, width [,band] [,det] [,/sample] [,/velo] [,/sep][,stat=stat]) Arguments Name I/O Type: Description: --------------------------------------------------------------------- in I AAR/SPD spectrum to be smoothed width I float FWHM of lorentzian used for smoothing, In wavelength [um] by default. band I int scalar/ Option to select one band (scalar) or several array (array). Example: band=2, band=[1,4]. If absent all bands are selected (default). Illegal option for LAAR. det I int scalar/ Option to select one detector (scalar) or array several (array). Example: det=6, det=[3,21,30]. If absent all detectors are selected (default). /sample I switch if set, the width is interpreted in terms of samples /velo I switch if set, the width is interpreted in terms of velocity [km/s] /sep I switch if set smoothing is done separately for each detector stat I/O int error status, 0 if ok, 1 if fatal Returns Smoothed AAR/SPD Description Smooth fluxes in a SPD or AAR by convolution with a Lorentz profile cut off at 3*FWHM (on either side, 3% of peak value). At edges, signal and error are set to zero (within 3*FWHM of edges). When (2*3*FWHM + 1) is longer than the signal, this latter and the error are set to 0. The FWHM of the lorentzian can be specified in wavelength (default), velocity units or sample domain. In the first 2 cases data is unequally sampled. For AAR, smooth over all detectors combined together (default) or separately on each detector when keyword /sep is set. The errors are propagated from the original data. Comment Does not treat sdir nor scnt. Does not handle SPDs. It is too difficult to have this deal with SWS SPD offsets? How to apply to SPDs???? even after RESUM??? The program would have to know which SPD fluxes are the good ones (i.e. those with reset). Example -- Dependencies CALLS: chk_tag, is_struct, sap_error, sap_keyword_set, update_history CALLED FROM: IA, GUI Category ISAP Filename sm_airy.pro Author Laurent Verstraete (IAS) (-->LV) Version 1.3 History Draft reqs DL/ES/CW 27.7.95 revision of requirements E. Sturm 8.8.95 1.0 - 04.03.96 LV creation 1.2 - 19.03.96 LV modified to handle combined or separate sets of band/det. Treat all AARs. Make wavelengths ascendent. 1.3 - 12.3.96 ES stat added ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;