BINS,W,F,weight,WCENTER,WIDTHS,MEAN,SIGMA,WNPTS, $
/silent,file=file,/overwrite,/kev
W | Wavelength vector (unbinned). |
F | Flux vector (unbinned). |
wt | Weights for each wavelength (optional). |
WCENTER | Vector of central wavelength(s) for each bin. |
WIDTHS | Vector of data bin width(s), or scalar for constant width. |
MEAN | Mean flux in each bin. |
SIGMA | RMS deviation in each bin. |
WNPTS | Weighted number of points per bin. |
silent | If this keyword is set, results will not be displayed on the screen. |
file | If you wish to write the results to a file, you may enter a filename via this keyword (e.g., file='bozo.lis'), or simply set the keyword (/file) to use a default filename (bins.txt). |
overwrite | On systems that don't support version numbers (e.g., UNIX), BINS will normally check for a pre-existing file of the same name as that chosen with the FILE keyword, and ask the user if the old file should be overwritten. Setting OVERWRITE disables this query and overwrites the file. This keyword is ignored if the FILE keyword is not included. |
kev | If specified, wavelengths are converted to energy units (Kev) and fluxes are given as photons/cm2/sec/Kev. |
The most common method of weighting the points for IUESIPS data is to use
the array
as the weight. Those points with negative
values
will be excluded from the
bin. The
array can also be converted into weight values
using the procedure WEIGHT (see Table 10.4).
This procedure can also convert
or
flag
values to weight values. (Note: Weighting of quality flags is most
meaningful for boxcar extractions since other extraction techniques may
not preserve some blemishes. Examine your data carefully before using
this procedure.) Its calling sequence is:
WEIGHT,P,WT,/silent,/sigma,/epsilon,nu=nu
P | Your ![]() ![]() ![]() |
WT | Calculated weights (see Table 10.4). |
epsilon | If all of your ![]() ![]() ![]() ![]() ![]() |
sigma | ![]() ![]() |
nu | The program will automatically assume that a P vector with all
non-positive values that have no fractional components is a ![]() ![]() ![]() ![]() |
silent | If you have no keywords set, the program will figure out what P is and tell you what it decides. To suppress this message, set this keyword. |
For
vectors, the weight is normalized to the maximum of 1./
.
It is acceptable to enter the scalar 1.0 to weight all data equally, but you might as well type
wt=w*0+1. or wt=replicate(1.,n_elements(w))
WCENTER and WIDTHS may be vectors or scalars. For one bin, both WCENTER and WIDTHS may be scalars. Or, you may use a scalar for WIDTHS if all of the bins will have the same width. There are two ways to make up the WCENTER and WIDTHS vectors. For an arbitrary sequence of centers and bandpasses you will have to create the arrays:
WCENTER = FLTARR(n) & WIDTHS=FLTARR(n)
where n is the number of bandpasses desired. You set the values by typing:
READ,WCENTER
and then type in the values separated by <CR> or commas until the IUE_IDL>prompt returns. You can ``READ'' in the widths in a similar manner.
The second way to define these vectors is to use the computational capabilities of IDL. For 16 bins from 1200Å2000 Å and spaced every 50 Å with width 100 Å
WCENTER=FINDGEN(16)*>50.+1200.
If the system variable !NOPRINT=0 (the default), or if the SILENT keyword is set, the binned data will be displayed at your terminal in a table. Otherwise, the screen display will be suppressed, but the data will still be available to you through the output parameters and can still be written to a file if you use the FILE keyword.