Index: trunk/doc/release.2015/ps1.analysis/analysis.tex
===================================================================
--- trunk/doc/release.2015/ps1.analysis/analysis.tex	(revision 39877)
+++ trunk/doc/release.2015/ps1.analysis/analysis.tex	(revision 39880)
@@ -1,9 +1,6 @@
-\documentclass[iop]{emulateapj}
-%\documentclass[iop,floatfix]{emulateapj}
-
+\documentclass[iop,floatfix]{emulateapj}
 % \pdfoutput=1
 
-% bounding box is not read correctly without 'graphicx'
-\RequirePackage{graphics}
+\RequirePackage{graphicx}
 \RequirePackage{color}
 \RequirePackage{code}
@@ -14,11 +11,17 @@
 %\def\plotmode{bw}
 
-\def\plotext{ps}
-\def\plottype{eps}
+% latex uses the .ps regardless of \plotext if passed with ext=.\plotext
+% pdflatex uses the png if it exists, pdf otherwise OK with pdf, png
+% independent of graphicx or graphics
+% pdflatex fails on files with multiple dots, protect with {file.name.long}.pdf
+% use ps2pdf -dEPSCrop input.ps to convert to pdf
+
+% \includegraphics[width=\hsize,clip]{peaks}
+% \includegraphics[width=\hsize]{temp.pdf}
+% \includegraphics[width=\hsize]{{FWHM.smooth.trend.ps1}.pdf}
+
+%\def\plotext{pdf}
+%\def\plotext{png}
 \def\plotext{pdf}
-\def\plottype{pdf}
-\def\plotext{png}
-\def\plottype{png}
-
 
 %\def\picdir{/home/eugene/chipresid.20140404}
@@ -581,7 +584,5 @@
 \begin{figure}[htbp]
   \begin{center}
-% \includegraphics[type=\plottype,ext=.\plotext,width=\hsize,clip]{peaks}
- \includegraphics[type=\plottype,ext=.\plotext,width=3.5in,clip]{peaks}
-%\includegraphics[type=\plottype,ext=.\plotext,width=\hsize,height=0.5\hsize,viewport=60 60 560 310,clip]{peaks}
+ \includegraphics[width=\hsize,clip]{peaks}
   \caption{\label{fig:peaks} Illustration of peak finding and culling peaks within a
     footprint.  Insignificant peaks within the footprint of a brighter
@@ -603,6 +604,4 @@
 contained (note by definition all peaks must be located in a
 footprint).  
-
-\end{document}
 
 For any peak which is not the brightest peak in that footprint it is
@@ -627,6 +626,5 @@
 \begin{figure}[htbp]
   \begin{center}
-%  \includegraphics[type=\plottype,ext=.\plotext,width=\hsize,height=2.0\hsize,viewport=60 60 413 760]{FWHM.smooth.trend.ps1}
-  \includegraphics[type=\plottype,ext=.\plotext,width=\hsize]{FWHM.smooth.trend.ps1}
+  \includegraphics[width=\hsize]{{FWHM.smooth.trend.ps1}.\plotext}
   \caption{\label{fig:moments.window} Example of the biases encountered when measuring the second
     moments.  A simulated image was generated using the PS1 PSF
@@ -915,6 +913,5 @@
 \begin{figure}[htbp]
   \begin{center}
-% \includegraphics[type=\plottype,ext=.\plotext,width=\hsize,height=\hsize,viewport=60 60 560 560]{moment.class}
-  \includegraphics[type=\plottype,ext=.\plotext,width=\hsize]{moment.class}
+  \includegraphics[width=\hsize]{{moment.class}.\plotext}
   \caption{\label{fig:moment.class} Illustration of PSF star selection using the FWHM derived
     from the second moments in $X_{\rm ccd}$ and $Y_{\rm ccd}$
@@ -1323,6 +1320,5 @@
 \begin{figure}[htbp]
   \begin{center}
-% \includegraphics[type=\plottype,ext=.\plotext,width=\hsize,height=\hsize,viewport=60 60 560 560]{radial.profiles}
-  \includegraphics[type=\plottype,ext=.\plotext,width=\hsize]{radial.profiles}
+  \includegraphics[width=\hsize]{{radial.profiles}.\plotext}
   \caption{\label{fig:radial.profiles} Radial profiles of stellar images from PS1.  These two
     profiles illustrate the radial trend of the PS1 PSFs for a star
