``Low-state'' Black Hole Accretion in Nearby Galaxies\footnote{ To appear in {From X-ray Binaries to Quasars: Black Hole Accretion on All Mass Scales}, ed. T. J. Maccarone, R. P. Fender, and L. C. Ho (Dordrecht: Kluwer)}
Luis C. \surname{Ho}
I summarize the main observational properties of low-luminosity AGNs in nearby galaxies to argue that they are the high-mass analogs of black hole X-ray binaries in the ``low/hard'' state. The principal characteristics of low-state AGNs can be accommodated with a scenario in which the central engine is comprised of three components: an optically thick, geometrically accretion disk with a truncated inner radius, a radiatively inefficient flow, and a compact jet.
preprint.tex
\documentclass{kluwer}    % Specifies the document style.

\input psfig.tex

\begin{document}                                                                                   
%Luis's definitions
\def\aa{{A\&A}}
\def\aas{{ A\&AS}}
\def\aj{{AJ}}
\def\al{$\alpha$}
\def\bet{$\beta$}
\def\amin{$^\prime$}
\def\annrev{{ARA\&A}}
\def\apj{{ApJ}}
\def\apjs{{ApJS}}
\def\asec{$^{\prime\prime}$}
\def\baas{{BAAS}}
\def\cc{cm$^{-3}$}
\def\deg{$^{\circ}$}
\def\ddeg{{\rlap.}$^{\circ}$}
\def\dsec{{\rlap.}$^{\prime\prime}$}
\def\cc{cm$^{-3}$}
\def\e#1{$\times$10$^{#1}$}
\def\etal{{et al. }}
\def\flamb{erg s$^{-1}$ cm$^{-2}$ \AA$^{-1}$}
\def\flux{erg s$^{-1}$ cm$^{-2}$}
\def\fnu{erg s$^{-1}$ cm$^{-2}$ Hz$^{-1}$}
\def\hal{H$\alpha$}
\def\hst{{\it HST}}
\def\kms{km s$^{-1}$}
\def\lamb{$\lambda$}
\def\lax{{$\mathrel{\hbox{\rlap{\hbox{\lower4pt\hbox{$\sim$}}}\hbox{$<$}}}$}}
\def\gax{{$\mathrel{\hbox{\rlap{\hbox{\lower4pt\hbox{$\sim$}}}\hbox{$>$}}}$}}
\def\simlt{\lower.5ex\hbox{$\; \buildrel < \over \sim \;$}}
\def\simgt{\lower.5ex\hbox{$\; \buildrel > \over \sim \;$}}
\def\lum{erg s$^{-1}$}
\def\mbh{{$M_{\rm BH}$}}
\def\micron{{$\mu$m}}
\def\mnras{{MNRAS}}
\def\nat{{Nature}}
\def\pasp{{PASP}}
\def\perang{\AA$^{-1}$}
\def\percm2{cm$^{-2}$}
\def\pp{\parshape 2 0truein 6.1truein .3truein 5.5truein}
%\def\reference{\noindent\pp}
\def\refindent{\par\noindent\parskip=2pt\hangindent=3pc\hangafter=1 }
\def\solum{$L_\odot$}
\def\solmass{$M_\odot$}
\def\ion#1#2{\setcounter{ctr}{#2}#1$\;${\small\rm\Roman{ctr}}\relax}
\def\oii{[\ion{O}{2}]}
\def\heii{\ion{He}{2}}
\def\hi{\ion{H}{1}}
\def\hii{\ion{H}{2}}
\def\oiii{[\ion{O}{3}]}
\def\ni{[\ion{N}{1}]}
\def\oi{[\ion{O}{1}]}
\def\nii{[\ion{N}{2}]}
\def\hei{\ion{He}{1}}
\def\sii{[\ion{S}{2}]}
\def\siii{[\ion{S}{3}]}

%\newdisplay{guess}{Conjecture}

\begin{article}         
\begin{opening}         
\title{``Low-state'' Black Hole Accretion in Nearby Galaxies\footnote{
To appear in {\it From X-ray Binaries to Quasars: Black Hole Accretion on
All Mass Scales}, ed. T. J. Maccarone, R. P. Fender, and L. C. Ho
(Dordrecht: Kluwer)}}
\author{Luis C. \surname{Ho}}  
\runningauthor{Luis C. Ho}
\runningtitle{``Low-state'' Black Hole Accretion}
\institute{The Observatories of the Carnegie Institution of Washington, 
813 Santa Barbara Street, Pasadena, CA 91101, U.S.A.}

\begin{abstract}
I summarize the main observational properties of low-luminosity AGNs in nearby 
galaxies to argue that they are the high-mass analogs of black hole X-ray 
binaries in the ``low/hard'' state.  The principal characteristics of 
low-state AGNs can be accommodated with a scenario in which the central engine 
is comprised of three components: an optically thick, geometrically 
accretion disk with a truncated inner radius, a radiatively inefficient 
flow, and a compact jet.
\end{abstract}

\end{opening}           

\section{AGNs and Black Hole X-ray Binaries}

Stellar-mass black holes in X-ray binaries, in 
response to changes in the mass accretion rate, exhibit 
distinct spectral ``states'' (McClintock \& Remillard 2005).  Since many 
aspects of accretion flows are invariant with respect to changes in black 
hole mass, it is of interest to ask whether there are extragalactic analogs to 
X-ray binary states in massive black holes in the centers of galaxies.  Nuclear 
black holes outweigh stellar black holes by factors of $10^5-10^8$, and so 
their evolutionary timescales increase in the same proportion.  To search for 
spectral states in massive black holes, one must consider the demographics of 
accreting nuclear black holes---AGNs---spanning a wide range of luminosity. 

In recent years, much attention has been devoted to the study of 
``narrow-line'' Seyfert 1 galaxies, which are widely believed to be 
the AGN counterparts of X-ray binaries in the ``high/soft'' state 
(e.g., Pounds, Done, \& Osborne 1995).  Indeed, this class of AGNs may be even 
accreting at super-Eddington rates (Collin \& Kawaguchi 2004). 

This contribution focuses on AGNs in the opposite extreme, namely those 
accreting at highly sub-Eddington rates, which I will argue are close analogs
to X-ray binaries in the ``low/hard'' or ``quiescent'' states, and which 
dominate the population of AGNs at $z = 0$.

\section{Observational Properties of Low-luminosity AGNs}

Although the physical nature of low-luminosity AGNs (LLAGNs) is still not
fully understood, the bulk of the current evidence suggests that a significant 
fraction of them are genuinely accretion-powered sources (for a recent review, 
see Ho 2004).  Here I highlight the most important observational properties of 
these objects, which, when taken collectively, point to some novel insights 
on the structure of their central engines.

\begin{itemize}

\item{
{\it Demography.}\ LLAGNs are very common.  According to the Palomar
survey (Ho, Filippenko, \& Sargent 1997a), over 40\% of nearby galaxies, and an
even greater fraction (50\%--75\%) of bulge-dominated (E--Sbc) systems, contain 
LLAGNs.
}

\item{
{\it Low ionization.}\ The dominant population (2/3) of LLAGNs have
low-ionization state spectra (Ho et al. 1997a).  They are classified as either 
LINERs (low-ionization nuclear emission-line regions) or transition objects, 
which are hypothesized to be related to LINERs (Ho, Filippenko, \& Sargent 
1993; but see complications discussed in Ho, Filippenko, \& Sargent 2003 and 
Ho 2004).
}

\item{
{\it Low accretion power.}\  LLAGNs are intrinsically faint, in most 
cases orders of magnitude less powerful than classical Seyferts and quasars.
The optical luminosity function of LLAGNs extends to absolute magnitudes 
as low as $M_B \approx -6$ (Ho 2004).  Figure~1{\it a}, from Ho (2005), shows 
the distributions of bolometric luminosities for $\sim$250 objects from the 
Palomar survey.  Note that nearly all the objects have $L_{\rm bol} < 10^{44}$ 
\lum, and most significantly less. Seyferts are on average 10 times more 
luminous than LINERs or transition objects.
}

\item{
{\it Sub-Eddington.}\  LLAGNs are highly sub-Eddington systems, as shown
in Figure~1{\it b}.  Essentially all objects in the Palomar sample 
have $L_{\rm bol}/L_{\rm Edd} < 1$, with the majority falling in the 
region $L_{\rm bol}/L_{\rm Edd} \approx 10^{-5}-10^{-3}$.
Seyferts have systematically higher Eddington ratios than LINERs or
transition objects, typically by 1 to 2 orders of magnitude.
}

\item{
{\it Radiatively inefficient.}\  Direct measurements of accretion rates are
not available, but rough estimates can be made of the likely minimum rates 
supplied {\it in situ}.  Quite apart from any additional fuel furnished
by the large-scale disk of the host galaxy or from external sources 
triggered by tidal interactions, both of which are inconsequential for 
nearby galaxies (Ho et al. 1997b, 2003), galactic centers contain two 
reservoirs of fuel that seems inescapable.   The first is mass loss from 
evolved stars, which is readily available from the dense stellar cusps 
invariably observed in the centers of bulges (e.g., Lauer et al. 1995; 
Ravindranath et al. 2001).  Ho (2005) estimates 
$\dot M_*$ \gax\ $10^{-5} - 10^{-3}$ \solmass\ yr$^{-1}$.  The other source 
of fuel is Bondi accretion of hot gas, which is ubiquitous not only in 
giant elliptical galaxies, but apparently also in the bulges of disk galaxies 
(e.g., Shirey et al. 2001; Baganoff et al. 2003).  The expected contribution 
from Bondi accretion turns out to be roughly comparable to $\dot M_*$ (Ho 
2005).  If this gas were to be all accreted and radiates with a standard
efficiency of $\eta = 10$\%, the nuclei should be $1-4$ orders of magnitude
more luminous than observed.  Three possible explanations come to mind: (1) 
angular momentum transfer is very inefficient, even at these small scales, so 
that only a tiny fraction of the available fuel makes it to the center; 
(2) the accretion flow is radiatively inefficient, with $\eta$ much less than 
10\%; (3) most of the gas is blown out of the system by winds or outflows, 
which arise naturally in radiatively (e.g., Blandford \& Begelman 1999).  
(Note that the third option is not entirely independent from the second.) 
While it is difficult to rule out the first explanation, it seems plausible 
that these systems are radiatively inefficient.
}

%Figure 1
%%BoundingBox: 50 50 440 840
\begin{figure}
\vbox{
\hbox{
\hskip -0.3truein
\psfig{file=fig1.ps,height=2.5truein,angle=270}
}
}
\caption{
Distribution of ({\it a}) nuclear bolometric luminosities
and ({\it b}) Eddington ratios, $L_{\rm bol}/L_{\rm Edd}$.
S = Seyferts, L = LINERs, T = transition objects, and A = absorption-line
nuclei.  Open histograms denote upper limits.  From Ho (2005.)}
\end{figure}

\item{
{\it Unusual SEDs.}\   With few exceptions, the spectral energy
distributions (SEDs) of LLAGNs lack the optical--UV ``big blue bump,'' a
feature usually attributed to thermal emission from an optically thick,
geometrically thin accretion disk (Ho 1999, 2002a; Ho et al. 2000).  This is 
illustrated in Figure 2, which compares the average SED of LLAGNs with the 
canonical SEDs of radio-loud and radio-quiet quasars (Elvis et al. 1994).
Instead of a blue excess, there is a maximum peaking somewhere in the mid-IR.
(The exact location of the peak is poorly defined because of the current 
lack of high-resolution IR data.)  One consequence of the deficit of 
optical--UV omission is that the X-rays become disproportionately 
important energetically.  The standard $\alpha_{\rm ox}$ parameter is 
typically less than 1, whereas in luminous AGNs $\alpha_{\rm ox} \approx 1.4$.  
The X-ray spectra can be well described by a
simple power law, with $\Gamma \approx 1.7-1.9$, which generally requires 
only little or modest intrinsic absorption, with no evidence for a 
soft excess at low energies (e.g., Terashima et al. 2002; Terashima \& 
Wilson 2003; Ptak et al. 2004).
}

%Figure 2
\begin{figure}
\vbox{
\hbox{
\hskip 0truein
\psfig{file=fig2.ps,width=5.0truein,angle=270}
}
}
\caption{
The average SED of low-luminosity AGNs ({\it solid line}), adapted from
Ho (1999).  Overplotted for comparison are the average SEDs of powerful
radio-loud ({\it dotted line}) and radio-quiet ({\it dashed line}) AGNs (Elvis
\etal 1994).  The curves have been arbitrarily normalized to
the luminosity at 10 $\mu$m.}
\end{figure}

\item{
{\it Radio jets.}\   Another notable feature of the SEDs of LLAGNs is that they 
tend to be generically radio-loud.  This is true of most LINERs (Ho 1999, 2002b; 
Ho et al.  2000; Terashima \& Wilson 2003), and, contrary to persistent popular
misconception, is so even in most Seyfert nuclei (Ho \& Peng 2001).  Detailed 
modeling of the SEDs (e.g., Quataert et al. 1999; Ulvestad \& Ho 2001; 
Anderson, Ulvestad, \& Ho 2004) shows that neither the radio power nor the 
detailed radio spectrum agrees with predictions from accretion flow models. 
Instead, a separate, compact jet component is required.  This indicates that 
compact jets develop naturally in LLAGNs.
}

\item{
{\it No broad Fe K\al\ line.}\  The 6.4 keV Fe K\al\ line is detected in
some LLAGNs, but it is almost always narrow (Terashima et al. 2002).  In 
well-studied cases (e.g., Ptak et al. 2004), Fe K\al\ emission of any 
breadth can be ruled out to very high significance.  Insofar as the broad iron 
line is regarded as a signature of a standard optically thick disk, this 
suggests that such a disk is generically absent or truncated in LLAGNs.  
}

\item{
{\it Disklike H\al\ profiles.}\  Emission lines with broad,
double-peaked profiles, taken to be the kinematic signature of a
relativistically broadened disk, are found quite often in LLAGNs (Ho et al.
2000, and references therein; Shields et al. 2000; Barth et al.  2001; 
Eracleous \& Halpern 2001).  When fitted with a disk model, one infers that 
the disk has a relatively large inner radius ($\sim 10^3\, R_{\rm S}$).
}
\end{itemize}

\section{A Physical Picture of the Central Engine}

I propose that the above set of characteristics, common to most LLAGNs
studied in detail thus far, suggest that nearby galaxy bulges contain
central engines as schematically depicted in Figure~3.  Most galaxies
with bulges contain active nuclei because most, if not all, bulges contain
massive black holes.  This is consistent with the picture that has emerged from 
recent kinematical studies of nearby galaxies (e.g., Richstone 2004). In the
present-day Universe, and especially in the centers of big bulges, the amount
of gas available for accretion is quite small, plausibly well below the
Eddington rate for the associated black hole mass (Ho 2005).  In such a
regime, the low-density, tenuous material is optically thin and cannot cool 
efficiently.  Rather than settling into a classical optically thick, 
geometrically thin disk, the hot accretion flow assumes a quasi-spherical 
configuration, whose dynamics may be dominated by advection, convection, or 
outflows (see Quataert 2001 and Narayan, these proceedings.) 
For simplicity, I follow Quataert (2001) and simply call these
low-radiative efficiency accretion flows (LRAFs).  The existence of LRAFs
in these systems, or conversely the absence of classical thin disks extending
all the way to small radii (few $R_{\rm S}$), is suggested by their (1) low
luminosities, (2) low Eddington ratios, (3) low inferred radiative
efficiencies, (4) lack of a big blue bump, and (5) lack of relativistically
broadened Fe K\al\ lines.

%Figure 3
%%BoundingBox: 1 150 700 60
\begin{figure}
\vbox{
\hbox{
\hskip 0.0truein
\psfig{file=fig3.ps,width=5.0truein,angle=0}
}
}
\caption{
A cartoon depicting the structure of the accretion flow
surrounding weakly active massive black holes.  An inner low-radiative
efficiency accretion flow (LRAF) irradiates an outer, truncated thin disk.
An additional compact jet component is needed.}
\end{figure}


Apart from a central LRAF, two additional components generally seem to be
required.  First, detailed considerations of the broad-band SED show that the
baseline LRAF spectrum underpredicts the observed radio power (e.g., Quataert
et al. 1999; Ulvestad \& Ho 2001).  Most of the radio luminosity, which is
substantial because these objects tend to be ``radio-loud,''  must come
from another component, and the most likely candidate is a compact jet.   Does
the puffed-up structure of an LRAF, or its propensity for outflows, somehow
facilitate the generation of relativistic jets?  Second, an  outer
thin disk, truncated at perhaps $\sim 100-1000\, R_{\rm S}$,  seems necessary to
explain (1) the existence of the IR excess in the SED (e.g., Quataert
et al. 1999) and (2) the prevalence of double-peaked broad emission lines
(Chen, Halpern, \& Filippenko 1989; Ho et al. 2000).  A large truncation radius
is also qualitatively consistent with the weakness or absence of broad Fe K\al\ 
emission.

Lastly, we note that low-ionization spectra may emerge quite naturally in the
scenario suggested above.  In the context of AGN photoionization models, it is
well known that LINER-like spectra can be produced largely by lowering the
``ionization parameter'' $U$, typically by a factor of $\sim 10$ below that in
Seyferts (e.g., Halpern \& Steiner 1983; Ferland \& Netzer 1983).  The
characteristically low luminosities of LINERs (Fig.~1{\it a}), coupled
with their low densities (Ho et al. 2003), naturally lead
to low values of $U$.  Two other effects, however, are also important in
boosting the low-ionization lines.  All else being equal, hardening the
ionizing spectrum (by removing the big blue bump) in photoionization
calculations creates a deeper partially ionized zone from which low-ionization
transitions, especially [O~I] \lamb\lamb 6300, 6363, are created.
Because of the prominence of the radio spectrum, cosmic-ray heating of the
line-emitting gas by the radio-emitting plasma may be nonnegligible; one
consequence of this process is again to enhance the low-ionization lines
(Ferland \& Mushotzky 1984).  Both of these effects should be investigated
quantitatively.

\acknowledgements
L. C. H. acknowledges financial support from the Carnegie Institution of
Washington and from NASA grants.

\theendnotes

\begin{thebibliography}{}

\bibitem[\protect\citeauthoryear{}{}]{}
Anderson, J.~M., Ulvestad, J.~S., \& Ho, L.~C. 2004, \apj, 603, 42

\bibitem[\protect\citeauthoryear{}{}]{}
Baganoff, F.~K., et al. 2003, \apj, 591, 891

\bibitem[\protect\citeauthoryear{}{}]{}
Barth, A.~J., Ho, L.~C., Filippenko, A.~V., Rix, H.-W., \& Sargent, W.~L.~W.
2001, \apj, 546, 205

\bibitem[\protect\citeauthoryear{}{}]{}
Blandford, R.~D., \& Begelman, M.~C. 1999, \mnras, 303, L1

\bibitem[\protect\citeauthoryear{}{}]{}
Chen, K., Halpern, J.~P., \& Filippenko, A.~V. 1989, \apj, 339, 742

\bibitem[\protect\citeauthoryear{}{}]{}
Collin, S., \& Kawaguchi, T. 2004, \aa, 426, 797

\bibitem[\protect\citeauthoryear{}{}]{}
Elvis, M., et al.  1994, \apjs, 95, 1

\bibitem[\protect\citeauthoryear{}{}]{}
Eracleous, M., \& Halpern, J.~P. 2001, \apj, 554, 240

\bibitem[\protect\citeauthoryear{}{}]{}
Ferland, G. J., \& Mushotzky, R.~F. 1984, \apj, 286, 42

\bibitem[\protect\citeauthoryear{}{}]{}
Ferland, G. J., \& Netzer, H. 1983, \apj, 264, 105

\bibitem[\protect\citeauthoryear{}{}]{}
Halpern, J.~P., \& Steiner, J.~E. 1983, \apj, 269, L37

\bibitem[\protect\citeauthoryear{}{}]{}
Ho, L.~C. 1999, \apj, 516, 672

\bibitem[\protect\citeauthoryear{}{}]{}
------. 2002a, in Issues in Unification of AGNs, ed. R. Maiolino, A. Marconi,
\& N. Nagar (San Francisco: ASP), 165

\bibitem[\protect\citeauthoryear{}{}]{}
------. 2002b, \apj, 564, 120

\bibitem[\protect\citeauthoryear{}{}]{}
-----. 2004, in Carnegie Observatories Astrophysics Series, Vol. 1:
Coevolution of Black Holes and Galaxies, ed. L. C. Ho (Cambridge: Cambridge
Univ. Press), 293

\bibitem[\protect\citeauthoryear{}{}]{}
------. 2005, in preparation

\bibitem[\protect\citeauthoryear{}{}]{}
Ho, L.~C., Filippenko, A.~V., \& Sargent, W.~L.~W. 1993, \apj, 417, 63

\bibitem[\protect\citeauthoryear{}{}]{}
------.  1997a, \apj, 487, 568

\bibitem[\protect\citeauthoryear{}{}]{}
------.  1997b, \apj, 487, 591

\bibitem[\protect\citeauthoryear{}{}]{}
------.  2003, \apj, 583, 159

\bibitem[\protect\citeauthoryear{}{}]{}
Ho, L.~C., \& Peng, C.~Y. 2001, \apj, 555, 650

\bibitem[\protect\citeauthoryear{}{}]{}
Ho, L.~C., Rudnick, G., Rix, H.-W., Shields, J.~C., McIntosh, D.~H.,
Filippenko, A.~V., Sargent, W.~L.~W., \& Eracleous, M. 2000, \apj, 541, 120

\bibitem[\protect\citeauthoryear{}{}]{}
Lauer, T.~R., et al.  1995, \aj, 110, 2622

\bibitem[\protect\citeauthoryear{}{}]{}
McClintock, J.~E., \& Remillard, R.~A. 2005, in Compact Stellar X-ray Sources,
ed. W. H. G. Lewin \& M. van der Klis (Cambridge: Cambridge Univ. Press), in
press (astro-ph/0306213)

\bibitem[\protect\citeauthoryear{}{}]{}
Pounds, K.~A., Done, C., \& Osborne, J.~P. 1995, \mnras, 277, L5

\bibitem[\protect\citeauthoryear{}{}]{}
Ptak, A., Terashima, Y., Ho, L.~C., \& Quataert, E. 2004, \apj, 606, 173

\bibitem[\protect\citeauthoryear{}{}]{}
Quataert, E. 2001, in Probing the Physics of Active Galactic
Nuclei by Multiwavelength Monitoring, ed. B.~M. Peterson, R.~S. Polidan, \&
R.~W. Pogge (San Francisco: ASP), 71

\bibitem[\protect\citeauthoryear{}{}]{}
Quataert, E., Di Matteo, T., Narayan, R., \& Ho, L.~C. 1999, \apj, 525, L89

\bibitem[\protect\citeauthoryear{}{}]{}
Ravindranath, S., Ho, L.~C., Peng, C.~Y., Filippenko, A.~V., \&
 Sargent, W.~L.~W. 2001, \aj, 122, 653

\bibitem[\protect\citeauthoryear{}{}]{}
Richstone, D. 2004, in Carnegie Observatories Astrophysics Series, Vol. 1:
Coevolution of Black Holes and Galaxies, ed. L. C. Ho (Cambridge: Cambridge
Univ. Press), 281

\bibitem[\protect\citeauthoryear{}{}]{}
Shields, J.~C., Rix, H.-W., McIntosh, D.~H., Ho, L.~C., Rudnick, G.,
 Filippenko, A.~V., Sargent, W.~L.~W., \& Sarzi, M. 2000, \apj, 534, L27

\bibitem[\protect\citeauthoryear{}{}]{}
Shirey, R., et al. 2001, \aa, 365, L195

\bibitem[\protect\citeauthoryear{}{}]{}
Terashima, Y., Iyomoto, N., Ho, L.~C., \& Ptak, A.~F. 2002, \apjs, 139, 1

\bibitem[\protect\citeauthoryear{}{}]{}
Terashima, Y., \& Wilson, A.~S. 2003, \apj, in press

\bibitem[\protect\citeauthoryear{}{}]{}
Ulvestad, J.~S., \& Ho, L.~C. 2001, \apj, 562, L133

\end{thebibliography}
\end{article}
\end{document}

psfig.tex
% Psfig/TeX Release 1.8
% dvips version
%
% All psfig/tex software, documentation, and related files
% in this distribution of psfig/tex are 
% Copyright 1987, 1988, 1991 Trevor J. Darrell
%
% Permission is granted for use and non-profit distribution of psfig/tex 
% providing that this notice is clearly maintained. The right to
% distribute any portion of psfig/tex for profit or as part of any commercial
% product is specifically reserved for the author(s) of that portion.
%
% *** Feel free to make local modifications of psfig as you wish,
% *** but DO NOT post any changed or modified versions of ``psfig''
% *** directly to the net. Send them to me and I'll try to incorporate
% *** them into future versions. If you want to take the psfig code 
% *** and make a new program (subject to the copyright above), distribute it, 
% *** (and maintain it) that's fine, just don't call it psfig.
%
% Bugs and improvements to trevor@media.mit.edu.
%
% Thanks to Greg Hager (GDH) and Ned Batchelder for their contributions
% to the original version of this project.
%
% Modified by J. Daniel Smith on 9 October 1990 to accept the
% %%BoundingBox: comment with or without a space after the colon.  Stole
% file reading code from Tom Rokicki's EPSF.TEX file (see below).
%
% More modifications by J. Daniel Smith on 29 March 1991 to allow the
% the included PostScript figure to be rotated.  The amount of
% rotation is specified by the "angle=" parameter of the \psfig command.
%
% Modified by Robert Russell on June 25, 1991 to allow users to specify
% .ps filenames which don't yet exist, provided they explicitly provide
% boundingbox information via the \psfig command. Note: This will only work
% if the "file=" parameter follows all four "bb???=" parameters in the
% command. This is due to the order in which psfig interprets these params.
%
%  3 Jul 1991	JDS	check if file already read in once
%  4 Sep 1991	JDS	fixed incorrect computation of rotated
%			bounding box
% 25 Sep 1991	GVR	expanded synopsis of \psfig
% 14 Oct 1991	JDS	\fbox code from LaTeX so \psdraft works with TeX
%			changed \typeout to \ps@typeout
% 17 Oct 1991	JDS	added \psscalefirst and \psrotatefirst
%

% From: gvr@cs.brown.edu (George V. Reilly)
%
% \psdraft	draws an outline box, but doesn't include the figure
%		in the DVI file.  Useful for previewing.
%
% \psfull	includes the figure in the DVI file (default).
%
% \psscalefirst width= or height= specifies the size of the figure
% 		before rotation.
% \psrotatefirst (default) width= or height= specifies the size of the
% 		 figure after rotation.  Asymetric figures will
% 		 appear to shrink.
%
% \psfigurepath#1	sets the path to search for the figure
%
% \psfig
% usage: \psfig{file=, figure=, height=, width=,
%			bbllx=, bblly=, bburx=, bbury=,
%			rheight=, rwidth=, clip=, angle=, silent=}
%
%	"file" is the filename.  If no path name is specified and the
%		file is not found in the current directory,
%		it will be looked for in directory \psfigurepath.
%	"figure" is a synonym for "file".
%	By default, the width and height of the figure are taken from
%		the BoundingBox of the figure.
%	If "width" is specified, the figure is scaled so that it has
%		the specified width.  Its height changes proportionately.
%	If "height" is specified, the figure is scaled so that it has
%		the specified height.  Its width changes proportionately.
%	If both "width" and "height" are specified, the figure is scaled
%		anamorphically.
%	"bbllx", "bblly", "bburx", and "bbury" control the PostScript
%		BoundingBox.  If these four values are specified
%               *before* the "file" option, the PSFIG will not try to
%               open the PostScript file.
%	"rheight" and "rwidth" are the reserved height and width
%		of the figure, i.e., how big TeX actually thinks
%		the figure is.  They default to "width" and "height".
%	The "clip" option ensures that no portion of the figure will
%		appear outside its BoundingBox.  "clip=" is a switch and
%		takes no value, but the `=' must be present.
%	The "angle" option specifies the angle of rotation (degrees, ccw).
%	The "silent" option makes \psfig work silently.
%

% check to see if macros already loaded in (maybe some other file says
% "\input psfig") ...
\ifx\undefined\psfig\else\endinput\fi

%
% from a suggestion by eijkhout@csrd.uiuc.edu to allow
% loading as a style file:
\edef\psfigRestoreAt{\catcode`@=\number\catcode`@\relax}
\catcode`\@=11\relax
\newwrite\@unused
\def\ps@typeout#1{{\let\protect\string\immediate\write\@unused{#1}}}
\ps@typeout{psfig/tex 1.8}

%% Here's how you define your figure path.  Should be set up with null
%% default and a user useable definition.

\def\figurepath{./}
\def\psfigurepath#1{\edef\figurepath{#1}}

%
% @psdo control structure -- similar to Latex @for.
% I redefined these with different names so that psfig can
% be used with TeX as well as LaTeX, and so that it will not 
% be vunerable to future changes in LaTeX's internal
% control structure,
%
\def\@nnil{\@nil}
\def\@empty{}
\def\@psdonoop#1\@@#2#3{}
\def\@psdo#1:=#2\do#3{\edef\@psdotmp{#2}\ifx\@psdotmp\@empty \else
    \expandafter\@psdoloop#2,\@nil,\@nil\@@#1{#3}\fi}
\def\@psdoloop#1,#2,#3\@@#4#5{\def#4{#1}\ifx #4\@nnil \else
       #5\def#4{#2}\ifx #4\@nnil \else#5\@ipsdoloop #3\@@#4{#5}\fi\fi}
\def\@ipsdoloop#1,#2\@@#3#4{\def#3{#1}\ifx #3\@nnil 
       \let\@nextwhile=\@psdonoop \else
      #4\relax\let\@nextwhile=\@ipsdoloop\fi\@nextwhile#2\@@#3{#4}}
\def\@tpsdo#1:=#2\do#3{\xdef\@psdotmp{#2}\ifx\@psdotmp\@empty \else
    \@tpsdoloop#2\@nil\@nil\@@#1{#3}\fi}
\def\@tpsdoloop#1#2\@@#3#4{\def#3{#1}\ifx #3\@nnil 
       \let\@nextwhile=\@psdonoop \else
      #4\relax\let\@nextwhile=\@tpsdoloop\fi\@nextwhile#2\@@#3{#4}}
% 
% \fbox is defined in latex.tex; so if \fbox is undefined, assume that
% we are not in LaTeX.
% Perhaps this could be done better???
\ifx\undefined\fbox
% \fbox code from modified slightly from LaTeX
\newdimen\fboxrule
\newdimen\fboxsep
\newdimen\ps@tempdima
\newbox\ps@tempboxa
\fboxsep = 3pt
\fboxrule = .4pt
\long\def\fbox#1{\leavevmode\setbox\ps@tempboxa\hbox{#1}\ps@tempdima\fboxrule
    \advance\ps@tempdima \fboxsep \advance\ps@tempdima \dp\ps@tempboxa
   \hbox{\lower \ps@tempdima\hbox
  {\vbox{\hrule height \fboxrule
          \hbox{\vrule width \fboxrule \hskip\fboxsep
          \vbox{\vskip\fboxsep \box\ps@tempboxa\vskip\fboxsep}\hskip 
                 \fboxsep\vrule width \fboxrule}
                 \hrule height \fboxrule}}}}
\fi
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% file reading stuff from epsf.tex
%   EPSF.TEX macro file:
%   Written by Tomas Rokicki of Radical Eye Software, 29 Mar 1989.
%   Revised by Don Knuth, 3 Jan 1990.
%   Revised by Tomas Rokicki to accept bounding boxes with no
%      space after the colon, 18 Jul 1990.
%   Portions modified/removed for use in PSFIG package by
%      J. Daniel Smith, 9 October 1990.
%
\newread\ps@stream
\newif\ifnot@eof       % continue looking for the bounding box?
\newif\if@noisy        % report what you're making?
\newif\if@atend        % %%BoundingBox: has (at end) specification
\newif\if@psfile       % does this look like a PostScript file?
%
% PostScript files should start with `%!'
%
{\catcode`\%=12\global\gdef\epsf@start{%!}}
\def\epsf@PS{PS}
%
\def\epsf@getbb#1{%
%
%   The first thing we need to do is to open the
%   PostScript file, if possible.
%
\openin\ps@stream=#1
\ifeof\ps@stream\ps@typeout{Error, File #1 not found}\else
%
%   Okay, we got it. Now we'll scan lines until we find one that doesn't
%   start with %. We're looking for the bounding box comment.
%
   {\not@eoftrue \chardef\other=12
    \def\do##1{\catcode`##1=\other}\dospecials \catcode`\ =10
    \loop
       \if@psfile
	  \read\ps@stream to \epsf@fileline
       \else{
	  \obeyspaces
          \read\ps@stream to \epsf@tmp\global\let\epsf@fileline\epsf@tmp}
       \fi
       \ifeof\ps@stream\not@eoffalse\else
%
%   Check the first line for `%!'.  Issue a warning message if its not
%   there, since the file might not be a PostScript file.
%
       \if@psfile\else
       \expandafter\epsf@test\epsf@fileline:. \\%
       \fi
%
%   We check to see if the first character is a % sign;
%   if so, we look further and stop only if the line begins with
%   `%%BoundingBox:' and the `(atend)' specification was not found.
%   That is, the only way to stop is when the end of file is reached,
%   or a `%%BoundingBox: llx lly urx ury' line is found.
%
          \expandafter\epsf@aux\epsf@fileline:. \\%
       \fi
   \ifnot@eof\repeat
   }\closein\ps@stream\fi}%
%
% This tests if the file we are reading looks like a PostScript file.
%
\long\def\epsf@test#1#2#3:#4\\{\def\epsf@testit{#1#2}
			\ifx\epsf@testit\epsf@start\else
\ps@typeout{Warning! File does not start with `\epsf@start'.  It may not be a PostScript file.}
			\fi
			\@psfiletrue} % don't test after 1st line
%
%   We still need to define the tricky \epsf@aux macro. This requires
%   a couple of magic constants for comparison purposes.
%
{\catcode`\%=12\global\let\epsf@percent=%\global\def\epsf@bblit{%BoundingBox}}
%
%
%   So we're ready to check for `%BoundingBox:' and to grab the
%   values if they are found.  We continue searching if `(at end)'
%   was found after the `%BoundingBox:'.
%
\long\def\epsf@aux#1#2:#3\\{\ifx#1\epsf@percent
   \def\epsf@testit{#2}\ifx\epsf@testit\epsf@bblit
	\@atendfalse
        \epsf@atend #3 . \\%
	\if@atend	
	   \if@verbose{
		\ps@typeout{psfig: found `(atend)'; continuing search}
	   }\fi
        \else
        \epsf@grab #3 . . . \\%
        \not@eoffalse
        \global\no@bbfalse
        \fi
   \fi\fi}%
%
%   Here we grab the values and stuff them in the appropriate definitions.
%
\def\epsf@grab #1 #2 #3 #4 #5\\{%
   \global\def\epsf@llx{#1}\ifx\epsf@llx\empty
      \epsf@grab #2 #3 #4 #5 .\\\else
   \global\def\epsf@lly{#2}%
   \global\def\epsf@urx{#3}\global\def\epsf@ury{#4}\fi}%
%
% Determine if the stuff following the %%BoundingBox is `(atend)'
% J. Daniel Smith.  Copied from \epsf@grab above.
%
\def\epsf@atendlit{(atend)} 
\def\epsf@atend #1 #2 #3\\{%
   \def\epsf@tmp{#1}\ifx\epsf@tmp\empty
      \epsf@atend #2 #3 .\\\else
   \ifx\epsf@tmp\epsf@atendlit\@atendtrue\fi\fi}


% End of file reading stuff from epsf.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% trigonometry stuff from "trig.tex"
\chardef\letter = 11
\chardef\other = 12

\newif \ifdebug %%% turn me on to see TeX hard at work ...
\newif\ifc@mpute %%% don't need to compute some values
\c@mputetrue % but assume that we do

\let\then = \relax
\def\r@dian{pt }
\let\r@dians = \r@dian
\let\dimensionless@nit = \r@dian
\let\dimensionless@nits = \dimensionless@nit
\def\internal@nit{sp }
\let\internal@nits = \internal@nit
\newif\ifstillc@nverging
\def \Mess@ge #1{\ifdebug \then \message {#1} \fi}

{ %%% Things that need abnormal catcodes %%%
	\catcode `\@ = \letter
	\gdef \nodimen {\expandafter \n@dimen \the \dimen}
	\gdef \term #1 #2 #3%
	       {\edef \t@ {\the #1}%%% freeze parameter 1 (count, by value)
		\edef \t@@ {\expandafter \n@dimen \the #2\r@dian}%
				   %%% freeze parameter 2 (dimen, by value)
		\t@rm {\t@} {\t@@} {#3}%
	       }
	\gdef \t@rm #1 #2 #3%
	       {{%
		\count 0 = 0
		\dimen 0 = 1 \dimensionless@nit
		\dimen 2 = #2\relax
		\Mess@ge {Calculating term #1 of \nodimen 2}%
		\loop
		\ifnum	\count 0 < #1
		\then	\advance \count 0 by 1
			\Mess@ge {Iteration \the \count 0 \space}%
			\Multiply \dimen 0 by {\dimen 2}%
			\Mess@ge {After multiplication, term = \nodimen 0}%
			\Divide \dimen 0 by {\count 0}%
			\Mess@ge {After division, term = \nodimen 0}%
		\repeat
		\Mess@ge {Final value for term #1 of 
				\nodimen 2 \space is \nodimen 0}%
		\xdef \Term {#3 = \nodimen 0 \r@dians}%
		\aftergroup \Term
	       }}
	\catcode `\p = \other
	\catcode `\t = \other
	\gdef \n@dimen #1pt{#1} %%% throw away the ``pt''
}

\def \Divide #1by #2{\divide #1 by #2} %%% just a synonym

\def \Multiply #1by #2%%% allows division of a dimen by a dimen
       {{%%% should really freeze parameter 2 (dimen, passed by value)
	\count 0 = #1\relax
	\count 2 = #2\relax
	\count 4 = 65536
	\Mess@ge {Before scaling, count 0 = \the \count 0 \space and
			count 2 = \the \count 2}%
	\ifnum	\count 0 > 32767 %%% do our best to avoid overflow
	\then	\divide \count 0 by 4
		\divide \count 4 by 4
	\else	\ifnum	\count 0 < -32767
		\then	\divide \count 0 by 4
			\divide \count 4 by 4
		\else
		\fi
	\fi
	\ifnum	\count 2 > 32767 %%% while retaining reasonable accuracy
	\then	\divide \count 2 by 4
		\divide \count 4 by 4
	\else	\ifnum	\count 2 < -32767
		\then	\divide \count 2 by 4
			\divide \count 4 by 4
		\else
		\fi
	\fi
	\multiply \count 0 by \count 2
	\divide \count 0 by \count 4
	\xdef \product {#1 = \the \count 0 \internal@nits}%
	\aftergroup \product
       }}

\def\r@duce{\ifdim\dimen0 > 90\r@dian \then   % sin(x+90) = sin(180-x)
		\multiply\dimen0 by -1
		\advance\dimen0 by 180\r@dian
		\r@duce
	    \else \ifdim\dimen0 < -90\r@dian \then  % sin(-x) = sin(360+x)
		\advance\dimen0 by 360\r@dian
		\r@duce
		\fi
	    \fi}

\def\Sine#1%
       {{%
	\dimen 0 = #1 \r@dian
	\r@duce
	\ifdim\dimen0 = -90\r@dian \then
	   \dimen4 = -1\r@dian
	   \c@mputefalse
	\fi
	\ifdim\dimen0 = 90\r@dian \then
	   \dimen4 = 1\r@dian
	   \c@mputefalse
	\fi
	\ifdim\dimen0 = 0\r@dian \then
	   \dimen4 = 0\r@dian
	   \c@mputefalse
	\fi
%
	\ifc@mpute \then
        	% convert degrees to radians
		\divide\dimen0 by 180
		\dimen0=3.141592654\dimen0
%
		\dimen 2 = 3.1415926535897963\r@dian %%% a well-known constant
		\divide\dimen 2 by 2 %%% we only deal with -pi/2 : pi/2
		\Mess@ge {Sin: calculating Sin of \nodimen 0}%
		\count 0 = 1 %%% see power-series expansion for sine
		\dimen 2 = 1 \r@dian %%% ditto
		\dimen 4 = 0 \r@dian %%% ditto
		\loop
			\ifnum	\dimen 2 = 0 %%% then we've done
			\then	\stillc@nvergingfalse 
			\else	\stillc@nvergingtrue
			\fi
			\ifstillc@nverging %%% then calculate next term
			\then	\term {\count 0} {\dimen 0} {\dimen 2}%
				\advance \count 0 by 2
				\count 2 = \count 0
				\divide \count 2 by 2
				\ifodd	\count 2 %%% signs alternate
				\then	\advance \dimen 4 by \dimen 2
				\else	\advance \dimen 4 by -\dimen 2
				\fi
		\repeat
	\fi		
			\xdef \sine {\nodimen 4}%
       }}

% Now the Cosine can be calculated easily by calling \Sine
\def\Cosine#1{\ifx\sine\UnDefined\edef\Savesine{\relax}\else
		             \edef\Savesine{\sine}\fi
	{\dimen0=#1\r@dian\advance\dimen0 by 90\r@dian
	 \Sine{\nodimen 0}
	 \xdef\cosine{\sine}
	 \xdef\sine{\Savesine}}}	      
% end of trig stuff
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\psdraft{
	\def\@psdraft{0}
	%\ps@typeout{draft level now is \@psdraft \space . }
}
\def\psfull{
	\def\@psdraft{100}
	%\ps@typeout{draft level now is \@psdraft \space . }
}

\psfull

\newif\if@scalefirst
\def\psscalefirst{\@scalefirsttrue}
\def\psrotatefirst{\@scalefirstfalse}
\psrotatefirst

\newif\if@draftbox
\def\psnodraftbox{
	\@draftboxfalse
}
\def\psdraftbox{
	\@draftboxtrue
}
\@draftboxtrue

\newif\if@prologfile
\newif\if@postlogfile
\def\pssilent{
	\@noisyfalse
}
\def\psnoisy{
	\@noisytrue
}
\psnoisy
%%% These are for the option list.
%%% A specification of the form a = b maps to calling \@p@@sa{b}
\newif\if@bbllx
\newif\if@bblly
\newif\if@bburx
\newif\if@bbury
\newif\if@height
\newif\if@width
\newif\if@rheight
\newif\if@rwidth
\newif\if@angle
\newif\if@clip
\newif\if@verbose
\def\@p@@sclip#1{\@cliptrue}


\newif\if@decmpr

%%% GDH 7/26/87 -- changed so that it first looks in the local directory,
%%% then in a specified global directory for the ps file.
%%% RPR 6/25/91 -- changed so that it defaults to user-supplied name if
%%% boundingbox info is specified, assuming graphic will be created by
%%% print time.
%%% TJD 10/19/91 -- added bbfile vs. file distinction, and @decmpr flag

\def\@p@@sfigure#1{\def\@p@sfile{null}\def\@p@sbbfile{null}
	        \openin1=#1.bb
		\ifeof1\closein1
	        	\openin1=\figurepath#1.bb
			\ifeof1\closein1
			        \openin1=#1
				\ifeof1\closein1%
				       \openin1=\figurepath#1
					\ifeof1
					   \ps@typeout{Error, File #1 not found}
						\if@bbllx\if@bblly
				   		\if@bburx\if@bbury
			      				\def\@p@sfile{#1}%
			      				\def\@p@sbbfile{#1}%
							\@decmprfalse
				  	   	\fi\fi\fi\fi
					\else\closein1
				    		\def\@p@sfile{\figurepath#1}%
				    		\def\@p@sbbfile{\figurepath#1}%
						\@decmprfalse
	                       		\fi%
			 	\else\closein1%
					\def\@p@sfile{#1}
					\def\@p@sbbfile{#1}
					\@decmprfalse
			 	\fi
			\else
				\def\@p@sfile{\figurepath#1}
				\def\@p@sbbfile{\figurepath#1.bb}
				\@decmprtrue
			\fi
		\else
			\def\@p@sfile{#1}
			\def\@p@sbbfile{#1.bb}
			\@decmprtrue
		\fi}

\def\@p@@sfile#1{\@p@@sfigure{#1}}

\def\@p@@sbbllx#1{
		%\ps@typeout{bbllx is #1}
		\@bbllxtrue
		\dimen100=#1
		\edef\@p@sbbllx{\number\dimen100}
}
\def\@p@@sbblly#1{
		%\ps@typeout{bblly is #1}
		\@bbllytrue
		\dimen100=#1
		\edef\@p@sbblly{\number\dimen100}
}
\def\@p@@sbburx#1{
		%\ps@typeout{bburx is #1}
		\@bburxtrue
		\dimen100=#1
		\edef\@p@sbburx{\number\dimen100}
}
\def\@p@@sbbury#1{
		%\ps@typeout{bbury is #1}
		\@bburytrue
		\dimen100=#1
		\edef\@p@sbbury{\number\dimen100}
}
\def\@p@@sheight#1{
		\@heighttrue
		\dimen100=#1
   		\edef\@p@sheight{\number\dimen100}
		%\ps@typeout{Height is \@p@sheight}
}
\def\@p@@swidth#1{
		%\ps@typeout{Width is #1}
		\@widthtrue
		\dimen100=#1
		\edef\@p@swidth{\number\dimen100}
}
\def\@p@@srheight#1{
		%\ps@typeout{Reserved height is #1}
		\@rheighttrue
		\dimen100=#1
		\edef\@p@srheight{\number\dimen100}
}
\def\@p@@srwidth#1{
		%\ps@typeout{Reserved width is #1}
		\@rwidthtrue
		\dimen100=#1
		\edef\@p@srwidth{\number\dimen100}
}
\def\@p@@sangle#1{
		%\ps@typeout{Rotation is #1}
		\@angletrue
%		\dimen100=#1
		\edef\@p@sangle{#1} %\number\dimen100}
}
\def\@p@@ssilent#1{ 
		\@verbosefalse
}
\def\@p@@sprolog#1{\@prologfiletrue\def\@prologfileval{#1}}
\def\@p@@spostlog#1{\@postlogfiletrue\def\@postlogfileval{#1}}
\def\@cs@name#1{\csname #1\endcsname}
\def\@setparms#1=#2,{\@cs@name{@p@@s#1}{#2}}
%
% initialize the defaults (size the size of the figure)
%
\def\ps@init@parms{
		\@bbllxfalse \@bbllyfalse
		\@bburxfalse \@bburyfalse
		\@heightfalse \@widthfalse
		\@rheightfalse \@rwidthfalse
		\def\@p@sbbllx{}\def\@p@sbblly{}
		\def\@p@sbburx{}\def\@p@sbbury{}
		\def\@p@sheight{}\def\@p@swidth{}
		\def\@p@srheight{}\def\@p@srwidth{}
		\def\@p@sangle{0}
		\def\@p@sfile{} \def\@p@sbbfile{}
		\def\@p@scost{10}
		\def\@sc{}
		\@prologfilefalse
		\@postlogfilefalse
		\@clipfalse
		\if@noisy
			\@verbosetrue
		\else
			\@verbosefalse
		\fi
}
%
% Go through the options setting things up.
%
\def\parse@ps@parms#1{
	 	\@psdo\@psfiga:=#1\do
		   {\expandafter\@setparms\@psfiga,}}
%
% Compute bb height and width
%
\newif\ifno@bb
\def\bb@missing{
	\if@verbose{
		\ps@typeout{psfig: searching \@p@sbbfile \space  for bounding box}
	}\fi
	\no@bbtrue
	\epsf@getbb{\@p@sbbfile}
        \ifno@bb \else \bb@cull\epsf@llx\epsf@lly\epsf@urx\epsf@ury\fi
}	
\def\bb@cull#1#2#3#4{
	\dimen100=#1 bp\edef\@p@sbbllx{\number\dimen100}
	\dimen100=#2 bp\edef\@p@sbblly{\number\dimen100}
	\dimen100=#3 bp\edef\@p@sbburx{\number\dimen100}
	\dimen100=#4 bp\edef\@p@sbbury{\number\dimen100}
	\no@bbfalse
}
% rotate point (#1,#2) about (0,0).
% The sine and cosine of the angle are already stored in \sine and
% \cosine.  The result is placed in (\p@intvaluex, \p@intvaluey).
\newdimen\p@intvaluex
\newdimen\p@intvaluey
\def\rotate@#1#2{{\dimen0=#1 sp\dimen1=#2 sp
%            	calculate x' = x \cos\theta - y \sin\theta
		  \global\p@intvaluex=\cosine\dimen0
		  \dimen3=\sine\dimen1
		  \global\advance\p@intvaluex by -\dimen3
% 		calculate y' = x \sin\theta + y \cos\theta
		  \global\p@intvaluey=\sine\dimen0
		  \dimen3=\cosine\dimen1
		  \global\advance\p@intvaluey by \dimen3
		  }}
\def\compute@bb{
		\no@bbfalse
		\if@bbllx \else \no@bbtrue \fi
		\if@bblly \else \no@bbtrue \fi
		\if@bburx \else \no@bbtrue \fi
		\if@bbury \else \no@bbtrue \fi
		\ifno@bb \bb@missing \fi
		\ifno@bb \ps@typeout{FATAL ERROR: no bb supplied or found}
			\no-bb-error
		\fi
		%
%\ps@typeout{BB: \@p@sbbllx, \@p@sbblly, \@p@sbburx, \@p@sbbury} 
%
% store height/width of original (unrotated) bounding box
		\count203=\@p@sbburx
		\count204=\@p@sbbury
		\advance\count203 by -\@p@sbbllx
		\advance\count204 by -\@p@sbblly
		\edef\ps@bbw{\number\count203}
		\edef\ps@bbh{\number\count204}
		%\ps@typeout{ psbbh = \ps@bbh, psbbw = \ps@bbw }
		\if@angle 
			\Sine{\@p@sangle}\Cosine{\@p@sangle}
	        	{\dimen100=\maxdimen\xdef\r@p@sbbllx{\number\dimen100}
					    \xdef\r@p@sbblly{\number\dimen100}
			                    \xdef\r@p@sbburx{-\number\dimen100}
					    \xdef\r@p@sbbury{-\number\dimen100}}
%
% Need to rotate all four points and take the X-Y extremes of the new
% points as the new bounding box.
                        \def\minmaxtest{
			   \ifnum\number\p@intvaluex<\r@p@sbbllx
			      \xdef\r@p@sbbllx{\number\p@intvaluex}\fi
			   \ifnum\number\p@intvaluex>\r@p@sbburx
			      \xdef\r@p@sbburx{\number\p@intvaluex}\fi
			   \ifnum\number\p@intvaluey<\r@p@sbblly
			      \xdef\r@p@sbblly{\number\p@intvaluey}\fi
			   \ifnum\number\p@intvaluey>\r@p@sbbury
			      \xdef\r@p@sbbury{\number\p@intvaluey}\fi
			   }
%			lower left
			\rotate@{\@p@sbbllx}{\@p@sbblly}
			\minmaxtest
%			upper left
			\rotate@{\@p@sbbllx}{\@p@sbbury}
			\minmaxtest
%			lower right
			\rotate@{\@p@sbburx}{\@p@sbblly}
			\minmaxtest
%			upper right
			\rotate@{\@p@sbburx}{\@p@sbbury}
			\minmaxtest
			\edef\@p@sbbllx{\r@p@sbbllx}\edef\@p@sbblly{\r@p@sbblly}
			\edef\@p@sbburx{\r@p@sbburx}\edef\@p@sbbury{\r@p@sbbury}
%\ps@typeout{rotated BB: \r@p@sbbllx, \r@p@sbblly, \r@p@sbburx, \r@p@sbbury}
		\fi
		\count203=\@p@sbburx
		\count204=\@p@sbbury
		\advance\count203 by -\@p@sbbllx
		\advance\count204 by -\@p@sbblly
		\edef\@bbw{\number\count203}
		\edef\@bbh{\number\count204}
		%\ps@typeout{ bbh = \@bbh, bbw = \@bbw }
}
%
% \in@hundreds performs #1 * (#2 / #3) correct to the hundreds,
%	then leaves the result in @result
%
\def\in@hundreds#1#2#3{\count240=#2 \count241=#3
		     \count100=\count240	% 100 is first digit #2/#3
		     \divide\count100 by \count241
		     \count101=\count100
		     \multiply\count101 by \count241
		     \advance\count240 by -\count101
		     \multiply\count240 by 10
		     \count101=\count240	%101 is second digit of #2/#3
		     \divide\count101 by \count241
		     \count102=\count101
		     \multiply\count102 by \count241
		     \advance\count240 by -\count102
		     \multiply\count240 by 10
		     \count102=\count240	% 102 is the third digit
		     \divide\count102 by \count241
		     \count200=#1\count205=0
		     \count201=\count200
			\multiply\count201 by \count100
		 	\advance\count205 by \count201
		     \count201=\count200
			\divide\count201 by 10
			\multiply\count201 by \count101
			\advance\count205 by \count201
			%
		     \count201=\count200
			\divide\count201 by 100
			\multiply\count201 by \count102
			\advance\count205 by \count201
			%
		     \edef\@result{\number\count205}
}
\def\compute@wfromh{
		% computing : width = height * (bbw / bbh)
		\in@hundreds{\@p@sheight}{\@bbw}{\@bbh}
		%\ps@typeout{ \@p@sheight * \@bbw / \@bbh, = \@result }
		\edef\@p@swidth{\@result}
		%\ps@typeout{w from h: width is \@p@swidth}
}
\def\compute@hfromw{
		% computing : height = width * (bbh / bbw)
	        \in@hundreds{\@p@swidth}{\@bbh}{\@bbw}
		%\ps@typeout{ \@p@swidth * \@bbh / \@bbw = \@result }
		\edef\@p@sheight{\@result}
		%\ps@typeout{h from w : height is \@p@sheight}
}
\def\compute@handw{
		\if@height 
			\if@width
			\else
				\compute@wfromh
			\fi
		\else 
			\if@width
				\compute@hfromw
			\else
				\edef\@p@sheight{\@bbh}
				\edef\@p@swidth{\@bbw}
			\fi
		\fi
}
\def\compute@resv{
		\if@rheight \else \edef\@p@srheight{\@p@sheight} \fi
		\if@rwidth \else \edef\@p@srwidth{\@p@swidth} \fi
		%\ps@typeout{rheight = \@p@srheight, rwidth = \@p@srwidth}
}
%		
% Compute any missing values
\def\compute@sizes{
	\compute@bb
	\if@scalefirst\if@angle
% at this point the bounding box has been adjsuted correctly for
% rotation.  PSFIG does all of its scaling using \@bbh and \@bbw.  If
% a width= or height= was specified along with \psscalefirst, then the
% width=/height= value needs to be adjusted to match the new (rotated)
% bounding box size (specifed in \@bbw and \@bbh).
%    \ps@bbw       width=
%    -------  =  ---------- 
%    \@bbw       new width=
% so `new width=' = (width= * \@bbw) / \ps@bbw; where \ps@bbw is the
% width of the original (unrotated) bounding box.
	\if@width
	   \in@hundreds{\@p@swidth}{\@bbw}{\ps@bbw}
	   \edef\@p@swidth{\@result}
	\fi
	\if@height
	   \in@hundreds{\@p@sheight}{\@bbh}{\ps@bbh}
	   \edef\@p@sheight{\@result}
	\fi
	\fi\fi
	\compute@handw
	\compute@resv}

%
% \psfig
% usage : \psfig{file=, height=, width=, bbllx=, bblly=, bburx=, bbury=,
%			rheight=, rwidth=, clip=}
%
% "clip=" is a switch and takes no value, but the `=' must be present.
\def\psfig#1{\vbox {
	% do a zero width hard space so that a single
	% \psfig in a centering enviornment will behave nicely
	%{\setbox0=\hbox{\ }\ \hskip-\wd0}
	%
	\ps@init@parms
	\parse@ps@parms{#1}
	\compute@sizes
	%
	\ifnum\@p@scost<\@psdraft{
		%
		\special{ps::[begin] 	\@p@swidth \space \@p@sheight \space
				\@p@sbbllx \space \@p@sbblly \space
				\@p@sbburx \space \@p@sbbury \space
				startTexFig \space }
		\if@angle
			\special {ps:: \@p@sangle \space rotate \space} 
		\fi
		\if@clip{
			\if@verbose{
				\ps@typeout{(clip)}
			}\fi
			\special{ps:: doclip \space }
		}\fi
		\if@prologfile
		    \special{ps: plotfile \@prologfileval \space } \fi
		\if@decmpr{
			\if@verbose{
				\ps@typeout{psfig: including \@p@sfile.Z \space }
			}\fi
			\special{ps: plotfile "`zcat \@p@sfile.Z" \space }
		}\else{
			\if@verbose{
				\ps@typeout{psfig: including \@p@sfile \space }
			}\fi
			\special{ps: plotfile \@p@sfile \space }
		}\fi
		\if@postlogfile
		    \special{ps: plotfile \@postlogfileval \space } \fi
		\special{ps::[end] endTexFig \space }
		% Create the vbox to reserve the space for the figure
		\vbox to \@p@srheight true sp{
			\hbox to \@p@srwidth true sp{
				\hss
			}
		\vss
		}
	}\else{
		% draft figure, just reserve the space and print the
		% path name.
		\if@draftbox{		
			% Verbose draft: print file name in box
			\hbox{\frame{\vbox to \@p@srheight true sp{
			\vss
			\hbox to \@p@srwidth true sp{ \hss \@p@sfile \hss }
			\vss
			}}}
		}\else{
			% Non-verbose draft
			\vbox to \@p@srheight true sp{
			\vss
			\hbox to \@p@srwidth true sp{\hss}
			\vss
			}
		}\fi	



	}\fi
}}
\psfigRestoreAt




astro-ph0504643.extracted_bib
\begin{thebibliography}{}

\bibitem[\protect\citeauthoryear{}{}]{}
Anderson, J.~M., Ulvestad, J.~S., \& Ho, L.~C. 2004, \apj, 603, 42

\bibitem[\protect\citeauthoryear{}{}]{}
Baganoff, F.~K., et al. 2003, \apj, 591, 891

\bibitem[\protect\citeauthoryear{}{}]{}
Barth, A.~J., Ho, L.~C., Filippenko, A.~V., Rix, H.-W., \& Sargent, W.~L.~W.
2001, \apj, 546, 205

\bibitem[\protect\citeauthoryear{}{}]{}
Blandford, R.~D., \& Begelman, M.~C. 1999, \mnras, 303, L1

\bibitem[\protect\citeauthoryear{}{}]{}
Chen, K., Halpern, J.~P., \& Filippenko, A.~V. 1989, \apj, 339, 742

\bibitem[\protect\citeauthoryear{}{}]{}
Collin, S., \& Kawaguchi, T. 2004, \aa, 426, 797

\bibitem[\protect\citeauthoryear{}{}]{}
Elvis, M., et al.  1994, \apjs, 95, 1

\bibitem[\protect\citeauthoryear{}{}]{}
Eracleous, M., \& Halpern, J.~P. 2001, \apj, 554, 240

\bibitem[\protect\citeauthoryear{}{}]{}
Ferland, G. J., \& Mushotzky, R.~F. 1984, \apj, 286, 42

\bibitem[\protect\citeauthoryear{}{}]{}
Ferland, G. J., \& Netzer, H. 1983, \apj, 264, 105

\bibitem[\protect\citeauthoryear{}{}]{}
Halpern, J.~P., \& Steiner, J.~E. 1983, \apj, 269, L37

\bibitem[\protect\citeauthoryear{}{}]{}
Ho, L.~C. 1999, \apj, 516, 672

\bibitem[\protect\citeauthoryear{}{}]{}
------. 2002a, in Issues in Unification of AGNs, ed. R. Maiolino, A. Marconi,
\& N. Nagar (San Francisco: ASP), 165

\bibitem[\protect\citeauthoryear{}{}]{}
------. 2002b, \apj, 564, 120

\bibitem[\protect\citeauthoryear{}{}]{}
-----. 2004, in Carnegie Observatories Astrophysics Series, Vol. 1:
Coevolution of Black Holes and Galaxies, ed. L. C. Ho (Cambridge: Cambridge
Univ. Press), 293

\bibitem[\protect\citeauthoryear{}{}]{}
------. 2005, in preparation

\bibitem[\protect\citeauthoryear{}{}]{}
Ho, L.~C., Filippenko, A.~V., \& Sargent, W.~L.~W. 1993, \apj, 417, 63

\bibitem[\protect\citeauthoryear{}{}]{}
------.  1997a, \apj, 487, 568

\bibitem[\protect\citeauthoryear{}{}]{}
------.  1997b, \apj, 487, 591

\bibitem[\protect\citeauthoryear{}{}]{}
------.  2003, \apj, 583, 159

\bibitem[\protect\citeauthoryear{}{}]{}
Ho, L.~C., \& Peng, C.~Y. 2001, \apj, 555, 650

\bibitem[\protect\citeauthoryear{}{}]{}
Ho, L.~C., Rudnick, G., Rix, H.-W., Shields, J.~C., McIntosh, D.~H.,
Filippenko, A.~V., Sargent, W.~L.~W., \& Eracleous, M. 2000, \apj, 541, 120

\bibitem[\protect\citeauthoryear{}{}]{}
Lauer, T.~R., et al.  1995, \aj, 110, 2622

\bibitem[\protect\citeauthoryear{}{}]{}
McClintock, J.~E., \& Remillard, R.~A. 2005, in Compact Stellar X-ray Sources,
ed. W. H. G. Lewin \& M. van der Klis (Cambridge: Cambridge Univ. Press), in
press (astro-ph/0306213)

\bibitem[\protect\citeauthoryear{}{}]{}
Pounds, K.~A., Done, C., \& Osborne, J.~P. 1995, \mnras, 277, L5

\bibitem[\protect\citeauthoryear{}{}]{}
Ptak, A., Terashima, Y., Ho, L.~C., \& Quataert, E. 2004, \apj, 606, 173

\bibitem[\protect\citeauthoryear{}{}]{}
Quataert, E. 2001, in Probing the Physics of Active Galactic
Nuclei by Multiwavelength Monitoring, ed. B.~M. Peterson, R.~S. Polidan, \&
R.~W. Pogge (San Francisco: ASP), 71

\bibitem[\protect\citeauthoryear{}{}]{}
Quataert, E., Di Matteo, T., Narayan, R., \& Ho, L.~C. 1999, \apj, 525, L89

\bibitem[\protect\citeauthoryear{}{}]{}
Ravindranath, S., Ho, L.~C., Peng, C.~Y., Filippenko, A.~V., \&
 Sargent, W.~L.~W. 2001, \aj, 122, 653

\bibitem[\protect\citeauthoryear{}{}]{}
Richstone, D. 2004, in Carnegie Observatories Astrophysics Series, Vol. 1:
Coevolution of Black Holes and Galaxies, ed. L. C. Ho (Cambridge: Cambridge
Univ. Press), 281

\bibitem[\protect\citeauthoryear{}{}]{}
Shields, J.~C., Rix, H.-W., McIntosh, D.~H., Ho, L.~C., Rudnick, G.,
 Filippenko, A.~V., Sargent, W.~L.~W., \& Sarzi, M. 2000, \apj, 534, L27

\bibitem[\protect\citeauthoryear{}{}]{}
Shirey, R., et al. 2001, \aa, 365, L195

\bibitem[\protect\citeauthoryear{}{}]{}
Terashima, Y., Iyomoto, N., Ho, L.~C., \& Ptak, A.~F. 2002, \apjs, 139, 1

\bibitem[\protect\citeauthoryear{}{}]{}
Terashima, Y., \& Wilson, A.~S. 2003, \apj, in press

\bibitem[\protect\citeauthoryear{}{}]{}
Ulvestad, J.~S., \& Ho, L.~C. 2001, \apj, 562, L133

\end{thebibliography}