This HTML automatically generated with rman for NEMO
Table of Contents


tabfilter - flux derived from convolving a filter with a spectrum


tabfilter [parameter=value]


tabfilter convolves a filter (in the form of a simple table of the instrumental spectral response as function of wavelength) with a model or observed spectrum, and computes the resulting flux.

Example filters are in $NEMODAT/filter, and for good measure should contain a 0 response at the lower and upper end of the filter.

Currently the program just integrates int{S(l) *F(l) *dl} and ignores any units, though filters F(l) are typically between 0 and 1 (but not necessarely peaked at 1), and wavelength l in Angstrom. The spectrum S(l) has arbitrary units.

Using xscale= and yscale= the input spectrum can be scaled to match that of the filter.

Using out= the filtered spectrum can be output to a table, the resulting flux is still computed but only output in debug level 0.


The following parameters are recognized in any order if the keyword is also given:
Filter mnemonic (e.g. U,B,V,R,I,u,g,r,i,z,H,J,K) or full filter file name. See $NEMODAT/filter for current filters. No Default.
Input spectrum table file (column 1 must contain the wavelength (in Angstrom), column 2 the flux. Default: not used.
Column for wavelength in the spectrum [Default: 1]
Column for flux in the spectrum [Default: 2]
Scale factor applied to input spectrum wavelength in order to match that of the filter. [Default 1]
Scale factor applied to input spectrum flux for your preferred flux scaling. [Default: 1]
(Wavelength) value below which no data are printed or used. This is useful if your input spectrum has a broad range you are not interested in, but can be dangerous if this cuts into your filter. Default: not used
(Wavelength) value above which no data are printed or used. Default: not used
Integration step in Angstrom. If too large compared to the width of the filter, the program will stubbornly decrease it to 1/100 of the filterwidth. Default: 1.
Black Body temperature. This is needed if no spectrum is given. Default: not used.
Normalize the flux by the integral over the filter shape? [no].
If specified, the integral (flux calculation) isn’t performed, the output contains a table of the filtered spectrum. Although the flux is still output, it is now redirected to stderr instead of stdout. Default: none.


What is the SDSS "g-r" color for a T=5000 star?
   % tabfilter g tbb=5000
   5000 1.46959e+10 -25.418
   % tabfilter r tbb=5000
   5000 2.15063e+10 -25.8314
   % nemoinp -25.41--25.8314 format=%.2f
here the output of tabfilter are 3 numbers: the input Black Body temperature, the linear flux and the "astronomical" (-2.5log(Flux)) magnitude.

Here’s a snippet of csh code to tabulate the colors for a range of BB temperatures:

  % foreach t (‘nemoinp 2000:9000:1000‘)
  ?   set g=(‘tabfilter g tbb=$t‘)
  ?   set r=(‘tabfilter r tbb=$t‘)
  ?   echo $t ‘nemoinp $g[3]-$r[3]‘
  ? end
2000 2.5357
3000 1.3928
4000 0.7875
5000 0.4134
6000 0.1615
7000 -0.018
8000 -0.151
9000 -0.2529

Here’s a neat way to plot a Black Body spectrum. We are using a flat filter spectrum (the alias filter=1 is available for this, which is defined as 1 from 1 Angstrom to 1e9 Angstrom) and redefining xmin and xmax with out= to produce a spectrum. Since the output is an ASCII file, it can be piped into for example tabplot(1NEMO) for visual inspection:

  % tabfilter 1 tbb=1000 xmin=10 xmax=80000 step=10 out=- |\
    tabplot - xmin=0 xmax=80000
The same could be done to a spectrum and re-interpolate it (simular to tabspline(1NEMO) )
  % tabfilter 1 xmin=4000 xmax=5000 step=1 out=- | tabplot - 


Absolute units are not taken into account, though with xscale=,yscale= some flexibility is possible.

The integration is a simple eulerian one, though 1A should be sufficient for most application. In case of doubt, check with a smaller or bigger value.

See Also

tabmath(1NEMO) , tabspline(1NEMO) , tabint(1NEMO) , filter(5NEMO)

Filters: : Synthetic Stellar Photometry.


NEMODAT/filter/     directory with filters
NEMODAT/filter/Fnames    translation file between short and full names
NEMODAT/vega.sed    Vega’s SED useful for absolute color calibration


Peter Teuben

Update History

11-May-05    V0.1 Created    PJT
16-may-06    V0.6 added xmin/xmax    PJT
25-may-06    V0.8 added out=, and Vega info        PJT

Table of Contents