0.1 fbol
========

fbol - Bolometric Flux/Spectral Energy Distribution Modeling

fbol Description
================

`fbol' is a spectral energy distribution (SED) modeling and angular
diameter estimation tool (and part of the getCal suite); it is designed
to estimate simple star apparent (angular) diameters by modeling their
photometry with a Plank black-body SED parameterized by effective
temperature and bolometric flux.  The angular diameter (theta - units
of radians) is simply related to effective temperature (T) and
bolometric flux (Fbol) by:

   Fbol = 1/4 theta^2 sigma T^4      = 1/4 pi theta^2
integral[B_lambda(T) d lambda]

   with sigma being the Steffan-Boltzman constant.  This relationship
defines effective temperature, and is derived in the accompanying
`fbolSED.tex' (see the `doc' directory in the getCal tarball).

   The basic `fbol' invocation looks like:
     fbol [options] photometry.file [phot.file2 ...] [more options]

   By default `fbol' reads input photometry/flux information from one or
more photometry files (the format is discussed below), however
photometry can also be read from stdin using a stdin switch:
     fbol --stdin [more options] < photometry.file

   `fbol' output is written to stdout:
     fbol ~/photometry.51_Peg
     # Read 89 data lines from file: /home/bode/photometry.51_Peg
     #                                   ChiSqr        F_bol (10^-8       Ang
     #   Star               Teff(K)      /DOF   DOF     erg/cm2/s)     Size (mas)    Filters
      1 HD_217014--G2.5IVa  5705 +/- 36   0.54  85   19.14 +/- 0.189  0.74 +/- 0.11 .........

   Errors quoted in the model parameters are mapped to a fit chi squared
per degree of freedom of 1.

   Errors quoted in the model parameters are FORMAL errors, and should
NOT be taken as the actual errors (i.e. stars are only approximately
black body radiators).

   `fbol' can also output plots of the input photometric/flux data and
resulting SED model using the third-party graphing package gnuplot
(available on most systems, see `http://www.gnuplot.info/').  Plots are
available in screen display, PostScript, and png formats (see more
information in the options section below).

Command-line Options
====================

Usage:
     	fbol [options]

   where valid options include:

     	--blackwellCorrections --constrainTemp --eps --fixedErrors= --hardCopy
     	--plots --png --reddening --verbose

     	--copyright --debug --filename= --help --longHelp --version --stdin

   * `--blackwellCorrections': compute estimated corrections for
     non-black-body effects in stellar atmospheres.  This correction is
     estimated on the basis of B-V color, and derived from the dataset
     of Blackwell and Lynas-Gray 1994 (more to come).

   * `--constrainTemp': constrains the model effective temperature in
     the fit to the data.  Effective temperature is constrained to the
     input value contained in the photometry data (i.e. by input lines)
     like:
          > T HD_217014--G2.5IVa  5808 # Model Effective Temp <= Spectral Type G2.5IVa)

     No argument when used.

   * `--eps': Encapsulated PostScript SED model plots.  No argument
     when used.

   * `--fixedErrors=': apply a uniform fractional error to all input
     photometry (rather than using the input error estimates associated
     with each of the individual measurements).  If used this switch
     takes an _optional_ argument defining the fractional error to be
     used - the default value for this fractional error is 0.1 (i.e.
     10%).

   * `--hardCopy'/`--hc'/`--ps': PostScript SED model plots.  No
     argument when used.

   * `--plots'/`--screen': SED model plots using gnuplot and display
     them at the terminal.

   * `--png': Produce SED model plots in the PNG (portable network
     graphics) format.

   * `--reddening' (`--noReddening'): apply (or not) reddening
     correction to the input photometry based on input distance
     (parallax) and a simple wavelength-parametric reddening model from
     Allen (3rd ed, p 264).  No argument when used.

   * `--verbose': verbose description of the output from the program.
     No argument when used.


   Generic options:

   * `--copyright': print out getCal copyright information and exit.

   * `--debug': Turns on debugging output, sent to stderr. When used
     multiple times, this option increases the verbosity of debug
     output.

   * `--help': print out short help message. Overrides all other
     arguments.

   * `--longHelp': print out a long help message.  `--longHelp'
     overrides all other arguments except `--help'.

   * `--version': print out module version information and exit.

   * `--stdin': force reading of input items from stdin.  No argument
     when used.

   * `--filename=': Read input from the specified file(s).  Multiple
     instances of this option are allowed.


Input Format
============

The photometry file format a is simple ASCII-based format:
     ### HD 19373 -- High proper-motion Star
     ### ICRS 2000: 03 09 04.0197 +49 36 47.799
     ### Spectral Type G0V
     T HD_19373--G0V  5930 # Model Effective Temp <= Spectral Type G0V
     ### V=4.05
     M HD_19373--G0V Johnson V 4.05 0.09  # Simbad V=4.05
     ### B-V=0.59
     C HD_19373--G0V B-V=0.59 ## Simbad B-V color index
     D HD_19373--G0V 10.534 0.074 ## Parallax 94.93 [.67] A [21]1997A&A...323L..49P
     M HD_19373--G0V Johnson V 4.04 0.05  # UBV Johnson V=4.04  1953ApJ...117..313J
     M HD_19373--G0V Johnson B 4.64 0.05  # UBV Johnson B=4.64  1953ApJ...117..313J
     M HD_19373--G0V Johnson U 4.74 0.05  # UBV Johnson U=4.74  1953ApJ...117..313J
     ## The format supports comments
     ## The format also support flux in Flambda or Fnu units
     Fl HD_19373--G0V 360 68  5.22e-07 2.3e-08  ## M HD_19373--G0V Johnson U 4.77 0.05  # UBV Johnson U=4.77  1966CoLPL...4...99J
     Fl HD_19373--G0V 555 89  8.83e-07 4e-08  ## M HD_19373--G0V Johnson V 4.07 0.05  # UBV Johnson V=4.07  1967AJ.....72.1334C
     Fl HD_19373--G0V 450 98  8.75e-07 3.9e-08  ## M HD_19373--G0V Johnson B 4.66 0.05  # UBV Johnson B=4.66  1967AJ.....72.1334C
     Fl HD_19373--G0V 360 68  5.07e-07 2.3e-08  ## M HD_19373--G0V Johnson U 4.8 0.05  # UBV Johnson U=4.8  1967AJ.....72.1334C
     Fl HD_19373--G0V 555 89  9e-07 4e-08  ## M HD_19373--G0V Johnson V 4.05 0.05  # UBV Johnson V=4.05  1952ApJ...116..251S
     Fl HD_19373--G0V 450 98  8.85e-07 4e-08  ## M HD_19373--G0V Johnson B 4.648 0.05  # UBV Johnson B=4.648  1952ApJ...116..251S
     ## Format supports different photometric systems (e.g. Johnson, Cousins,
     ##  Stromgren, Geneva, and 2Mass)
     M HD_19373--G0V Stromgren u 5.959 0.08  # Stromgren ubvy u=5.959  1998A&AS..129..431H
     M HD_19373--G0V Stromgren v 5.004 0.08  # Stromgren ubvy v=5.004  1998A&AS..129..431H
     M HD_19373--G0V Stromgren b 4.427 0.08  # Stromgren ubvy b=4.427  1998A&AS..129..431H
     M HD_19373--G0V Stromgren y 4.05 0.08  # Stromgren ubvy y=4.05  1998A&AS..129..431H
     #M HD_19373--G0V Stromgren u 5.956 0.08  # Stromgren ubvy u=5.956  1966AJ.....71..709C
     #M HD_19373--G0V Stromgren v 5.003 0.08  # Stromgren ubvy v=5.003  1966AJ.....71..709C
     #T HD_19373--G0V   5528 # model Effective Temp <= Stromgren photometry
     M HD_19373--G0V Johnson J 3.06 0.05  # JP11 Johnson J=3.06  1968ApJ...152..465J
     M HD_19373--G0V Johnson K 2.69 0.05  # JP11 Johnson K=2.69  1968ApJ...152..465J
     M HD_19373--G0V Johnson L 2.66 0.05  # JP11 Johnson L=2.66  1968ApJ...152..465J
     M HD_19373--G0V Johnson H 2.73 0.05  # JP11 Johnson H=2.73  1968ApJ...152..465J
     # 2Mass Search HD_19373:  K = 2.723 +/- 0.266  J = 3.143 +/- 0.246  H = 2.875 +/- 0.206
     M HD_19373--G0V 2Mass Ks 2.723 0.266  # 2Mass Ks=2.723 +/- 0.266
     M HD_19373--G0V 2Mass J 3.143 0.246  # 2Mass J=3.143 +/- 0.246
     M HD_19373--G0V 2Mass H 2.875 0.206  # 2Mass H=2.875 +/- 0.206

   Available formats in this scheme are:

     M starID System Band Magnitude Error          <### Generic photometry format
     M StarID Lambda Bandpass Magnitude Error      <### (magnitudes in Johnson system assumed)
     F StarID Lambda Bandpass Flux Error           <### (Fluxes in Jy)
     Fn StarID Lambda Bandpass Flux Error          <### (Fluxes in Jy)
     Fl StarID Lambda Bandpass Flux Error          <### (Fluxes in erg s^-1 cm^-2 um^-1)
     C StarID B-V=color                            <### Star B-V color
     S StarID Filter Magnitude Error (Not yet implemented)
     Z Filter Lambda Bandpass Zeropoint (For specifying a new filter)
     D StarID Distance
     P StarID Parallax
     N Datafilename BlackbodyFilename (For specifying output filenames)

   General notes on this format:
   *  wavelengths and bandpass are specified in nm

   *  fluxes are specified either in Jy (`F', `Fn' -  F_nu  units) or
     erg s^-1 cm^-2 um^-1 (`Fl' -  F_lambda  units)

   *  zeropoints for magnitudes should be in Flambda units (erg s^-1
     cm^-2 um^-1)

   *  distance is specified in pc

   *  parallax is specified in mas


   For magnitude data in an unspecified system (Johnson assumed), the
supported Johnson-system bands (wavelengths, pass-bands, and
zeropoints) (in nm and erg s^-1 cm^-2 um^-1) are:

Filter  Lambda_0Delta_lambdaZero (F_lambda)               Zero (F_nu)
        (nm)    (nm)    (erg s^-1 cm^-2 um^-1)        (Jy)
U       360     68      4.27e-5                       1829
B       445     98      6.61e-5                       4144
V       555     89      3.64e-5                       3544
R       668     210     1.74e-5                       2950
I       879     240     9.12e-6                       2280
J       1215    260     3.18e-6                       1630
H       1654    290     1.15e-6                       1050
K       2179    410     4.14e-7                       655
L       3500    700     6.59e-8                       276
M       4769    450     2.11e-8                       160
N       10472   5190    9.63e-10                      35.2
Q       20130   7800    7.18e-11                      9.70

   getCal uses the companion (perl) program *Note fbolFormat:: to
automatically create this photometry file format from Simbad (and
other) database material.  getCal now exposes this format to the user
so they can see details of the bolometric flux calculations, and save
(and modify) this data in future calculations.  Note that starting in
the v2.6 series, by default getCal produces all photometry records in
the generic system/band specification.  Further, fbol uses the
companion script *Note convertPhotometry:: to render disparate
photometry data into consistent flux (Flambda or Fnu) units.

Theory
======

_Estimating Stellar Angular Diameters With SED Modeling_

   As argued elsewhere, we are motivated to estimate star angular
diameters.  For instance, our own sun viewed from a typical solar
neighborhood distance of 10 pc is less than 1 milliarcsecond (10^(-3)
arcseconds, mas) in apparent diameter.  Therefore, as an adjunct to
both selecting and using calibration stars, it is a practical necessity
to estimate stellar angular diameters from ancillary data.  While
several techniques exist for such estimates, the most broadly
applicable and prevalent techniques are based on modeling the stellar
photosphere as a blackbody, in which case the apparent diameter of the
star reduces to a simple function the observed bolometric flux and the
effective temperature (e.g.~see Blackwell94 and references therein).
This section documents the algorithm `fbol' uses for angular diameter
estimation.

   First consider a unit area Plank blackbody at temperature T.  The
_emittance_ (radiation emitted per unit surface - dimensions of energy
per unit time) is:

   where the last two expressions capture the spectral energy
distribution of the blackbody radiation.  Radiation from the unit
surface is isotropic, so the _specific intensity_ (radiation flux
density per unit solid angle - dimensions of energy per unit time per
unit solid angle) is a simple function of the projected area, so in a
direction \bf \hat o this flux density is:

   where \bf \hat n is the unit normal to the surface, and $\theta$ is
the angle between \bf \hat n and \bf \hat o.  Thus at a location D \,
\bf \hat o from the unit emitter, the radiation flux per unit
cross-sectional area (dimensions of energy per unit time per unit area)
is:

   Now consider the photosphere of a star as an isotropic sphere of
radius R, the surface of which is taken to be a Plank blackbody
radiator at uniform temperature T.  For the observer at distance D the
total radiation flux per unit cross-sectional area (the _bolometric
flux_) can be computed as the integral of the contributions f_a \, dA
over the hemisphere of the star visible to the observer:

   Choosing the observer direction \bf \hat o as the reference axis in
a spherical polar coordinate system allows us to identify the star
surface area element dA as R^2 \sin \theta \, d \theta \, d \phi,
making the evaluation of the integral straightforward:

   with the identification of the star's angular diameter \Theta = 2 R /
D, and introducing the stellar flux per unit wavelength F_\lambda.
Solving Eq.~\ref(eq:Fbol) for \Theta yields the desired angular
diameter estimator:

   \approx 8.17 mas \times 10^(-0.2 * (V + BC)) \left[T / 5800 K
\right]^(-2)

   with V and BC as the star's (Johnson) visual magnitude and
bolometric correction respectively.  A couple of aspects of
Eq.~eq:angDiameter are noteworthy.  First, it is significant that no
particular knowledge of the physical size of the star is necessary -
the bolometric flux characterizes the solid angle of the star on the
sky, and the blackbody temperature characterizes the emittance of the
stellar surface.  This emphasizes the intuitive notion that two stars
of the same temperature but different physical radii R_1 and R_2
(e.g.~an M-dwarf and an M supergiant) will have the same apparent size
and bolometric flux so long as R_1 / D_1 = R_2 / D_2.  Secondly, in
deriving Eq.eq:angDiameter it was sufficient that the photospheric
emittance was taken as isotropic and characterizable by a ancillary
parameter (temperature); no particular use is made of the blackbody SED
model.

   The operational issue in applying Eq.angDiameter to potential
calibrators is determining the bolometric flux and effective
temperature for the star.  The most prevalent methods for this
estimation is by modeling the observed spectral energy distribution
(SED) of the star.  This is illustrated in Fig.~fig:SEDmodel1 which
depicts the modeling of the SED for 51 Pegasi (HD~217014) with a Plank
blackbody form (specifically Eq.eq:Flambda) with free parameters \Theta
and T_eff.  In both cases the flux data for the stars is derived from
archival optical and infrared photometry.  In the first example
(Fig.~fig:SEDmodel1) the 51~Peg SED is well-modeled by Eq.eq:Flambda
with T \approx 5600 K and \Theta \approx 0.74 mas (despite the putative
planetary-mass companion to 51 Peg; the implied temperature and
physical size (R \sim 1.3 R_\odot from this diameter estimate and
Hipparcos parallax) are in good agreement with the putative
evolutionary state of the star.