\documentclass[11pt]{article}

\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{pstricks,multido,pst-grad}
\usepackage{tabularx}
\usepackage{url}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
% DecodingStarlight.tex
%
% Peter Newbury
% Department of Physics and Astronomy, UBC 
% newbury@phas.ubc.ca
% Twitter @polarisdotca
% http://blogs.ubc.ca/polarisdotca
%
% 12 Sept 2011
%
% This work is supported by the Carl Wieman Science Education
% Initiative cwsei.ubc.ca.
%
% Unless credit is given explicitly, all documents, graphics and images
% are licensed under a Creative Commons BY-NC-SA
% Attribution-NonCommercial-ShareAlike 3.0 Unported License. 
% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Margins
\oddsidemargin  -0.5in
\evensidemargin 0.0in
\textwidth      7.5in

\topmargin     -0.75in
\headheight     0pt
 
\textheight     9.5in
\footskip       30pt

\parindent      0pt
% \renewcommand{\baselinestretch}{1.5}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Fancyhdr:
\pagestyle{fancy}
\lhead{}
\chead{}
\rhead{}
\renewcommand{\headrulewidth}{0pt}
\lfoot{Decoding Starlight}
\cfoot{}
\rfoot{Page~\thepage}
\renewcommand{\footrulewidth}{0.4pt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\dfrac}[2]{\displaystyle\frac{#1}{#2}}
\newcommand{\mybox}{\psframe(-1ex,0)(1ex,2ex)}
\newcommand{\blank}[2][1]{#2\baselineskip}
\newcommand{\foo}{1in}

\newcommand{\checkbox}{%
  \psset{unit=0.8em,linewidth=0.5pt}
  \psline(0,0)(1,0)(1,1)(0,1)(0,0)}

\begin{document}

\begin{center}
  \huge
  Decoding Starlight \\
\end{center}

\begin{tabularx}{\textwidth}{@{}Xp{3in}@{}}
  The colour of a glowing gas, like a candle flame, the burner on a gas
  stove or a star, reveals its temperature: hotter gases glow blue,
  colder gases glow red.  On more careful inspection, though, the light
  contains an enormous amount of information about the gas:
  not just its temperature but also its chemical composition, motion and
  more.  This information is found by decoding the spectrum of the gas.

  \medskip
  In this tutorial, you'll learn how to ``crack the code'' and reveal
  what the glowing objects are made of.

  &
  
  \rput[tl](0,0){\includegraphics[width=3in]{SolarSpectrum_NOAO}}\\[50mm]
  & \centerline{The Sun's spectrum (NOAO)} 
\end{tabularx}

%\vspace{1in}
\bigskip

{\Large Part 1: The Sunripe Apple Sorting Machine}  

\medskip

In the Fall, apple orchards sell their apples to the Sunripe
Company.  One of Sunripe's products, {\em Extraordinary
  Selection}\,$^{\scriptsize \copyright}$ apple pie, is made only from certain apples:
those with diameters between $60-65$~mm and $80-85$~mm.  

\medskip

Your job is to {\bf design the sorting machine} that selects the {\em
  Extraordinary Selection}\,$^{\scriptsize \copyright}$ apples out of
all the apples processed in the factory.  Sketch your design on the
whiteboard and be prepared to share your design.

\begin{center}
  \includegraphics[width=\textwidth]{AppleSorter}\\
\end{center}

\clearpage

{\Large Part 2: A Catalogue of Spectra}

\bigskip

Visit each of the 4 stations. At each one, use the diffraction grating
slide to see what the spectrum of the gas looks like.  Draw the emission
spectrum in the space below -- the positions of the lines is important,
so use the reference spectrum as a guide for where to draw the lines.

\renewcommand{\foo}{1.25in}
\bigskip
\begin{tabular}{@{}l}
  Reference spectrum \\
  \rput[tl](0,0){%
    \includegraphics[width=7.5in]{Spectrum_WikimediaCommons}}\\[\foo]
  %
  Gas:\ \underline{\hspace{2in}} \\
  \psframe(0,0)(7.5in,-1in) \\[\foo]
  %
  Gas:\ \underline{\hspace{2in}} \\
  \psframe(0,0)(7.5in,-1in) \\[\foo]
  %
  Gas:\ \underline{\hspace{2in}} \\
  \psframe(0,0)(7.5in,-1in) \\[\foo]
  %
  Gas:\ \underline{\hspace{2in}} \\
  \psframe(0,0)(7.5in,-1in) \\[\foo]
  %
\end{tabular}

\clearpage

%
% Part 4: Questions
%

\ \vspace{-8ex}

\begin{tabularx}{\textwidth}{@{}rXrp{3cm}rp{3cm}@{}}
  Name & & ID No. & & Tutorial Day/Time &  \\\cline{2-2}\cline{4-4}\cline{6-6}
\end{tabularx}

\bigskip
\bigskip

{\Large Part 3: Questions}\ \ \ Please hand in this worksheet when you
are finished.

\begin{enumerate}
\item These are the emission spectra of several elements and the absorption
  spectrum of a star. How many elements are present in the star's atmosphere?

  \newcommand{\emissionline}[1]{%
    \psline[linewidth=2pt,linecolor=white](#1,0)(#1,1)}
  \newcommand{\emission}[2]{%
    \psset{xunit=0.01in,yunit=0.5in}
    \pspicture(400,0)(700,1)
    % black bkgd
    \psframe[fillstyle=solid,fillcolor=black](400,0)(700,1)
    % emission lines
    #2
    % frame
    \psframe[linewidth=0.5pt](400,0)(700,1)
    % label
    \uput[180](400,0.5){\textsf{#1}}
    \endpspicture}% end \newcommand

  \begin{center}
    \begin{tabular}{c}
      \emission{hydrogen}{%
        \emissionline{405}
        \emissionline{434}
        \emissionline{486}
        \emissionline{656}} \\
      \emission{helium}{%
        \emissionline{405}
        \emissionline{447}
        \emissionline{502}
        \emissionline{588}
        \emissionline{656}} \\
      \emission{mercury}{%
        \emissionline{405}
        \emissionline{434}
        \emissionline{546}
        \emissionline{588}
        \emissionline{615}}\\
    \end{tabular}\\
    \begin{tabular}{c}
      \psset{xunit=0.01in,yunit=0.5in}
      % absorption spectum
      \pspicture(400,0)(700,1)
      % gradient fill bkgd
      \psframe[fillstyle=gradient,gradbegin=lightgray,
        gradend=darkgray,gradangle=90,gradmidpoint=0](400,0)(700,1)
      % black emission lines
      \psline[linewidth=2pt](405,0)(405,1)
      \psline[linewidth=2pt](434,0)(434,1)
      \psline[linewidth=2pt](447,0)(447,1)
      \psline[linewidth=2pt](486,0)(486,1)
      \psline[linewidth=2pt](502,0)(502,1)
      \psline[linewidth=2pt](588,0)(588,1)
      \psline[linewidth=2pt](656,0)(656,1)
      % frame
      \psframe[linewidth=0.5pt](400,0)(700,1)
      % label
      \uput[0](700,0.5){\textsf{star}}
      \endpspicture% end \newcommand
    \end{tabular}
  \end{center}

  \begin{tabularx}{0.95\textwidth}{cXcXcXcX}
    \checkbox & 2 element & 
    \checkbox & 3 elements &
    \checkbox & 7 elements &
    \checkbox & 9 elements
  \end{tabularx}

  \bigskip
\item The absorption spectra from 2 mystery stars are hanging on the walls in the
  room. Compare those spectra to your catalogue of emission spectra to
  figure out the chemical composition of the two stars. ({\em Psst!
    Don't write on the mystery spectra or else the next group of students will
    get the answers!})

  \medskip
  Mystery Star 1 contains \hrulefill

  \bigskip

  Mystery Star 2 contains \hrulefill

\item Look up at the spectrum of the fluorescent lights in this room.  Is it a
  continuous, absorption or emission spectrum?

  \vspace{1cm}
  The atoms in the fluorescent lights {\bf are not} helium,
  mercury, krypton or neon.  Describe how you could use techniques
  explored in this activity to find out what kinds of atoms are responsible
  for the light. 

  \vfill

\item Using the symbols A (Absorption), C (Continuous) and E (Emission), 
  which one of the following ``spectrum arithmetic'' equations is true?
  (Adapted from the ClassAction collection at \url{astro.unl.edu}.)

  \begin{tabularx}{0.95\textwidth}{cXcXcXcX}
    \checkbox & 2A $-$ E = C &
    \checkbox & E $+$ C = A &
    \checkbox & C $-$ E = A &
    \checkbox & C $+$ A = 2E
  \end{tabularx}


\end{enumerate}

\clearpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% apple sorter 
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\thispagestyle{empty}

\begin{center}
  \includegraphics[width=\textwidth]{AppleSorter}\\
\end{center}

\textsf{\Huge What sizes of apples do you find in the...}

\clearpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% ``decode'' the apple factory
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\thispagestyle{empty}

\begin{center}
  \psset{xunit=2.5mm,yunit=0.08mm}
  \pspicture(50,-150)(105,1100)
  % histogram bars
  \psset{linewidth=0.5pt,dimen=middle,fillstyle=solid,fillcolor=lightgray}
  \psframe(50,0)(55,100)
  \psframe(55,0)(60,180)
  %\psframe(60,0)(65,350)
  \psframe(65,0)(70,700)
  \psframe(70,0)(75,850)
  \psframe(75,0)(80,800)
  %\psframe(80,0)(85,620)
  \psframe(85,0)(90,440)
  %\psframe(90,0)(95,320)
  \psframe(95,0)(100,230)
  \psframe(100,0)(105,150)
  % axes (on top)
  \psset{fillstyle=none}
  \psframe[linewidth=0.5pt](50,0)(105,1000)
  \psline[linewidth=1pt]{<->}(50,1000)(50,0)(105,0)
  \multido{\ix=50+5}{12}{%
    \psline[linewidth=1pt](\ix,0)(\ix,-25)
    \uput[-90](\ix,-25){\textsf{\Large \ix}}}
  \multido{\iy=0+100}{11}{%
    \psline[linewidth=1pt](49,\iy)(50,\iy)
    \uput[180](49,\iy){\textsf{\Large \iy}}}
  % axis labels
  \rput(77.5,-150){\textsf{\Large Size of apples (mm)}}
  \rput[b]{L}(44,500){\textsf{\Large Number of apples}}
  \rput[b](77.5,1025){\textsf{\Large Apples in the Absent Selection bin}}
  \endpspicture
\end{center}

\bigskip
\begin{center}
  \textsf{\Huge
    \begin{tabular}{c|l}
      Product & Apple Sizes Used \\\hline
      pie & 60--65, 80--85\\
      juice & 70--75, 80--85\\
      sauce & 80--85, 90--95\\
      eating & 65--75
    \end{tabular}}
\end{center}

\clearpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% sorter and spectrum formation 
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\thispagestyle{empty}

\begin{center}
  \includegraphics[width=\textwidth]{AppleSorter}\\
\end{center}

\bigskip

\centerline{\includegraphics[width=1.1\textwidth]{StellarSpectraFormation}}

\textsf{\Huge What kind of light do you find in the...}
\clearpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Demonstrate how to create emission line catalogue
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\thispagestyle{empty}

\begin{center}
  \textsf{\Huge Catalogue entry for fluorescent lights}\\[2cm]
  \textsf{\Huge reference spectrum}\\  
  \includegraphics[width=7.5in]{Spectrum_WikimediaCommons}
\end{center}

\psframe(0,0)(7.5in,-1in)


\clearpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% mystery stars
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\thispagestyle{empty}

\begin{center}
  \textsf{\Huge Mystery Star 1} \\[0.5in]
  \includegraphics[width=\textwidth]{Spectrum_WikimediaCommons} \\[\foo]
\end{center}

\vfill

\begin{center}
  \textsf{\Huge Mystery Star 2} \\[0.5in]
  \includegraphics[width=\textwidth]{Spectrum_WikimediaCommons} \\[\foo]
\end{center}

\end{document}

