% @(#)standairsp.hlq	19.1 (ESO-IPG) 02/25/03 14:23:17 
% @(#)
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%.COPYRIGHT  (c)  1992 European Southern Observatory
%.IDENT      rectifirsp.hlq
%.AUTHOR     E.Oliva, Arcetri (Florence)
%.KEYWORDS   MIDAS, help files, STANDARD/IRSPEC
%.PURPOSE    On-line help file for the command: STANDARD/IRSPEC
%.VERSION    1.0  23-SEP-1992 : Creation, E.Oliva
%----------------------------------------------------------------
\se
SECTION./IRSPEC
\es\co
STANDARD/IRSPEC                                         23-SEP-1992 EO
\oc\su
STANDARD/IRSPEC in_ascii_file out_table interp_method 
                [degree=degree] [step=wavelength_step] [limits=wl1,wl2]
                [units=wavelength_units] [plot=plot_option]
        Create standard star flux table from a "flux ascii file".
\us\pu
Purpose:    To a create a table containing a properly sampled F(lambda) vs.
            lambda representation of the continuum of a standard star.
            The user must provide an ascii file with his/her favourite
            guesses of the star fluxes at a number of wavelengths, e.g.
            the values of F(lambda) at the effective wavelengths of 
            photometric filters in case of photometric standard stars.
            The output table is necessary to create the response frames
            (see RESPONSE/IRSPEC). You are also kindly invited to read 
            the notes below.
\up\sy
Syntax:     STANDARD/IRSPEC in_ascii_file out_table interp_method 
                            [degree=degree] [step=wavelength_step] 
                            [limits=wl1,wl2] [units=wavelength_units]
                            [plot=plot_option]
\ys\pa
            in_ascii_file =
                       Input, ascii (i.e. "normal") file created by the
                       user and containing his/her best guesses of the star
                       fluxes at a number of wavelengths (see notes below).
                       The file must contain, in each lines, 
                          "wavelength" "flux"  "any comment you like"
                       and must not contain empty/comment rows; the format and
                       wavelength order is free.\\
                       Example:\\
                        1.25  1.04e3  J=6.12, flux in 1e-11 erg cm-2 s-1 um-1\\
                        2.20     196  K=5.73, same units\\
                        1.65  4.34e2  H=5.99, same units
\ap\pa
            out_table= Output table containing wavelengths (column :wl)
                       and fluxes (column :flux) interpolated over
                       the input values according to the method defined by
                       the next parameter. The wavelength step and limits
                       of the table are controlled by the "limits=.."
                       and "step=..." options (see below).
\ap\pa 
            interp_method =
                       Method for interpolation/fitting of input data.
                     - b  black-body fitting
                     - p  polynomial fitting, in the log(F) vs. log(wl) plane
                     - s  spline interpolation, in the log-log plane
                       The spline method should be used only when you have many
                       points in your input file, for few data it should give
                       the same result as polynomial interpolation.\\
\\
            Additional parameters and options
\ap\pa
            degree   = degree of the polynomial/spline, default=2
                       Not used for black body fitting
\ap\pa
            step     = In the output table the star flux is sampled
                       at wavelength intervals equal to "step". Default
                       value is 0.01, be careful to properly set this
                       parameter if you are working in Angstroms!
\ap\pa
            limits   = The output table will cover the full wavelength
                       range specified by the input ascii files. Use
                       this parameter if you need to restrict the size
                       of the table (e.g. limits=1.1,1.3 or l=1.9,2.4).
                       This does not affect the fitting procedure which
                       always considers all the input data.
\ap\pa
            units    = Wavelengths are usually in microns. You can use
                       units=a (or just u=a) if you prefer to work in
                       Angstroms; your ascii file must also contain
                       wavelengths in Angstroms and ... be careful with
                       the step parameter (see above)
\ap\pa
            plot     = Plot option, if equal to 1 (the default) the command
                       will plot your input points and the fitted function,
                       Use plot=0 (or p=0) for silent work.
\ap\no
Note:       The ideal standard star should be featurless - to allow a proper
            cancellation of the telluric, absorption features (remember that
            you should not smooth the star spectrum in the IR) - and with a
            precisely known flux distribution. In practice, no such a star
            exists not only because all stars - even the hottest O types -
            have some absorption features, but mainly because it is hard
            to find accurate measurements (at fairly high resolving powers) 
            of the absolute flux distribution of any star. At present 
            (end 1992), there is nothing like a list of spectrophotometric
            standard stars as you find in the optical. Hence you must choose
            your reference stars according to your preferences - I personally
            like early O types though they are rare, little studied and
            often variable! - and also use your favourite guesses for their
            absolute fluxes at a number of wavelengths. In practice, you will
            probably end up using photometric standard stars in which case
            you can enter, in your ascii file, the values of F(lambda) at 
            the effective wavelengths of the filters; and for the 
            transformation from magnitudes to fluxes you may use e.g.
            Wilson et al. (1972, ApJ 177, 533) and Bessel (1979, P.A.S.P. 91,
            589) or any other reference you like.
\\ 
\\
            This command does not extrapolate beyond the wavelength limits
            given in the input, ascii file. If you have spectra at
            wavelength shorter than 1.25 micron (the effective wavelength
            of the J filter) you may find it difficult to estimate the star 
            flux at wavelengths around 1 micron, and you will probably be
            forced to use the R - or even the V - photometric point.
            Be aware that interpolating over such a broad range may introduce
            not negligible errors!
\\
\\
            You are recommended to use F(lambda) units rather than F(nu).
            However, you can also use the latter but be aware that the
            black-body interpolation will not work.
\on\exs
Examples:
\ex
            STAND/IRSP bs1933.flux bs1933 bb
\xe\ex
            STAND/IRSP hd33312.flux hd33312k poly d=3 p=0 s=.001 l=1.95,2.50
\xe \sxe
