Identifier sap_add Purpose Add either a constant or another spectrum to a spectrum (with error propagation) Synopsis sap_add, in1flux, in1err, in2flux, in2err, outflux, outerr Arguments Name I/O Type Description ----------------------------------------------------- in1flux I Float(*) array of first spectrum (flux or photocurrents) in1err I Float(*) Array of weights for in1flux in2flux I Float(*) array that is to be added (constant or fluxes of a second spectrum) in2err I Float(*) Array of weights for in2flx outflux O Float(*) array of Spectrum 1 after addition outerr O Float(*) Array of uncertainties of outflux Returns The added fluxes (or photocurrents) and their propagated errors. Description Adds either a constant or another spectrum to a spectrum. If a constant is to be added this constant has to be passed as array (from the shell arithm). The errors are propagated ( outerr = sqrt(in1err^2 + in2err^2) ). After adding two spectra together the resulting spectrum is NOT renormalized (by dividing by 2.) Comment The routine is usually called from the "shell" ARITHM which provides the appropriate arrays from the product structures. Example --- Dependencies CALLS: CALLED FROM: arithm Category ISAP Filename sap_add.pro Author E. Sturm (--> ES) A. Fiedler (--> AF) Version 1.0 History 0.1 14-09-95 ES 0.2 27-09-95 AF added check for number of arguments 1.0 30-11-95 ES V1 delivery ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Copyright (C) 1995, Max-Planck-Institut fuer extraterrestrische Physik (MPE); Garching, Germany ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;