https:///astrobaki/api.php?action=feedcontributions&user=Aparsons&feedformat=atomAstroBaki - User contributions [en]2022-10-04T01:39:09ZUser contributionsMediaWiki 1.35.1Setting Up Your Raspberry Pi2022-06-10T01:19:16Z<p>Aparsons: </p>
<hr />
<div>With the growing utility and prevalence of low-cost computing boards, it is becoming increasingly common to embed computing directly into instrumentation.<br />
The Raspberry Pi is an example of a relatively low-cost but very versatile computer capable of running a full-fledged (Linux) operating system and performing a non-trivial amount of computing, while also providing interfaces for low-level communication with electronics.<br />
The Raspberry PI (RPi) is not the only example of such board, and it is not necessarily suited to all embedded computing applications, but it is widely used and quite capable.<br />
<br />
Because of its ubiquity and versatility, we have chosen the RPi as a platform for data acquisition and computing for the [[Undergraduate Radio Lab]].<br />
Having a common computing platform for the class makes it easy for us to introduce you to the Linux operating system (a mainstay of scientific computing), the world of embedded computing, and new developments in software-defined radio (SDR). I strongly encourage you to buy your own for use in this class so that you can take it home with you. These little computers are super versatile and you will find that you can use them for all sorts of things. In my home, I use them for wireless print servers, robot controllers, roku-like TV streamers, video game emulators, and as a straight-up desktop computer for kids doing remote schooling. Think of this purchase as your "textbook" for this class.<br />
<br />
To get started, here is a parts list:<br />
<br />
==Raspberry Pi==<br />
* Raspberry PI 4 version B (2 or 4 GB RAM) (~$45/$55 ea). Alternately, may use RPI 3.<br />
** stock is low because of pandemic supply chain problems. Try https://rpilocator.com , https://www.canakit.com/raspberry-pi-4-4gb.html or https://www.sparkfun.com/products/15446.<br />
** if stock is exhausted, back-order and switch to using it whenever it arrives (using the class ones in the meantime)<br />
** the computing board does not come with: monitor, keyboard, mouse, power supply, SD card (its hard drive), or even a case to hold it. Some places sell a "starter kit" that has many of these things, or you can buy them separately (under accessories below).<br />
<br />
====RPi Accessories====<br />
* plastic case ($6 ea; e.g. https://www.adafruit.com/product/4301)<br />
** note that RPi1-3 cases are not compatible with RPi4<br />
* 15W USB-C charger w/ cable (~$15 ea; e.g. https://www.adafruit.com/product/4298)<br />
** not all USB-C chargers source the same power. Any USB-C charger will work, provided it supplies >= 15 W.<br />
** RPi1-3 use micro-USB (not USB-C). a cheap USB-C to micro-USB adapter (e.g. https://www.amazon.com/Adapter-Convert-Connector-Support-Compatible/dp/B07GH5KJH2) will do the trick.<br />
* micro-HDMI to HDMI cable (~$10 ea; e.g. https://www.adafruit.com/product/1322)<br />
** necessary for RPi4 (RPi1-3 use HDMI)<br />
** we will have these in class, but if you want to plug into a monitor (or TV) at home, you'll need this<br />
* aluminum 15x15x15 mm heatsink ($2 ea; e.g. https://www.adafruit.com/product/3082)<br />
** keeps your RPI from overheating on processing-intensive applications. Particularly necessary for RPI 3.<br />
* bluetooth keyboard/mouse (~$20 ea; e.g. https://www.amazon.com/Rii-Ultra-slim-Wireless-Multimedia-Raspberry/dp/B07BF3LFN3)<br />
** only buy this if you don't have another one lying around you could use<br />
* Samsung EVO plus 32 GB (95 MB/s read, 20 MB/s write) micro SD Card (~$10 ea)<br />
** suggest only buying this brand (others seem more prone to corruption, or are slow).<br />
** blank is fine, we'll copy over our class "image" to it for you.<br />
** it's often handy to have more than one of these on hand; consider buying a couple<br />
<br />
==Software-Defined Radio (SDR) Receiver==<br />
To digitize radio-frequency (RF) signals and get them on an RPi, you need SDR receiver (we will stock these in class, but if you want one for home, or if you are working remotely, consider buying). These are only necessary for "radio" applications. They come with some cheap antennas you can use to listen to, e.g., FM radio on your RPI. Cheap SDRs have become available because they are used for tuning in to broadcast TV and FM radio.<br />
* (option 1, preferred) Nooelec NESDR SMARTee v4 (~$35 ea; e.g. https://www.nooelec.com/store/sdr/sdr-receivers/smart/nesdr-smart-sdr.html)<br />
** more rugged/isolated version with the same chipset as the rest below. Has an SMA connector that is easier to interface to stuff in the class<br />
* (option 2) Nooelec NESDR Mini R820T SDR & DVB-T (~$25 ea; e.g. https://www.nooelec.com/store/sdr/sdr-receivers/nesdr-mini.html)<br />
** same chipset as above, but less rugged. has a mcx connector that requires a male mcx to male sma pigtail connector ($10, https://www.nooelec.com/store/male-mcx-to-male-sma-pigtail-rg316-0-5-length.html) to connect to other stuff in class, but we will buy some of these to have on hand.<br />
<br />
==Setup==<br />
The SD card you ordered functions as your RPi's hard drive. You will need to install it with an operating system, along with any software you will need. The easy way to do this is to clone an existing installation from another card. If you come to class, we will do this for you. Otherwise, follow the instructions below.<br />
<br />
===Setup from Scratch===<br />
Raspberry Pi's benefit from being a standard set of hardware. As such, they have a customized version of Linux (a free, open-source version of Unix) that runs on them an includes drivers for all their hardware. That customized Linux version is called Raspbian (being a branch of Debian Linux for a Raspberry Pi). Other operating systems exist, but we will only support Raspbian in class.<br />
<br />
* Set up SD Card<br />
** This has to be done on an already working computer with an SD Card reader. Instructions are [https://elinux.org/RPi_Easy_SD_Card_Setup here]. Below is a summary outline for Linux.<br />
** On an existing linux installation, you can use <tt>gparted</tt><br />
*** plug in SD card<br />
*** use <tt>dmesg</tt> to find the <tt>/dev/</tt> path to the device (<tt>/dev/mmcblk0</tt> in this tutorial). Do *not* use any <tt>pN</tt> extensions to this name (e.g. <tt>mmcblk0p1</tt>).<br />
*** format SD Card as FAT32<br />
*** <tt>umount /dev/mmcblk0</tt><br />
*** download a basic Raspbian install from https://www.raspberrypi.com/software/operating-systems<br />
**** current (Jan. 2022) version is https://downloads.raspberrypi.org/raspios_full_armhf/images/raspios_full_armhf-2021-11-08/2021-10-30-raspios-bullseye-armhf-full.zip<br />
*** <tt>sudo dd bs=1M if=2021-10-30-raspios-bullseye-armhf-full.img of=/dev/mmcblk0<br />
**** (can check progress with <tt>sudo iotop -o </tt>, takes about 5 min)<br />
<br />
* Initial boot<br />
** get wireless up (click Desktop icon in top-right)<br />
** open up a terminal and run the following commands<br />
*** <tt>sudo apt update</tt><br />
*** <tt>sudo apt upgrade</tt><br />
** open Raspberry Pi Configuration (menu)<br />
*** change hostname to, e.g., radiopi<br />
*** Interfaces: ssh=enabled, vnc=enabled, remote gpio=enabled<br />
*** Localisation: Keyboard US layout<br />
** reboot<br />
** change passwd<br />
<br />
* Software Install<br />
** <tt>sudo apt install python3-ipython jupyter vim texlive libusb-1.0-0-dev</tt><br />
** Copy over VIM config (if you use vim)<br />
** <tt>scp .vimrc pi@radiopi:</tt><br />
** Fix missing ipython command<br />
*** <tt>vi .pydisutils.cfg</tt> and add these lines:<br />
**** <tt>[install]<br />
**** <tt>install-scripts=/usr/local/bin</tt><br />
*** <tt>sudo pip3 install --force ipython</tt><br />
*** <tt>sudo pip3 install astropy</tt><br />
*** <tt>sudo pip3 install wxpython</tt><br />
*** <tt>sudo apt-get install libatlas-base-dev</tt><br />
*** <tt>sudo pip3 install numpy==1.22</tt><br />
<br />
===SDR Setup===<br />
See https://wiki.gentoo.org/wiki/Rtl-sdr<br />
* Plug SDR module in<br />
* Force detect as sdr, not dvb<br />
** <tt>sudo vi /etc/modprobe.d/blacklist-dvb.conf</tt> add the following line:<br />
*** <tt>blacklist dvb_usb_rtl28xxu</tt><br />
** <tt>sudo apt install rtl-sdr gqrx-sdr</tt><br />
** <tt>sudo vi /etc/udev/rules.d/20-rtlsdr.rules</tt> add the following line:<br />
*** <tt>SUBSYSTEM==”usb”, ATTRS{idVentor}==”0bda”, ATTRS{idProduct}==”2838”, GROUP=”pi”, MODE=”0666”, SYMLINK+=”rtl_sdr”</tt><br />
<br />
===Class Software===<br />
* install <tt>ugradio</tt><br />
** <tt>git clone https://github.com/AaronParsons/ugradio.git</tt><br />
** <tt>cd ugradio/ugradio_code</tt><br />
** <tt>sudo pip3 install .</tt><br />
<br />
==Cloning==<br />
This assumes you are on a Linux system.<br />
* Make a copy of an existing RPi filesystem:<br />
** Insert SD Card<br />
** <tt>sudo dd if=/dev/mmcblk0 of=radiopi.img bs=4M status=progress</tt><br />
* Optional: shrink file system:<br />
** <tt>wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh</tt><br />
** <tt>chmod a+x pyshrink.sh</tt><br />
** <tt>sudo pishrink.sh radiopi.img</tt><br />
* Copy to a new SD card<br />
** Insert new SD Card<br />
** Ensure it is formatted FAT32 (else use <tt>gparted</tt>)<br />
** unmount the new disk: <tt>umount /media/disk_name</tt><br />
** <tt>sudo dd bs=4M if=radiopi.img of=/dev/mmcblk0 conv=fsync status=progress</tt></div>AparsonsSetting Up Your Raspberry Pi2022-06-10T01:18:32Z<p>Aparsons: </p>
<hr />
<div>With the growing utility and prevalence of low-cost computing boards, it is becoming increasingly common to embed computing directly into instrumentation.<br />
The Raspberry Pi is an example of a relatively low-cost but very versatile computer capable of running a full-fledged (Linux) operating system and performing a non-trivial amount of computing, while also providing interfaces for low-level communication with electronics.<br />
The Raspberry PI (RPi) is not the only example of such board, and it is not necessarily suited to all embedded computing applications, but it is widely used and quite capable.<br />
<br />
Because of its ubiquity and versatility, we have chosen the RPi as a platform for data acquisition and computing for the [[Undergraduate Radio Lab]].<br />
Having a common computing platform for the class makes it easy for us to introduce you to the Linux operating system (a mainstay of scientific computing), the world of embedded computing, and new developments in software-defined radio (SDR). I strongly encourage you to buy your own for use in this class so that you can take it home with you. These little computers are super versatile and you will find that you can use them for all sorts of things. In my home, I use them for wireless print servers, robot controllers, roku-like TV streamers, video game emulators, and as a straight-up desktop computer for kids doing remote schooling. Think of this purchase as your "textbook" for this class.<br />
<br />
To get started, here is a parts list:<br />
<br />
==Raspberry Pi==<br />
* Raspberry PI 4 version B (2 or 4 GB RAM) (~$45/$55 ea). Alternately, may use RPI 3.<br />
** stock is low because of pandemic supply chain problems. Try https://www.canakit.com/raspberry-pi-4-4gb.html or https://www.sparkfun.com/products/15446.<br />
** if stock is exhausted, back-order and switch to using it whenever it arrives (using the class ones in the meantime)<br />
** the computing board does not come with: monitor, keyboard, mouse, power supply, SD card (its hard drive), or even a case to hold it. Some places sell a "starter kit" that has many of these things, or you can buy them separately (under accessories below).<br />
<br />
====RPi Accessories====<br />
* plastic case ($6 ea; e.g. https://www.adafruit.com/product/4301)<br />
** note that RPi1-3 cases are not compatible with RPi4<br />
* 15W USB-C charger w/ cable (~$15 ea; e.g. https://www.adafruit.com/product/4298)<br />
** not all USB-C chargers source the same power. Any USB-C charger will work, provided it supplies >= 15 W.<br />
** RPi1-3 use micro-USB (not USB-C). a cheap USB-C to micro-USB adapter (e.g. https://www.amazon.com/Adapter-Convert-Connector-Support-Compatible/dp/B07GH5KJH2) will do the trick.<br />
* micro-HDMI to HDMI cable (~$10 ea; e.g. https://www.adafruit.com/product/1322)<br />
** necessary for RPi4 (RPi1-3 use HDMI)<br />
** we will have these in class, but if you want to plug into a monitor (or TV) at home, you'll need this<br />
* aluminum 15x15x15 mm heatsink ($2 ea; e.g. https://www.adafruit.com/product/3082)<br />
** keeps your RPI from overheating on processing-intensive applications. Particularly necessary for RPI 3.<br />
* bluetooth keyboard/mouse (~$20 ea; e.g. https://www.amazon.com/Rii-Ultra-slim-Wireless-Multimedia-Raspberry/dp/B07BF3LFN3)<br />
** only buy this if you don't have another one lying around you could use<br />
* Samsung EVO plus 32 GB (95 MB/s read, 20 MB/s write) micro SD Card (~$10 ea)<br />
** suggest only buying this brand (others seem more prone to corruption, or are slow).<br />
** blank is fine, we'll copy over our class "image" to it for you.<br />
** it's often handy to have more than one of these on hand; consider buying a couple<br />
<br />
==Software-Defined Radio (SDR) Receiver==<br />
To digitize radio-frequency (RF) signals and get them on an RPi, you need SDR receiver (we will stock these in class, but if you want one for home, or if you are working remotely, consider buying). These are only necessary for "radio" applications. They come with some cheap antennas you can use to listen to, e.g., FM radio on your RPI. Cheap SDRs have become available because they are used for tuning in to broadcast TV and FM radio.<br />
* (option 1, preferred) Nooelec NESDR SMARTee v4 (~$35 ea; e.g. https://www.nooelec.com/store/sdr/sdr-receivers/smart/nesdr-smart-sdr.html)<br />
** more rugged/isolated version with the same chipset as the rest below. Has an SMA connector that is easier to interface to stuff in the class<br />
* (option 2) Nooelec NESDR Mini R820T SDR & DVB-T (~$25 ea; e.g. https://www.nooelec.com/store/sdr/sdr-receivers/nesdr-mini.html)<br />
** same chipset as above, but less rugged. has a mcx connector that requires a male mcx to male sma pigtail connector ($10, https://www.nooelec.com/store/male-mcx-to-male-sma-pigtail-rg316-0-5-length.html) to connect to other stuff in class, but we will buy some of these to have on hand.<br />
<br />
==Setup==<br />
The SD card you ordered functions as your RPi's hard drive. You will need to install it with an operating system, along with any software you will need. The easy way to do this is to clone an existing installation from another card. If you come to class, we will do this for you. Otherwise, follow the instructions below.<br />
<br />
===Setup from Scratch===<br />
Raspberry Pi's benefit from being a standard set of hardware. As such, they have a customized version of Linux (a free, open-source version of Unix) that runs on them an includes drivers for all their hardware. That customized Linux version is called Raspbian (being a branch of Debian Linux for a Raspberry Pi). Other operating systems exist, but we will only support Raspbian in class.<br />
<br />
* Set up SD Card<br />
** This has to be done on an already working computer with an SD Card reader. Instructions are [https://elinux.org/RPi_Easy_SD_Card_Setup here]. Below is a summary outline for Linux.<br />
** On an existing linux installation, you can use <tt>gparted</tt><br />
*** plug in SD card<br />
*** use <tt>dmesg</tt> to find the <tt>/dev/</tt> path to the device (<tt>/dev/mmcblk0</tt> in this tutorial). Do *not* use any <tt>pN</tt> extensions to this name (e.g. <tt>mmcblk0p1</tt>).<br />
*** format SD Card as FAT32<br />
*** <tt>umount /dev/mmcblk0</tt><br />
*** download a basic Raspbian install from https://www.raspberrypi.com/software/operating-systems<br />
**** current (Jan. 2022) version is https://downloads.raspberrypi.org/raspios_full_armhf/images/raspios_full_armhf-2021-11-08/2021-10-30-raspios-bullseye-armhf-full.zip<br />
*** <tt>sudo dd bs=1M if=2021-10-30-raspios-bullseye-armhf-full.img of=/dev/mmcblk0<br />
**** (can check progress with <tt>sudo iotop -o </tt>, takes about 5 min)<br />
<br />
* Initial boot<br />
** get wireless up (click Desktop icon in top-right)<br />
** open up a terminal and run the following commands<br />
*** <tt>sudo apt update</tt><br />
*** <tt>sudo apt upgrade</tt><br />
** open Raspberry Pi Configuration (menu)<br />
*** change hostname to, e.g., radiopi<br />
*** Interfaces: ssh=enabled, vnc=enabled, remote gpio=enabled<br />
*** Localisation: Keyboard US layout<br />
** reboot<br />
** change passwd<br />
<br />
* Software Install<br />
** <tt>sudo apt install python3-ipython jupyter vim texlive libusb-1.0-0-dev</tt><br />
** Copy over VIM config (if you use vim)<br />
** <tt>scp .vimrc pi@radiopi:</tt><br />
** Fix missing ipython command<br />
*** <tt>vi .pydisutils.cfg</tt> and add these lines:<br />
**** <tt>[install]<br />
**** <tt>install-scripts=/usr/local/bin</tt><br />
*** <tt>sudo pip3 install --force ipython</tt><br />
*** <tt>sudo pip3 install astropy</tt><br />
*** <tt>sudo pip3 install wxpython</tt><br />
*** <tt>sudo apt-get install libatlas-base-dev</tt><br />
*** <tt>sudo pip3 install numpy==1.22</tt><br />
<br />
===SDR Setup===<br />
See https://wiki.gentoo.org/wiki/Rtl-sdr<br />
* Plug SDR module in<br />
* Force detect as sdr, not dvb<br />
** <tt>sudo vi /etc/modprobe.d/blacklist-dvb.conf</tt> add the following line:<br />
*** <tt>blacklist dvb_usb_rtl28xxu</tt><br />
** <tt>sudo apt install rtl-sdr gqrx-sdr</tt><br />
** <tt>sudo vi /etc/udev/rules.d/20-rtlsdr.rules</tt> add the following line:<br />
*** <tt>SUBSYSTEM==”usb”, ATTRS{idVentor}==”0bda”, ATTRS{idProduct}==”2838”, GROUP=”pi”, MODE=”0666”, SYMLINK+=”rtl_sdr”</tt><br />
<br />
===Class Software===<br />
* install <tt>ugradio</tt><br />
** <tt>git clone https://github.com/AaronParsons/ugradio.git</tt><br />
** <tt>cd ugradio/ugradio_code</tt><br />
** <tt>sudo pip3 install .</tt><br />
<br />
==Cloning==<br />
This assumes you are on a Linux system.<br />
* Make a copy of an existing RPi filesystem:<br />
** Insert SD Card<br />
** <tt>sudo dd if=/dev/mmcblk0 of=radiopi.img bs=4M status=progress</tt><br />
* Optional: shrink file system:<br />
** <tt>wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh</tt><br />
** <tt>chmod a+x pyshrink.sh</tt><br />
** <tt>sudo pishrink.sh radiopi.img</tt><br />
* Copy to a new SD card<br />
** Insert new SD Card<br />
** Ensure it is formatted FAT32 (else use <tt>gparted</tt>)<br />
** unmount the new disk: <tt>umount /media/disk_name</tt><br />
** <tt>sudo dd bs=4M if=radiopi.img of=/dev/mmcblk0 conv=fsync status=progress</tt></div>AparsonsUndergraduate Radio Lab2022-01-26T01:19:22Z<p>Aparsons: </p>
<hr />
<div>This course consists of four laboratory experiments that concentrate on radio instrumentation and laboratory techniques. We will build receiving, observing, and data analysis systems for two telescopes: a single-dish 21-cm line system, and a 10.7-GHz interferometer. We will use these telescopes for astronomical observing projects including structure of the Milky Way galaxy, precise position measurement of several radio sources, and measurement of the radio brightness distributions of the sun and moon with high angular resolution. There is a heavy emphasis on digital data acquisition, software development in the Python language, and high-quality written reports.<br />
<br />
=== Class Programmatics ===<br />
* Class Code Repository: [http://github.com/AaronParsons/ugradio http://github.com/AaronParsons/ugradio]<br />
* [https://github.com/AaronParsons/ugradio/raw/main/schedule/syllabus_2022_spring.docx Syllabus]<br />
* [https://berkeley.zoom.us/j/3587609756 Zoom Room: 358 760 9756]<br />
* Bcourses: [https://bcourses.berkeley.edu/courses/1512067 1512067]<br />
* Discord: https://discord.gg/54m6yjsFHN<br />
* Sign-up sheet for lab: https://calendar.google.com/calendar/u/0/selfsched?sstoken=UUhoRVItYjh2bFA3fGRlZmF1bHR8MDlkOGRkN2MzNmVlMDM1ZTYzNzJiZTcxOTRkNmY1Y2Q<br />
* Class Hours:<br />
** Tuesday/Thursday 1:30-3:30pm<br />
* Office Hours:<br />
** Aaron Parsons (aparsons at berkeley): TBD, or by appointment, in standard [https://berkeley.zoom.us/j/3587609756 Zoom Room: 358 760 9756]<br />
** Christian Bye (chbye at berkeley): TBD or by appointment (Through Discord Office Hours Channel or [https://berkeley.zoom.us/my/christianbye Zoom: 372 207 8992])<br />
** Mine Gokcen (minegokcen at berkeley):<br />
** Frank Latora (fjlatora at berkeley):<br />
* Lab Groups:<br />
** Group 1<br />
** Group 2<br />
** Group 3<br />
** Group 4<br />
** Group 5<br />
<br />
=== Experiments ===<br />
* Lab 1: [https://github.com/AaronParsons/ugradio/blob/main/lab_mixers/allmixers.pdf Exploring Digital Sampling, Fourier Transforms, and both DSB and SSB Mixers]<br />
* Lab 2: [https://github.com/AaronParsons/ugradio/blob/main/lab_bighorn/bighorn.pdf Astronomy with the 21cm Line; Some Microwave Electronics]<br />
* Lab 3: [https://github.com/AaronParsons/ugradio/blob/main/lab_interf/interf.pdf Radio Interferometry at X Band]<br />
* Lab 4: [https://github.com/AaronParsons/ugradio/blob/main/lab_dish/HI1.pdf Mapping the HI Line: the Galaxy and Supershells]<br />
<br />
===Getting Set Up===<br />
* [[Getting Started in the Undergraduate Radio Lab]]<br />
** [[Setting Up Your Raspberry Pi]]<br />
** [[Connecting to the Lab Computers Remotely]]<br />
<br />
=== General Skills Used Through-Out Course ===<br />
<br />
* Navigating Linux/Unix-like Operating Systems<br />
** [[Unix Primer]]<br />
** [[Unix Text Editors]]<br />
* Programming in Python<br />
** [[Python Installation and Basic Programming]]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting]<br />
* Software Engineering<br />
** [[Revision Control]]<br />
** [[Getting Started w/ Github]]<br />
** [[Unit Testing]]<br />
* Report Writing<br />
** [[LaTeX]]<br />
<br />
== Topics by Date ==<br />
<br />
=== Lab 1 ([https://github.com/AaronParsons/ugradio/blob/main/lab_mixers/allmixers.pdf Exploring Digital Sampling, Fourier Transforms, and both DSB and SSB Mixers]), Due Feb 8, 1:30p ===<br />
==== Lab 1, Week 1 (Jan 18): Sampling and Power Spectra ====<br />
* Resources and Handouts<br />
** [[Nyquist Sampling]]<br />
** [[Fourier Transform]]<br />
** Technical Skills<br />
*** [[Unix Primer]]<br />
*** [[Unix Text Editors]]<br />
*** [[Python Installation and Basic Programming]]<br />
**** [[Revision Control]]<br />
**** [[Getting Started w/ Github]]<br />
<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/Nyquist%20Sampling%20and%20Aliasing.ipynb Aliasing Demo] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=ugradio&branch=main&path=jupyter_tutorials/Nyquist%20Samplling%20and%20Aliasing.ipynb datahub.berkeley.edu])<br />
* In class:<br />
** Astrobaki, Syllabus, Office Hours<br />
** Getting accounts (premade by Bill Boyd, change password with <tt>passwd</tt> command)<br />
** Lab access (see [[Getting Started in the Undergraduate Radio Lab]])<br />
** Class philosophy and workflow<br />
** [[Nyquist Sampling]] and aliasing<br />
** [[Fourier Transform]]<br />
** ADC Quantization<br />
** Lab Hardware<br />
*** PicoScope 2206a<br />
*** Raspberry Pi + [[NESDR Smart]]<br />
** Data Challenge<br />
*** [https://github.com/AaronParsons/ugradio/blob/main/lab_mixers/secret_message.npz Secret Message]<br />
** [https://youtu.be/uH-dQnq7ZD4 Lecture 1 Zoom recording] (2021 is [https://youtu.be/Yb4K8t6SG4k here])<br />
** [https://youtu.be/LtEzUnp_E9E Lecture 2 Zoom recording] (2021 is [https://youtu.be/oJplegmHeAI here])<br />
<br />
==== Lab 1, Week 2 (Jan 26): DSB and SSB Mixers ====<br />
* Theory and Background:<br />
** [[Heterodyne Mixers]]<br />
** [[Convolution Theorem]]<br />
** [[Fast Fourier Transform]]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/dft_intro/fourierc.pdf Spectral Analysis with Discrete Fourier Transforms]<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/Convolutions%20and%20Correlations.ipynb Convolutions and Correlations ]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/Sec%204.%20In%20the%20mind.ipynb In the Mind: Introduction to the Fourier Transform ]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/datatype_demo.ipynb Mommy Fortuna's Midnight Carnival of Python Oddities]<br />
** [[Data Representations]], with handout on [https://github.com/AaronParsons/ugradio/blob/main/pythonprimer/datatypes.pdf Data Types and Organizational Structures]<br />
** Data Challenge<br />
*** [https://github.com/AaronParsons/ugradio/blob/main/lab_mixers/mixed_message.npz Secret Message 2]<br />
* In class:<br />
** [https://youtu.be/dsCZ_F2HEVY Lecture 3 Zoom recording] (2021 is [https://youtu.be/Ut_jTUoqcd8 here])<br />
** [https://youtu.be/ZxAWNiisn3Y Lecture 4: Show and Tell]<br />
** Lecture: Introduction to DSB and SSB Mixers<br />
** Show and Tell (10m per group)<br />
<br />
==== Lab 1, Week 3 (Feb 1): More Mixers, and Lab Reports ====<br />
* Theory and Background<br />
** [[LaTeX]]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting], second pass<br />
** [https://github.com/AaronParsons/ugradio/tree/main/latex_template/lab1 LaTex Template] Template you may use for your lab report<br />
*** [https://www.overleaf.com/read/hvrwkmfkvkhg Overleaf version of the lab template]<br />
* In Class:<br />
** Lecture: One more pass on [[Convolution Theorem]], [[Heterodyne Mixers]], and [https://github.com/AaronParsons/ugradio/blob/main/dft_intro/fourierc.pdf DFTs]<br />
** [https://youtu.be/igZPQQ-6ieo Lecture 5]<br />
** [https://youtu.be/53CZj1CCEm0 Lecture 6]<br />
** Show and Tell<br />
** Writing Lab Reports<br />
* Lab 1 Due Feb 8, 1:30p<br />
<br />
---------<br />
<br />
=== Lab 2 ([https://github.com/AaronParsons/ugradio/blob/main/lab_bighorn/bighorn.pdf Astronomy with the 21cm Line; Some Microwave Electronics]), due Mar 1, 1:30p ===<br />
==== Lab 2, Week 1 (Feb 8): 21cm Line and Waveguides ====<br />
* Theory and Background:<br />
** [https://github.com/AaronParsons/ugradio/blob/main/lab_bighorn/cal_intensity.pdf Calibrating the Intensity and Shape of Spectral Lines]<br />
** [[Specific Intensity]]<br />
** [[21cm Transition]]<br />
** [[Coordinates]]<br />
* Demos and Tutorials<br />
** Python Tutorial Part 3: Functions, Modules, and Objects<br />
** Matrix Math with Numpy<br />
** Doppler Corrections, ugradio.doppler<br />
* In class:<br />
** Introduction to Horn and Receiver<br />
** Time<br />
** Coordinates<br />
** [https://youtu.be/ouSTGedJtI4 Lecture 7]<br />
** [https://youtu.be/htF9zWPzeLQ Lecture 8]<br />
<br />
==== Lab 2, Week 2 (Feb 15): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Impedance]]<br />
** [[Transmission_Lines]]<br />
** [http://ugastro.berkeley.edu/radio/2017/handout_links/RWvD.pdf Fields and Waves in Communication Electronics (Ramo, Whinney, and Van Duzer)]<br />
** [[Central Limit Theorem]] and [[Random Walks]]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/least_squares/lsfit_lite.pdf Least Squares Lite for the Budding Aficionado: Art and Practice]<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab2/Central%20Limit%20Theorem%20and%20Averaging.ipynb Central Limit Theorem and Averaging]<br />
* In Class:<br />
** Show and Tell<br />
** Waveguides, Transmission Lines, and Rope<br />
** Fitting Gaussians and Polynomials, ugradio.gauss<br />
** [https://youtu.be/l6_qxtqGtuY Lecture 9]<br />
** [https://youtu.be/xre1hQiZKCM Lecture 10]<br />
<br />
==== Lab 2, Week 3 (Feb 22): Write Lab Report ====<br />
* Theory and Background<br />
** [https://github.com/AaronParsons/ugradio/blob/main/least_squares/lsfit_2008.pdf Least-Squares and Chi-Square for the Budding Aficionado: Art and Practice]<br />
* In Class:<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab2/chisq_intro.ipynb Chi-Square Jupyter Notebook]<br />
** Show and Tell<br />
** Least Squares Part 2<br />
** [https://youtu.be/M92l0k45Gjw Lecture 11]<br />
* Lab 2 Due Mar 1, 1:30p<br />
<br />
---------<br />
<br />
=== Lab 3 ([https://github.com/AaronParsons/ugradio/blob/main/lab_interf/interf.pdf Radio Interferometry at X Band]), due Apr 5, 1:00p ===<br />
<br />
==== Lab 3 Week 1 (Mar 1): Interferometer ====<br />
* Theory and Background<br />
** [[Coordinates]]<br />
** [[Basic Interferometry]]<br />
* In Class:<br />
** Tour of Rooftop Interferometer<br />
** Exercise Ball Coordinates<br />
** Interferometry with Strings<br />
** [https://youtu.be/NXvDSyCfHMQ Lecture 12]<br />
** [https://youtu.be/5IDLQMO6_8g Lecture 13]<br />
<br />
==== Lab 3 Week 2 (Mar 8): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Measurement Equation]]<br />
** [[Telescope Field of View/Resolution]]<br />
* In Class:<br />
** Show and Tell<br />
** Controlling the Telescope<br />
** Tracking the Sun<br />
** Scheduling Observations<br />
* Lecture Links<br />
** [https://youtu.be/bgDBf9bPSTA Lecture 14]<br />
** [https://youtu.be/xVtmz0TfUJg Lecture 15]<br />
<br />
==== Lab 3 Week 3 (Mar 15): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Basic Interferometry II]]<br />
** [[Least Squares]]<br />
* In Class:<br />
** Show and Tell<br />
** Linear Least-Squares in Python<br />
** Minimizing Chi-Square]<br />
** Noise in Observations<br />
* Lecture Links<br />
** [https://youtu.be/ZhMu_0YFxCo Lecture 16]<br />
** [https://youtu.be/n-FOeZVuHls Lecture 17]<br />
<br />
==== No class (Mar 23, 26) ====<br />
<br />
==== Lab 3 Week 4 (Mar 29): Write Lab Report ====<br />
* Theory and Background<br />
*** [[Correlators]]<br />
*** [[Units of radiation]]<br />
* In Class:<br />
** Show and Tell<br />
** Photon bucket demo<br />
* Lecture Links<br />
** [https://youtu.be/Nl5h3Hi51bQ Lecture 18]<br />
** [https://youtu.be/GVugVn5PdB0 Lecture 19]<br />
* Lab 3 Due Apr 6, 1:30p<br />
<br />
<br />
---------<br />
<br />
=== Lab 4 ([https://github.com/AaronParsons/ugradio/blob/main/lab_dish/HI1.pdf Mapping the HI Line: the Galaxy and Supershells]), due May 3, 1:30p ===<br />
<br />
==== Useful Links ====<br />
[https://teamup.com/ksd715ee7fb766a108/#/ Link to Observing Calendar]<br />
<br />
[http://leuschner.berkeley.edu:8080 Leuschner WebCam]<br />
<br />
==== Lab 4 Week 1 (Apr 5): Leuschner Dish ====<br />
* Theory and Background<br />
** [[Specific Intensity]]<br />
** [[Radio Sky]]<br />
** [[Screen Command]]<br />
* In Class:<br />
** Trip to Leuschner: Class will go later than usual<br />
** drive mechanism (how the dish moves)<br />
** feed (notice probes) and cables<br />
** IF setup (one channel for OH, one for HI)<br />
** interacting with a CASPER [https://github.com/AaronParsons/leuschner-spectrimeter spectrometer]<br />
** pointing control<br />
** spatial sampling with dish<br />
* Lecture Links<br />
** [https://youtu.be/ZeB9Gj3gHgs Lecture 20]<br />
** [https://berkeley.zoom.us/rec/share/yYtJDpzz52pOc5GR42PxBbA_QorFT6a81CAfr6IKyRre8X_2LRtd9NPzNNLXeBCw Lab 4 Lecture 2 (Thursday 4/9/20)]<br />
<br />
==== Lab 4 Week 2 (Apr 12): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[21cm Transition]]<br />
** [[Black-Body Radiation]]<br />
** [[Line Profile Functions]]<br />
* In Class:<br />
** Show and Tell<br />
** spatial sampling with a dish<br />
** interpolation<br />
** projection<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/3pBJILbBxE5JRpWSwkWOe6QYMoHlaaa823IZr_QNyE0M46G1NWz2KSaA40QwupHp Lab 4 Lecture 3 (Tuesday 4/14; access v7*1$5k7)]<br />
** [https://berkeley.zoom.us/rec/share/wsAsELX3yThOTJXExEjjWaI4Mdq7eaa8hicf__AEzEkISCgjfujdIe8CV-yXP8VP Lab 4 Lecture 4 (Thursday 4/16; access G7*##+1O)]<br />
<br />
==== Lab 4 Week 3 (Apr 19): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Emission Line Observing]]<br />
** [[Radiative Transfer Equation]]<br />
** [[Optical Depth]]<br />
** [[Estimating Atomic Transition Strengths]]<br />
* In Class:<br />
** Show and Tell<br />
** close-out plan<br />
** computing doppler width for a line of sight (assuming circular motion)<br />
** calibrating spectra<br />
** converting spectra to hydrogen<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/7Md4Fejz1FJLcqPEslDnAPFmTqGieaa81Cgb-PRczh6T0TBWOxVAZOoPk8cPBvsd Lab 4 Lecture 5 (Tuesday 4/21; access 7f!o&=J9)]<br />
** Lab 4 Lecture 6 (Thursday 4/23): share day; no recording<br />
<br />
==== Lab 4 Week 4 (Apr 26): Write Lab Report ====<br />
* Theory and Background<br />
** [https://github.com/AaronParsons/ugradio/blob/main/lab_bighorn/cal_intensity.pdf Calibrating the Intensity and Shape of Spectral Lines (Carl Heiles)] <br />
* In Class:<br />
** Show and Tell<br />
** displaying information in image form<br />
** Lab 4 Due May 3, 1:30p<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/6pVKDIHL7XlIQ5GVtAL4Q4klI7Tvaaa81HBP_vBezRuCI54jJ3AKdenjUZB-gScx Lab 4 Lecture 7 (Tuesday 4/28; access 3h=j11*@ )]<br />
** [https://berkeley.zoom.us/rec/share/teBrde3hr2lOHZ3V9GH4S6MAH5j7aaa8hCZN-PoOxUycBmjJiZYoIuqIb29LQg8W Lab 4 Lecture 8 (Thursday 4/30; access 5V$.3i8$ )]<br />
<br />
<br />
<!-- === Lab 2 (Digital Lab) ===<br />
* Lab 2, Part 1 <br />
** Quiz 4 on:<br />
** Breakout Sessions:<br />
** Discrete Fourier Transform<br />
*** Convolving and Smoothing<br />
*** Aliasing<br />
*** Intro to Lab 2, pick groups<br />
<br />
* Lab 2, Part 2 <br />
** Quiz 5 on:<br />
*** [[Data Representations]]<br />
*** [[Digital Down Conversion]]<br />
** Breakout Sessions:<br />
*** Data Representations demo<br />
*** Mixing, Filtering, Decimation, and the FFT<br />
*** [[Intro to ROACH]]<br />
<br />
* Lab 2, Part 3 <br />
** Quiz 6 on:<br />
*** [[Synchronous and Asynchronous Logic]]<br />
*** [[Processor Architectures]]<br />
*** [[FIR Filters]]<br />
** Breakout Sessions:<br />
*** Acting out various processors<br />
*** Simulating an FIR filter<br />
*** Lab feedback<br />
--><br />
<br />
== Unused but Useful? ==<br />
<br />
* [[Radiometer Equation]]<br />
* [[Quantization and Rounding]]<br />
* [[Reciprocity Theorem]]<br />
* [[Dipole Antennas]]<br />
* [[Impedance of Free Space]]<br />
* [[Radiometer Equation Applied to Telescopes]]<br />
* [[Radiometer Equation Applied to Interferometers]]<br />
* [[Fringe Stopping]]<br />
* [[Direction Dependent Beams]]<br />
* [[Self Calibration]]<br />
* [[Flux Calibration]]<br />
* [[Gridding]]<br />
* [[Earth Rotation Synthesis]]<br />
* [[Delay Imaging]]</div>AparsonsRadiometer Equation2022-01-21T19:13:35Z<p>Aparsons: </p>
<hr />
<div>===Prerequisites===<br />
* [[Central Limit Theorem]]<br />
* [[Noise Temperature]]<br />
<br />
===Short Topical Videos===<br />
* <br />
<br />
===Reference Material===<br />
* Synthesis Imaging in Radio Astronomy II, ed. Taylor, Carilli, Perley, Ch. 9 (Wrobel & Walker)<br />
* [https://www.cv.nrao.edu/~sransom/web/Ch3.html NRAO Radio Antennas and Radiometers]<br />
<br />
<latex><br />
\documentclass[11pt]{article}<br />
\usepackage{graphicx}<br />
\usepackage{amsmath}<br />
\usepackage{fullpage}<br />
\begin{document}<br />
<br />
\section*{The Radiometer Equation}<br />
<br />
The radiometer equation, at its heart, is a relatively straight-forward application of the Central Limit Theorem. It describes how the uncertainty in measuring a noise temperature decreases as the square-root of the number of samples averaged together:<br />
\begin{equation}<br />
\sigma_T=\frac{T_{sys}}{\sqrt{Bt}},<br />
\end{equation}<br />
where $\sigma$ is the residual (root-mean-square) uncertainty in a noise temperature measurement, $T_{sys}$ is the noise temperature of a circuit (or ``system"), $B$ is the bandwidth over which a single measurement is made (i.e. the integrated bandwidth), and $t$ is the time over which a measurement is averaged (i.e. the integration time). <br />
<br />
Although the above equation is correct, to fully understand it, it would be better to write it as follows:<br />
\begin{equation}<br />
\sigma_T=\frac{\sqrt{2}T_{sys}}{\sqrt{2Bt}}<br />
\end{equation}<br />
In the denominator, $2Bt$, is simply the number of independent samples (i.e. $N$ in the Central Limit Theorem) that were averaged together into a single measurement. The accounting goes as follows: according to the Nyquist Theorem of sampling, it takes two samples per period to uniquely characterize a sine wave. Said another way, a signal with bandwidth $B$, expressed in Hz, contains $2B$ independent pieces of information each second. Thus, for an measurement made over $t$ seconds, we have averaged $2Bt$ independent samples.<br />
<br />
The numerator of the (re-expressed) radiometer equation, $\sqrt{2}T_{sys}$, has one bit of trickiness in it, and to understand it, we first need to understand what exactly we are measuring, and why there is uncertainty in our measurements. $T_{sys}$ is a {\it noise} temperature, which means that it characterizes the variance of a noise signal with zero mean. When you go to measure a noise temperature, you are really trying to measure the variance of a random noisy signal. <br />
<br />
For any limited number of samples $x_1,x_2,\dots$ generated by a random process, there is an inherent uncertainty in the variance, $\sigma^2$, you compute for that sample, just as there would be an inherent uncertainty in the mean, $\bar x$. However, whereas $\sigma$ characterizes the per-sample uncertainty for the purpose of calculating $\bar x$, if you are trying to measure $\sigma^2$, the uncertainty is actually $\sqrt{2}\sigma$ for each sample. This is because, to compute the variance, you have to square each sample (e.g. $x_1^2,x_2^2,\dots$), and then average. The math can get messy, but if you just take your computer and calculate the standard deviation of $x^2$, for $x$ drawn from a Gaussian distribution with $\sigma=1$, you'll find that it is $\sqrt{2}$.<br />
<br />
This is all to say that if you are trying to measure the noise temperature, $T_{sys}$, which relates to the variance of a distribution, then the uncertainty of each variance measurement is $\sqrt{2}T_{sys}$. That is the measurement error that we are beating down by $\sqrt{N}$ according to the Central Limit Theorem (where $N=2Bt$), and so that is what goes in the numerator of the Radiometer equation. It's just a confusing accident that the $\sqrt{2}$ for the measurement error associated with measuring the variance cancels out the factor of 2 in $N$ associated with Nyquist sampling. <br />
<br />
\end{document}<br />
</latex></div>AparsonsUndergraduate Radio Lab2022-01-21T01:16:00Z<p>Aparsons: </p>
<hr />
<div>This course consists of four laboratory experiments that concentrate on radio instrumentation and laboratory techniques. We will build receiving, observing, and data analysis systems for two telescopes: a single-dish 21-cm line system, and a 10.7-GHz interferometer. We will use these telescopes for astronomical observing projects including structure of the Milky Way galaxy, precise position measurement of several radio sources, and measurement of the radio brightness distributions of the sun and moon with high angular resolution. There is a heavy emphasis on digital data acquisition, software development in the Python language, and high-quality written reports.<br />
<br />
=== Class Programmatics ===<br />
* Class Code Repository: [http://github.com/AaronParsons/ugradio http://github.com/AaronParsons/ugradio]<br />
* [https://github.com/AaronParsons/ugradio/raw/main/schedule/syllabus_2022_spring.docx Syllabus]<br />
* [https://berkeley.zoom.us/j/3587609756 Zoom Room: 358 760 9756]<br />
* Bcourses: [https://bcourses.berkeley.edu/courses/1512067 1512067]<br />
* Discord: https://discord.gg/54m6yjsFHN<br />
* Sign-up sheet for lab: https://calendar.google.com/calendar/u/0/selfsched?sstoken=UUhoRVItYjh2bFA3fGRlZmF1bHR8MDlkOGRkN2MzNmVlMDM1ZTYzNzJiZTcxOTRkNmY1Y2Q<br />
* Class Hours:<br />
** Tuesday/Thursday 1:30-3:30pm<br />
* Office Hours:<br />
** Aaron Parsons (aparsons at berkeley): TBD, or by appointment, in standard [https://berkeley.zoom.us/j/3587609756 Zoom Room: 358 760 9756]<br />
** Christian Bye (chbye at berkeley): TBD or by appointment (Through Discord Office Hours Channel or [https://berkeley.zoom.us/my/christianbye Zoom: 372 207 8992])<br />
** Mine Gokcen (minegokcen at berkeley):<br />
** Frank Latora (fjlatora at berkeley):<br />
* Lab Groups:<br />
** Group 1<br />
** Group 2<br />
** Group 3<br />
** Group 4<br />
** Group 5<br />
<br />
=== Experiments ===<br />
* Lab 1: [https://github.com/AaronParsons/ugradio/blob/main/lab_mixers/allmixers.pdf Exploring Digital Sampling, Fourier Transforms, and both DSB and SSB Mixers]<br />
* Lab 2: [https://github.com/AaronParsons/ugradio/blob/main/lab_bighorn/bighorn.pdf Astronomy with the 21cm Line; Some Microwave Electronics]<br />
* Lab 3: [https://github.com/AaronParsons/ugradio/blob/main/lab_interf/interf.pdf Radio Interferometry at X Band]<br />
* Lab 4: [https://github.com/AaronParsons/ugradio/blob/main/lab_dish/HI1.pdf Mapping the HI Line: the Galaxy and Supershells]<br />
<br />
===Getting Set Up===<br />
* [[Getting Started in the Undergraduate Radio Lab]]<br />
** [[Setting Up Your Raspberry Pi]]<br />
** [[Connecting to the Lab Computers Remotely]]<br />
<br />
=== General Skills Used Through-Out Course ===<br />
<br />
* Navigating Linux/Unix-like Operating Systems<br />
** [[Unix Primer]]<br />
** [[Unix Text Editors]]<br />
* Programming in Python<br />
** [[Python Installation and Basic Programming]]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting]<br />
* Software Engineering<br />
** [[Revision Control]]<br />
** [[Getting Started w/ Github]]<br />
** [[Unit Testing]]<br />
* Report Writing<br />
** [[LaTeX]]<br />
<br />
== Topics by Date ==<br />
<br />
=== Lab 1 ([https://github.com/AaronParsons/ugradio/blob/main/lab_mixers/allmixers.pdf Exploring Digital Sampling, Fourier Transforms, and both DSB and SSB Mixers]), Due Feb 8, 1:30p ===<br />
==== Lab 1, Week 1 (Jan 18): Sampling and Power Spectra ====<br />
* Resources and Handouts<br />
** [[Nyquist Sampling]]<br />
** [[Fourier Transform]]<br />
** Technical Skills<br />
*** [[Unix Primer]]<br />
*** [[Unix Text Editors]]<br />
*** [[Python Installation and Basic Programming]]<br />
**** [[Revision Control]]<br />
**** [[Getting Started w/ Github]]<br />
<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/Nyquist%20Sampling%20and%20Aliasing.ipynb Aliasing Demo] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=ugradio&branch=main&path=jupyter_tutorials/Nyquist%20Samplling%20and%20Aliasing.ipynb datahub.berkeley.edu])<br />
* In class:<br />
** Astrobaki, Syllabus, Office Hours<br />
** Getting accounts (premade by Bill Boyd, change password with <tt>passwd</tt> command)<br />
** Lab access (see [[Getting Started in the Undergraduate Radio Lab]])<br />
** Class philosophy and workflow<br />
** [[Nyquist Sampling]] and aliasing<br />
** [[Fourier Transform]]<br />
** ADC Quantization<br />
** Lab Hardware<br />
*** PicoScope 2206a<br />
*** Raspberry Pi + [[NESDR Smart]]<br />
** Data Challenge<br />
*** [https://github.com/AaronParsons/ugradio/blob/main/lab_mixers/secret_message.npz Secret Message]<br />
** [https://youtu.be/uH-dQnq7ZD4 2022 Lecture 1 Zoom recording] (2021 is [https://youtu.be/Yb4K8t6SG4k here])<br />
** [https://youtu.be/LtEzUnp_E9E Lecture 2 Zoom recording] (2021 is [https://youtu.be/oJplegmHeAI here])<br />
<br />
==== Lab 1, Week 2 (Jan 26): DSB and SSB Mixers ====<br />
* Theory and Background:<br />
** [[Heterodyne Mixers]]<br />
** [[Convolution Theorem]]<br />
** [[Fast Fourier Transform]]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/dft_intro/fourierc.pdf Spectral Analysis with Discrete Fourier Transforms]<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/Convolutions%20and%20Correlations.ipynb Convolutions and Correlations ]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/Sec%204.%20In%20the%20mind.ipynb In the Mind: Introduction to the Fourier Transform ]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/datatype_demo.ipynb Mommy Fortuna's Midnight Carnival of Python Oddities]<br />
** [[Data Representations]], with handout on [https://github.com/AaronParsons/ugradio/blob/main/pythonprimer/datatypes.pdf Data Types and Organizational Structures]<br />
** Data Challenge<br />
*** [https://github.com/AaronParsons/ugradio/blob/main/lab_mixers/mixed_message.npz Secret Message 2]<br />
* In class:<br />
** [https://youtu.be/Ut_jTUoqcd8 Lecture 3: Discrete Fourier Transforms and the Convolution Theorem]<br />
** [https://youtu.be/ZxAWNiisn3Y Lecture 4: Show and Tell]<br />
** Lecture: Introduction to DSB and SSB Mixers<br />
** Show and Tell (10m per group)<br />
<br />
==== Lab 1, Week 3 (Feb 1): More Mixers, and Lab Reports ====<br />
* Theory and Background<br />
** [[LaTeX]]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting], second pass<br />
** [https://github.com/AaronParsons/ugradio/tree/main/latex_template/lab1 LaTex Template] Template you may use for your lab report<br />
*** [https://www.overleaf.com/read/hvrwkmfkvkhg Overleaf version of the lab template]<br />
* In Class:<br />
** Lecture: One more pass on [[Convolution Theorem]], [[Heterodyne Mixers]], and [https://github.com/AaronParsons/ugradio/blob/main/dft_intro/fourierc.pdf DFTs]<br />
** [https://youtu.be/igZPQQ-6ieo Lecture 5]<br />
** [https://youtu.be/53CZj1CCEm0 Lecture 6]<br />
** Show and Tell<br />
** Writing Lab Reports<br />
* Lab 1 Due Feb 8, 1:30p<br />
<br />
---------<br />
<br />
=== Lab 2 ([https://github.com/AaronParsons/ugradio/blob/main/lab_bighorn/bighorn.pdf Astronomy with the 21cm Line; Some Microwave Electronics]), due Mar 1, 1:30p ===<br />
==== Lab 2, Week 1 (Feb 8): 21cm Line and Waveguides ====<br />
* Theory and Background:<br />
** [https://github.com/AaronParsons/ugradio/blob/main/lab_bighorn/cal_intensity.pdf Calibrating the Intensity and Shape of Spectral Lines]<br />
** [[Specific Intensity]]<br />
** [[21cm Transition]]<br />
** [[Coordinates]]<br />
* Demos and Tutorials<br />
** Python Tutorial Part 3: Functions, Modules, and Objects<br />
** Matrix Math with Numpy<br />
** Doppler Corrections, ugradio.doppler<br />
* In class:<br />
** Introduction to Horn and Receiver<br />
** Time<br />
** Coordinates<br />
** [https://youtu.be/ouSTGedJtI4 Lecture 7]<br />
** [https://youtu.be/htF9zWPzeLQ Lecture 8]<br />
<br />
==== Lab 2, Week 2 (Feb 15): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Impedance]]<br />
** [[Transmission_Lines]]<br />
** [http://ugastro.berkeley.edu/radio/2017/handout_links/RWvD.pdf Fields and Waves in Communication Electronics (Ramo, Whinney, and Van Duzer)]<br />
** [[Central Limit Theorem]] and [[Random Walks]]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/least_squares/lsfit_lite.pdf Least Squares Lite for the Budding Aficionado: Art and Practice]<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab2/Central%20Limit%20Theorem%20and%20Averaging.ipynb Central Limit Theorem and Averaging]<br />
* In Class:<br />
** Show and Tell<br />
** Waveguides, Transmission Lines, and Rope<br />
** Fitting Gaussians and Polynomials, ugradio.gauss<br />
** [https://youtu.be/l6_qxtqGtuY Lecture 9]<br />
** [https://youtu.be/xre1hQiZKCM Lecture 10]<br />
<br />
==== Lab 2, Week 3 (Feb 22): Write Lab Report ====<br />
* Theory and Background<br />
** [https://github.com/AaronParsons/ugradio/blob/main/least_squares/lsfit_2008.pdf Least-Squares and Chi-Square for the Budding Aficionado: Art and Practice]<br />
* In Class:<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab2/chisq_intro.ipynb Chi-Square Jupyter Notebook]<br />
** Show and Tell<br />
** Least Squares Part 2<br />
** [https://youtu.be/M92l0k45Gjw Lecture 11]<br />
* Lab 2 Due Mar 1, 1:30p<br />
<br />
---------<br />
<br />
=== Lab 3 ([https://github.com/AaronParsons/ugradio/blob/main/lab_interf/interf.pdf Radio Interferometry at X Band]), due Apr 5, 1:00p ===<br />
<br />
==== Lab 3 Week 1 (Mar 1): Interferometer ====<br />
* Theory and Background<br />
** [[Coordinates]]<br />
** [[Basic Interferometry]]<br />
* In Class:<br />
** Tour of Rooftop Interferometer<br />
** Exercise Ball Coordinates<br />
** Interferometry with Strings<br />
** [https://youtu.be/NXvDSyCfHMQ Lecture 12]<br />
** [https://youtu.be/5IDLQMO6_8g Lecture 13]<br />
<br />
==== Lab 3 Week 2 (Mar 8): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Measurement Equation]]<br />
** [[Telescope Field of View/Resolution]]<br />
* In Class:<br />
** Show and Tell<br />
** Controlling the Telescope<br />
** Tracking the Sun<br />
** Scheduling Observations<br />
* Lecture Links<br />
** [https://youtu.be/bgDBf9bPSTA Lecture 14]<br />
** [https://youtu.be/xVtmz0TfUJg Lecture 15]<br />
<br />
==== Lab 3 Week 3 (Mar 15): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Basic Interferometry II]]<br />
** [[Least Squares]]<br />
* In Class:<br />
** Show and Tell<br />
** Linear Least-Squares in Python<br />
** Minimizing Chi-Square]<br />
** Noise in Observations<br />
* Lecture Links<br />
** [https://youtu.be/ZhMu_0YFxCo Lecture 16]<br />
** [https://youtu.be/n-FOeZVuHls Lecture 17]<br />
<br />
==== No class (Mar 23, 26) ====<br />
<br />
==== Lab 3 Week 4 (Mar 29): Write Lab Report ====<br />
* Theory and Background<br />
*** [[Correlators]]<br />
*** [[Units of radiation]]<br />
* In Class:<br />
** Show and Tell<br />
** Photon bucket demo<br />
* Lecture Links<br />
** [https://youtu.be/Nl5h3Hi51bQ Lecture 18]<br />
** [https://youtu.be/GVugVn5PdB0 Lecture 19]<br />
* Lab 3 Due Apr 6, 1:30p<br />
<br />
<br />
---------<br />
<br />
=== Lab 4 ([https://github.com/AaronParsons/ugradio/blob/main/lab_dish/HI1.pdf Mapping the HI Line: the Galaxy and Supershells]), due May 3, 1:30p ===<br />
<br />
==== Useful Links ====<br />
[https://teamup.com/ksd715ee7fb766a108/#/ Link to Observing Calendar]<br />
<br />
[http://leuschner.berkeley.edu:8080 Leuschner WebCam]<br />
<br />
==== Lab 4 Week 1 (Apr 5): Leuschner Dish ====<br />
* Theory and Background<br />
** [[Specific Intensity]]<br />
** [[Radio Sky]]<br />
** [[Screen Command]]<br />
* In Class:<br />
** Trip to Leuschner: Class will go later than usual<br />
** drive mechanism (how the dish moves)<br />
** feed (notice probes) and cables<br />
** IF setup (one channel for OH, one for HI)<br />
** interacting with a CASPER [https://github.com/AaronParsons/leuschner-spectrimeter spectrometer]<br />
** pointing control<br />
** spatial sampling with dish<br />
* Lecture Links<br />
** [https://youtu.be/ZeB9Gj3gHgs Lecture 20]<br />
** [https://berkeley.zoom.us/rec/share/yYtJDpzz52pOc5GR42PxBbA_QorFT6a81CAfr6IKyRre8X_2LRtd9NPzNNLXeBCw Lab 4 Lecture 2 (Thursday 4/9/20)]<br />
<br />
==== Lab 4 Week 2 (Apr 12): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[21cm Transition]]<br />
** [[Black-Body Radiation]]<br />
** [[Line Profile Functions]]<br />
* In Class:<br />
** Show and Tell<br />
** spatial sampling with a dish<br />
** interpolation<br />
** projection<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/3pBJILbBxE5JRpWSwkWOe6QYMoHlaaa823IZr_QNyE0M46G1NWz2KSaA40QwupHp Lab 4 Lecture 3 (Tuesday 4/14; access v7*1$5k7)]<br />
** [https://berkeley.zoom.us/rec/share/wsAsELX3yThOTJXExEjjWaI4Mdq7eaa8hicf__AEzEkISCgjfujdIe8CV-yXP8VP Lab 4 Lecture 4 (Thursday 4/16; access G7*##+1O)]<br />
<br />
==== Lab 4 Week 3 (Apr 19): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Emission Line Observing]]<br />
** [[Radiative Transfer Equation]]<br />
** [[Optical Depth]]<br />
** [[Estimating Atomic Transition Strengths]]<br />
* In Class:<br />
** Show and Tell<br />
** close-out plan<br />
** computing doppler width for a line of sight (assuming circular motion)<br />
** calibrating spectra<br />
** converting spectra to hydrogen<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/7Md4Fejz1FJLcqPEslDnAPFmTqGieaa81Cgb-PRczh6T0TBWOxVAZOoPk8cPBvsd Lab 4 Lecture 5 (Tuesday 4/21; access 7f!o&=J9)]<br />
** Lab 4 Lecture 6 (Thursday 4/23): share day; no recording<br />
<br />
==== Lab 4 Week 4 (Apr 26): Write Lab Report ====<br />
* Theory and Background<br />
** [https://github.com/AaronParsons/ugradio/blob/main/lab_bighorn/cal_intensity.pdf Calibrating the Intensity and Shape of Spectral Lines (Carl Heiles)] <br />
* In Class:<br />
** Show and Tell<br />
** displaying information in image form<br />
** Lab 4 Due May 3, 1:30p<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/6pVKDIHL7XlIQ5GVtAL4Q4klI7Tvaaa81HBP_vBezRuCI54jJ3AKdenjUZB-gScx Lab 4 Lecture 7 (Tuesday 4/28; access 3h=j11*@ )]<br />
** [https://berkeley.zoom.us/rec/share/teBrde3hr2lOHZ3V9GH4S6MAH5j7aaa8hCZN-PoOxUycBmjJiZYoIuqIb29LQg8W Lab 4 Lecture 8 (Thursday 4/30; access 5V$.3i8$ )]<br />
<br />
<br />
<!-- === Lab 2 (Digital Lab) ===<br />
* Lab 2, Part 1 <br />
** Quiz 4 on:<br />
** Breakout Sessions:<br />
** Discrete Fourier Transform<br />
*** Convolving and Smoothing<br />
*** Aliasing<br />
*** Intro to Lab 2, pick groups<br />
<br />
* Lab 2, Part 2 <br />
** Quiz 5 on:<br />
*** [[Data Representations]]<br />
*** [[Digital Down Conversion]]<br />
** Breakout Sessions:<br />
*** Data Representations demo<br />
*** Mixing, Filtering, Decimation, and the FFT<br />
*** [[Intro to ROACH]]<br />
<br />
* Lab 2, Part 3 <br />
** Quiz 6 on:<br />
*** [[Synchronous and Asynchronous Logic]]<br />
*** [[Processor Architectures]]<br />
*** [[FIR Filters]]<br />
** Breakout Sessions:<br />
*** Acting out various processors<br />
*** Simulating an FIR filter<br />
*** Lab feedback<br />
--><br />
<br />
== Unused but Useful? ==<br />
<br />
* [[Radiometer Equation]]<br />
* [[Quantization and Rounding]]<br />
* [[Reciprocity Theorem]]<br />
* [[Dipole Antennas]]<br />
* [[Impedance of Free Space]]<br />
* [[Radiometer Equation Applied to Telescopes]]<br />
* [[Radiometer Equation Applied to Interferometers]]<br />
* [[Fringe Stopping]]<br />
* [[Direction Dependent Beams]]<br />
* [[Self Calibration]]<br />
* [[Flux Calibration]]<br />
* [[Gridding]]<br />
* [[Earth Rotation Synthesis]]<br />
* [[Delay Imaging]]</div>AparsonsNESDR Smart2022-01-20T21:18:19Z<p>Aparsons: Created page with "For the Undergraduate Radio Lab we use a software-defined radio (SDR) dongle hosted on a RPI (see Setting Up Your Raspberry Pi). This page describes the details of the..."</p>
<hr />
<div>For the [[Undergraduate Radio Lab]] we use a software-defined radio (SDR) dongle hosted on a RPI (see [[Setting Up Your Raspberry Pi]]). This page describes the details of the the Nooelec NESDR Smart,<br />
which shares a chipset with many other cheap dongles you could use for SDR. In particular, the features we describe below are common to dongles that employ the R820T tuner chip and the<br />
RTL2832U digitizer chip.<br />
<br />
==Helpful Links==<br />
* Data sheets for the [http://www.datasheetmeta.com/pdf.php?q=RTL2832 RTL2832U] and the [http://www.datasheetmeta.com/pdf.php?q=R820T2 R820T2]<br />
* A characterization of [http://pa3fwm.nl/technotes/tn20.html spectral response] by Pieter-Tjerk de Boer<br />
* the [https://github.com/roger-/pyrtlsdr PyRtlSdr] Python library for interfacing to the dongle<br />
* a [https://www.rtl-sdr.com/rtl-sdr-blog-v-3-dongles-user-guide/ User Guide] on RTL-SDR for using these dongles<br />
* an [https://www.rtl-sdr.com/cheap-and-easy-hydrogen-line-radio-astronomy-with-a-rtl-sdr-wifi-parabolic-grid-dish-lna-and-sdrsharp/ example] from RTL-SDR of using a dongle for 21 cm observing<br />
* a [http://www.radioforeveryone.com/p/officially-called-nooelec-nesdr-smart.html comparison] of various dongles<br />
* an [http://www.radioforeveryone.com/p/the-new-smart-manufacturer-link-can-do.html example] of how certain dongles can be reworked to support direct sampling<br />
* a [https://github.com/steve-m/librtlsdr C Library] for the RTL2832U driver we use.<br />
* a [https://github.com/medvedvvs/r820tweak_patched tweaked library] that supports changing FIR coefficients on the R820T2, along with a [https://www.rtl-sdr.com/new-updates-to-the-librtlsdr-rtl-sdr-driver-fork/ summary]<br />
<br />
==Description==</div>AparsonsUndergraduate Radio Lab2022-01-20T21:02:16Z<p>Aparsons: </p>
<hr />
<div>This course consists of four laboratory experiments that concentrate on radio instrumentation and laboratory techniques. We will build receiving, observing, and data analysis systems for two telescopes: a single-dish 21-cm line system, and a 10.7-GHz interferometer. We will use these telescopes for astronomical observing projects including structure of the Milky Way galaxy, precise position measurement of several radio sources, and measurement of the radio brightness distributions of the sun and moon with high angular resolution. There is a heavy emphasis on digital data acquisition, software development in the Python language, and high-quality written reports.<br />
<br />
=== Class Programmatics ===<br />
* Class Code Repository: [http://github.com/AaronParsons/ugradio http://github.com/AaronParsons/ugradio]<br />
* [https://github.com/AaronParsons/ugradio/raw/main/schedule/syllabus_2022_spring.docx Syllabus]<br />
* [https://berkeley.zoom.us/j/3587609756 Zoom Room: 358 760 9756]<br />
* Bcourses: [https://bcourses.berkeley.edu/courses/1512067 1512067]<br />
* Discord: https://discord.gg/54m6yjsFHN<br />
* Sign-up sheet for lab: https://calendar.google.com/calendar/u/0/selfsched?sstoken=UUhoRVItYjh2bFA3fGRlZmF1bHR8MDlkOGRkN2MzNmVlMDM1ZTYzNzJiZTcxOTRkNmY1Y2Q<br />
* Class Hours:<br />
** Tuesday/Thursday 1:30-3:30pm<br />
* Office Hours:<br />
** Aaron Parsons (aparsons at berkeley): TBD, or by appointment, in standard [https://berkeley.zoom.us/j/3587609756 Zoom Room: 358 760 9756]<br />
** Christian Bye (chbye at berkeley): TBD or by appointment (Through Discord Office Hours Channel or [https://berkeley.zoom.us/my/christianbye Zoom: 372 207 8992])<br />
** Mine Gokcen (minegokcen at berkeley):<br />
** Frank Latora (fjlatora at berkeley):<br />
* Lab Groups:<br />
** Group 1<br />
** Group 2<br />
** Group 3<br />
** Group 4<br />
** Group 5<br />
<br />
=== Experiments ===<br />
* Lab 1: [https://github.com/AaronParsons/ugradio/blob/main/lab_mixers/allmixers.pdf Exploring Digital Sampling, Fourier Transforms, and both DSB and SSB Mixers]<br />
* Lab 2: [https://github.com/AaronParsons/ugradio/blob/main/lab_bighorn/bighorn.pdf Astronomy with the 21cm Line; Some Microwave Electronics]<br />
* Lab 3: [https://github.com/AaronParsons/ugradio/blob/main/lab_interf/interf.pdf Radio Interferometry at X Band]<br />
* Lab 4: [https://github.com/AaronParsons/ugradio/blob/main/lab_dish/HI1.pdf Mapping the HI Line: the Galaxy and Supershells]<br />
<br />
===Getting Set Up===<br />
* [[Getting Started in the Undergraduate Radio Lab]]<br />
** [[Setting Up Your Raspberry Pi]]<br />
** [[Connecting to the Lab Computers Remotely]]<br />
<br />
=== General Skills Used Through-Out Course ===<br />
<br />
* Navigating Linux/Unix-like Operating Systems<br />
** [[Unix Primer]]<br />
** [[Unix Text Editors]]<br />
* Programming in Python<br />
** [[Python Installation and Basic Programming]]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting]<br />
* Software Engineering<br />
** [[Revision Control]]<br />
** [[Getting Started w/ Github]]<br />
** [[Unit Testing]]<br />
* Report Writing<br />
** [[LaTeX]]<br />
<br />
== Topics by Date ==<br />
<br />
=== Lab 1 ([https://github.com/AaronParsons/ugradio/blob/main/lab_mixers/allmixers.pdf Exploring Digital Sampling, Fourier Transforms, and both DSB and SSB Mixers]), Due Feb 8, 1:30p ===<br />
==== Lab 1, Week 1 (Jan 18): Sampling and Power Spectra ====<br />
* Resources and Handouts<br />
** [[Nyquist Sampling]]<br />
** [[Fourier Transform]]<br />
** Technical Skills<br />
*** [[Unix Primer]]<br />
*** [[Unix Text Editors]]<br />
*** [[Python Installation and Basic Programming]]<br />
**** [[Revision Control]]<br />
**** [[Getting Started w/ Github]]<br />
<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/Nyquist%20Sampling%20and%20Aliasing.ipynb Aliasing Demo] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=ugradio&branch=main&path=jupyter_tutorials/Nyquist%20Samplling%20and%20Aliasing.ipynb datahub.berkeley.edu])<br />
* In class:<br />
** Astrobaki, Syllabus, Office Hours<br />
** Getting accounts (premade by Bill Boyd, change password with <tt>passwd</tt> command)<br />
** Lab access (see [[Getting Started in the Undergraduate Radio Lab]])<br />
** Class philosophy and workflow<br />
** [[Nyquist Sampling]] and aliasing<br />
** [[Fourier Transform]]<br />
** ADC Quantization<br />
** Lab Hardware<br />
*** PicoScope 2206a<br />
*** Raspberry Pi + [[NESDR Smart]]<br />
** Data Challenge<br />
*** [https://github.com/AaronParsons/ugradio/blob/main/lab_mixers/secret_message.npz Secret Message]<br />
** [https://youtu.be/uH-dQnq7ZD4 2022 Lecture 1 Zoom recording] (2021 is [https://youtu.be/Yb4K8t6SG4k here])<br />
** (2021 is [https://youtu.be/oJplegmHeAI here])<br />
<br />
==== Lab 1, Week 2 (Jan 26): DSB and SSB Mixers ====<br />
* Theory and Background:<br />
** [[Heterodyne Mixers]]<br />
** [[Convolution Theorem]]<br />
** [[Fast Fourier Transform]]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/dft_intro/fourierc.pdf Spectral Analysis with Discrete Fourier Transforms]<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/Convolutions%20and%20Correlations.ipynb Convolutions and Correlations ]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/Sec%204.%20In%20the%20mind.ipynb In the Mind: Introduction to the Fourier Transform ]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/datatype_demo.ipynb Mommy Fortuna's Midnight Carnival of Python Oddities]<br />
** [[Data Representations]], with handout on [https://github.com/AaronParsons/ugradio/blob/main/pythonprimer/datatypes.pdf Data Types and Organizational Structures]<br />
** Data Challenge<br />
*** [https://github.com/AaronParsons/ugradio/blob/main/lab_mixers/mixed_message.npz Secret Message 2]<br />
* In class:<br />
** [https://youtu.be/Ut_jTUoqcd8 Lecture 3: Discrete Fourier Transforms and the Convolution Theorem]<br />
** [https://youtu.be/ZxAWNiisn3Y Lecture 4: Show and Tell]<br />
** Lecture: Introduction to DSB and SSB Mixers<br />
** Show and Tell (10m per group)<br />
<br />
==== Lab 1, Week 3 (Feb 1): More Mixers, and Lab Reports ====<br />
* Theory and Background<br />
** [[LaTeX]]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting], second pass<br />
** [https://github.com/AaronParsons/ugradio/tree/main/latex_template/lab1 LaTex Template] Template you may use for your lab report<br />
*** [https://www.overleaf.com/read/hvrwkmfkvkhg Overleaf version of the lab template]<br />
* In Class:<br />
** Lecture: One more pass on [[Convolution Theorem]], [[Heterodyne Mixers]], and [https://github.com/AaronParsons/ugradio/blob/main/dft_intro/fourierc.pdf DFTs]<br />
** [https://youtu.be/igZPQQ-6ieo Lecture 5]<br />
** [https://youtu.be/53CZj1CCEm0 Lecture 6]<br />
** Show and Tell<br />
** Writing Lab Reports<br />
* Lab 1 Due Feb 8, 1:30p<br />
<br />
---------<br />
<br />
=== Lab 2 ([https://github.com/AaronParsons/ugradio/blob/main/lab_bighorn/bighorn.pdf Astronomy with the 21cm Line; Some Microwave Electronics]), due Mar 1, 1:30p ===<br />
==== Lab 2, Week 1 (Feb 8): 21cm Line and Waveguides ====<br />
* Theory and Background:<br />
** [https://github.com/AaronParsons/ugradio/blob/main/lab_bighorn/cal_intensity.pdf Calibrating the Intensity and Shape of Spectral Lines]<br />
** [[Specific Intensity]]<br />
** [[21cm Transition]]<br />
** [[Coordinates]]<br />
* Demos and Tutorials<br />
** Python Tutorial Part 3: Functions, Modules, and Objects<br />
** Matrix Math with Numpy<br />
** Doppler Corrections, ugradio.doppler<br />
* In class:<br />
** Introduction to Horn and Receiver<br />
** Time<br />
** Coordinates<br />
** [https://youtu.be/ouSTGedJtI4 Lecture 7]<br />
** [https://youtu.be/htF9zWPzeLQ Lecture 8]<br />
<br />
==== Lab 2, Week 2 (Feb 15): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Impedance]]<br />
** [[Transmission_Lines]]<br />
** [http://ugastro.berkeley.edu/radio/2017/handout_links/RWvD.pdf Fields and Waves in Communication Electronics (Ramo, Whinney, and Van Duzer)]<br />
** [[Central Limit Theorem]] and [[Random Walks]]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/least_squares/lsfit_lite.pdf Least Squares Lite for the Budding Aficionado: Art and Practice]<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab2/Central%20Limit%20Theorem%20and%20Averaging.ipynb Central Limit Theorem and Averaging]<br />
* In Class:<br />
** Show and Tell<br />
** Waveguides, Transmission Lines, and Rope<br />
** Fitting Gaussians and Polynomials, ugradio.gauss<br />
** [https://youtu.be/l6_qxtqGtuY Lecture 9]<br />
** [https://youtu.be/xre1hQiZKCM Lecture 10]<br />
<br />
==== Lab 2, Week 3 (Feb 22): Write Lab Report ====<br />
* Theory and Background<br />
** [https://github.com/AaronParsons/ugradio/blob/main/least_squares/lsfit_2008.pdf Least-Squares and Chi-Square for the Budding Aficionado: Art and Practice]<br />
* In Class:<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab2/chisq_intro.ipynb Chi-Square Jupyter Notebook]<br />
** Show and Tell<br />
** Least Squares Part 2<br />
** [https://youtu.be/M92l0k45Gjw Lecture 11]<br />
* Lab 2 Due Mar 1, 1:30p<br />
<br />
---------<br />
<br />
=== Lab 3 ([https://github.com/AaronParsons/ugradio/blob/main/lab_interf/interf.pdf Radio Interferometry at X Band]), due Apr 5, 1:00p ===<br />
<br />
==== Lab 3 Week 1 (Mar 1): Interferometer ====<br />
* Theory and Background<br />
** [[Coordinates]]<br />
** [[Basic Interferometry]]<br />
* In Class:<br />
** Tour of Rooftop Interferometer<br />
** Exercise Ball Coordinates<br />
** Interferometry with Strings<br />
** [https://youtu.be/NXvDSyCfHMQ Lecture 12]<br />
** [https://youtu.be/5IDLQMO6_8g Lecture 13]<br />
<br />
==== Lab 3 Week 2 (Mar 8): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Measurement Equation]]<br />
** [[Telescope Field of View/Resolution]]<br />
* In Class:<br />
** Show and Tell<br />
** Controlling the Telescope<br />
** Tracking the Sun<br />
** Scheduling Observations<br />
* Lecture Links<br />
** [https://youtu.be/bgDBf9bPSTA Lecture 14]<br />
** [https://youtu.be/xVtmz0TfUJg Lecture 15]<br />
<br />
==== Lab 3 Week 3 (Mar 15): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Basic Interferometry II]]<br />
** [[Least Squares]]<br />
* In Class:<br />
** Show and Tell<br />
** Linear Least-Squares in Python<br />
** Minimizing Chi-Square]<br />
** Noise in Observations<br />
* Lecture Links<br />
** [https://youtu.be/ZhMu_0YFxCo Lecture 16]<br />
** [https://youtu.be/n-FOeZVuHls Lecture 17]<br />
<br />
==== No class (Mar 23, 26) ====<br />
<br />
==== Lab 3 Week 4 (Mar 29): Write Lab Report ====<br />
* Theory and Background<br />
*** [[Correlators]]<br />
*** [[Units of radiation]]<br />
* In Class:<br />
** Show and Tell<br />
** Photon bucket demo<br />
* Lecture Links<br />
** [https://youtu.be/Nl5h3Hi51bQ Lecture 18]<br />
** [https://youtu.be/GVugVn5PdB0 Lecture 19]<br />
* Lab 3 Due Apr 6, 1:30p<br />
<br />
<br />
---------<br />
<br />
=== Lab 4 ([https://github.com/AaronParsons/ugradio/blob/main/lab_dish/HI1.pdf Mapping the HI Line: the Galaxy and Supershells]), due May 3, 1:30p ===<br />
<br />
==== Useful Links ====<br />
[https://teamup.com/ksd715ee7fb766a108/#/ Link to Observing Calendar]<br />
<br />
[http://leuschner.berkeley.edu:8080 Leuschner WebCam]<br />
<br />
==== Lab 4 Week 1 (Apr 5): Leuschner Dish ====<br />
* Theory and Background<br />
** [[Specific Intensity]]<br />
** [[Radio Sky]]<br />
** [[Screen Command]]<br />
* In Class:<br />
** Trip to Leuschner: Class will go later than usual<br />
** drive mechanism (how the dish moves)<br />
** feed (notice probes) and cables<br />
** IF setup (one channel for OH, one for HI)<br />
** interacting with a CASPER [https://github.com/AaronParsons/leuschner-spectrimeter spectrometer]<br />
** pointing control<br />
** spatial sampling with dish<br />
* Lecture Links<br />
** [https://youtu.be/ZeB9Gj3gHgs Lecture 20]<br />
** [https://berkeley.zoom.us/rec/share/yYtJDpzz52pOc5GR42PxBbA_QorFT6a81CAfr6IKyRre8X_2LRtd9NPzNNLXeBCw Lab 4 Lecture 2 (Thursday 4/9/20)]<br />
<br />
==== Lab 4 Week 2 (Apr 12): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[21cm Transition]]<br />
** [[Black-Body Radiation]]<br />
** [[Line Profile Functions]]<br />
* In Class:<br />
** Show and Tell<br />
** spatial sampling with a dish<br />
** interpolation<br />
** projection<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/3pBJILbBxE5JRpWSwkWOe6QYMoHlaaa823IZr_QNyE0M46G1NWz2KSaA40QwupHp Lab 4 Lecture 3 (Tuesday 4/14; access v7*1$5k7)]<br />
** [https://berkeley.zoom.us/rec/share/wsAsELX3yThOTJXExEjjWaI4Mdq7eaa8hicf__AEzEkISCgjfujdIe8CV-yXP8VP Lab 4 Lecture 4 (Thursday 4/16; access G7*##+1O)]<br />
<br />
==== Lab 4 Week 3 (Apr 19): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Emission Line Observing]]<br />
** [[Radiative Transfer Equation]]<br />
** [[Optical Depth]]<br />
** [[Estimating Atomic Transition Strengths]]<br />
* In Class:<br />
** Show and Tell<br />
** close-out plan<br />
** computing doppler width for a line of sight (assuming circular motion)<br />
** calibrating spectra<br />
** converting spectra to hydrogen<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/7Md4Fejz1FJLcqPEslDnAPFmTqGieaa81Cgb-PRczh6T0TBWOxVAZOoPk8cPBvsd Lab 4 Lecture 5 (Tuesday 4/21; access 7f!o&=J9)]<br />
** Lab 4 Lecture 6 (Thursday 4/23): share day; no recording<br />
<br />
==== Lab 4 Week 4 (Apr 26): Write Lab Report ====<br />
* Theory and Background<br />
** [https://github.com/AaronParsons/ugradio/blob/main/lab_bighorn/cal_intensity.pdf Calibrating the Intensity and Shape of Spectral Lines (Carl Heiles)] <br />
* In Class:<br />
** Show and Tell<br />
** displaying information in image form<br />
** Lab 4 Due May 3, 1:30p<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/6pVKDIHL7XlIQ5GVtAL4Q4klI7Tvaaa81HBP_vBezRuCI54jJ3AKdenjUZB-gScx Lab 4 Lecture 7 (Tuesday 4/28; access 3h=j11*@ )]<br />
** [https://berkeley.zoom.us/rec/share/teBrde3hr2lOHZ3V9GH4S6MAH5j7aaa8hCZN-PoOxUycBmjJiZYoIuqIb29LQg8W Lab 4 Lecture 8 (Thursday 4/30; access 5V$.3i8$ )]<br />
<br />
<br />
<!-- === Lab 2 (Digital Lab) ===<br />
* Lab 2, Part 1 <br />
** Quiz 4 on:<br />
** Breakout Sessions:<br />
** Discrete Fourier Transform<br />
*** Convolving and Smoothing<br />
*** Aliasing<br />
*** Intro to Lab 2, pick groups<br />
<br />
* Lab 2, Part 2 <br />
** Quiz 5 on:<br />
*** [[Data Representations]]<br />
*** [[Digital Down Conversion]]<br />
** Breakout Sessions:<br />
*** Data Representations demo<br />
*** Mixing, Filtering, Decimation, and the FFT<br />
*** [[Intro to ROACH]]<br />
<br />
* Lab 2, Part 3 <br />
** Quiz 6 on:<br />
*** [[Synchronous and Asynchronous Logic]]<br />
*** [[Processor Architectures]]<br />
*** [[FIR Filters]]<br />
** Breakout Sessions:<br />
*** Acting out various processors<br />
*** Simulating an FIR filter<br />
*** Lab feedback<br />
--><br />
<br />
== Unused but Useful? ==<br />
<br />
* [[Radiometer Equation]]<br />
* [[Quantization and Rounding]]<br />
* [[Reciprocity Theorem]]<br />
* [[Dipole Antennas]]<br />
* [[Impedance of Free Space]]<br />
* [[Radiometer Equation Applied to Telescopes]]<br />
* [[Radiometer Equation Applied to Interferometers]]<br />
* [[Fringe Stopping]]<br />
* [[Direction Dependent Beams]]<br />
* [[Self Calibration]]<br />
* [[Flux Calibration]]<br />
* [[Gridding]]<br />
* [[Earth Rotation Synthesis]]<br />
* [[Delay Imaging]]</div>AparsonsUndergraduate Radio Lab2022-01-20T20:56:59Z<p>Aparsons: </p>
<hr />
<div>This course consists of four laboratory experiments that concentrate on radio instrumentation and laboratory techniques. We will build receiving, observing, and data analysis systems for two telescopes: a single-dish 21-cm line system, and a 10.7-GHz interferometer. We will use these telescopes for astronomical observing projects including structure of the Milky Way galaxy, precise position measurement of several radio sources, and measurement of the radio brightness distributions of the sun and moon with high angular resolution. There is a heavy emphasis on digital data acquisition, software development in the Python language, and high-quality written reports.<br />
<br />
=== Class Programmatics ===<br />
* Class Code Repository: [http://github.com/AaronParsons/ugradio http://github.com/AaronParsons/ugradio]<br />
* [https://github.com/AaronParsons/ugradio/raw/main/schedule/syllabus_2022_spring.docx Syllabus]<br />
* [https://berkeley.zoom.us/j/3587609756 Zoom Room: 358 760 9756]<br />
* Bcourses: [https://bcourses.berkeley.edu/courses/1512067 1512067]<br />
* Discord: https://discord.gg/54m6yjsFHN<br />
* Sign-up sheet for lab: https://calendar.google.com/calendar/u/0/selfsched?sstoken=UUhoRVItYjh2bFA3fGRlZmF1bHR8MDlkOGRkN2MzNmVlMDM1ZTYzNzJiZTcxOTRkNmY1Y2Q<br />
* Class Hours:<br />
** Tuesday/Thursday 1:30-3:30pm<br />
* Office Hours:<br />
** Aaron Parsons (aparsons at berkeley): TBD, or by appointment, in standard [https://berkeley.zoom.us/j/3587609756 Zoom Room: 358 760 9756]<br />
** Christian Bye (chbye at berkeley): TBD or by appointment (Through Discord Office Hours Channel or [https://berkeley.zoom.us/my/christianbye Zoom: 372 207 8992])<br />
** Mine Gokcen (minegokcen at berkeley):<br />
** Frank Latora (fjlatora at berkeley):<br />
* Lab Groups:<br />
** Group 1<br />
** Group 2<br />
** Group 3<br />
** Group 4<br />
** Group 5<br />
<br />
=== Experiments ===<br />
* Lab 1: [https://github.com/AaronParsons/ugradio/blob/main/lab_mixers/allmixers.pdf Exploring Digital Sampling, Fourier Transforms, and both DSB and SSB Mixers]<br />
* Lab 2: [https://github.com/AaronParsons/ugradio/blob/main/lab_bighorn/bighorn.pdf Astronomy with the 21cm Line; Some Microwave Electronics]<br />
* Lab 3: [https://github.com/AaronParsons/ugradio/blob/main/lab_interf/interf.pdf Radio Interferometry at X Band]<br />
* Lab 4: [https://github.com/AaronParsons/ugradio/blob/main/lab_dish/HI1.pdf Mapping the HI Line: the Galaxy and Supershells]<br />
<br />
===Getting Set Up===<br />
* [[Getting Started in the Undergraduate Radio Lab]]<br />
** [[Setting Up Your Raspberry Pi]]<br />
** [[Connecting to the Lab Computers Remotely]]<br />
<br />
=== General Skills Used Through-Out Course ===<br />
<br />
* Navigating Linux/Unix-like Operating Systems<br />
** [[Unix Primer]]<br />
** [[Unix Text Editors]]<br />
* Programming in Python<br />
** [[Python Installation and Basic Programming]]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting]<br />
* Software Engineering<br />
** [[Revision Control]]<br />
** [[Getting Started w/ Github]]<br />
** [[Unit Testing]]<br />
* Report Writing<br />
** [[LaTeX]]<br />
<br />
== Topics by Date ==<br />
<br />
=== Lab 1 ([https://github.com/AaronParsons/ugradio/blob/main/lab_mixers/allmixers.pdf Exploring Digital Sampling, Fourier Transforms, and both DSB and SSB Mixers]), Due Feb 8, 1:30p ===<br />
==== Lab 1, Week 1 (Jan 18): Sampling and Power Spectra ====<br />
* Resources and Handouts<br />
** [[Nyquist Sampling]]<br />
** [[Fourier Transform]]<br />
** Technical Skills<br />
*** [[Unix Primer]]<br />
*** [[Unix Text Editors]]<br />
*** [[Python Installation and Basic Programming]]<br />
**** [[Revision Control]]<br />
**** [[Getting Started w/ Github]]<br />
<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/Nyquist%20Sampling%20and%20Aliasing.ipynb Aliasing Demo] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=ugradio&branch=main&path=jupyter_tutorials/Nyquist%20Samplling%20and%20Aliasing.ipynb datahub.berkeley.edu])<br />
* In class:<br />
** Astrobaki, Syllabus, Office Hours<br />
** Getting accounts (premade by Bill Boyd, change password)<br />
** Lab access (see [[Getting Started in the Undergraduate Radio Lab]])<br />
** Class philosophy and workflow<br />
** [[Nyquist Sampling]] and aliasing<br />
** [[Fourier Transform]]<br />
** ADC Quantization<br />
** Lab Hardware<br />
*** PicoScope 2206a<br />
** Data Challenge<br />
*** [https://github.com/AaronParsons/ugradio/blob/main/lab_mixers/secret_message.npz Secret Message]<br />
** [https://youtu.be/uH-dQnq7ZD4 2022 Lecture 1 Zoom recording] (2021 is [https://youtu.be/Yb4K8t6SG4k here])<br />
** (2021 is [https://youtu.be/oJplegmHeAI here])<br />
<br />
==== Lab 1, Week 2 (Jan 26): DSB and SSB Mixers ====<br />
* Theory and Background:<br />
** [[Heterodyne Mixers]]<br />
** [[Convolution Theorem]]<br />
** [[Fast Fourier Transform]]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/dft_intro/fourierc.pdf Spectral Analysis with Discrete Fourier Transforms]<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/Convolutions%20and%20Correlations.ipynb Convolutions and Correlations ]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/Sec%204.%20In%20the%20mind.ipynb In the Mind: Introduction to the Fourier Transform ]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/datatype_demo.ipynb Mommy Fortuna's Midnight Carnival of Python Oddities]<br />
** [[Data Representations]], with handout on [https://github.com/AaronParsons/ugradio/blob/main/pythonprimer/datatypes.pdf Data Types and Organizational Structures]<br />
** Data Challenge<br />
*** [https://github.com/AaronParsons/ugradio/blob/main/lab_mixers/mixed_message.npz Secret Message 2]<br />
* In class:<br />
** [https://youtu.be/Ut_jTUoqcd8 Lecture 3: Discrete Fourier Transforms and the Convolution Theorem]<br />
** [https://youtu.be/ZxAWNiisn3Y Lecture 4: Show and Tell]<br />
** Lecture: Introduction to DSB and SSB Mixers<br />
** Show and Tell (10m per group)<br />
<br />
==== Lab 1, Week 3 (Feb 1): More Mixers, and Lab Reports ====<br />
* Theory and Background<br />
** [[LaTeX]]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting], second pass<br />
** [https://github.com/AaronParsons/ugradio/tree/main/latex_template/lab1 LaTex Template] Template you may use for your lab report<br />
*** [https://www.overleaf.com/read/hvrwkmfkvkhg Overleaf version of the lab template]<br />
* In Class:<br />
** Lecture: One more pass on [[Convolution Theorem]], [[Heterodyne Mixers]], and [https://github.com/AaronParsons/ugradio/blob/main/dft_intro/fourierc.pdf DFTs]<br />
** [https://youtu.be/igZPQQ-6ieo Lecture 5]<br />
** [https://youtu.be/53CZj1CCEm0 Lecture 6]<br />
** Show and Tell<br />
** Writing Lab Reports<br />
* Lab 1 Due Feb 8, 1:30p<br />
<br />
---------<br />
<br />
=== Lab 2 ([https://github.com/AaronParsons/ugradio/blob/main/lab_bighorn/bighorn.pdf Astronomy with the 21cm Line; Some Microwave Electronics]), due Mar 1, 1:30p ===<br />
==== Lab 2, Week 1 (Feb 8): 21cm Line and Waveguides ====<br />
* Theory and Background:<br />
** [https://github.com/AaronParsons/ugradio/blob/main/lab_bighorn/cal_intensity.pdf Calibrating the Intensity and Shape of Spectral Lines]<br />
** [[Specific Intensity]]<br />
** [[21cm Transition]]<br />
** [[Coordinates]]<br />
* Demos and Tutorials<br />
** Python Tutorial Part 3: Functions, Modules, and Objects<br />
** Matrix Math with Numpy<br />
** Doppler Corrections, ugradio.doppler<br />
* In class:<br />
** Introduction to Horn and Receiver<br />
** Time<br />
** Coordinates<br />
** [https://youtu.be/ouSTGedJtI4 Lecture 7]<br />
** [https://youtu.be/htF9zWPzeLQ Lecture 8]<br />
<br />
==== Lab 2, Week 2 (Feb 15): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Impedance]]<br />
** [[Transmission_Lines]]<br />
** [http://ugastro.berkeley.edu/radio/2017/handout_links/RWvD.pdf Fields and Waves in Communication Electronics (Ramo, Whinney, and Van Duzer)]<br />
** [[Central Limit Theorem]] and [[Random Walks]]<br />
** [https://github.com/AaronParsons/ugradio/blob/main/least_squares/lsfit_lite.pdf Least Squares Lite for the Budding Aficionado: Art and Practice]<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab2/Central%20Limit%20Theorem%20and%20Averaging.ipynb Central Limit Theorem and Averaging]<br />
* In Class:<br />
** Show and Tell<br />
** Waveguides, Transmission Lines, and Rope<br />
** Fitting Gaussians and Polynomials, ugradio.gauss<br />
** [https://youtu.be/l6_qxtqGtuY Lecture 9]<br />
** [https://youtu.be/xre1hQiZKCM Lecture 10]<br />
<br />
==== Lab 2, Week 3 (Feb 22): Write Lab Report ====<br />
* Theory and Background<br />
** [https://github.com/AaronParsons/ugradio/blob/main/least_squares/lsfit_2008.pdf Least-Squares and Chi-Square for the Budding Aficionado: Art and Practice]<br />
* In Class:<br />
** [https://github.com/AaronParsons/ugradio/blob/main/jupyter_tutorials/lab2/chisq_intro.ipynb Chi-Square Jupyter Notebook]<br />
** Show and Tell<br />
** Least Squares Part 2<br />
** [https://youtu.be/M92l0k45Gjw Lecture 11]<br />
* Lab 2 Due Mar 1, 1:30p<br />
<br />
---------<br />
<br />
=== Lab 3 ([https://github.com/AaronParsons/ugradio/blob/main/lab_interf/interf.pdf Radio Interferometry at X Band]), due Apr 5, 1:00p ===<br />
<br />
==== Lab 3 Week 1 (Mar 1): Interferometer ====<br />
* Theory and Background<br />
** [[Coordinates]]<br />
** [[Basic Interferometry]]<br />
* In Class:<br />
** Tour of Rooftop Interferometer<br />
** Exercise Ball Coordinates<br />
** Interferometry with Strings<br />
** [https://youtu.be/NXvDSyCfHMQ Lecture 12]<br />
** [https://youtu.be/5IDLQMO6_8g Lecture 13]<br />
<br />
==== Lab 3 Week 2 (Mar 8): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Measurement Equation]]<br />
** [[Telescope Field of View/Resolution]]<br />
* In Class:<br />
** Show and Tell<br />
** Controlling the Telescope<br />
** Tracking the Sun<br />
** Scheduling Observations<br />
* Lecture Links<br />
** [https://youtu.be/bgDBf9bPSTA Lecture 14]<br />
** [https://youtu.be/xVtmz0TfUJg Lecture 15]<br />
<br />
==== Lab 3 Week 3 (Mar 15): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Basic Interferometry II]]<br />
** [[Least Squares]]<br />
* In Class:<br />
** Show and Tell<br />
** Linear Least-Squares in Python<br />
** Minimizing Chi-Square]<br />
** Noise in Observations<br />
* Lecture Links<br />
** [https://youtu.be/ZhMu_0YFxCo Lecture 16]<br />
** [https://youtu.be/n-FOeZVuHls Lecture 17]<br />
<br />
==== No class (Mar 23, 26) ====<br />
<br />
==== Lab 3 Week 4 (Mar 29): Write Lab Report ====<br />
* Theory and Background<br />
*** [[Correlators]]<br />
*** [[Units of radiation]]<br />
* In Class:<br />
** Show and Tell<br />
** Photon bucket demo<br />
* Lecture Links<br />
** [https://youtu.be/Nl5h3Hi51bQ Lecture 18]<br />
** [https://youtu.be/GVugVn5PdB0 Lecture 19]<br />
* Lab 3 Due Apr 6, 1:30p<br />
<br />
<br />
---------<br />
<br />
=== Lab 4 ([https://github.com/AaronParsons/ugradio/blob/main/lab_dish/HI1.pdf Mapping the HI Line: the Galaxy and Supershells]), due May 3, 1:30p ===<br />
<br />
==== Useful Links ====<br />
[https://teamup.com/ksd715ee7fb766a108/#/ Link to Observing Calendar]<br />
<br />
[http://leuschner.berkeley.edu:8080 Leuschner WebCam]<br />
<br />
==== Lab 4 Week 1 (Apr 5): Leuschner Dish ====<br />
* Theory and Background<br />
** [[Specific Intensity]]<br />
** [[Radio Sky]]<br />
** [[Screen Command]]<br />
* In Class:<br />
** Trip to Leuschner: Class will go later than usual<br />
** drive mechanism (how the dish moves)<br />
** feed (notice probes) and cables<br />
** IF setup (one channel for OH, one for HI)<br />
** interacting with a CASPER [https://github.com/AaronParsons/leuschner-spectrimeter spectrometer]<br />
** pointing control<br />
** spatial sampling with dish<br />
* Lecture Links<br />
** [https://youtu.be/ZeB9Gj3gHgs Lecture 20]<br />
** [https://berkeley.zoom.us/rec/share/yYtJDpzz52pOc5GR42PxBbA_QorFT6a81CAfr6IKyRre8X_2LRtd9NPzNNLXeBCw Lab 4 Lecture 2 (Thursday 4/9/20)]<br />
<br />
==== Lab 4 Week 2 (Apr 12): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[21cm Transition]]<br />
** [[Black-Body Radiation]]<br />
** [[Line Profile Functions]]<br />
* In Class:<br />
** Show and Tell<br />
** spatial sampling with a dish<br />
** interpolation<br />
** projection<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/3pBJILbBxE5JRpWSwkWOe6QYMoHlaaa823IZr_QNyE0M46G1NWz2KSaA40QwupHp Lab 4 Lecture 3 (Tuesday 4/14; access v7*1$5k7)]<br />
** [https://berkeley.zoom.us/rec/share/wsAsELX3yThOTJXExEjjWaI4Mdq7eaa8hicf__AEzEkISCgjfujdIe8CV-yXP8VP Lab 4 Lecture 4 (Thursday 4/16; access G7*##+1O)]<br />
<br />
==== Lab 4 Week 3 (Apr 19): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Emission Line Observing]]<br />
** [[Radiative Transfer Equation]]<br />
** [[Optical Depth]]<br />
** [[Estimating Atomic Transition Strengths]]<br />
* In Class:<br />
** Show and Tell<br />
** close-out plan<br />
** computing doppler width for a line of sight (assuming circular motion)<br />
** calibrating spectra<br />
** converting spectra to hydrogen<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/7Md4Fejz1FJLcqPEslDnAPFmTqGieaa81Cgb-PRczh6T0TBWOxVAZOoPk8cPBvsd Lab 4 Lecture 5 (Tuesday 4/21; access 7f!o&=J9)]<br />
** Lab 4 Lecture 6 (Thursday 4/23): share day; no recording<br />
<br />
==== Lab 4 Week 4 (Apr 26): Write Lab Report ====<br />
* Theory and Background<br />
** [https://github.com/AaronParsons/ugradio/blob/main/lab_bighorn/cal_intensity.pdf Calibrating the Intensity and Shape of Spectral Lines (Carl Heiles)] <br />
* In Class:<br />
** Show and Tell<br />
** displaying information in image form<br />
** Lab 4 Due May 3, 1:30p<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/6pVKDIHL7XlIQ5GVtAL4Q4klI7Tvaaa81HBP_vBezRuCI54jJ3AKdenjUZB-gScx Lab 4 Lecture 7 (Tuesday 4/28; access 3h=j11*@ )]<br />
** [https://berkeley.zoom.us/rec/share/teBrde3hr2lOHZ3V9GH4S6MAH5j7aaa8hCZN-PoOxUycBmjJiZYoIuqIb29LQg8W Lab 4 Lecture 8 (Thursday 4/30; access 5V$.3i8$ )]<br />
<br />
<br />
<!-- === Lab 2 (Digital Lab) ===<br />
* Lab 2, Part 1 <br />
** Quiz 4 on:<br />
** Breakout Sessions:<br />
** Discrete Fourier Transform<br />
*** Convolving and Smoothing<br />
*** Aliasing<br />
*** Intro to Lab 2, pick groups<br />
<br />
* Lab 2, Part 2 <br />
** Quiz 5 on:<br />
*** [[Data Representations]]<br />
*** [[Digital Down Conversion]]<br />
** Breakout Sessions:<br />
*** Data Representations demo<br />
*** Mixing, Filtering, Decimation, and the FFT<br />
*** [[Intro to ROACH]]<br />
<br />
* Lab 2, Part 3 <br />
** Quiz 6 on:<br />
*** [[Synchronous and Asynchronous Logic]]<br />
*** [[Processor Architectures]]<br />
*** [[FIR Filters]]<br />
** Breakout Sessions:<br />
*** Acting out various processors<br />
*** Simulating an FIR filter<br />
*** Lab feedback<br />
--><br />
<br />
== Unused but Useful? ==<br />
<br />
* [[Radiometer Equation]]<br />
* [[Quantization and Rounding]]<br />
* [[Reciprocity Theorem]]<br />
* [[Dipole Antennas]]<br />
* [[Impedance of Free Space]]<br />
* [[Radiometer Equation Applied to Telescopes]]<br />
* [[Radiometer Equation Applied to Interferometers]]<br />
* [[Fringe Stopping]]<br />
* [[Direction Dependent Beams]]<br />
* [[Self Calibration]]<br />
* [[Flux Calibration]]<br />
* [[Gridding]]<br />
* [[Earth Rotation Synthesis]]<br />
* [[Delay Imaging]]</div>AparsonsUndergraduate Radio Lab2022-01-20T19:14:40Z<p>Aparsons: </p>
<hr />
<div>This course consists of four laboratory experiments that concentrate on radio instrumentation and laboratory techniques. We will build receiving, observing, and data analysis systems for two telescopes: a single-dish 21-cm line system, and a 10.7-GHz interferometer. We will use these telescopes for astronomical observing projects including structure of the Milky Way galaxy, precise position measurement of several radio sources, and measurement of the radio brightness distributions of the sun and moon with high angular resolution. There is a heavy emphasis on digital data acquisition, software development in the Python language, and high-quality written reports.<br />
<br />
=== Class Programmatics ===<br />
* Class Code Repository: [http://github.com/AaronParsons/ugradio http://github.com/AaronParsons/ugradio]<br />
* [https://github.com/AaronParsons/ugradio/raw/master/schedule/syllabus_2022_spring.docx Syllabus]<br />
* [https://berkeley.zoom.us/j/3587609756 Zoom Room: 358 760 9756]<br />
* Bcourses: [https://bcourses.berkeley.edu/courses/1512067 1512067]<br />
* Discord: https://discord.gg/54m6yjsFHN<br />
* Sign-up sheet for lab: https://calendar.google.com/calendar/u/0/selfsched?sstoken=UUhoRVItYjh2bFA3fGRlZmF1bHR8MDlkOGRkN2MzNmVlMDM1ZTYzNzJiZTcxOTRkNmY1Y2Q<br />
* Class Hours:<br />
** Tuesday/Thursday 1:30-3:30pm<br />
* Office Hours:<br />
** Aaron Parsons (aparsons at berkeley): TBD, or by appointment, in standard [https://berkeley.zoom.us/j/3587609756 Zoom Room: 358 760 9756]<br />
** Christian Bye (chbye at berkeley): TBD or by appointment (Through Discord Office Hours Channel or [https://berkeley.zoom.us/my/christianbye Zoom: 372 207 8992])<br />
** Mine Gokcen (minegokcen at berkeley):<br />
** Frank Latora (fjlatora at berkeley):<br />
* Lab Groups:<br />
** Group 1<br />
** Group 2<br />
** Group 3<br />
** Group 4<br />
** Group 5<br />
<br />
=== Experiments ===<br />
* Lab 1: [https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/allmixers.pdf Exploring Digital Sampling, Fourier Transforms, and both DSB and SSB Mixers]<br />
* Lab 2: [https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/bighorn.pdf Astronomy with the 21cm Line; Some Microwave Electronics]<br />
* Lab 3: [https://github.com/AaronParsons/ugradio/blob/master/lab_interf/interf.pdf Radio Interferometry at X Band]<br />
* Lab 4: [https://github.com/AaronParsons/ugradio/blob/master/lab_dish/HI1.pdf Mapping the HI Line: the Galaxy and Supershells]<br />
<br />
===Getting Set Up===<br />
* [[Getting Started in the Undergraduate Radio Lab]]<br />
** [[Setting Up Your Raspberry Pi]]<br />
** [[Connecting to the Lab Computers Remotely]]<br />
<br />
=== General Skills Used Through-Out Course ===<br />
<br />
* Navigating Linux/Unix-like Operating Systems<br />
** [[Unix Primer]]<br />
** [[Unix Text Editors]]<br />
* Programming in Python<br />
** [[Python Installation and Basic Programming]]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting]<br />
* Software Engineering<br />
** [[Revision Control]]<br />
** [[Getting Started w/ Github]]<br />
** [[Unit Testing]]<br />
* Report Writing<br />
** [[LaTeX]]<br />
<br />
== Topics by Date ==<br />
<br />
=== Lab 1 ([https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/allmixers.pdf Exploring Digital Sampling, Fourier Transforms, and both DSB and SSB Mixers]), Due Feb 8, 1:30p ===<br />
==== Lab 1, Week 1 (Jan 18): Sampling and Power Spectra ====<br />
* Resources and Handouts<br />
** [[Nyquist Sampling]]<br />
** [[Fourier Transform]]<br />
** Technical Skills<br />
*** [[Unix Primer]]<br />
*** [[Unix Text Editors]]<br />
*** [[Python Installation and Basic Programming]]<br />
**** [[Revision Control]]<br />
**** [[Getting Started w/ Github]]<br />
<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/Nyquist%20Sampling%20and%20Aliasing.ipynb Aliasing Demo]<br />
* In class:<br />
** Astrobaki, Syllabus, Office Hours<br />
** Getting accounts (premade by Bill Boyd, change password)<br />
** Lab access (see [[Getting Started in the Undergraduate Radio Lab]])<br />
** Class philosophy and workflow<br />
** [[Nyquist Sampling]] and aliasing<br />
** [[Fourier Transform]]<br />
** ADC Quantization<br />
** Lab Hardware<br />
*** PicoScope 2206a<br />
** Data Challenge<br />
*** [https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/secret_message.npz Secret Message]<br />
** [https://youtu.be/uH-dQnq7ZD4 2022 Lecture 1 Zoom recording] (2021 is [https://youtu.be/Yb4K8t6SG4k here])<br />
** (2021 is [https://youtu.be/oJplegmHeAI here])<br />
<br />
==== Lab 1, Week 2 (Jan 26): DSB and SSB Mixers ====<br />
* Theory and Background:<br />
** [[Heterodyne Mixers]]<br />
** [[Convolution Theorem]]<br />
** [[Fast Fourier Transform]]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/dft_intro/fourierc.pdf Spectral Analysis with Discrete Fourier Transforms]<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/Convolutions%20and%20Correlations.ipynb Convolutions and Correlations ]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/Sec%204.%20In%20the%20mind.ipynb In the Mind: Introduction to the Fourier Transform ]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/datatype_demo.ipynb Mommy Fortuna's Midnight Carnival of Python Oddities]<br />
** [[Data Representations]], with handout on [https://github.com/AaronParsons/ugradio/blob/master/pythonprimer/datatypes.pdf Data Types and Organizational Structures]<br />
** Data Challenge<br />
*** [https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/mixed_message.npz Secret Message 2]<br />
* In class:<br />
** [https://youtu.be/Ut_jTUoqcd8 Lecture 3: Discrete Fourier Transforms and the Convolution Theorem]<br />
** [https://youtu.be/ZxAWNiisn3Y Lecture 4: Show and Tell]<br />
** Lecture: Introduction to DSB and SSB Mixers<br />
** Show and Tell (10m per group)<br />
<br />
==== Lab 1, Week 3 (Feb 1): More Mixers, and Lab Reports ====<br />
* Theory and Background<br />
** [[LaTeX]]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting], second pass<br />
** [https://github.com/AaronParsons/ugradio/tree/master/latex_template/lab1 LaTex Template] Template you may use for your lab report<br />
*** [https://www.overleaf.com/read/hvrwkmfkvkhg Overleaf version of the lab template]<br />
* In Class:<br />
** Lecture: One more pass on [[Convolution Theorem]], [[Heterodyne Mixers]], and [https://github.com/AaronParsons/ugradio/blob/master/dft_intro/fourierc.pdf DFTs]<br />
** [https://youtu.be/igZPQQ-6ieo Lecture 5]<br />
** [https://youtu.be/53CZj1CCEm0 Lecture 6]<br />
** Show and Tell<br />
** Writing Lab Reports<br />
* Lab 1 Due Feb 8, 1:30p<br />
<br />
---------<br />
<br />
=== Lab 2 ([https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/bighorn.pdf Astronomy with the 21cm Line; Some Microwave Electronics]), due Mar 1, 1:30p ===<br />
==== Lab 2, Week 1 (Feb 8): 21cm Line and Waveguides ====<br />
* Theory and Background:<br />
** [https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/cal_intensity.pdf Calibrating the Intensity and Shape of Spectral Lines]<br />
** [[Specific Intensity]]<br />
** [[21cm Transition]]<br />
** [[Coordinates]]<br />
* Demos and Tutorials<br />
** Python Tutorial Part 3: Functions, Modules, and Objects<br />
** Matrix Math with Numpy<br />
** Doppler Corrections, ugradio.doppler<br />
* In class:<br />
** Introduction to Horn and Receiver<br />
** Time<br />
** Coordinates<br />
** [https://youtu.be/ouSTGedJtI4 Lecture 7]<br />
** [https://youtu.be/htF9zWPzeLQ Lecture 8]<br />
<br />
==== Lab 2, Week 2 (Feb 15): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Impedance]]<br />
** [[Transmission_Lines]]<br />
** [http://ugastro.berkeley.edu/radio/2017/handout_links/RWvD.pdf Fields and Waves in Communication Electronics (Ramo, Whinney, and Van Duzer)]<br />
** [[Central Limit Theorem]] and [[Random Walks]]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/least_squares/lsfit_lite.pdf Least Squares Lite for the Budding Aficionado: Art and Practice]<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab2/Central%20Limit%20Theorem%20and%20Averaging.ipynb Central Limit Theorem and Averaging]<br />
* In Class:<br />
** Show and Tell<br />
** Waveguides, Transmission Lines, and Rope<br />
** Fitting Gaussians and Polynomials, ugradio.gauss<br />
** [https://youtu.be/l6_qxtqGtuY Lecture 9]<br />
** [https://youtu.be/xre1hQiZKCM Lecture 10]<br />
<br />
==== Lab 2, Week 3 (Feb 22): Write Lab Report ====<br />
* Theory and Background<br />
** [https://github.com/AaronParsons/ugradio/blob/master/least_squares/lsfit_2008.pdf Least-Squares and Chi-Square for the Budding Aficionado: Art and Practice]<br />
* In Class:<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab2/chisq_intro.ipynb Chi-Square Jupyter Notebook]<br />
** Show and Tell<br />
** Least Squares Part 2<br />
** [https://youtu.be/M92l0k45Gjw Lecture 11]<br />
* Lab 2 Due Mar 1, 1:30p<br />
<br />
---------<br />
<br />
=== Lab 3 ([https://github.com/AaronParsons/ugradio/blob/master/lab_interf/interf.pdf Radio Interferometry at X Band]), due Apr 5, 1:00p ===<br />
<br />
==== Lab 3 Week 1 (Mar 1): Interferometer ====<br />
* Theory and Background<br />
** [[Coordinates]]<br />
** [[Basic Interferometry]]<br />
* In Class:<br />
** Tour of Rooftop Interferometer<br />
** Exercise Ball Coordinates<br />
** Interferometry with Strings<br />
** [https://youtu.be/NXvDSyCfHMQ Lecture 12]<br />
** [https://youtu.be/5IDLQMO6_8g Lecture 13]<br />
<br />
==== Lab 3 Week 2 (Mar 8): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Measurement Equation]]<br />
** [[Telescope Field of View/Resolution]]<br />
* In Class:<br />
** Show and Tell<br />
** Controlling the Telescope<br />
** Tracking the Sun<br />
** Scheduling Observations<br />
* Lecture Links<br />
** [https://youtu.be/bgDBf9bPSTA Lecture 14]<br />
** [https://youtu.be/xVtmz0TfUJg Lecture 15]<br />
<br />
==== Lab 3 Week 3 (Mar 15): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Basic Interferometry II]]<br />
** [[Least Squares]]<br />
* In Class:<br />
** Show and Tell<br />
** Linear Least-Squares in Python<br />
** Minimizing Chi-Square]<br />
** Noise in Observations<br />
* Lecture Links<br />
** [https://youtu.be/ZhMu_0YFxCo Lecture 16]<br />
** [https://youtu.be/n-FOeZVuHls Lecture 17]<br />
<br />
==== No class (Mar 23, 26) ====<br />
<br />
==== Lab 3 Week 4 (Mar 29): Write Lab Report ====<br />
* Theory and Background<br />
*** [[Correlators]]<br />
*** [[Units of radiation]]<br />
* In Class:<br />
** Show and Tell<br />
** Photon bucket demo<br />
* Lecture Links<br />
** [https://youtu.be/Nl5h3Hi51bQ Lecture 18]<br />
** [https://youtu.be/GVugVn5PdB0 Lecture 19]<br />
* Lab 3 Due Apr 6, 1:30p<br />
<br />
<br />
---------<br />
<br />
=== Lab 4 ([https://github.com/AaronParsons/ugradio/blob/master/lab_dish/HI1.pdf Mapping the HI Line: the Galaxy and Supershells]), due May 3, 1:30p ===<br />
<br />
==== Useful Links ====<br />
[https://teamup.com/ksd715ee7fb766a108/#/ Link to Observing Calendar]<br />
<br />
[http://leuschner.berkeley.edu:8080 Leuschner WebCam]<br />
<br />
==== Lab 4 Week 1 (Apr 5): Leuschner Dish ====<br />
* Theory and Background<br />
** [[Specific Intensity]]<br />
** [[Radio Sky]]<br />
** [[Screen Command]]<br />
* In Class:<br />
** Trip to Leuschner: Class will go later than usual<br />
** drive mechanism (how the dish moves)<br />
** feed (notice probes) and cables<br />
** IF setup (one channel for OH, one for HI)<br />
** interacting with a CASPER [https://github.com/AaronParsons/leuschner-spectrimeter spectrometer]<br />
** pointing control<br />
** spatial sampling with dish<br />
* Lecture Links<br />
** [https://youtu.be/ZeB9Gj3gHgs Lecture 20]<br />
** [https://berkeley.zoom.us/rec/share/yYtJDpzz52pOc5GR42PxBbA_QorFT6a81CAfr6IKyRre8X_2LRtd9NPzNNLXeBCw Lab 4 Lecture 2 (Thursday 4/9/20)]<br />
<br />
==== Lab 4 Week 2 (Apr 12): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[21cm Transition]]<br />
** [[Black-Body Radiation]]<br />
** [[Line Profile Functions]]<br />
* In Class:<br />
** Show and Tell<br />
** spatial sampling with a dish<br />
** interpolation<br />
** projection<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/3pBJILbBxE5JRpWSwkWOe6QYMoHlaaa823IZr_QNyE0M46G1NWz2KSaA40QwupHp Lab 4 Lecture 3 (Tuesday 4/14; access v7*1$5k7)]<br />
** [https://berkeley.zoom.us/rec/share/wsAsELX3yThOTJXExEjjWaI4Mdq7eaa8hicf__AEzEkISCgjfujdIe8CV-yXP8VP Lab 4 Lecture 4 (Thursday 4/16; access G7*##+1O)]<br />
<br />
==== Lab 4 Week 3 (Apr 19): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Emission Line Observing]]<br />
** [[Radiative Transfer Equation]]<br />
** [[Optical Depth]]<br />
** [[Estimating Atomic Transition Strengths]]<br />
* In Class:<br />
** Show and Tell<br />
** close-out plan<br />
** computing doppler width for a line of sight (assuming circular motion)<br />
** calibrating spectra<br />
** converting spectra to hydrogen<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/7Md4Fejz1FJLcqPEslDnAPFmTqGieaa81Cgb-PRczh6T0TBWOxVAZOoPk8cPBvsd Lab 4 Lecture 5 (Tuesday 4/21; access 7f!o&=J9)]<br />
** Lab 4 Lecture 6 (Thursday 4/23): share day; no recording<br />
<br />
==== Lab 4 Week 4 (Apr 26): Write Lab Report ====<br />
* Theory and Background<br />
** [https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/cal_intensity.pdf Calibrating the Intensity and Shape of Spectral Lines (Carl Heiles)] <br />
* In Class:<br />
** Show and Tell<br />
** displaying information in image form<br />
** Lab 4 Due May 3, 1:30p<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/6pVKDIHL7XlIQ5GVtAL4Q4klI7Tvaaa81HBP_vBezRuCI54jJ3AKdenjUZB-gScx Lab 4 Lecture 7 (Tuesday 4/28; access 3h=j11*@ )]<br />
** [https://berkeley.zoom.us/rec/share/teBrde3hr2lOHZ3V9GH4S6MAH5j7aaa8hCZN-PoOxUycBmjJiZYoIuqIb29LQg8W Lab 4 Lecture 8 (Thursday 4/30; access 5V$.3i8$ )]<br />
<br />
<br />
<!-- === Lab 2 (Digital Lab) ===<br />
* Lab 2, Part 1 <br />
** Quiz 4 on:<br />
** Breakout Sessions:<br />
** Discrete Fourier Transform<br />
*** Convolving and Smoothing<br />
*** Aliasing<br />
*** Intro to Lab 2, pick groups<br />
<br />
* Lab 2, Part 2 <br />
** Quiz 5 on:<br />
*** [[Data Representations]]<br />
*** [[Digital Down Conversion]]<br />
** Breakout Sessions:<br />
*** Data Representations demo<br />
*** Mixing, Filtering, Decimation, and the FFT<br />
*** [[Intro to ROACH]]<br />
<br />
* Lab 2, Part 3 <br />
** Quiz 6 on:<br />
*** [[Synchronous and Asynchronous Logic]]<br />
*** [[Processor Architectures]]<br />
*** [[FIR Filters]]<br />
** Breakout Sessions:<br />
*** Acting out various processors<br />
*** Simulating an FIR filter<br />
*** Lab feedback<br />
--><br />
<br />
== Unused but Useful? ==<br />
<br />
* [[Radiometer Equation]]<br />
* [[Quantization and Rounding]]<br />
* [[Reciprocity Theorem]]<br />
* [[Dipole Antennas]]<br />
* [[Impedance of Free Space]]<br />
* [[Radiometer Equation Applied to Telescopes]]<br />
* [[Radiometer Equation Applied to Interferometers]]<br />
* [[Fringe Stopping]]<br />
* [[Direction Dependent Beams]]<br />
* [[Self Calibration]]<br />
* [[Flux Calibration]]<br />
* [[Gridding]]<br />
* [[Earth Rotation Synthesis]]<br />
* [[Delay Imaging]]</div>AparsonsSetting Up Your Raspberry Pi2022-01-19T00:00:53Z<p>Aparsons: </p>
<hr />
<div>With the growing utility and prevalence of low-cost computing boards, it is becoming increasingly common to embed computing directly into instrumentation.<br />
The Raspberry Pi is an example of a relatively low-cost but very versatile computer capable of running a full-fledged (Linux) operating system and performing a non-trivial amount of computing, while also providing interfaces for low-level communication with electronics.<br />
The Raspberry PI (RPi) is not the only example of such board, and it is not necessarily suited to all embedded computing applications, but it is widely used and quite capable.<br />
<br />
Because of its ubiquity and versatility, we have chosen the RPi as a platform for data acquisition and computing for the [[Undergraduate Radio Lab]].<br />
Having a common computing platform for the class makes it easy for us to introduce you to the Linux operating system (a mainstay of scientific computing), the world of embedded computing, and new developments in software-defined radio (SDR). I strongly encourage you to buy your own for use in this class so that you can take it home with you. These little computers are super versatile and you will find that you can use them for all sorts of things. In my home, I use them for wireless print servers, robot controllers, roku-like TV streamers, video game emulators, and as a straight-up desktop computer for kids doing remote schooling. Think of this purchase as your "textbook" for this class.<br />
<br />
To get started, here is a parts list:<br />
<br />
==Raspberry Pi==<br />
* Raspberry PI 4 version B (2 or 4 GB RAM) (~$45/$55 ea). Alternately, may use RPI 3.<br />
** stock is low because of pandemic supply chain problems. Try https://www.canakit.com/raspberry-pi-4-4gb.html or https://www.sparkfun.com/products/15446.<br />
** if stock is exhausted, back-order and switch to using it whenever it arrives (using the class ones in the meantime)<br />
** the computing board does not come with: monitor, keyboard, mouse, power supply, SD card (its hard drive), or even a case to hold it. Some places sell a "starter kit" that has many of these things, or you can buy them separately (under accessories below).<br />
<br />
====RPi Accessories====<br />
* plastic case ($6 ea; e.g. https://www.adafruit.com/product/4301)<br />
** note that RPi1-3 cases are not compatible with RPi4<br />
* 15W USB-C charger w/ cable (~$15 ea; e.g. https://www.adafruit.com/product/4298)<br />
** not all USB-C chargers source the same power. Any USB-C charger will work, provided it supplies >= 15 W.<br />
** RPi1-3 use micro-USB (not USB-C). a cheap USB-C to micro-USB adapter (e.g. https://www.amazon.com/Adapter-Convert-Connector-Support-Compatible/dp/B07GH5KJH2) will do the trick.<br />
* micro-HDMI to HDMI cable (~$10 ea; e.g. https://www.adafruit.com/product/1322)<br />
** necessary for RPi4 (RPi1-3 use HDMI)<br />
** we will have these in class, but if you want to plug into a monitor (or TV) at home, you'll need this<br />
* aluminum 15x15x15 mm heatsink ($2 ea; e.g. https://www.adafruit.com/product/3082)<br />
** keeps your RPI from overheating on processing-intensive applications. Particularly necessary for RPI 3.<br />
* bluetooth keyboard/mouse (~$20 ea; e.g. https://www.amazon.com/Rii-Ultra-slim-Wireless-Multimedia-Raspberry/dp/B07BF3LFN3)<br />
** only buy this if you don't have another one lying around you could use<br />
* Samsung EVO plus 32 GB (95 MB/s read, 20 MB/s write) micro SD Card (~$10 ea)<br />
** suggest only buying this brand (others seem more prone to corruption, or are slow).<br />
** blank is fine, we'll copy over our class "image" to it for you.<br />
** it's often handy to have more than one of these on hand; consider buying a couple<br />
<br />
==Software-Defined Radio (SDR) Receiver==<br />
To digitize radio-frequency (RF) signals and get them on an RPi, you need SDR receiver (we will stock these in class, but if you want one for home, or if you are working remotely, consider buying). These are only necessary for "radio" applications. They come with some cheap antennas you can use to listen to, e.g., FM radio on your RPI. Cheap SDRs have become available because they are used for tuning in to broadcast TV and FM radio.<br />
* (option 1, preferred) Nooelec NESDR SMARTee v4 (~$35 ea; e.g. https://www.nooelec.com/store/sdr/sdr-receivers/smart/nesdr-smart-sdr.html)<br />
** more rugged/isolated version with the same chipset as the rest below. Has an SMA connector that is easier to interface to stuff in the class<br />
* (option 2) Nooelec NESDR Mini R820T SDR & DVB-T (~$25 ea; e.g. https://www.nooelec.com/store/sdr/sdr-receivers/nesdr-mini.html)<br />
** same chipset as above, but less rugged. has a mcx connector that requires a male mcx to male sma pigtail connector ($10, https://www.nooelec.com/store/male-mcx-to-male-sma-pigtail-rg316-0-5-length.html) to connect to other stuff in class, but we will buy some of these to have on hand.<br />
<br />
==Setup==<br />
The SD card you ordered functions as your RPi's hard drive. You will need to install it with an operating system, along with any software you will need. The easy way to do this is to clone an existing installation from another card. If you come to class, we will do this for you. Otherwise, follow the instructions below.<br />
<br />
===Setup from Scratch===<br />
Raspberry Pi's benefit from being a standard set of hardware. As such, they have a customized version of Linux (a free, open-source version of Unix) that runs on them an includes drivers for all their hardware. That customized Linux version is called Raspbian (being a branch of Debian Linux for a Raspberry Pi). Other operating systems exist, but we will only support Raspbian in class.<br />
<br />
* Set up SD Card<br />
** This has to be done on an already working computer with an SD Card reader. Instructions are [https://elinux.org/RPi_Easy_SD_Card_Setup here]. Below is a summary outline for Linux.<br />
** On an existing linux installation, you can use <tt>gparted</tt><br />
*** plug in SD card<br />
*** use <tt>dmesg</tt> to find the <tt>/dev/</tt> path to the device (<tt>/dev/mmcblk0</tt> in this tutorial). Do *not* use any <tt>pN</tt> extensions to this name (e.g. <tt>mmcblk0p1</tt>).<br />
*** format SD Card as FAT32<br />
*** <tt>unmount /dev/mmcblk0</tt><br />
*** download a basic Raspbian install from https://www.raspberrypi.com/software/operating-systems<br />
**** current (Jan. 2022) version is https://downloads.raspberrypi.org/raspios_full_armhf/images/raspios_full_armhf-2021-11-08/2021-10-30-raspios-bullseye-armhf-full.zip<br />
*** <tt>sudo dd bs=1M if=2021-10-30-raspios-bullseye-armhf-full.img of=/dev/mmcblk0<br />
**** (can check progress with <tt>sudo iotop -o </tt>, takes about 5 min)<br />
<br />
* Initial boot<br />
** get wireless up (click Desktop icon in top-right)<br />
** open up a terminal and run the following commands<br />
*** <tt>sudo apt update</tt><br />
*** <tt>sudo apt upgrade</tt><br />
** open Raspberry Pi Configuration (menu)<br />
*** change hostname to, e.g., radiopi<br />
*** Interfaces: ssh=enabled, vnc=enabled, remote gpio=enabled<br />
*** Localisation: Keyboard US layout<br />
** reboot<br />
** change passwd<br />
<br />
* Software Install<br />
** <tt>sudo apt install python3-ipython jupyter vim texlive libusb-1.0-0-dev</tt><br />
** Copy over VIM config (if you use vim)<br />
** <tt>scp .vimrc pi@radiopi:</tt><br />
** Fix missing ipython command<br />
*** <tt>vi .pydisutils.cfg</tt> and add these lines:<br />
**** <tt>[install]<br />
**** <tt>install-scripts=/usr/local/bin</tt><br />
*** <tt>sudo pip3 install --force ipython</tt><br />
*** <tt>sudo pip3 install astropy</tt><br />
*** <tt>sudo pip3 install wxpython</tt><br />
<br />
===SDR Setup===<br />
See https://wiki.gentoo.org/wiki/Rtl-sdr<br />
* Plug SDR module in<br />
* Force detect as sdr, not dvb<br />
** <tt>sudo vi /etc/modprobe.d/blacklist-dvb.conf</tt> add the following line:<br />
*** <tt>blacklist dvb_usb_rtl28xxu</tt><br />
** <tt>sudo apt install rtl-sdr gqrx-sdr</tt><br />
** <tt>sudo vi /etc/udev/rules.d/20-rtlsdr.rules</tt> add the following line:<br />
*** <tt>SUBSYSTEM==”usb”, ATTRS{idVentor}==”0bda”, ATTRS{idProduct}==”2838”, GROUP=”pi”, MODE=”0666”, SYMLINK+=”rtl_sdr”</tt><br />
<br />
===Class Software===<br />
* install <tt>ugradio</tt><br />
** <tt>git clone https://github.com/AaronParsons/ugradio.git</tt><br />
** <tt>cd ugradio/ugradio_code</tt><br />
** <tt>sudo pip3 install .</tt><br />
<br />
==Cloning==<br />
This assumes you are on a Linux system.<br />
* Make a copy of an existing RPi filesystem:<br />
** Insert SD Card<br />
** <tt>sudo dd if=/dev/mmcblk0 of=radiopi.img bs=4M status=progress</tt><br />
* Optional: shrink file system:<br />
** <tt>wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh</tt><br />
** <tt>chmod a+x pyshrink.sh</tt><br />
** <tt>sudo pishrink.sh radiopi.img</tt><br />
* Copy to a new SD card<br />
** Insert new SD Card<br />
** Ensure it is formatted FAT32 (else use <tt>gparted</tt>)<br />
** unmount the new disk: <tt>umount /media/disk_name</tt><br />
** <tt>sudo dd bs=4M if=radiopi.img of=/dev/mmcblk0 conv=fsync status=progress</tt></div>AparsonsSetting Up Your Raspberry Pi2022-01-18T03:15:44Z<p>Aparsons: </p>
<hr />
<div>With the growing utility and prevalence of low-cost computing boards, it is becoming increasingly common to embed computing directly into instrumentation.<br />
The Raspberry Pi is an example of a relatively low-cost but very versatile computer capable of running a full-fledged (Linux) operating system and performing a non-trivial amount of computing, while also providing interfaces for low-level communication with electronics.<br />
The Raspberry PI (RPi) is not the only example of such board, and it is not necessarily suited to all embedded computing applications, but it is widely used and quite capable.<br />
<br />
Because of its ubiquity and versatility, we have chosen the RPi as a platform for data acquisition and computing for the [[Undergraduate Radio Lab]].<br />
Having a common computing platform for the class makes it easy for us to introduce you to the Linux operating system (a mainstay of scientific computing), the world of embedded computing, and new developments in software-defined radio (SDR). I strongly encourage you to buy your own for use in this class so that you can take it home with you. These little computers are super versatile and you will find that you can use them for all sorts of things. In my home, I use them for wireless print servers, robot controllers, roku-like TV streamers, video game emulators, and as a straight-up desktop computer for kids doing remote schooling. Think of this purchase as your "textbook" for this class.<br />
<br />
To get started, here is a parts list:<br />
<br />
==Raspberry Pi==<br />
* Raspberry PI 4 version B (2 or 4 GB RAM) (~$45/$55 ea). Alternately, may use RPI 3.<br />
** stock is low because of pandemic supply chain problems. Try https://www.canakit.com/raspberry-pi-4-4gb.html or https://www.sparkfun.com/products/15446.<br />
** if stock is exhausted, back-order and switch to using it whenever it arrives (using the class ones in the meantime)<br />
** the computing board does not come with: monitor, keyboard, mouse, power supply, SD card (its hard drive), or even a case to hold it. Some places sell a "starter kit" that has many of these things, or you can buy them separately (under accessories below).<br />
<br />
====RPi Accessories====<br />
* plastic case ($6 ea; e.g. https://www.adafruit.com/product/4301)<br />
** note that RPi1-3 cases are not compatible with RPi4<br />
* 15W USB-C charger w/ cable (~$15 ea; e.g. https://www.adafruit.com/product/4298)<br />
** not all USB-C chargers source the same power. Any USB-C charger will work, provided it supplies >= 15 W.<br />
** RPi1-3 use micro-USB (not USB-C). a cheap USB-C to micro-USB adapter (e.g. https://www.amazon.com/Adapter-Convert-Connector-Support-Compatible/dp/B07GH5KJH2) will do the trick.<br />
* micro-HDMI to HDMI cable (~$10 ea; e.g. https://www.adafruit.com/product/1322)<br />
** necessary for RPi4 (RPi1-3 use HDMI)<br />
** we will have these in class, but if you want to plug into a monitor (or TV) at home, you'll need this<br />
* aluminum 15x15x15 mm heatsink ($2 ea; e.g. https://www.adafruit.com/product/3082)<br />
** keeps your RPI from overheating on processing-intensive applications. Particularly necessary for RPI 3.<br />
* bluetooth keyboard/mouse (~$20 ea; e.g. https://www.amazon.com/Rii-Ultra-slim-Wireless-Multimedia-Raspberry/dp/B07BF3LFN3)<br />
** only buy this if you don't have another one lying around you could use<br />
* Samsung EVO plus 32 GB (95 MB/s read, 20 MB/s write) micro SD Card (~$10 ea)<br />
** suggest only buying this brand (others seem more prone to corruption, or are slow).<br />
** blank is fine, we'll copy over our class "image" to it for you.<br />
** it's often handy to have more than one of these on hand; consider buying a couple<br />
<br />
==Software-Defined Radio (SDR) Receiver==<br />
To digitize radio-frequency (RF) signals and get them on an RPi, you need SDR receiver (we will stock these in class, but if you want one for home, or if you are working remotely, consider buying). These are only necessary for "radio" applications. They come with some cheap antennas you can use to listen to, e.g., FM radio on your RPI. Cheap SDRs have become available because they are used for tuning in to broadcast TV and FM radio.<br />
* (option 1, preferred) Nooelec NESDR SMARTee v4 (~$35 ea; e.g. https://www.nooelec.com/store/sdr/sdr-receivers/smart/nesdr-smart-sdr.html)<br />
** more rugged/isolated version with the same chipset as the rest below. Has an SMA connector that is easier to interface to stuff in the class<br />
* (option 2) Nooelec NESDR Mini R820T SDR & DVB-T (~$25 ea; e.g. https://www.nooelec.com/store/sdr/sdr-receivers/nesdr-mini.html)<br />
** same chipset as above, but less rugged. has a mcx connector that requires a male mcx to male sma pigtail connector ($10, https://www.nooelec.com/store/male-mcx-to-male-sma-pigtail-rg316-0-5-length.html) to connect to other stuff in class, but we will buy some of these to have on hand.<br />
<br />
==Setup==<br />
The SD card you ordered functions as your RPi's hard drive. You will need to install it with an operating system, along with any software you will need. The easy way to do this is to clone an existing installation from another card. If you come to class, we will do this for you. Otherwise, follow the instructions below.<br />
<br />
===Setup from Scratch===<br />
Raspberry Pi's benefit from being a standard set of hardware. As such, they have a customized version of Linux (a free, open-source version of Unix) that runs on them an includes drivers for all their hardware. That customized Linux version is called Raspbian (being a branch of Debian Linux for a Raspberry Pi). Other operating systems exist, but we will only support Raspbian in class.<br />
<br />
* Set up SD Card<br />
** This has to be done on an already working computer with an SD Card reader. Instructions are [https://elinux.org/RPi_Easy_SD_Card_Setup here]. Below is a summary outline for Linux.<br />
** On an existing linux installation, you can use <tt>gparted</tt><br />
*** plug in SD card<br />
*** use <tt>dmesg</tt> to find the <tt>/dev/</tt> path to the device (<tt>/dev/mmcblk0</tt> in this tutorial). Do *not* use any <tt>pN</tt> extensions to this name (e.g. <tt>mmcblk0p1</tt>).<br />
*** format SD Card as FAT32<br />
*** <tt>unmount /dev/mmcblk0</tt><br />
*** download a basic Raspbian install from https://www.raspberrypi.com/software/operating-systems<br />
**** current (Jan. 2022) version is https://downloads.raspberrypi.org/raspios_full_armhf/images/raspios_full_armhf-2021-11-08/2021-10-30-raspios-bullseye-armhf-full.zip<br />
*** <tt>sudo dd bs=1M if=2021-10-30-raspios-bullseye-armhf-full.img of=/dev/mmcblk0<br />
**** (can check progress with <tt>sudo iotop -o </tt>, takes about 5 min)<br />
<br />
* Initial boot<br />
** get wireless up (click Desktop icon in top-right)<br />
** open up a terminal and run the following commands<br />
*** <tt>sudo apt update</tt><br />
*** <tt>sudo apt upgrade</tt><br />
** open Raspberry Pi Configuration (menu)<br />
*** change hostname to, e.g., radiopi<br />
*** Interfaces: ssh=enabled, vnc=enabled, remote gpio=enabled<br />
*** Localisation: Keyboard US layout<br />
** reboot<br />
** change passwd<br />
<br />
* Software Install<br />
** <tt>sudo apt install python3-ipython jupyter vim texlive libusb-1.0-0-dev</tt><br />
** Copy over VIM config (if you use vim)<br />
** <tt>scp .vimrc pi@radiopi:</tt><br />
** Fix missing ipython command<br />
*** <tt>vi .pydisutils.cfg</tt> and add these lines:<br />
**** <tt>[install]<br />
**** <tt>install-scripts=/usr/local/bin</tt><br />
*** <tt>sudo pip3 install --force ipython</tt><br />
*** <tt>sudo pip3 install astropy</tt><br />
*** <tt>sudo pip3 install wxpython</tt><br />
<br />
===SDR Setup===<br />
See https://wiki.gentoo.org/wiki/Rtl-sdr<br />
* Plug SDR module in<br />
* Force detect as sdr, not dvb<br />
** <tt>sudo vi /etc/modprobe.d/blacklist-dvb.conf</tt> add the following line:<br />
*** <tt>blacklist dvb_usb_rtl28xxu</tt><br />
** <tt>sudo apt install rtl-sdr gqrx-sdr</tt><br />
** <tt>sudo vi /etc/udev/rules.d/20-rtlsdr.rules</tt> add the following line:<br />
*** <tt>SUBSYSTEM==”usb”, ATTRS{idVentor}==”0bda”, ATTRS{idProduct}==”2838”, GROUP=”pi”, MODE=”0666”, SYMLINK+=”rtl_sdr”</tt><br />
<br />
===Class Software===<br />
* install <tt>ugradio</tt><br />
** <tt>git clone https://github.com/AaronParsons/ugradio.git</tt><br />
** <tt>cd ugradio/ugradio_code</tt><br />
** <tt>sudo pip3 install .</tt></div>AparsonsSetting Up Your Raspberry Pi2022-01-18T03:14:05Z<p>Aparsons: </p>
<hr />
<div>With the growing utility and prevalence of low-cost computing boards, it is becoming increasingly common to embed computing directly into instrumentation.<br />
The Raspberry Pi is an example of a relatively low-cost but very versatile computer capable of running a full-fledged (Linux) operating system and performing a non-trivial amount of computing, while also providing interfaces for low-level communication with electronics.<br />
The Raspberry PI (RPi) is not the only example of such board, and it is not necessarily suited to all embedded computing applications, but it is widely used and quite capable.<br />
<br />
Because of its ubiquity and versatility, we have chosen the RPi as a platform for data acquisition and computing for the [[Undergraduate Radio Lab]].<br />
Having a common computing platform for the class makes it easy for us to introduce you to the Linux operating system (a mainstay of scientific computing), the world of embedded computing, and new developments in software-defined radio (SDR). I strongly encourage you to buy your own for use in this class so that you can take it home with you. These little computers are super versatile and you will find that you can use them for all sorts of things. In my home, I use them for wireless print servers, robot controllers, roku-like TV streamers, video game emulators, and as a straight-up desktop computer for kids doing remote schooling. Think of this purchase as your "textbook" for this class.<br />
<br />
To get started, here is a parts list:<br />
<br />
==Raspberry Pi==<br />
* Raspberry PI 4 version B (2 or 4 GB RAM) (~$45/$55 ea). Alternately, may use RPI 3.<br />
** stock is low because of pandemic supply chain problems. Try https://www.canakit.com/raspberry-pi-4-4gb.html or https://www.sparkfun.com/products/15446.<br />
** if stock is exhausted, back-order and switch to using it whenever it arrives (using the class ones in the meantime)<br />
** the computing board does not come with: monitor, keyboard, mouse, power supply, SD card (its hard drive), or even a case to hold it. Some places sell a "starter kit" that has many of these things, or you can buy them separately (under accessories below).<br />
<br />
====RPi Accessories====<br />
* plastic case ($6 ea; e.g. https://www.adafruit.com/product/4301)<br />
** note that RPi1-3 cases are not compatible with RPi4<br />
* 15W USB-C charger w/ cable (~$15 ea; e.g. https://www.adafruit.com/product/4298)<br />
** not all USB-C chargers source the same power. Any USB-C charger will work, provided it supplies >= 15 W.<br />
** RPi1-3 use micro-USB (not USB-C). a cheap USB-C to micro-USB adapter (e.g. https://www.amazon.com/Adapter-Convert-Connector-Support-Compatible/dp/B07GH5KJH2) will do the trick.<br />
* micro-HDMI to HDMI cable (~$10 ea; e.g. https://www.adafruit.com/product/1322)<br />
** necessary for RPi4 (RPi1-3 use HDMI)<br />
** we will have these in class, but if you want to plug into a monitor (or TV) at home, you'll need this<br />
* aluminum 15x15x15 mm heatsink ($2 ea; e.g. https://www.adafruit.com/product/3082)<br />
** keeps your RPI from overheating on processing-intensive applications. Particularly necessary for RPI 3.<br />
* bluetooth keyboard/mouse (~$20 ea; e.g. https://www.amazon.com/Rii-Ultra-slim-Wireless-Multimedia-Raspberry/dp/B07BF3LFN3)<br />
** only buy this if you don't have another one lying around you could use<br />
* Samsung EVO plus 32 GB (95 MB/s read, 20 MB/s write) micro SD Card (~$10 ea)<br />
** suggest only buying this brand (others seem more prone to corruption, or are slow).<br />
** blank is fine, we'll copy over our class "image" to it for you.<br />
** it's often handy to have more than one of these on hand; consider buying a couple<br />
<br />
==Software-Defined Radio (SDR) Receiver==<br />
To digitize radio-frequency (RF) signals and get them on an RPi, you need SDR receiver (we will stock these in class, but if you want one for home, or if you are working remotely, consider buying). These are only necessary for "radio" applications. They come with some cheap antennas you can use to listen to, e.g., FM radio on your RPI. Cheap SDRs have become available because they are used for tuning in to broadcast TV and FM radio.<br />
* (option 1, preferred) Nooelec NESDR SMARTee v4 (~$35 ea; e.g. https://www.nooelec.com/store/sdr/sdr-receivers/smart/nesdr-smart-sdr.html)<br />
** more rugged/isolated version with the same chipset as the rest below. Has an SMA connector that is easier to interface to stuff in the class<br />
* (option 2) Nooelec NESDR Mini R820T SDR & DVB-T (~$25 ea; e.g. https://www.nooelec.com/store/sdr/sdr-receivers/nesdr-mini.html)<br />
** same chipset as above, but less rugged. has a mcx connector that requires a male mcx to male sma pigtail connector ($10, https://www.nooelec.com/store/male-mcx-to-male-sma-pigtail-rg316-0-5-length.html) to connect to other stuff in class, but we will buy some of these to have on hand.<br />
<br />
==Setup==<br />
The SD card you ordered functions as your RPi's hard drive. You will need to install it with an operating system, along with any software you will need. The easy way to do this is to clone an existing installation from another card. If you come to class, we will do this for you. Otherwise, follow the instructions below.<br />
<br />
===Setup from Scratch===<br />
Raspberry Pi's benefit from being a standard set of hardware. As such, they have a customized version of Linux (a free, open-source version of Unix) that runs on them an includes drivers for all their hardware. That customized Linux version is called Raspbian (being a branch of Debian Linux for a Raspberry Pi). Other operating systems exist, but we will only support Raspbian in class.<br />
<br />
* Set up SD Card<br />
** This has to be done on an already working computer with an SD Card reader. Instructions are [https://elinux.org/RPi_Easy_SD_Card_Setup here]. Below is a summary outline for Linux.<br />
** On an existing linux installation, you can use <tt>gparted</tt><br />
*** plug in SD card<br />
*** use <tt>dmesg</tt> to find the <tt>/dev/</tt> path to the device (<tt>/dev/mmcblk0</tt> in this tutorial). Do *not* use any <tt>pN</tt> extensions to this name (e.g. <tt>mmcblk0p1</tt>).<br />
*** format SD Card as FAT32<br />
*** <tt>unmount /dev/mmcblk0</tt><br />
*** download a basic Raspbian install from https://www.raspberrypi.com/software/operating-systems<br />
**** current (Jan. 2022) version is https://downloads.raspberrypi.org/raspios_full_armhf/images/raspios_full_armhf-2021-11-08/2021-10-30-raspios-bullseye-armhf-full.zip<br />
*** <tt>sudo dd bs=1M if=2021-10-30-raspios-bullseye-armhf-full.img of=/dev/mmcblk0<br />
**** (can check progress with <tt>sudo iotop -o </tt>, takes about 5 min)<br />
<br />
* Initial boot<br />
** get wireless up (click Desktop icon in top-right)<br />
** open up a terminal and run the following commands<br />
*** <tt>sudo apt update</tt><br />
*** <tt>sudo apt upgrade</tt><br />
** open Raspberry Pi Configuration (menu)<br />
*** change hostname to, e.g., radiopi<br />
*** Interfaces: ssh=enabled, vnc=enabled, remote gpio=enabled<br />
*** Localisation: Keyboard US layout<br />
** reboot<br />
** change passwd<br />
<br />
* Software Install<br />
** <tt>sudo apt install python3-ipython jupyter vim texlive libusb-1.0-0-dev</tt><br />
** Copy over VIM config (if you use vim)<br />
** <tt>scp .vimrc pi@radiopi:</tt><br />
** Fix missing ipython command<br />
*** <tt>vi .pydisutils.cfg</tt> and add these lines:<br />
**** <tt>[install]<br />
**** <tt>install-scripts=/usr/local/bin</tt><br />
*** <tt>sudo pip3 install --force ipython</tt><br />
*** <tt>sudo pip3 install astropy</tt><br />
<br />
===SDR Setup===<br />
See https://wiki.gentoo.org/wiki/Rtl-sdr<br />
* Plug SDR module in<br />
* Force detect as sdr, not dvb<br />
** <tt>sudo vi /etc/modprobe.d/blacklist-dvb.conf</tt> add the following line:<br />
*** <tt>blacklist dvb_usb_rtl28xxu</tt><br />
** <tt>sudo apt install rtl-sdr gqrx-sdr</tt><br />
** <tt>sudo vi /etc/udev/rules.d/20-rtlsdr.rules</tt> add the following line:<br />
*** <tt>SUBSYSTEM==”usb”, ATTRS{idVentor}==”0bda”, ATTRS{idProduct}==”2838”, GROUP=”pi”, MODE=”0666”, SYMLINK+=”rtl_sdr”</tt><br />
<br />
===Class Software===<br />
* install <tt>ugradio</tt><br />
** <tt>git clone https://github.com/AaronParsons/ugradio.git</tt><br />
** <tt>cd ugradio/ugradio_code</tt><br />
** <tt>sudo pip3 install .</tt></div>AparsonsSetting Up Your Raspberry Pi2022-01-18T03:02:18Z<p>Aparsons: </p>
<hr />
<div>With the growing utility and prevalence of low-cost computing boards, it is becoming increasingly common to embed computing directly into instrumentation.<br />
The Raspberry Pi is an example of a relatively low-cost but very versatile computer capable of running a full-fledged (Linux) operating system and performing a non-trivial amount of computing, while also providing interfaces for low-level communication with electronics.<br />
The Raspberry PI (RPi) is not the only example of such board, and it is not necessarily suited to all embedded computing applications, but it is widely used and quite capable.<br />
<br />
Because of its ubiquity and versatility, we have chosen the RPi as a platform for data acquisition and computing for the [[Undergraduate Radio Lab]].<br />
Having a common computing platform for the class makes it easy for us to introduce you to the Linux operating system (a mainstay of scientific computing), the world of embedded computing, and new developments in software-defined radio (SDR). I strongly encourage you to buy your own for use in this class so that you can take it home with you. These little computers are super versatile and you will find that you can use them for all sorts of things. In my home, I use them for wireless print servers, robot controllers, roku-like TV streamers, video game emulators, and as a straight-up desktop computer for kids doing remote schooling. Think of this purchase as your "textbook" for this class.<br />
<br />
To get started, here is a parts list:<br />
<br />
==Raspberry Pi==<br />
* Raspberry PI 4 version B (2 or 4 GB RAM) (~$45/$55 ea). Alternately, may use RPI 3.<br />
** stock is low because of pandemic supply chain problems. Try https://www.canakit.com/raspberry-pi-4-4gb.html or https://www.sparkfun.com/products/15446.<br />
** if stock is exhausted, back-order and switch to using it whenever it arrives (using the class ones in the meantime)<br />
** the computing board does not come with: monitor, keyboard, mouse, power supply, SD card (its hard drive), or even a case to hold it. Some places sell a "starter kit" that has many of these things, or you can buy them separately (under accessories below).<br />
<br />
====RPi Accessories====<br />
* plastic case ($6 ea; e.g. https://www.adafruit.com/product/4301)<br />
** note that RPi1-3 cases are not compatible with RPi4<br />
* 15W USB-C charger w/ cable (~$15 ea; e.g. https://www.adafruit.com/product/4298)<br />
** not all USB-C chargers source the same power. Any USB-C charger will work, provided it supplies >= 15 W.<br />
** RPi1-3 use micro-USB (not USB-C). a cheap USB-C to micro-USB adapter (e.g. https://www.amazon.com/Adapter-Convert-Connector-Support-Compatible/dp/B07GH5KJH2) will do the trick.<br />
* micro-HDMI to HDMI cable (~$10 ea; e.g. https://www.adafruit.com/product/1322)<br />
** necessary for RPi4 (RPi1-3 use HDMI)<br />
** we will have these in class, but if you want to plug into a monitor (or TV) at home, you'll need this<br />
* aluminum 15x15x15 mm heatsink ($2 ea; e.g. https://www.adafruit.com/product/3082)<br />
** keeps your RPI from overheating on processing-intensive applications. Particularly necessary for RPI 3.<br />
* bluetooth keyboard/mouse (~$20 ea; e.g. https://www.amazon.com/Rii-Ultra-slim-Wireless-Multimedia-Raspberry/dp/B07BF3LFN3)<br />
** only buy this if you don't have another one lying around you could use<br />
* Samsung EVO plus 32 GB (95 MB/s read, 20 MB/s write) micro SD Card (~$10 ea)<br />
** suggest only buying this brand (others seem more prone to corruption, or are slow).<br />
** blank is fine, we'll copy over our class "image" to it for you.<br />
** it's often handy to have more than one of these on hand; consider buying a couple<br />
<br />
==Software-Defined Radio (SDR) Receiver==<br />
To digitize radio-frequency (RF) signals and get them on an RPi, you need SDR receiver (we will stock these in class, but if you want one for home, or if you are working remotely, consider buying). These are only necessary for "radio" applications. They come with some cheap antennas you can use to listen to, e.g., FM radio on your RPI. Cheap SDRs have become available because they are used for tuning in to broadcast TV and FM radio.<br />
* (option 1, preferred) Nooelec NESDR SMARTee v4 (~$35 ea; e.g. https://www.nooelec.com/store/sdr/sdr-receivers/smart/nesdr-smart-sdr.html)<br />
** more rugged/isolated version with the same chipset as the rest below. Has an SMA connector that is easier to interface to stuff in the class<br />
* (option 2) Nooelec NESDR Mini R820T SDR & DVB-T (~$25 ea; e.g. https://www.nooelec.com/store/sdr/sdr-receivers/nesdr-mini.html)<br />
** same chipset as above, but less rugged. has a mcx connector that requires a male mcx to male sma pigtail connector ($10, https://www.nooelec.com/store/male-mcx-to-male-sma-pigtail-rg316-0-5-length.html) to connect to other stuff in class, but we will buy some of these to have on hand.<br />
<br />
==Setup==<br />
The SD card you ordered functions as your RPi's hard drive. You will need to install it with an operating system, along with any software you will need. The easy way to do this is to clone an existing installation from another card. If you come to class, we will do this for you. Otherwise, follow the instructions below.<br />
<br />
===Setup from Scratch===<br />
Raspberry Pi's benefit from being a standard set of hardware. As such, they have a customized version of Linux (a free, open-source version of Unix) that runs on them an includes drivers for all their hardware. That customized Linux version is called Raspbian (being a branch of Debian Linux for a Raspberry Pi). Other operating systems exist, but we will only support Raspbian in class.<br />
<br />
* Set up SD Card<br />
** This has to be done on an already working computer with an SD Card reader. Instructions are [https://elinux.org/RPi_Easy_SD_Card_Setup here]. Below is a summary outline for Linux.<br />
** On an existing linux installation, you can use <tt>gparted</tt><br />
*** plug in SD card<br />
*** use <tt>dmesg</tt> to find the <tt>/dev/</tt> path to the device (<tt>/dev/mmcblk0</tt> in this tutorial). Do *not* use any <tt>pN</tt> extensions to this name (e.g. <tt>mmcblk0p1</tt>).<br />
*** format SD Card as FAT32<br />
*** <tt>unmount /dev/mmcblk0</tt><br />
*** download a basic Raspbian install from https://www.raspberrypi.com/software/operating-systems<br />
**** current (Jan. 2022) version is https://downloads.raspberrypi.org/raspios_full_armhf/images/raspios_full_armhf-2021-11-08/2021-10-30-raspios-bullseye-armhf-full.zip<br />
*** <tt>sudo dd bs=1M if=2021-10-30-raspios-bullseye-armhf-full.img of=/dev/mmcblk0<br />
**** (can check progress with <tt>sudo iotop -o </tt>, takes about 5 min)<br />
<br />
* Initial boot<br />
** get wireless up (click Desktop icon in top-right)<br />
** open up a terminal and run the following commands<br />
*** <tt>sudo apt update</tt><br />
*** <tt>sudo apt upgrade</tt><br />
** open Raspberry Pi Configuration (menu)<br />
*** change hostname to, e.g., radiopi<br />
*** Interfaces: ssh=enabled, vnc=enabled, remote gpio=enabled<br />
*** Localisation: Keyboard US layout<br />
** reboot<br />
** change passwd<br />
<br />
* Software Install<br />
** <tt>sudo apt install python3-ipython jupyter vim texlive libusb-dev</tt><br />
** Copy over VIM config (if you use vim)<br />
** <tt>scp .vimrc pi@radiopi:</tt><br />
** Fix missing ipython command<br />
*** <tt>vi .pydisutils.cfg</tt> and add these lines:<br />
**** <tt>[install]<br />
**** <tt>install-scripts=/usr/local/bin</tt><br />
*** <tt>sudo pip3 install --force ipython</tt><br />
*** <tt>sudo pip3 install astropy</tt><br />
<br />
===SDR Setup===<br />
See https://wiki.gentoo.org/wiki/Rtl-sdr<br />
* Plug SDR module in<br />
* Force detect as sdr, not dvb<br />
** <tt>sudo vi /etc/modprobe.d/blacklist-dvb.conf</tt> add the following line:<br />
*** <tt>blacklist dvb_usb_rtl28xxu</tt><br />
** <tt>sudo apt install rtl-sdr gqrx-sdr</tt><br />
** <tt>sudo vi /etc/udev/rules.d/20-rtlsdr.rules</tt> add the following line:<br />
*** <tt>SUBSYSTEM==”usb”, ATTRS{idVentor}==”0bda”, ATTRS{idProduct}==”2838”, GROUP=”pi”, MODE=”0666”, SYMLINK+=”rtl_sdr”</tt><br />
<br />
===Class Software===<br />
* install <tt>ugradio</tt><br />
** <tt>git clone https://github.com/AaronParsons/ugradio.git</tt><br />
** <tt>cd ugradio/ugradio_code</tt><br />
** <tt>sudo pip3 install .</tt></div>AparsonsUndergraduate Radio Lab2022-01-13T23:15:24Z<p>Aparsons: </p>
<hr />
<div>This course consists of four laboratory experiments that concentrate on radio instrumentation and laboratory techniques. We will build receiving, observing, and data analysis systems for two telescopes: a single-dish 21-cm line system, and a 10.7-GHz interferometer. We will use these telescopes for astronomical observing projects including structure of the Milky Way galaxy, precise position measurement of several radio sources, and measurement of the radio brightness distributions of the sun and moon with high angular resolution. There is a heavy emphasis on digital data acquisition, software development in the Python language, and high-quality written reports.<br />
<br />
=== Class Programmatics ===<br />
* Class Code Repository: [http://github.com/AaronParsons/ugradio http://github.com/AaronParsons/ugradio]<br />
* [https://github.com/AaronParsons/ugradio/raw/master/schedule/syllabus_2022_spring.docx Syllabus]<br />
* [https://berkeley.zoom.us/j/3587609756 Zoom Room: 358 760 9756]<br />
* Bcourses: [https://bcourses.berkeley.edu/courses/1512067 1512067]<br />
* Discord: https://discord.gg/vdmcyZcAbS<br />
* Class Hours:<br />
** Tuesday/Thursday 1:30-3:30pm<br />
* Office Hours:<br />
** Aaron Parsons (aparsons at berkeley): TBD, or by appointment, in standard [https://berkeley.zoom.us/j/3587609756 Zoom Room: 358 760 9756]<br />
** Christian Bye (chbye at berkeley): TBD or by appointment (Through Discord Office Hours Channel)<br />
** Mine Gokcen (minegokcen at berkeley):<br />
** Frank Latora (fjlatora at berkeley):<br />
* Lab Groups:<br />
** Group 1<br />
** Group 2<br />
** Group 3<br />
** Group 4<br />
** Group 5<br />
<br />
=== Experiments ===<br />
* Lab 1: [https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/allmixers.pdf Exploring Digital Sampling, Fourier Transforms, and both DSB and SSB Mixers]<br />
* Lab 2: [https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/bighorn.pdf Astronomy with the 21cm Line; Some Microwave Electronics]<br />
* Lab 3: [https://github.com/AaronParsons/ugradio/blob/master/lab_interf/interf.pdf Radio Interferometry at X Band]<br />
* Lab 4: [https://github.com/AaronParsons/ugradio/blob/master/lab_dish/HI1.pdf Mapping the HI Line: the Galaxy and Supershells]<br />
<br />
===Getting Set Up===<br />
* [[Getting Started in the Undergraduate Radio Lab]]<br />
** [[Setting Up Your Raspberry Pi]]<br />
** [[Connecting to the Lab Computers Remotely]]<br />
<br />
=== General Skills Used Through-Out Course ===<br />
<br />
* Navigating Linux/Unix-like Operating Systems<br />
** [[Unix Primer]]<br />
** [[Unix Text Editors]]<br />
* Programming in Python<br />
** [[Python Installation and Basic Programming]]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting]<br />
* Software Engineering<br />
** [[Revision Control]]<br />
** [[Getting Started w/ Github]]<br />
** [[Unit Testing]]<br />
* Report Writing<br />
** [[LaTeX]]<br />
<br />
== Topics by Date ==<br />
<br />
=== Lab 1 ([https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/allmixers.pdf Exploring Digital Sampling, Fourier Transforms, and both DSB and SSB Mixers]), Due Feb 8, 1:30p ===<br />
==== Lab 1, Week 1 (Jan 18): Sampling and Power Spectra ====<br />
* Resources and Handouts<br />
** [[Nyquist Sampling]]<br />
** [[Fourier Transform]]<br />
** Technical Skills<br />
*** [[Unix Primer]]<br />
*** [[Unix Text Editors]]<br />
*** [[Python Installation and Basic Programming]]<br />
**** [[Revision Control]]<br />
**** [[Getting Started w/ Github]]<br />
<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/Nyquist%20Sampling%20and%20Aliasing.ipynb Aliasing Demo]<br />
* In class:<br />
** Astrobaki, Syllabus, Office Hours<br />
** Getting accounts (premade by Bill Boyd, change password)<br />
** Lab access (see [[Getting Started in the Undergraduate Radio Lab]])<br />
** Class philosophy and workflow<br />
** [[Nyquist Sampling]] and aliasing<br />
** [[Fourier Transform]]<br />
** ADC Quantization<br />
** Lab Hardware<br />
*** PicoScope 2206a<br />
** Data Challenge<br />
*** [https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/secret_message.npz Secret Message]<br />
** [https://youtu.be/Yb4K8t6SG4k Lecture 1 Zoom Recording]<br />
** [https://youtu.be/oJplegmHeAI Lecture 2 Zoom Recording]<br />
<br />
==== Lab 1, Week 2 (Jan 26): DSB and SSB Mixers ====<br />
* Theory and Background:<br />
** [[Heterodyne Mixers]]<br />
** [[Convolution Theorem]]<br />
** [[Fast Fourier Transform]]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/dft_intro/fourierc.pdf Spectral Analysis with Discrete Fourier Transforms]<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/Convolutions%20and%20Correlations.ipynb Convolutions and Correlations ]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/Sec%204.%20In%20the%20mind.ipynb In the Mind: Introduction to the Fourier Transform ]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/datatype_demo.ipynb Mommy Fortuna's Midnight Carnival of Python Oddities]<br />
** [[Data Representations]], with handout on [https://github.com/AaronParsons/ugradio/blob/master/pythonprimer/datatypes.pdf Data Types and Organizational Structures]<br />
** Data Challenge<br />
*** [https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/mixed_message.npz Secret Message 2]<br />
* In class:<br />
** [https://youtu.be/Ut_jTUoqcd8 Lecture 3: Discrete Fourier Transforms and the Convolution Theorem]<br />
** [https://youtu.be/ZxAWNiisn3Y Lecture 4: Show and Tell]<br />
** Lecture: Introduction to DSB and SSB Mixers<br />
** Show and Tell (10m per group)<br />
<br />
==== Lab 1, Week 3 (Feb 1): More Mixers, and Lab Reports ====<br />
* Theory and Background<br />
** [[LaTeX]]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting], second pass<br />
** [https://github.com/AaronParsons/ugradio/tree/master/latex_template/lab1 LaTex Template] Template you may use for your lab report<br />
*** [https://www.overleaf.com/read/hvrwkmfkvkhg Overleaf version of the lab template]<br />
* In Class:<br />
** Lecture: One more pass on [[Convolution Theorem]], [[Heterodyne Mixers]], and [https://github.com/AaronParsons/ugradio/blob/master/dft_intro/fourierc.pdf DFTs]<br />
** [https://youtu.be/igZPQQ-6ieo Lecture 5]<br />
** [https://youtu.be/53CZj1CCEm0 Lecture 6]<br />
** Show and Tell<br />
** Writing Lab Reports<br />
* Lab 1 Due Feb 8, 1:30p<br />
<br />
---------<br />
<br />
=== Lab 2 ([https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/bighorn.pdf Astronomy with the 21cm Line; Some Microwave Electronics]), due Mar 1, 1:30p ===<br />
==== Lab 2, Week 1 (Feb 8): 21cm Line and Waveguides ====<br />
* Theory and Background:<br />
** [https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/cal_intensity.pdf Calibrating the Intensity and Shape of Spectral Lines]<br />
** [[Specific Intensity]]<br />
** [[21cm Transition]]<br />
** [[Coordinates]]<br />
* Demos and Tutorials<br />
** Python Tutorial Part 3: Functions, Modules, and Objects<br />
** Matrix Math with Numpy<br />
** Doppler Corrections, ugradio.doppler<br />
* In class:<br />
** Introduction to Horn and Receiver<br />
** Time<br />
** Coordinates<br />
** [https://youtu.be/ouSTGedJtI4 Lecture 7]<br />
** [https://youtu.be/htF9zWPzeLQ Lecture 8]<br />
<br />
==== Lab 2, Week 2 (Feb 15): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Impedance]]<br />
** [[Transmission_Lines]]<br />
** [http://ugastro.berkeley.edu/radio/2017/handout_links/RWvD.pdf Fields and Waves in Communication Electronics (Ramo, Whinney, and Van Duzer)]<br />
** [[Central Limit Theorem]] and [[Random Walks]]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/least_squares/lsfit_lite.pdf Least Squares Lite for the Budding Aficionado: Art and Practice]<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab2/Central%20Limit%20Theorem%20and%20Averaging.ipynb Central Limit Theorem and Averaging]<br />
* In Class:<br />
** Show and Tell<br />
** Waveguides, Transmission Lines, and Rope<br />
** Fitting Gaussians and Polynomials, ugradio.gauss<br />
** [https://youtu.be/l6_qxtqGtuY Lecture 9]<br />
** [https://youtu.be/xre1hQiZKCM Lecture 10]<br />
<br />
==== Lab 2, Week 3 (Feb 22): Write Lab Report ====<br />
* Theory and Background<br />
** [https://github.com/AaronParsons/ugradio/blob/master/least_squares/lsfit_2008.pdf Least-Squares and Chi-Square for the Budding Aficionado: Art and Practice]<br />
* In Class:<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab2/chisq_intro.ipynb Chi-Square Jupyter Notebook]<br />
** Show and Tell<br />
** Least Squares Part 2<br />
** [https://youtu.be/M92l0k45Gjw Lecture 11]<br />
* Lab 2 Due Mar 1, 1:30p<br />
<br />
---------<br />
<br />
=== Lab 3 ([https://github.com/AaronParsons/ugradio/blob/master/lab_interf/interf.pdf Radio Interferometry at X Band]), due Apr 5, 1:00p ===<br />
<br />
==== Lab 3 Week 1 (Mar 1): Interferometer ====<br />
* Theory and Background<br />
** [[Coordinates]]<br />
** [[Basic Interferometry]]<br />
* In Class:<br />
** Tour of Rooftop Interferometer<br />
** Exercise Ball Coordinates<br />
** Interferometry with Strings<br />
** [https://youtu.be/NXvDSyCfHMQ Lecture 12]<br />
** [https://youtu.be/5IDLQMO6_8g Lecture 13]<br />
<br />
==== Lab 3 Week 2 (Mar 8): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Measurement Equation]]<br />
** [[Telescope Field of View/Resolution]]<br />
* In Class:<br />
** Show and Tell<br />
** Controlling the Telescope<br />
** Tracking the Sun<br />
** Scheduling Observations<br />
* Lecture Links<br />
** [https://youtu.be/bgDBf9bPSTA Lecture 14]<br />
** [https://youtu.be/xVtmz0TfUJg Lecture 15]<br />
<br />
==== Lab 3 Week 3 (Mar 15): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Basic Interferometry II]]<br />
** [[Least Squares]]<br />
* In Class:<br />
** Show and Tell<br />
** Linear Least-Squares in Python<br />
** Minimizing Chi-Square]<br />
** Noise in Observations<br />
* Lecture Links<br />
** [https://youtu.be/ZhMu_0YFxCo Lecture 16]<br />
** [https://youtu.be/n-FOeZVuHls Lecture 17]<br />
<br />
==== No class (Mar 23, 26) ====<br />
<br />
==== Lab 3 Week 4 (Mar 29): Write Lab Report ====<br />
* Theory and Background<br />
*** [[Correlators]]<br />
*** [[Units of radiation]]<br />
* In Class:<br />
** Show and Tell<br />
** Photon bucket demo<br />
* Lecture Links<br />
** [https://youtu.be/Nl5h3Hi51bQ Lecture 18]<br />
** [https://youtu.be/GVugVn5PdB0 Lecture 19]<br />
* Lab 3 Due Apr 6, 1:30p<br />
<br />
<br />
---------<br />
<br />
=== Lab 4 ([https://github.com/AaronParsons/ugradio/blob/master/lab_dish/HI1.pdf Mapping the HI Line: the Galaxy and Supershells]), due May 3, 1:30p ===<br />
<br />
==== Useful Links ====<br />
[https://teamup.com/ksd715ee7fb766a108/#/ Link to Observing Calendar]<br />
<br />
[http://leuschner.berkeley.edu:8080 Leuschner WebCam]<br />
<br />
==== Lab 4 Week 1 (Apr 5): Leuschner Dish ====<br />
* Theory and Background<br />
** [[Specific Intensity]]<br />
** [[Radio Sky]]<br />
** [[Screen Command]]<br />
* In Class:<br />
** Trip to Leuschner: Class will go later than usual<br />
** drive mechanism (how the dish moves)<br />
** feed (notice probes) and cables<br />
** IF setup (one channel for OH, one for HI)<br />
** interacting with a CASPER [https://github.com/AaronParsons/leuschner-spectrimeter spectrometer]<br />
** pointing control<br />
** spatial sampling with dish<br />
* Lecture Links<br />
** [https://youtu.be/ZeB9Gj3gHgs Lecture 20]<br />
** [https://berkeley.zoom.us/rec/share/yYtJDpzz52pOc5GR42PxBbA_QorFT6a81CAfr6IKyRre8X_2LRtd9NPzNNLXeBCw Lab 4 Lecture 2 (Thursday 4/9/20)]<br />
<br />
==== Lab 4 Week 2 (Apr 12): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[21cm Transition]]<br />
** [[Black-Body Radiation]]<br />
** [[Line Profile Functions]]<br />
* In Class:<br />
** Show and Tell<br />
** spatial sampling with a dish<br />
** interpolation<br />
** projection<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/3pBJILbBxE5JRpWSwkWOe6QYMoHlaaa823IZr_QNyE0M46G1NWz2KSaA40QwupHp Lab 4 Lecture 3 (Tuesday 4/14; access v7*1$5k7)]<br />
** [https://berkeley.zoom.us/rec/share/wsAsELX3yThOTJXExEjjWaI4Mdq7eaa8hicf__AEzEkISCgjfujdIe8CV-yXP8VP Lab 4 Lecture 4 (Thursday 4/16; access G7*##+1O)]<br />
<br />
==== Lab 4 Week 3 (Apr 19): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Emission Line Observing]]<br />
** [[Radiative Transfer Equation]]<br />
** [[Optical Depth]]<br />
** [[Estimating Atomic Transition Strengths]]<br />
* In Class:<br />
** Show and Tell<br />
** close-out plan<br />
** computing doppler width for a line of sight (assuming circular motion)<br />
** calibrating spectra<br />
** converting spectra to hydrogen<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/7Md4Fejz1FJLcqPEslDnAPFmTqGieaa81Cgb-PRczh6T0TBWOxVAZOoPk8cPBvsd Lab 4 Lecture 5 (Tuesday 4/21; access 7f!o&=J9)]<br />
** Lab 4 Lecture 6 (Thursday 4/23): share day; no recording<br />
<br />
==== Lab 4 Week 4 (Apr 26): Write Lab Report ====<br />
* Theory and Background<br />
** [https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/cal_intensity.pdf Calibrating the Intensity and Shape of Spectral Lines (Carl Heiles)] <br />
* In Class:<br />
** Show and Tell<br />
** displaying information in image form<br />
** Lab 4 Due May 3, 1:30p<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/6pVKDIHL7XlIQ5GVtAL4Q4klI7Tvaaa81HBP_vBezRuCI54jJ3AKdenjUZB-gScx Lab 4 Lecture 7 (Tuesday 4/28; access 3h=j11*@ )]<br />
** [https://berkeley.zoom.us/rec/share/teBrde3hr2lOHZ3V9GH4S6MAH5j7aaa8hCZN-PoOxUycBmjJiZYoIuqIb29LQg8W Lab 4 Lecture 8 (Thursday 4/30; access 5V$.3i8$ )]<br />
<br />
<br />
<!-- === Lab 2 (Digital Lab) ===<br />
* Lab 2, Part 1 <br />
** Quiz 4 on:<br />
** Breakout Sessions:<br />
** Discrete Fourier Transform<br />
*** Convolving and Smoothing<br />
*** Aliasing<br />
*** Intro to Lab 2, pick groups<br />
<br />
* Lab 2, Part 2 <br />
** Quiz 5 on:<br />
*** [[Data Representations]]<br />
*** [[Digital Down Conversion]]<br />
** Breakout Sessions:<br />
*** Data Representations demo<br />
*** Mixing, Filtering, Decimation, and the FFT<br />
*** [[Intro to ROACH]]<br />
<br />
* Lab 2, Part 3 <br />
** Quiz 6 on:<br />
*** [[Synchronous and Asynchronous Logic]]<br />
*** [[Processor Architectures]]<br />
*** [[FIR Filters]]<br />
** Breakout Sessions:<br />
*** Acting out various processors<br />
*** Simulating an FIR filter<br />
*** Lab feedback<br />
--><br />
<br />
== Unused but Useful? ==<br />
<br />
* [[Radiometer Equation]]<br />
* [[Quantization and Rounding]]<br />
* [[Reciprocity Theorem]]<br />
* [[Dipole Antennas]]<br />
* [[Impedance of Free Space]]<br />
* [[Radiometer Equation Applied to Telescopes]]<br />
* [[Radiometer Equation Applied to Interferometers]]<br />
* [[Fringe Stopping]]<br />
* [[Direction Dependent Beams]]<br />
* [[Self Calibration]]<br />
* [[Flux Calibration]]<br />
* [[Gridding]]<br />
* [[Earth Rotation Synthesis]]<br />
* [[Delay Imaging]]</div>AparsonsUndergraduate Radio Lab2022-01-13T22:38:47Z<p>Aparsons: /* Lab 1, Week 1 (Jan 18): Sampling and Power Spectra */</p>
<hr />
<div>This course consists of four laboratory experiments that concentrate on radio instrumentation and laboratory techniques. We will build receiving, observing, and data analysis systems for two telescopes: a single-dish 21-cm line system, and a 10.7-GHz interferometer. We will use these telescopes for astronomical observing projects including structure of the Milky Way galaxy, precise position measurement of several radio sources, and measurement of the radio brightness distributions of the sun and moon with high angular resolution. There is a heavy emphasis on digital data acquisition, software development in the Python language, and high-quality written reports.<br />
<br />
=== Class Programmatics ===<br />
* Class Code Repository: [http://github.com/AaronParsons/ugradio http://github.com/AaronParsons/ugradio]<br />
* [https://github.com/AaronParsons/ugradio/raw/master/schedule/syllabus_2022_spring.docx Syllabus]<br />
* [https://berkeley.zoom.us/j/3587609756 Zoom Room: 358 760 9756]<br />
* Bcourses: [https://bcourses.berkeley.edu/courses/1512067 1512067]<br />
* Discord: https://discord.gg/vdmcyZcAbS<br />
* Class Hours:<br />
** Tuesday/Thursday 1:30-3:30pm<br />
* Office Hours:<br />
** Aaron Parsons (aparsons at berkeley): TBD, or by appointment, in standard [https://berkeley.zoom.us/j/3587609756 Zoom Room: 358 760 9756]<br />
** Christian Bye (chbye at berkeley): TBD or by appointment (Through Discord Office Hours Channel)<br />
** Mine Gokcen (minegokcen at berkeley):<br />
** Frank Latora (fjlatora at berkeley):<br />
* Lab Groups:<br />
** Group 1<br />
** Group 2<br />
** Group 3<br />
** Group 4<br />
** Group 5<br />
<br />
=== Experiments ===<br />
* Lab 1: [https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/allmixers.pdf Exploring Digital Sampling, Fourier Transforms, and both DSB and SSB Mixers]<br />
* Lab 2: [https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/bighorn.pdf Astronomy with the 21cm Line; Some Microwave Electronics]<br />
* Lab 3: [https://github.com/AaronParsons/ugradio/blob/master/lab_interf/interf.pdf Radio Interferometry at X Band]<br />
* Lab 4: [https://github.com/AaronParsons/ugradio/blob/master/lab_dish/HI1.pdf Mapping the HI Line: the Galaxy and Supershells]<br />
<br />
===Getting Set Up===<br />
* [[Getting Started in the Undergraduate Radio Lab]]<br />
** [[Setting Up Your Raspberry Pi]]<br />
** [[Connecting to the Lab Computers Remotely]]<br />
<br />
=== General Skills Used Through-Out Course ===<br />
<br />
* Navigating Linux/Unix-like Operating Systems<br />
** [[Unix Primer]]<br />
** [[Unix Text Editors]]<br />
* Programming in Python<br />
** [[Python Installation and Basic Programming]]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting]<br />
* Software Engineering<br />
** [[Revision Control]]<br />
** [[Getting Started w/ Github]]<br />
** [[Unit Testing]]<br />
* Report Writing<br />
** [[LaTeX]]<br />
<br />
== Topics by Date ==<br />
<br />
=== Lab 1 ([https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/allmixers.pdf Exploring Digital Sampling, Fourier Transforms, and both DSB and SSB Mixers]), Due Feb 8, 1:30p ===<br />
==== Lab 1, Week 1 (Jan 18): Sampling and Power Spectra ====<br />
* Resources and Handouts<br />
** [[Nyquist Sampling]]<br />
** [[Fourier Transform]]<br />
** Technical Skills<br />
*** [[Unix Primer]]<br />
*** [[Unix Text Editors]]<br />
*** [[Python Installation and Basic Programming]]<br />
**** [[Revision Control]]<br />
**** [[Getting Started w/ Github]]<br />
<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/Nyquist%20Sampling%20and%20Aliasing.ipynb Aliasing Demo]<br />
* In class:<br />
** Astrobaki, Syllabus, Office Hours<br />
** Getting accounts (premade by Bill Boyd, change password)<br />
** Lab access (see [[Getting Started in the Undergraduate Radio Lab]])<br />
** Class philosophy and workflow<br />
** [[Nyquist Sampling]] and aliasing<br />
** [[Fourier Transform]] <br />
** Lab Hardware<br />
*** PicoScope 2206a<br />
** Data Challenge<br />
*** [https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/secret_message.npz Secret Message]<br />
** [https://youtu.be/Yb4K8t6SG4k Lecture 1 Zoom Recording]<br />
** [https://youtu.be/oJplegmHeAI Lecture 2 Zoom Recording]<br />
<br />
==== Lab 1, Week 2 (Jan 26): DSB and SSB Mixers ====<br />
* Theory and Background:<br />
** [[Heterodyne Mixers]]<br />
** [[Convolution Theorem]]<br />
** [[Fast Fourier Transform]]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/dft_intro/fourierc.pdf Spectral Analysis with Discrete Fourier Transforms]<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/Convolutions%20and%20Correlations.ipynb Convolutions and Correlations ]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/Sec%204.%20In%20the%20mind.ipynb In the Mind: Introduction to the Fourier Transform ]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/datatype_demo.ipynb Mommy Fortuna's Midnight Carnival of Python Oddities]<br />
** [[Data Representations]], with handout on [https://github.com/AaronParsons/ugradio/blob/master/pythonprimer/datatypes.pdf Data Types and Organizational Structures]<br />
** Data Challenge<br />
*** [https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/mixed_message.npz Secret Message 2]<br />
* In class:<br />
** [https://youtu.be/Ut_jTUoqcd8 Lecture 3: Discrete Fourier Transforms and the Convolution Theorem]<br />
** [https://youtu.be/ZxAWNiisn3Y Lecture 4: Show and Tell]<br />
** Lecture: Introduction to DSB and SSB Mixers<br />
** Show and Tell (10m per group)<br />
<br />
==== Lab 1, Week 3 (Feb 1): More Mixers, and Lab Reports ====<br />
* Theory and Background<br />
** [[LaTeX]]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting], second pass<br />
** [https://github.com/AaronParsons/ugradio/tree/master/latex_template/lab1 LaTex Template] Template you may use for your lab report<br />
*** [https://www.overleaf.com/read/hvrwkmfkvkhg Overleaf version of the lab template]<br />
* In Class:<br />
** Lecture: One more pass on [[Convolution Theorem]], [[Heterodyne Mixers]], and [https://github.com/AaronParsons/ugradio/blob/master/dft_intro/fourierc.pdf DFTs]<br />
** [https://youtu.be/igZPQQ-6ieo Lecture 5]<br />
** [https://youtu.be/53CZj1CCEm0 Lecture 6]<br />
** Show and Tell<br />
** Writing Lab Reports<br />
* Lab 1 Due Feb 8, 1:30p<br />
<br />
---------<br />
<br />
=== Lab 2 ([https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/bighorn.pdf Astronomy with the 21cm Line; Some Microwave Electronics]), due Mar 1, 1:30p ===<br />
==== Lab 2, Week 1 (Feb 8): 21cm Line and Waveguides ====<br />
* Theory and Background:<br />
** [https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/cal_intensity.pdf Calibrating the Intensity and Shape of Spectral Lines]<br />
** [[Specific Intensity]]<br />
** [[21cm Transition]]<br />
** [[Coordinates]]<br />
* Demos and Tutorials<br />
** Python Tutorial Part 3: Functions, Modules, and Objects<br />
** Matrix Math with Numpy<br />
** Doppler Corrections, ugradio.doppler<br />
* In class:<br />
** Introduction to Horn and Receiver<br />
** Time<br />
** Coordinates<br />
** [https://youtu.be/ouSTGedJtI4 Lecture 7]<br />
** [https://youtu.be/htF9zWPzeLQ Lecture 8]<br />
<br />
==== Lab 2, Week 2 (Feb 15): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Impedance]]<br />
** [[Transmission_Lines]]<br />
** [http://ugastro.berkeley.edu/radio/2017/handout_links/RWvD.pdf Fields and Waves in Communication Electronics (Ramo, Whinney, and Van Duzer)]<br />
** [[Central Limit Theorem]] and [[Random Walks]]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/least_squares/lsfit_lite.pdf Least Squares Lite for the Budding Aficionado: Art and Practice]<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab2/Central%20Limit%20Theorem%20and%20Averaging.ipynb Central Limit Theorem and Averaging]<br />
* In Class:<br />
** Show and Tell<br />
** Waveguides, Transmission Lines, and Rope<br />
** Fitting Gaussians and Polynomials, ugradio.gauss<br />
** [https://youtu.be/l6_qxtqGtuY Lecture 9]<br />
** [https://youtu.be/xre1hQiZKCM Lecture 10]<br />
<br />
==== Lab 2, Week 3 (Feb 22): Write Lab Report ====<br />
* Theory and Background<br />
** [https://github.com/AaronParsons/ugradio/blob/master/least_squares/lsfit_2008.pdf Least-Squares and Chi-Square for the Budding Aficionado: Art and Practice]<br />
* In Class:<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab2/chisq_intro.ipynb Chi-Square Jupyter Notebook]<br />
** Show and Tell<br />
** Least Squares Part 2<br />
** [https://youtu.be/M92l0k45Gjw Lecture 11]<br />
* Lab 2 Due Mar 1, 1:30p<br />
<br />
---------<br />
<br />
=== Lab 3 ([https://github.com/AaronParsons/ugradio/blob/master/lab_interf/interf.pdf Radio Interferometry at X Band]), due Apr 5, 1:00p ===<br />
<br />
==== Lab 3 Week 1 (Mar 1): Interferometer ====<br />
* Theory and Background<br />
** [[Coordinates]]<br />
** [[Basic Interferometry]]<br />
* In Class:<br />
** Tour of Rooftop Interferometer<br />
** Exercise Ball Coordinates<br />
** Interferometry with Strings<br />
** [https://youtu.be/NXvDSyCfHMQ Lecture 12]<br />
** [https://youtu.be/5IDLQMO6_8g Lecture 13]<br />
<br />
==== Lab 3 Week 2 (Mar 8): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Measurement Equation]]<br />
** [[Telescope Field of View/Resolution]]<br />
* In Class:<br />
** Show and Tell<br />
** Controlling the Telescope<br />
** Tracking the Sun<br />
** Scheduling Observations<br />
* Lecture Links<br />
** [https://youtu.be/bgDBf9bPSTA Lecture 14]<br />
** [https://youtu.be/xVtmz0TfUJg Lecture 15]<br />
<br />
==== Lab 3 Week 3 (Mar 15): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Basic Interferometry II]]<br />
** [[Least Squares]]<br />
* In Class:<br />
** Show and Tell<br />
** Linear Least-Squares in Python<br />
** Minimizing Chi-Square]<br />
** Noise in Observations<br />
* Lecture Links<br />
** [https://youtu.be/ZhMu_0YFxCo Lecture 16]<br />
** [https://youtu.be/n-FOeZVuHls Lecture 17]<br />
<br />
==== No class (Mar 23, 26) ====<br />
<br />
==== Lab 3 Week 4 (Mar 29): Write Lab Report ====<br />
* Theory and Background<br />
*** [[Correlators]]<br />
*** [[Units of radiation]]<br />
* In Class:<br />
** Show and Tell<br />
** Photon bucket demo<br />
* Lecture Links<br />
** [https://youtu.be/Nl5h3Hi51bQ Lecture 18]<br />
** [https://youtu.be/GVugVn5PdB0 Lecture 19]<br />
* Lab 3 Due Apr 6, 1:30p<br />
<br />
<br />
---------<br />
<br />
=== Lab 4 ([https://github.com/AaronParsons/ugradio/blob/master/lab_dish/HI1.pdf Mapping the HI Line: the Galaxy and Supershells]), due May 3, 1:30p ===<br />
<br />
==== Useful Links ====<br />
[https://teamup.com/ksd715ee7fb766a108/#/ Link to Observing Calendar]<br />
<br />
[http://leuschner.berkeley.edu:8080 Leuschner WebCam]<br />
<br />
==== Lab 4 Week 1 (Apr 5): Leuschner Dish ====<br />
* Theory and Background<br />
** [[Specific Intensity]]<br />
** [[Radio Sky]]<br />
** [[Screen Command]]<br />
* In Class:<br />
** Trip to Leuschner: Class will go later than usual<br />
** drive mechanism (how the dish moves)<br />
** feed (notice probes) and cables<br />
** IF setup (one channel for OH, one for HI)<br />
** interacting with a CASPER [https://github.com/AaronParsons/leuschner-spectrimeter spectrometer]<br />
** pointing control<br />
** spatial sampling with dish<br />
* Lecture Links<br />
** [https://youtu.be/ZeB9Gj3gHgs Lecture 20]<br />
** [https://berkeley.zoom.us/rec/share/yYtJDpzz52pOc5GR42PxBbA_QorFT6a81CAfr6IKyRre8X_2LRtd9NPzNNLXeBCw Lab 4 Lecture 2 (Thursday 4/9/20)]<br />
<br />
==== Lab 4 Week 2 (Apr 12): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[21cm Transition]]<br />
** [[Black-Body Radiation]]<br />
** [[Line Profile Functions]]<br />
* In Class:<br />
** Show and Tell<br />
** spatial sampling with a dish<br />
** interpolation<br />
** projection<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/3pBJILbBxE5JRpWSwkWOe6QYMoHlaaa823IZr_QNyE0M46G1NWz2KSaA40QwupHp Lab 4 Lecture 3 (Tuesday 4/14; access v7*1$5k7)]<br />
** [https://berkeley.zoom.us/rec/share/wsAsELX3yThOTJXExEjjWaI4Mdq7eaa8hicf__AEzEkISCgjfujdIe8CV-yXP8VP Lab 4 Lecture 4 (Thursday 4/16; access G7*##+1O)]<br />
<br />
==== Lab 4 Week 3 (Apr 19): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Emission Line Observing]]<br />
** [[Radiative Transfer Equation]]<br />
** [[Optical Depth]]<br />
** [[Estimating Atomic Transition Strengths]]<br />
* In Class:<br />
** Show and Tell<br />
** close-out plan<br />
** computing doppler width for a line of sight (assuming circular motion)<br />
** calibrating spectra<br />
** converting spectra to hydrogen<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/7Md4Fejz1FJLcqPEslDnAPFmTqGieaa81Cgb-PRczh6T0TBWOxVAZOoPk8cPBvsd Lab 4 Lecture 5 (Tuesday 4/21; access 7f!o&=J9)]<br />
** Lab 4 Lecture 6 (Thursday 4/23): share day; no recording<br />
<br />
==== Lab 4 Week 4 (Apr 26): Write Lab Report ====<br />
* Theory and Background<br />
** [https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/cal_intensity.pdf Calibrating the Intensity and Shape of Spectral Lines (Carl Heiles)] <br />
* In Class:<br />
** Show and Tell<br />
** displaying information in image form<br />
** Lab 4 Due May 3, 1:30p<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/6pVKDIHL7XlIQ5GVtAL4Q4klI7Tvaaa81HBP_vBezRuCI54jJ3AKdenjUZB-gScx Lab 4 Lecture 7 (Tuesday 4/28; access 3h=j11*@ )]<br />
** [https://berkeley.zoom.us/rec/share/teBrde3hr2lOHZ3V9GH4S6MAH5j7aaa8hCZN-PoOxUycBmjJiZYoIuqIb29LQg8W Lab 4 Lecture 8 (Thursday 4/30; access 5V$.3i8$ )]<br />
<br />
<br />
<!-- === Lab 2 (Digital Lab) ===<br />
* Lab 2, Part 1 <br />
** Quiz 4 on:<br />
** Breakout Sessions:<br />
** Discrete Fourier Transform<br />
*** Convolving and Smoothing<br />
*** Aliasing<br />
*** Intro to Lab 2, pick groups<br />
<br />
* Lab 2, Part 2 <br />
** Quiz 5 on:<br />
*** [[Data Representations]]<br />
*** [[Digital Down Conversion]]<br />
** Breakout Sessions:<br />
*** Data Representations demo<br />
*** Mixing, Filtering, Decimation, and the FFT<br />
*** [[Intro to ROACH]]<br />
<br />
* Lab 2, Part 3 <br />
** Quiz 6 on:<br />
*** [[Synchronous and Asynchronous Logic]]<br />
*** [[Processor Architectures]]<br />
*** [[FIR Filters]]<br />
** Breakout Sessions:<br />
*** Acting out various processors<br />
*** Simulating an FIR filter<br />
*** Lab feedback<br />
--><br />
<br />
== Unused but Useful? ==<br />
<br />
* [[Radiometer Equation]]<br />
* [[Quantization and Rounding]]<br />
* [[Reciprocity Theorem]]<br />
* [[Dipole Antennas]]<br />
* [[Impedance of Free Space]]<br />
* [[Radiometer Equation Applied to Telescopes]]<br />
* [[Radiometer Equation Applied to Interferometers]]<br />
* [[Fringe Stopping]]<br />
* [[Direction Dependent Beams]]<br />
* [[Self Calibration]]<br />
* [[Flux Calibration]]<br />
* [[Gridding]]<br />
* [[Earth Rotation Synthesis]]<br />
* [[Delay Imaging]]</div>AparsonsUnit Testing2022-01-13T22:20:46Z<p>Aparsons: </p>
<hr />
<div>The basic idea of unit testing is to verify that a piece of code works the way it is supposed to work. That is, have the code try to solve the a problem with a known answer, and if the code does not give the right answer, it does not work. There is a module for doing this in python called unittest (or, alternatively, PyUnit).<br />
* [http://blip.tv/pycon-us-videos-2009-2010-2011/pycon-2010-introduction-to-unittest-a-k-a-pyunit-96-3379016 Introductory video] explaining how to use unittest, presented at PyCon<br />
* [http://pyunit.sourceforge.net/pyunit.html Tutorial] by the developer of unittest<br />
<br />
Why unit test? When developing code, we always find ourselves running some "sanity checks" to see if it makes sense. Unit tests formalize that process<br />
so that we can methodically check the correctness of important pieces of the code, and most importantly, we can *recheck* them after making changes.<br />
Done correctly, unit tests should speed development by allowing you to make ambitious changes to you code and quickly verify that you haven't broken anything.<br />
Although unit tests are very helpful when you are the sole developer of a code base, they really shine when multiple people are making changes to the code.<br />
Continuous integration (whereby code is run through unit tests each time someone merges changes into a code base) is the modern mainstay of<br />
coordinated code development, and it is only possible because of unit testing.<br />
<br />
Done incorrectly, they add a lot of extra hoops to jump through when editing your code without telling you anything meaningful about the functionality.<br />
This is why it is important to carefully choose the scope of your unit tests. If you choose your units (the block of code under test) too big, then<br />
failed tests don't illuminate where or why code broke and you run the risk of missing important failure modes. If you choose your units too small,<br />
then superficial code changes or refactorings end up requiring significant changes in the test code. Similarly, if the tests you write are too<br />
micro-managy (i.e. enforcing *how* a solution is computing, instead of the solution itself), you may find that tests do not survive code changes.<br />
On the other hand, if you only check final answers, you may find that the interfaces between code sections are not well enforced and are<br />
prone to break for non-obvious reasons.<br />
<br />
At its best, unit testing helps authors write modular, factorized code with well-defined interfaces, while also providing on-going quality assurance.<br />
In the short term, it can feel like it takes extra time to write tests, but that time is earned back during the debugging and integration stages<br />
of code development.<br />
<br />
When is the right time to write unit tests? For large applications, it can be *before* you've written your actual code, at the time when you have<br />
defined the interfaces and the objectives. For smaller applications (the ones we see more often in small-scale science projects), the right time<br />
is just after you've sketched out some exploratory code. You've written enough to convince yourself you know what the code should look like, and it's<br />
time to graduate that code into something a bit more stable. Ideally, you should write your tests as you write the code, using the unit tests<br />
themselves as the mechanism for convincing yourself that the code works. Whatever it was that you wanted to see that would tell you the code "makes sense"---that's<br />
what you should put in the unit test. As you make changes and refactor the code, you can extend these tests, evolving them in step with the maturity of your code.<br />
<br />
==Practical Unit Testing in Python==<br />
This section serves as a recipe for adding unit tests to a python software package you may be writing. If you need a primer on<br />
writing Python Packages, see [https://packaging.python.org/en/latest/tutorials/packaging-projects/ Packaging Projects]. For this section, we assume your package<br />
is laid out as follows:<br />
* Package Directory (<tt>mypkg</tt>)<br />
** Setup Script (<tt>mypkg/setup.py</tt>)<br />
** Source Code (<tt>mypkg/mypkg_src</tt>)<br />
<br />
In this case, the best place to put your unit tests is probably <tt>mypkg/mypkg_src/tests</tt>, although <tt>mypkg/tests</tt> is a reasonable alternative.<br />
Inside this directory, you should write a file with the following structure:<br />
<syntaxhighlight lang="python"><br />
import unittest<br />
import numpy as np<br />
import mypkg<br />
<br />
class TestMyPkg(unittest.TestCase):<br />
def test_method1(self):<br />
answer = mypkg.method1(parameters)<br />
self.assertEqual(answer, true_answer)<br />
def test_method2(self):<br />
ans_array = mypkg.method2(parameters)<br />
np.testing.assert_all_close(ans_array, true_ans_array)<br />
<br />
if __name__ == '__main__':<br />
unittest.main()<br />
</syntaxhighlight><br />
<br />
Assuming you fill out the values of the above pseudo-code, you can then run the unit test from the command line as:<br />
<syntaxhighlight lang="bash"><br />
$ python test_mypkg.py<br />
..<br />
----------------------------------------------------------------------<br />
Ran 2 tests in 0.072s<br />
<br />
OK<br />
</syntaxhighlight><br />
<br />
If you are just developing this project yourself, that's about all there is to it! Add new unit test scripts to test different modules, and add new objects/methods within each script to test functions and objects for each module. Just remember to keep running your different unit tests when you make changes.<br />
<br />
=== Setting Up Continuous Integration ===<br />
Continuous integration is the merging of unit testing into a revision control workflow so that tests are automatically run when code changes are proposed. CI is well-supported on [https://lab.github.com/githubtraining/github-actions:-continuous-integration GitHub] by setting up Actions which trigger, where you can configure a repository to run tests automatically before allowing branches to be merged into main.<br />
[https://circleci.com/blog/setting-up-continuous-integration-with-github/ This tutorail] provides a good step-by-step formula for setting it up.</div>AparsonsGetting Started w/ Github2022-01-13T21:15:47Z<p>Aparsons: </p>
<hr />
<div>== Introduction ==<br />
[[Revision Control]]<br />
<br />
== Creating a Github Repository ==<br />
Links:<br />
* [https://www.youtube.com/watch?v=rd-WiB_2oVQ Introduction to Git]<br />
* [https://www.youtube.com/watch?v=SwK2dPFXhpU How to Install and Configure Git and Repositories on GitHub]<br />
* [https://docs.github.com/en/github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line Adding an Existing Project to GitHub Using the Command Line]<br />
<br />
If you don't have a GitHub account that's where you'll want to start. You can get started setting up your account by going to [https://github.com/ github.com] and log-in using an email. Github has special benefits for students, so if possible, use your school email. Once you've set up an account, in the terminal type the following commands:<br />
<source lang="bash"><br />
git config --global user.name "John Doe"<br />
git config --global user.email johndoe@example.com<br />
</source><br />
These commands configure your command line to use your GitHub username and email from now and this should be the only time you have to type these commands.<br />
<br />
== Creating a Repository ==<br />
One of the main benefits of Git and GitHub is the ability to synchronize files between different working environments (like your personal computer and a remote computer). Here, we'll set up a git repository and connect that repository to GitHub in order to synchronize files between different sources. Start by moving into the directory that you would like to use as your repository. Next, run the following command to create a git repository:<br />
<source lang="bash"><br />
git init<br />
</source><br />
Once you've initialized your repository, add files by using:<br />
<source lang="bash"><br />
git add {file}<br />
</source><br />
or if you want to add all of the files in a directory you can use the following command:<br />
<source lang="bash"><br />
git add .<br />
</source><br />
Once you've added the files that you work like to add to GitHub, you will need to commit those files. You can do this by running the command,<br />
<source lang="bash"><br />
git commit -m "Your Commit Message"<br />
</source><br />
The commit message is used to remind yourself and others what you changed when you made that commit. The message should be less than 50 characters but descriptive enough to remind you of what changes were made. Now that files have been added, we need to connect this repository to GitHub. To do this, you'll need to start by logging into GitHub and setting up a repository on GitHub to store your file using the following [https://github.com/new link]. Give your repository a name and create the repository. Now, we'll need to link the repository on your computer to the repository you just created on GitHub. We can do this using the command:<br />
<source lang="bash"><br />
git remote add origin https://github.com/<your-username>/<your-repo-name><br />
</source><br />
Finally, run the following commands to add your committed files from your computer to GitHub:<br />
<source lang="bash"><br />
git branch -M main<br />
git push -u origin main<br />
</source><br />
Once, these commands are run you should be able to see your files on GitHub. If you'd like to add this repository to another computer, log into the terminal of that computer and run the following command:<br />
<source lang="bash"><br />
git clone https://github.com/<your-username>/<your-repo-name><br />
</source><br />
This will copy files stored in your repository on GitHub to the computer that you're currently working on and will initialize a new repository on that computer. You can now add files and make and commit changes from this repository.</div>AparsonsUnix Text Editors2022-01-13T21:02:21Z<p>Aparsons: </p>
<hr />
<div>=== Short Topical Videos ===<br />
* [http://www.youtube.com/watch?v=XSXoap2h3Mw VI/VIM (Tortoise)]<br />
<br />
=== Reference Material ===<br />
* [http://www.cs.colostate.edu/helpdocs/vi.html Basic vi commands (Colorado State University)]<br />
* [http://michael.peopleofhonoronly.com/vim/vim_cheat_sheet_for_programmers_screen.pdf VI cheat sheet]<br />
* [http://www.gnu.org/software/emacs/refcards/pdf/refcard.pdf GNU Emacs reference card]<br />
* [http://en.wikipedia.org/wiki/Editor_war Editor War (Wikipedia)]<br />
<br />
<latex><br />
\documentclass[preprint]{aastex}<br />
<br />
\begin{document}<br />
\setlength{\parskip}{0.02in}<br />
<br />
\title{Choosing a Text Editor}<br />
<br />
Any serious programmer needs a robust text editor to write program, and you (as aspiring scientists)<br />
are going to need to be serious programmers. So you need to put some thought into<br />
choosing your editor. Here is a quick breakdown of your choices for a serious text editor:<br />
<br />
\begin{itemize}<br />
\item {\bf vi/vim} (gvim adds windows/tabs/mouse capability)<br />
\begin{itemize}<br />
\item free and installed by default on all unix (and OSX) systems<br />
\item steep learning curve, but there will be vim experts nearby<br />
\item arguably faster to control once you master it<br />
\end{itemize}<br />
\item {\bf emacs}<br />
\begin{itemize}<br />
\item free and installed by default on all unix (and OXS) systems<br />
\item less steep learning curve, and there will likely be emacs experts nearby<br />
\end{itemize}<br />
\item {\bf Others}, including sublime, atom, ultraedit:<br />
\begin{itemize}<br />
\item you'll probably have to install these yourself, which can be annoying if you are working on a computer you don't own/control<br />
\item you're on your own for learning<br />
\end{itemize}<br />
\end{itemize}<br />
<br />
My suggestion is that you pick between vi/vim/gvim and emacs, at least to start. You should also be warned that people tend to be monogamous with their editors. You may end up using the editor you choose now for the rest of your life. For example, I picked vi in college and have never strayed. If you choose the red pill, go to the section on vi. If you choose the blue pill, go to the section on emacs.<br />
<br />
\section{A Beginners Guide to Vi}<br />
<br />
Vi is a text file editor in Unix environments. This includes our<br />
lab which runs a flavor of Linux. You can use vi<br />
to quickly edit a simple text file, as an editor for your Python source<br />
code, or as a nice front end to typesetting documents in \LaTeX, the<br />
required typesetting utility in this class. <br />
<br />
\subsection{The Basics}<br />
<br />
\subsubsection{Opening}<br />
Most of the programs that you will be using on these systems will be<br />
started from the command line. To begin a new document, simply<br />
navagate (via the Unix command line) to the directory where you want<br />
the file to be and type: <br />
\begin{verbatim}<br />
vim something.txt<br />
\end{verbatim}<br />
Where {\tt something.txt} is the new file that you wish to create, or<br />
the old file that you wish to update. <br />
<br />
Before we go any further, you need to know that vi has {\bf three} operating modes: COMMAND mode, INSERT mode, and VISUAL mode, which<br />
are described in the table below.<br />
<br />
\begin{table}[h]<br />
\begin{center}<br />
\begin{tabular}{|c|c|} \hline<br />
COMMAND & the default mode vi starts in. Get here from other modes with ESC. \\ \hline<br />
INSERT & what you type goes into the document. Get here from COMMAND mode with 'i'. \\ \hline<br />
VISUAL & like command mode, but you can highlight text. Get here from COMMAND mode with 'v' or CTRL+'v'. \\ \hline <br />
\end{tabular}<br />
\end{center}<br />
\caption{Vi Modes}<br />
\end{table}<br />
<br />
Now that you have vi open (in COMMAND mode), you can press 'i' to enter INSERT mode and type some text. In the next section we will save the file.<br />
<br />
\subsubsection{Saving and Exiting}<br />
To save a document, go to COMMAND mode (press ESC), then type ':w' to write the file under the name you opened it. If you would like to change the<br />
name, you can write ':w newname.txt'. If you'd like to save and exit, replace ':w' with ':wq'. To just exit, type ':q'. If you've made changes to a file<br />
and you don't want to save them, you will need to add an exclamation point to force vi to lose your changes: ':q!'.<br />
In the<br />
interest of simplifying your life, this document will concentrate on<br />
the usage of keyboard shortcuts in using vi. <br />
<br />
\subsubsection{Keyboard Shortcuts in COMMAND mode}<br />
<br />
What makes vi powerful (with a steep learning curve) are the rich set of<br />
keyboard shortcuts in COMMAND mode. We'll cover a few simple ones<br />
here, but you should be aware that there is probably a command to accelerate<br />
anything you find yourself doing, if you take the time to learn how. Guru-level<br />
vi programmers pride themselves in almost never moving their hands away from the<br />
keyboard to use a mouse or arrow keys. <br />
<br />
Some basic COMMANDs: \\<br />
{\bf :open somefile.txt} - Open a file \\<br />
{\bf :w} - Save file \\<br />
{\bf :q} - Close vi\\<br />
<br />
{\bf i} - enter INSERT mode \\<br />
{\bf A} - move to end of line in INSERT mode \\<br />
{\bf I} - move to beginning of line in INSERT mode \\<br />
<br />
{\bf x} - delete character under cursor (put in buffer)\\<br />
{\bf dw} - delete word (put in buffer)\\<br />
{\bf dd} - delete line (put in buffer)\\<br />
{\bf p} - paste from buffer \\<br />
{\bf yy} - yank current line into paste buffer (without deleting) \\<br />
<br />
{\bf h},{\bf j},{\bf k},{\bf l} - move left, up, down, right, respectively \\<br />
{\bf b} - move back one word \\<br />
{\bf w} - move forward one word \\<br />
<br />
<br />
\subsection{\LaTeX Integration}<br />
Vi has nice \LaTeX integration. If you start a file with the ending<br />
\emph{.tex}, Vi will automatically load up in a mode to highlight<br />
special characters and special modes to make life a little<br />
easier.<br />
<br />
\subsection{Python Integration}<br />
<br />
Vi also has a nice mode for integrating with Python. For the purposes<br />
of this lab, we will only need to use the highlighting features of<br />
Vi. This checks to make sure that you have matching parentheses and will color<br />
special keywords separately from other commands. <br />
<br />
<br />
\section{A Beginners Guide to Emacs}<br />
<br />
Emacs is a text file editor in Unix environments. This includes our<br />
lab which runs a flavor of Linux. You can use emacs<br />
to quickly edit a simple text file, as an editor for your Python source<br />
code, or as a nice front end to typesetting documents in \LaTeX, the<br />
required typesetting utility in this class. This document will outline<br />
the basics of using emacs.<br />
<br />
\subsection{The Basics}<br />
<br />
\subsubsection{Opening}<br />
Most of the programs that you will be using on these systems will be<br />
started from the command line. To begin a new document, simply<br />
navagate (via the Unix command line) to the directory where you want<br />
the file to be and type: <br />
\begin{verbatim}<br />
emacs something.txt &<br />
\end{verbatim}<br />
Where {\tt something.txt} is the new file that you wish to create, or<br />
the old file that you wish to update. After a few moments, a new window<br />
will popup with a blank screen that you can type into. You can use the<br />
mouse to navigate the menus at the top. See table 1 for information on<br />
what the different menu options do.<br />
<br />
\begin{table}[h]<br />
\begin{center}<br />
\begin{tabular}{|c|c|} \hline<br />
Buffers & Contains information about the currently open files in this<br />
instance of \\ & Emacs.\\ \hline<br />
Files & Contains basic commands for opening, saving, and closing<br />
files.\\ \hline<br />
Tools & Contains advanced functions for doing things like version<br />
control.\\ \hline<br />
Edit & Contains cut, paste, and spell checking capabilities of<br />
emacs.\\ \hline<br />
Search & Contains search and replace functions.\\ \hline<br />
Mule & Advanced editing functions.\\ \hline<br />
TeX & LaTeX specific functions. Only appears when the filename you are<br />
\\ & editing ends with \emph{.tex}.\\ \hline<br />
Python specific functions. Only appears when you are<br />
editing a filename\\ & that end with \emph{.py}\\ \hline<br />
Help & Emacs' extensive help and configuration area. \\ \hline<br />
\end{tabular}<br />
\end{center}<br />
\caption{Emacs Menu Items}<br />
\end{table}<br />
<br />
Now that you have emacs open you can type something in the text<br />
area. In the next section we will save the file.<br />
<br />
\subsubsection{Saving}<br />
In Emacs, saving a document is as simple as $\pi$. You can click on<br />
the \verb1Files1 menu, then click on \verb1Save Buffer...1 You can<br />
also save by using the keyboard shortcut \verb1C-x C-s1. In the<br />
interest of simplifying your life, this document will concentrate on<br />
the usage of keyboard shortcuts in using emacs. <br />
<br />
\subsubsection{Keyboard Shortcuts}<br />
Just about every aspect of emacs can be accessed and configured with<br />
keyboard shortcuts. This means that to work on a document, you rarely<br />
need to move your hands away from the keyboard and use the mouse. This<br />
increases productivity, and just makes things easier. All the keyboard<br />
shortcuts that I mention in this document will be summarized at the<br />
end.<br />
<br />
All keyboard shortcuts are represented in a format like<br />
\verb1C-x C-f1. When you see a \verb1-1, that means you hold the key<br />
that comes before and after the \verb1-1 down at the same time. The<br />
capitol \verb1C1 however, does not correspond to the letter c, but<br />
rather the control button (abbreviated \verb1CTRL1) on the<br />
keyboard. So, if you see \verb1C-x C-f1, that means press and hold the<br />
\verb1CTRL1 button, then press the \verb1x1 key, then press the<br />
\verb1f1 key, then release the \verb1CTRL1 button. If you see<br />
something of the form \verb1C-x d1, then that means to press and hold<br />
the \verb1CTRL1 button, press \verb1x1, release \verb1CTRL1, then<br />
press \verb1d1. I think you get the picture. Similarly, \verb1M1 represents the \verb1ALT1 button.<br />
<br />
In some of the menus, you will see keyboard shortcuts that are<br />
labelled as \tt M-\%. \normalfont On the Sun workstations that<br />
corresponds to the $\Diamond$, and works identically to the<br />
\verb1CTRL1 key. On non-Sun workstations this key is simulated by<br />
pressing \verb1ESC1 then \verb1CTRL-1whatever.<br />
<br />
Some basic keystroke {\it Shortcuts}: \\<br />
{\bf \verb1C-x C-f1} - Open a file \\<br />
{\bf \verb1C-x C-s1} - Save file \\<br />
{\bf \verb1C-x C-c1} - Close Emacs\\<br />
<br />
{\bf \verb1C-space1} - Start Selection \\<br />
{\bf \verb1C-w1} - Cut ("kill") selection \\<br />
{\bf \verb1M-w1} - Copy selection \\<br />
{\bf \verb1C-y1} - Paste ("yank") selection \\<br />
{\bf \verb1C-k1} - Kill a line \\<br />
<br />
{\bf \verb1C-x C-21} - Split window horizontally \\<br />
{\bf \verb1C-x C-31} - Split window vertically \\<br />
<br />
{\bf \verb1C-a1} - Move to the beginning of a line \\<br />
{\bf \verb1C-e1} - Move to the end of a line \\<br />
<br />
\subsubsection{Cutting, Pasting, and Navigation}<br />
In Emacs cutting and pasting is simple, yet slightly different from what<br />
you may be used to. {\it To do it using keystrokes only}:<br />
\begin{enumerate}<br />
<br />
\item Select and cut the block of text by \begin{enumerate}<br />
\item moving the cursor to its beginning, type {\tt C-spacebar}.<br />
\item using the arrow keys, move the cursor to its end abd type {\tt C-k}.<br />
\end{enumerate}<br />
<br />
\item Paste the block by \begin{enumerate}<br />
\item moving the cursor to where you want to paste<br />
\item type {\tt C-y} .<br />
\end{enumerate}<br />
\end{enumerate}<br />
<br />
{\it To do it using the mouse}: Select the text with your mouse and<br />
the double right click in the selection. To paste, move the cursor to<br />
where you want to paste and click the middle mouse button. <br />
<br />
\subsection{\LaTeX Integration}<br />
Emacs has nice \LaTeX integration. If you start a file with the ending<br />
\emph{.tex}, Emacs will automatically load up in a mode to highlight<br />
special characters and special modes to make life a little<br />
easier. Emacs also has a couple modes to automatically compile \LaTeX<br />
files and display the result in xdvi (refer to the \LaTeX handout if<br />
none of this makes sense to you. Below are the basic \LaTeX shortcuts.<br />
<br />
\begin{table}[h]<br />
\begin{center}<br />
\begin{tabular}{|c|c|} \hline<br />
Compile \LaTeX file & \verb1C-c C-f1\\ \hline<br />
View file in xdvi & \verb1C-c C-v1\\ \hline<br />
\end{tabular}<br />
\end{center}<br />
\caption{\LaTeX - Emacs commands}<br />
\end{table}<br />
<br />
\subsection{Python Integration}<br />
<br />
Emacs also has a nice mode for integrating with Python. For the purposes<br />
of this lab, we will only need to use the highlighting features of<br />
Emacs. This checks to make sure that you have matching parentheses and will color<br />
special keywords separately from other commands. <br />
<br />
\end{document}<br />
<br />
</latex></div>AparsonsUnix Primer2022-01-13T20:59:28Z<p>Aparsons: </p>
<hr />
<div>===Short Topical Videos===<br />
* [http://www.youtube.com/watch?v=Ms5sNYyejEw Basic Unix Commands (Bergey, NYU)]<br />
<br />
===Reference Material===<br />
* [http://genepath.med.harvard.edu/~depalma/unixPrimer.html A Brief Unix Primer (Harvard)]<br />
* [http://www.ks.uiuc.edu/Training/Tutorials/Reference/unixprimer.html Unix Primer (Univ. Illinois Urbana Champaign)]<br />
<br />
<latex><br />
\documentclass[]{article}<br />
%\usepackage[top=1in,bottom=1in,left=1in,right=1in]{geometry}<br />
%\usepackage{amsmath}<br />
%\usepackage{graphicx}<br />
%\usepackage{natbib}<br />
%\documentclass[psfig,preprint]{aastex}<br />
\begin{document}<br />
<br />
\title{A SHORT UNIX PRIMER}<br />
<br />
This document provides a short primer on how to navigate Unix-like operating systems (e.g. Linux).<br />
Unix has a long tradition of use in scientific computing. That tradition was bolstered when Linus<br />
Torvalds developed an open-source implementation of Unix (Linux) which enabled the operating system<br />
to be continuously developed and distributed for free. Today, Linux has become almost synonymous with Unix,<br />
and you will find many flavors<br />
of Linux (e.g. Ubuntu, Debian, CentOS, Raspbian, Fedora, etc.) available supporting most modern hardware. <br />
You can even find closely related Unix<br />
variants in other major operating systems (e.g. {\tt terminal} in Mac OSX and {\tt cygwin} on Windows}).<br />
<br />
Unix (or Linux, if you like) supports graphical user interfaces (e.g. Gnome, KDE), but it was originally<br />
written to support command-line (text) processing, and that is where its true power shines. The learning<br />
curve can be a bit steep at first. Many of the commands are quite terse/baroque, as they date from a time<br />
when keystrokes were slow to be processed. Once you master the tools, though, you may find that you spend a lot<br />
less time clicking through menus or manually renaming files, and a lot more time doing fun things like<br />
programming/scripting and getting things done.<br />
<br />
Everything below assumes you are at a command-line prompt. If you are using a graphic interface,<br />
you may need to find the "terminal" icon and click it to get started. The command line is actually<br />
an interface to a program that interprets the text you enter. There are various flavors of command-line<br />
programs (called "shells, which include {\tt bash}, {\tt zsh}, {\tt csh}, etc.). We will use {\tt bash} because it is among<br />
the most prevalent and full-featured, but most of the commands below will work on any of these shells.<br />
<br />
\section{DIRECTORY STRUCTURE} \label{directories}<br />
<br />
The Unix file system is all held inside the root directory ({\tt /}). All other directories<br />
are subdirectories off of this one. When you log in, you will usually start in a user directory<br />
bearing your username. For most Unix flavors, this is in {\tt /home/<username>}. This is where you<br />
will put most of your files (preferably in a subdirectory off of your home directory, as it tends to<br />
get cluttered). It is also where a lot of configuration files get stored. These files tend to begin with<br />
a dot (e.g. {\tt .bashrc}). These files don't tend to be visible to you by default, but as you will see below,<br />
they are there if you know how to look for them.<br />
<br />
All of the rest of the stuff your computer and operating system needs is also linked off of root.<br />
This includes places where executable programs ("applications," if you like) are stored<br />
(e.g. {\tt /bin}, {\tt /usr/bin}, {\tt /usr/local/bin}), where all of the run-time program and<br />
system information is stored ({\tt /var}), where configuration and resource for your programs<br />
are stored ({\tt /etc}), where external devices ({\tt /dev}) and mounted disks ({\tt /mnt}) are held,<br />
and even where the boot instructions of your computer are held ({\tt /boot}). Until you know what you<br />
are doing, though, best not to mess with these things.<br />
<br />
\subsection{Navigating the Directory Tree}\label{thedirtree}<br />
<br />
The first thing you will need to learn is to navigate between directories,<br />
find out what is in them, make/remove directories, and copy/move<br />
files between directories.<br />
<br />
Here is a list of the most important commands relevant to directories include:<br />
<br />
\begin{itemize}<br />
\item To see a listing of the files and subdirectories of the present working<br />
directory (pwd), use<br />
the {\tt ls} command. It has some useful<br />
options. One of my favorite combinations of options is {\tt ls -lrt}:<br />
the {\tt l} means ``long listing format'', the {\tt t} means ``time<br />
order'', and the {\tt r} means ``reverse order''---so this lists all<br />
files in reverse time order so that the most recent file appears as the<br />
last line of the list. You can also use the {\tt *} character as a<br />
wildcard: for example, {\tt ls *pdf} lists all files with the suffix {\tt<br />
pdf} (i.e. PDF files). Note: if you want to see all the files (even<br />
the invisible configuration files, you need to add the {\tt a} flag to the command. <br />
<br />
\item To change to a directory, e.g.\ the {\tt tex} directory under {\tt<br />
lab1}, type the absolute path<br />
\begin{verbatim}<br />
cd /home/user_name/lab1<br />
\end{verbatim}<br />
Or, shorter: $\sim$ stands for your home directory, so you can type<br />
\begin{verbatim}<br />
cd ~/lab1<br />
\end{verbatim}<br />
Or, if your present working directory (pwd) is {\tt /home/user_name}, you can type just a relative path {\tt cd tex}.<br />
<br />
<br />
\item To create a new directory, e.g.\ a directory called {\tt monday}<br />
under {\tt data}, type <br />
\begin{verbatim}<br />
mkdir ~/lab1/data/monday<br />
\end{verbatim}<br />
Or, if your cwd is {\tt ~/lab1/data}, you need only type {\tt mkdir monday}. If<br />
you want to eliminate (remove) a directory, get rid of all the files<br />
and type {\tt rmdir monday}.<br />
<br />
\item To copy a file from one directory to another, e.g.\ the file {\tt<br />
carl} from $\sim$ to {\tt \~{}/lab1/src}, type<br />
\begin{verbatim}<br />
cp ~/carl ~/lab1/src<br />
\end{verbatim}<br />
You end up with two copies of the file. You<br />
can instead move the file using {\tt mv}. To remove a file, use {\tt<br />
rm}.<br />
<br />
We have defined the following options for these commands:<br />
\begin{itemize}<br />
<br />
\item For {\tt cp}: {\tt cp -ip}. The {\tt i} means ``inquire before<br />
overwriting a file of the same name''; once you overwrite the original<br />
version, it's gone! the {\tt p} means ''preserve the original time<br />
information about the file''; otherwise, it would tag the copied file<br />
with the current time.<br />
<br />
\item For {\tt mv}: {\tt mv -i}. As above. inquire!<br />
<br />
\item For {\tt rm}: {\tt rm -i}. Ask to confirm your intention to<br />
eliminate the file. Once it's gone, it's gone---there's no<br />
``wastebasket''. <br />
\end{itemize}<br />
<br />
\end{itemize}<br />
<br />
\subsection{Permissions for Directories and Files} \label{perm}<br />
<br />
Permissions determine who has access. You might want your data to be<br />
accessible by everybody, for reading, but you probably don't want other<br />
people writing over your data! And you shouldn't want your lab writeup<br />
to be accessible by anybody, either reading or writing---you don't want<br />
to facilitate plagiarism! And it makes sense to keep all your love<br />
letters in a separate directory that isn't accessible in any way by<br />
anybody else---including their recipient(s)!<br />
<br />
You set permissions with {\tt chmod}. Permissions recognize three<br />
classes of people: {\tt u} ({\it user}---yourself!), {\tt g} ({\it<br />
group}---that's usually all the users of {\tt ugastro}), and {\tt o}<br />
({\it other}---everybody else, {\it including} somebody in Timbuktu who<br />
happens to crash into our system). Note that {\it group} is essentially<br />
like {\it other}---almost everybody! Each class can have three<br />
permissions: {\tt r} (read permission), {\tt w} (write permission), and<br />
{\tt x} (execute permission). {\tt chmod} allows you to add, take away,<br />
and set exactly permissions for different users with the operators ({\tt<br />
+, -, =}).<br />
<br />
Suppose, for your data subdirectory, you want read permission for<br />
everyone and write permission only for yourself. To grant the read<br />
permissions to {\it group} and {\it other}, get into the directory above<br />
{\tt data} (that's {\tt lab1}) and then type {\tt chmod go+rx data}; to<br />
eliminate the write permissions, {\tt chmod go-w data}. To check your<br />
work, do a long listing of the directory ({\tt ls -l data}). On your<br />
screen, it would write<br />
<br />
\begin{verbatim}<br />
drwxr-xr-x 1 heiles bin 10 2007-01-20 17:58 data/<br />
\end{verbatim}<br />
<br />
\noindent Translation: The first character, {\tt d}, means it's a<br />
directory. The next three specify the permissions for the user (that's<br />
you): {\tt rw} means you have read, write privileges, and the {\tt x} means<br />
you can access the directory. The next set of three characters {\tt<br />
r-x} is for<br />
the group (all your classmates); the final set of three characters {\tt<br />
r-x} means that everybody can read and access the directory contents,<br />
but can't write into it.<br />
<br />
For your love letter directory (called {\tt love}), you'd want {\tt chmod<br />
go-rwx love}<br />
<br />
Permissions apply slightly differently to directories and files: \begin{enumerate} <br />
<br />
\item {\it Directories.} In order to access any file in a<br />
directory---even to obtain a listing of the files with the {\tt ls}<br />
command---the person needs {\it execute} permission. The read and<br />
write permissions are as you'd expect.<br />
<br />
\item {\it Files.} Most files don't need execute permission. By<br />
default, when you create a file, it has read/write permissions for you<br />
and read for the other two classes.<br />
<br />
\end{enumerate}<br />
<br />
\section{OTHER ASPECTS\dots}<br />
<br />
<br />
\subsection{Typing on the Command-Line in Linux/UNIX, Emacs}<br />
<br />
\label{keycommands}<br />
<br />
One of the joys of Unix is command-line editing using shortcuts. If you master a few<br />
of these, you will find that you can interact much more quickly with your computer.<br />
<br />
\begin {itemize}<br />
\item {\bf Ctrl-r} \> Reverse search through your history for what you've already started typing. Hit enter to pull out the command, which you can then modify before entering.<br />
\item {\bf up/down arrow} \> scroll up (or down) through commands you've already entered.<br />
\item {\bf Ctrl-e} \> moves the cursor to the end of the line.<br />
\item {\bf Ctrl-a} \> moves the cursor to the beginning of the line.<br />
\item {\bf Ctrl-k} \> deletes the rest of the line.<br />
\item {\bf Ctrl-w} \> deletes the word or portion of the word preceding the cursor.<br />
\end{itemize}<br />
<br />
%\noindent Sometimes, when command-line editing, you inadvertently hit {\bf Ctrl-s}; this prevents the cursor from responding to your<br />
%keystrokes. If you encounter this condition, type {\bf Ctrl-q}, after which things will work normally again.<br />
<br />
\subsection{Stopping or Suspending Processes}<br />
<br />
When you run a program (from the command line or otherwise), the operating system kernel (that's<br />
the main program that makes your computer operate) launches a process that carries out its instructions.<br />
Often, that process ends naturally, but sometimes you'd like to end it before it is finished. Or perhaps<br />
you'd like the computer to keep executing the program in the background, but you would like control <br />
over your command line again to start typing something else. Here are some basic tools:<br />
\begin{itemize}<br />
\item {\bf Ctrl-c} \> Break out of the current process. If the process is responsive, this will<br />
land you back at the command line. If it is not responsive, this will not work and you might need to try<br />
suspending or killing (see below) the process.<br />
\item {\bf Ctrl-z} \> Suspends the current process. The process still exists, but it has been frozen by<br />
the kernel. You will land back at the command line. Sometimes this succeeds in escaping from a process when<br />
{\tt Ctrl-c} fails. Once you are at the command line, you can do whatever you wish. If you wish to continue<br />
the process, you can type {\bf fg} (foreground) to jump back in. Alternately, you can type {\bf bg} (background)<br />
to continue the process, but keep the command line available for running other commands.<br />
\item {\bf jobs} \> This command lists all processes (foreground or background) that you have started from this<br />
command line. Note that this does not list all the processes that are running on your machine.<br />
\end{itemize}<br />
<br />
%\subsection{Aliases}\label{short}<br />
% <br />
% Aliases are shortcuts that you can use in place of typing out a<br />
%long command over and over again. You can define an alias on the<br />
%command line; alternatively, if you want to define it permanently, you<br />
%can define it by editing your {\tt .bashrc} or {\tt .aliasfile} file<br />
%(which reside in your home directory).<br />
<br />
% Here's an example. Suppose that you want to force UNIX to check<br />
%whether it will overwrite a file when you use the {\tt mv} command and,<br />
%also, to ask you about it. To do this,<br />
%you use the {\tt -i} option, and you redefine the command {\tt mv} by<br />
%typing<br />
<br />
%\begin{verbatim}<br />
%alias mv "mv -i"<br />
%\end{verbatim}<br />
<br />
%\noindent If you type it in a window, it will apply henceforth to that window alone. <br />
<br />
%We have included this definition in your {\tt .aliasfile}, which<br />
%resides in your home directory and is automatically invoked whenever<br />
%you open a new terminal window---because your {\tt .bashrc} file invokes<br />
%your {\tt .aliasfile}. <br />
<br />
%You can check the definition of the alias for {\tt mv} by typing<br />
<br />
%\begin{verbatim}<br />
%which mv<br />
%\end{verbatim}<br />
<br />
%Finally, you can bypass any defined alias by using a backslash. For<br />
%example, {\tt \\rm carl} invokes the {\tt rm} command without the {\tt<br />
%-i} option that is defined in your {\tt .aliasfile}, which means\dots it<br />
%removes the file {\tt carl} {\it without asking}. Using {\tt rm}, {\tt<br />
% cp}, or {\tt mv} without the {\tt -i} option is {\it dangerous}: Once<br />
%a file has been overwritten or deleted, it's gone for good!<br />
<br />
\subsection{Piping, etc: $|, >, <$}\label{help}<br />
<br />
Piping ($|$) directs the text output of a command to the next succeeding<br />
command. For example,<br />
<br />
\begin{verbatim}<br />
ls | grep /<br />
\end{verbatim}<br />
<br />
\noindent directs the output of the listing command to {\it grep}, which<br />
here selects all names containing the string ``/''; those are<br />
directories, so this gives a list of directories just under the current<br />
directory.<br />
<br />
Unix has a rich set of commands for manipulating text output exchanged through pipes. Examples include:<br />
\begin{itemize}<br />
\item {\bf cat} \> Send the contents of a file to the output pipe (stdout).<br />
\item {\bf less} \> Like {\bf more}. Buffers output and allows to you interactively page though it. Can also operate directly on a file.<br />
\item {\bf sort} \> Sort the lines of the output (with optional control over how to sort).<br />
\tiem {\bf uniq} \> List only one instance of consecutive unique lines (pair with {\tt uniq} to get all the unique lines).<br />
\item {\bf wc} \> Word count. Counts the characters, words, and lines in the output.<br />
\item {\bf awk} \> A very powerful parser for extracting fields from text output. Often coupled with {\bf sed} (a file editor) to reparse and format information.<br />
\end{itemize}<br />
<br />
Normally the result of a UNIX command is written to the terminal<br />
for you to see. However, you can direct the output elsewhere. For<br />
example, <br />
<br />
\begin{verbatim}<br />
more love1<br />
\end{verbatim}<br />
<br />
\noindent prints the file {\tt love1} on your screen, while<br />
<br />
\begin{verbatim}<br />
more love1 > love2<br />
\end{verbatim}<br />
<br />
\noindent creates the file {\tt love2} and writes the content into it.<br />
<br />
Normally the input to a UNIX command is expected to be from the<br />
terminal. However, you can get the input from elsewhere. For example, <br />
<br />
\begin{verbatim}<br />
mail aparsons < idea.txt<br />
\end{verbatim}<br />
<br />
\noindent uses the file {\tt idea.txt} as input to the command {\tt<br />
mail}, which means that it mails the file {\tt idea.txt} to<br />
the user aparsons on this computer. You can try it, but mail on this account is not checked.<br />
<br />
\subsection{Text Editing}<br />
<br />
Unix comes with some build-in text editors (e.g. vim, emacs, nano/pico). You can always use a different one, but it's a good idea <br />
to be reasonably conversant in one of these, since it's guaranteed to be installed on any UNIX system.<br />
Moreover, you may find that vim and emacs, in particular, are actually incredible powerful and streamlined. Of the two,<br />
{\bf vim} (VI iMproved) is terser, more baroque, and arguably faster for expert use, but it has a steeper learning curve.<br />
{\bf emacs} is similarly powerful, but with perhaps an easier learning curve because it takes more Ctrl key presses (which slows down editing). <br />
<br />
\subsection{Scripting}<br />
<br />
Once you can write files, it becomes easy to write scripts. The easiest way is to put commands into a file and then run that file from the command line.<br />
These commands could be {\tt bash}, but they could also be {\tt python} or any other programming language. For example, edit a file {\tt test.py} with the following:<br />
\begin{verbatim}<br />
a = 1<br />
b = 2<br />
print(a + b)<br />
\end{verbatim}<br />
Then from the command line, run<br />
\begin{verbatim}<br />
$ python test.py<br />
\end{verbatim}<br />
If you'd like to not have to type "python", but instead just run the script as if it were a program, you need to do two things:<br />
\begin{enumerate}<br />
\item Add {\tt #! /usr/bin/env python} to the top of the text of your script. This uses the {\bf env} command to find where python is on this computer.<br />
\item Make your script executable ({\tt chmod a+x test.py})<br />
\end{enumerate}<br />
Now you can run your script directly from the command line. Bash scripting works just as easily. Edit test.sh:<br />
\begin{verbatim}<br />
#! /usr/bin/env bash<br />
for file in `ls`; do<br />
echo $file<br />
echo `wc $file`<br />
done<br />
\end{verbatim}<br />
You can run this script (don't forget to make it executable) to print out the word count of each file in the current directory. A full bash script tutorial is beyond the scope<br />
of this document, but there are many tutorials online. For reading this script, it helps to know that backticks enclosing a command replace the text of the command with the text that<br />
command outputs, and that dollar signs are used to extract a value from a variable name. If you find yourself (as a python programmer) using bash scripting, you may find<br />
that using {\tt python -c "<some quick one-line script here>"} is very helpful for gluing bash scripts together.<br />
<br />
All of this is to say, if you want to edit code and run it exclusively over the command line, there are many versatile tools at your disposal.<br />
<br />
\subsection{Remote Logging In}\label{remote}<br />
<br />
You can log in from home {\it if} your computer has the secure<br />
login software, called {\tt ssh}. <br />
If you have Linux, type {\tt ssh ugastro.berkeley.edu}<br />
<br />
If you're logging in from home on an (ugh!) Windows machine, you need to<br />
be able to use X windows and a SSH client. To enable X11 forwarding (X windows) run SSH with the {\tt -X} and {\tt -Y} flags.<br />
<br />
\section{COMMON COMMANDS}\label{commands}<br />
\vspace{-0.2in}<br />
<br />
\begin{itemize}<br />
<br />
\item {\bf passwd} \> Change your account password.<br />
\item {\bf man commandname} \> Gets voluminous (usually overly so) info for you on a specific command. Old-school StackExchange that works without an internet connection.<br />
%\item {\bf apropos topic} \> Tells which commands are relevant to the {\bf topic}.<br />
<br />
\item {\bf pwd} \> Shows your ``present working directory''.<br />
\item {\bf cd dirname} \> Moves you into the subdirectory, below your <br />
present directory.<br />
\item {\bf cd ..} \> Moves you out of a subdirectory into the directory above<br />
it.<br />
\item {\bf cd -} \> Moves you to previous directory you were in.<br />
\item {\bf mkdir dirname} \> Creates a subdirectory named {\bf dirname}.<br />
\item {\bf rmdir dirname} \> Removes a subdirectory named {\bf dirname}.<br />
<br />
\item {\bf rm filename} \> Removes a file named {\bf filename}; it must<br />
be empty.<br />
\item {\bf cp file1 file2} \> Copies the contents of {\bf file1} into {\bf file2}. You are left with two files.<br />
\item {\bf mv oldfile newfile} \> Moves (or renames) {\bf oldfile} as {\bf newfile}.<br />
\item {\bf cat file1 file2 $>$ fileboth} \> Concatenates {\bf file1} and {\bf<br />
file2}, writing them into the new {\bf fileboth}.<br />
<br />
\item {\bf which cp} \> Tells the current definition of {\bf cp} ({\bf which}<br />
works for any command);<br />
\item {\bf history} \> Gives a numbered list of the previous commands you've<br />
typed;<br />
\> typing {\bf !number} repeats that command.<br />
\item {\bf !!} \> Repeats the previous UNIX command.<br />
<br />
\item {\bf find dirname -name filename} \> finds all files with {\bf<br />
filename} in and under the directory with {\bf dirname}.<br />
\item {\bf find dirname -name '*love*'} \> Finds all files whose names <br />
contain the string ``love''.<br />
<br />
\item {\bf ls -lrt} \> Lists the files and subdirectories <br />
in the present directory.<br />
\>The {\bf -lrt} gives a long format in reverse time order.<br />
{\bf ls -lrt $|$ grep /} \> Pipes the output to {\bf grep}, which <br />
\> selects only those names containing ``/'' (which are directories).<br />
<br />
\item {\bf grep -il text file} \> Searches the {\bf file} for occurrences of<br />
the string {\bf text}<br />
\> The {\bf -i} ignores capitalization and {\bf l} lists only the filename.<br />
<br />
%\item {\bf lp filename} \> Prints the contents of {\bf filename}.<br />
%\item {\bf enscript filename} \> Fancier print than {\bf lp}.<br />
<br />
\item {\bf less filename} \> Shows you the contents of the file named {\bf filename} one screen at a time;<br />
\> more flexible than {\textit more}.<br />
\item {\bf tail -40 filename} \> Shows you the last 40 lines of the file<br />
{\bf filename}.<br />
<br />
%\item {\bf lpq} \> Displays the print queue.<br />
%\item {\bf cancel jobnum} \> Removes the {\bf jobnum} in the print queue. You must own the job<br />
<br />
\item {\bf du -h dirname} \> Tells the disk space used by everything in dirname.<br />
\>The ``h'' means in ``human units''.<br />
\>Also handy for giving the directory tree structure.<br />
\item {\bf df -k} \> Tells kilobytes used and available on all<br />
disks. (``-h'' works here too!)<br />
\item {\bf top} \> Shows CPU usage, etc, for jobs on your machine.<br />
\item {\bf ps -u username} \> List the programs that {\bf username} is<br />
currently<br />
\> running on the machine you are logged onto.<br />
\item {\bf kill processnum} \> Kills the process listed with<br />
{\bf processnum}. You must own the process<br />
\end{itemize}<br />
<br />
\end{document}<br />
<br />
<br />
</latex></div>AparsonsUnix Primer2022-01-13T20:54:32Z<p>Aparsons: </p>
<hr />
<div>===Short Topical Videos===<br />
* [http://www.youtube.com/watch?v=Ms5sNYyejEw Basic Unix Commands (Bergey, NYU)]<br />
<br />
===Reference Material===<br />
* [http://genepath.med.harvard.edu/~depalma/unixPrimer.html A Brief Unix Primer (Harvard)]<br />
* [http://www.ks.uiuc.edu/Training/Tutorials/Reference/unixprimer.html Unix Primer (Univ. Illinois Urbana Champaign)]<br />
<br />
<latex><br />
\documentclass[]{article}<br />
%\usepackage[top=1in,bottom=1in,left=1in,right=1in]{geometry}<br />
%\usepackage{amsmath}<br />
%\usepackage{graphicx}<br />
%\usepackage{natbib}<br />
%\documentclass[psfig,preprint]{aastex}<br />
\begin{document}<br />
<br />
\title{A SHORT UNIX PRIMER}<br />
<br />
This document provides a short primer on how to navigate Unix-like operating systems (e.g. Linux).<br />
Unix has a long tradition of use in scientific computing. That tradition was bolstered when Linus<br />
Torvalds developed an open-source implementation of Unix (Linux) which enabled the operating system<br />
to be continuously developed and distributed for free. Today, Linux has become almost synonymous with Unix,<br />
and you will find many flavors<br />
of Linux (e.g. Ubuntu, Debian, CentOS, Raspbian, Fedora, etc.) available supporting most modern hardware. <br />
You can even find closely related Unix<br />
variants in other major operating systems (e.g. {\tt terminal} in Mac OSX and {\tt cygwin} on Windows}).<br />
<br />
Unix (or Linux, if you like) supports graphical user interfaces (e.g. Gnome, KDE), but it was originally<br />
written to support command-line (text) processing, and that is where its true power shines. The learning<br />
curve can be a bit steep at first. Many of the commands are quite terse/baroque, as they date from a time<br />
when keystrokes were slow to be processed. Once you master the tools, though, you may find that you spend a lot<br />
less time clicking through menus or manually renaming files, and a lot more time doing fun things like<br />
programming/scripting and getting things done.<br />
<br />
Everything below assumes you are at a command-line prompt. If you are using a graphic interface,<br />
you may need to find the "terminal" icon and click it to get started. The command line is actually<br />
an interface to a program that interprets the text you enter. There are various flavors of command-line<br />
programs (called "shells, which include {\tt bash}, {\tt zsh}, {\tt csh}, etc.). We will use {\tt bash} because it is among<br />
the most prevalent and full-featured, but most of the commands below will work on any of these shells.<br />
<br />
\section{DIRECTORY STRUCTURE} \label{directories}<br />
<br />
The Unix file system is all held inside the root directory ({\tt /}). All other directories<br />
are subdirectories off of this one. When you log in, you will usually start in a user directory<br />
bearing your username. For most Unix flavors, this is in {\tt /home/<username>}. This is where you<br />
will put most of your files (preferably in a subdirectory off of your home directory, as it tends to<br />
get cluttered). It is also where a lot of configuration files get stored. These files tend to begin with<br />
a dot (e.g. {\tt .bashrc}). These files don't tend to be visible to you by default, but as you will see below,<br />
they are there if you know how to look for them.<br />
<br />
All of the rest of the stuff your computer and operating system needs is also linked off of root.<br />
This includes places where executable programs ("applications," if you like) are stored<br />
(e.g. {\tt /bin}, {\tt /usr/bin}, {\tt /usr/local/bin}), where all of the run-time program and<br />
system information is stored ({\tt /var}), where configuration and resource for your programs<br />
are stored ({\tt /etc}), where external devices ({\tt /dev}) and mounted disks ({\tt /mnt}) are held,<br />
and even where the boot instructions of your computer are held ({\tt /boot}). Until you know what you<br />
are doing, though, best not to mess with these things.<br />
<br />
\subsection{Navigating the Directory Tree}\label{thedirtree}<br />
<br />
The first thing you will need to learn is to navigate between directories,<br />
find out what is in them, make/remove directories, and copy/move<br />
files between directories.<br />
<br />
Here is a list of the most important commands relevant to directories include:<br />
<br />
\begin{itemize}<br />
\item To see a listing of the files and subdirectories of the present working<br />
directory (pwd), use<br />
the {\tt ls} command. It has some useful<br />
options. One of my favorite combinations of options is {\tt ls -lrt}:<br />
the {\tt l} means ``long listing format'', the {\tt t} means ``time<br />
order'', and the {\tt r} means ``reverse order''---so this lists all<br />
files in reverse time order so that the most recent file appears as the<br />
last line of the list. You can also use the {\tt *} character as a<br />
wildcard: for example, {\tt ls *pdf} lists all files with the suffix {\tt<br />
pdf} (i.e. PDF files). Note: if you want to see all the files (even<br />
the invisible configuration files, you need to add the {\tt a} flag to the command. <br />
<br />
\item To change to a directory, e.g.\ the {\tt tex} directory under {\tt<br />
lab1}, type <br />
\begin{verbatim}<br />
cd /home/user_name/lab1/tex<br />
\end{verbatim}<br />
Or, shorter: $\sim$ stands for your home directory, so you can type<br />
\begin{verbatim}<br />
cd ~/lab1/tex<br />
\end{verbatim}<br />
Or, if your present working directory (pwd) is {\tt lab1}, you can type just {\tt cd tex}.<br />
<br />
<br />
\item To create a new directory, e.g.\ a directory called {\tt monday}<br />
under {\tt data}, type <br />
\begin{verbatim}<br />
mkdir ~/lab1/data/monday<br />
\end{verbatim}<br />
Or, if your cwd is {\tt ~/lab1/data}, you need only type {\tt mkdir monday}. If<br />
you want to eliminate (remove) a directory, get rid of all the files<br />
and type {\tt rmdir monday}.<br />
<br />
\item To copy a file from one directory to another, e.g.\ the file {\tt<br />
carl} from $\sim$ to {\tt \~{}/lab1/src}, type<br />
\begin{verbatim}<br />
cp ~/carl ~/lab1/src<br />
\end{verbatim}<br />
You end up with two copies of the file. You<br />
can instead move the file using {\tt mv}. To remove a file, use {\tt<br />
rm}.<br />
<br />
We have defined the following options for these commands:<br />
\begin{itemize}<br />
<br />
\item For {\tt cp}: {\tt cp -ip}. The {\tt i} means ``inquire before<br />
overwriting a file of the same name''; once you overwrite the original<br />
version, it's gone! the {\tt p} means ''preserve the original time<br />
information about the file''; otherwise, it would tag the copied file<br />
with the current time.<br />
<br />
\item For {\tt mv}: {\tt mv -i}. As above. inquire!<br />
<br />
\item For {\tt rm}: {\tt rm -i}. Ask to confirm your intention to<br />
eliminate the file. Once it's gone, it's gone---there's no<br />
``wastebasket''. <br />
\end{itemize}<br />
<br />
\end{itemize}<br />
<br />
\subsection{Permissions for Directories and Files} \label{perm}<br />
<br />
Permissions determine who has access. You might want your data to be<br />
accessible by everybody, for reading, but you probably don't want other<br />
people writing over your data! And you shouldn't want your lab writeup<br />
to be accessible by anybody, either reading or writing---you don't want<br />
to facilitate plagiarism! And it makes sense to keep all your love<br />
letters in a separate directory that isn't accessible in any way by<br />
anybody else---including their recipient(s)!<br />
<br />
You set permissions with {\tt chmod}. Permissions recognize three<br />
classes of people: {\tt u} ({\it user}---yourself!), {\tt g} ({\it<br />
group}---that's usually all the users of {\tt ugastro}), and {\tt o}<br />
({\it other}---everybody else, {\it including} somebody in Timbuktu who<br />
happens to crash into our system). Note that {\it group} is essentially<br />
like {\it other}---almost everybody! Each class can have three<br />
permissions: {\tt r} (read permission), {\tt w} (write permission), and<br />
{\tt x} (execute permission). {\tt chmod} allows you to add, take away,<br />
and set exactly permissions for different users with the operators ({\tt<br />
+, -, =}).<br />
<br />
Suppose, for your data subdirectory, you want read permission for<br />
everyone and write permission only for yourself. To grant the read<br />
permissions to {\it group} and {\it other}, get into the directory above<br />
{\tt data} (that's {\tt lab1}) and then type {\tt chmod go+rx data}; to<br />
eliminate the write permissions, {\tt chmod go-w data}. To check your<br />
work, do a long listing of the directory ({\tt ls -l data}). On your<br />
screen, it would write<br />
<br />
\begin{verbatim}<br />
drwxr-xr-x 1 heiles bin 10 2007-01-20 17:58 data/<br />
\end{verbatim}<br />
<br />
\noindent Translation: The first character, {\tt d}, means it's a<br />
directory. The next three specify the permissions for the user (that's<br />
you): {\tt rw} means you have read, write privileges, and the {\tt x} means<br />
you can access the directory. The next set of three characters {\tt<br />
r-x} is for<br />
the group (all your classmates); the final set of three characters {\tt<br />
r-x} means that everybody can read and access the directory contents,<br />
but can't write into it.<br />
<br />
For your love letter directory (called {\tt love}), you'd want {\tt chmod<br />
go-rwx love}<br />
<br />
Permissions apply slightly differently to directories and files: \begin{enumerate} <br />
<br />
\item {\it Directories.} In order to access any file in a<br />
directory---even to obtain a listing of the files with the {\tt ls}<br />
command---the person needs {\it execute} permission. The read and<br />
write permissions are as you'd expect.<br />
<br />
\item {\it Files.} Most files don't need execute permission. By<br />
default, when you create a file, it has read/write permissions for you<br />
and read for the other two classes.<br />
<br />
\end{enumerate}<br />
<br />
\section{OTHER ASPECTS\dots}<br />
<br />
<br />
\subsection{Typing on the Command-Line in Linux/UNIX, Emacs}<br />
<br />
\label{keycommands}<br />
<br />
One of the joys of Unix is command-line editing using shortcuts. If you master a few<br />
of these, you will find that you can interact much more quickly with your computer.<br />
<br />
\begin {itemize}<br />
\item {\bf Ctrl-r} \> Reverse search through your history for what you've already started typing. Hit enter to pull out the command, which you can then modify before entering.<br />
\item {\bf up/down arrow} \> scroll up (or down) through commands you've already entered.<br />
\item {\bf Ctrl-e} \> moves the cursor to the end of the line.<br />
\item {\bf Ctrl-a} \> moves the cursor to the beginning of the line.<br />
\item {\bf Ctrl-k} \> deletes the rest of the line.<br />
\item {\bf Ctrl-w} \> deletes the word or portion of the word preceding the cursor.<br />
\end{itemize}<br />
<br />
%\noindent Sometimes, when command-line editing, you inadvertently hit {\bf Ctrl-s}; this prevents the cursor from responding to your<br />
%keystrokes. If you encounter this condition, type {\bf Ctrl-q}, after which things will work normally again.<br />
<br />
\subsection{Stopping or Suspending Processes}<br />
<br />
When you run a program (from the command line or otherwise), the operating system kernel (that's<br />
the main program that makes your computer operate) launches a process that carries out its instructions.<br />
Often, that process ends naturally, but sometimes you'd like to end it before it is finished. Or perhaps<br />
you'd like the computer to keep executing the program in the background, but you would like control <br />
over your command line again to start typing something else. Here are some basic tools:<br />
\begin{itemize}<br />
\item {\bf Ctrl-c} \> Break out of the current process. If the process is responsive, this will<br />
land you back at the command line. If it is not responsive, this will not work and you might need to try<br />
suspending or killing (see below) the process.<br />
\item {\bf Ctrl-z} \> Suspends the current process. The process still exists, but it has been frozen by<br />
the kernel. You will land back at the command line. Sometimes this succeeds in escaping from a process when<br />
{\tt Ctrl-c} fails. Once you are at the command line, you can do whatever you wish. If you wish to continue<br />
the process, you can type {\bf fg} (foreground) to jump back in. Alternately, you can type {\bf bg} (background)<br />
to continue the process, but keep the command line available for running other commands.<br />
\item {\bf jobs} \> This command lists all processes (foreground or background) that you have started from this<br />
command line. Note that this does not list all the processes that are running on your machine.<br />
\end{itemize}<br />
<br />
\subsection{Aliases}\label{short}<br />
<br />
Aliases are shortcuts that you can use in place of typing out a<br />
long command over and over again. You can define an alias on the<br />
command line; alternatively, if you want to define it permanently, you<br />
can define it by editing your {\tt .bashrc} or {\tt .aliasfile} file<br />
(which reside in your home directory).<br />
<br />
Here's an example. Suppose that you want to force UNIX to check<br />
whether it will overwrite a file when you use the {\tt mv} command and,<br />
also, to ask you about it. To do this,<br />
you use the {\tt -i} option, and you redefine the command {\tt mv} by<br />
typing<br />
<br />
\begin{verbatim}<br />
alias mv "mv -i"<br />
\end{verbatim}<br />
<br />
\noindent If you type it in a window, it will apply henceforth to that<br />
window alone. <br />
<br />
We have included this definition in your {\tt .aliasfile}, which<br />
resides in your home directory and is automatically invoked whenever<br />
you open a new terminal window---because your {\tt .bashrc} file invokes<br />
your {\tt .aliasfile}. <br />
<br />
You can check the definition of the alias for {\tt mv} by typing<br />
<br />
\begin{verbatim}<br />
which mv<br />
\end{verbatim}<br />
<br />
Finally, you can bypass any defined alias by using a backslash. For<br />
example, {\tt \\rm carl} invokes the {\tt rm} command without the {\tt<br />
-i} option that is defined in your {\tt .aliasfile}, which means\dots it<br />
removes the file {\tt carl} {\it without asking}. Using {\tt rm}, {\tt<br />
cp}, or {\tt mv} without the {\tt -i} option is {\it dangerous}: Once<br />
a file has been overwritten or deleted, it's gone for good!<br />
<br />
\subsection{Piping, etc: $|, >, <$}\label{help}<br />
<br />
Piping ($|$) directs the text output of a command to the next succeeding<br />
command. For example,<br />
<br />
\begin{verbatim}<br />
ls | grep /<br />
\end{verbatim}<br />
<br />
\noindent directs the output of the listing command to {\it grep}, which<br />
here selects all names containing the string ``/''; those are<br />
directories, so this gives a list of directories just under the current<br />
directory.<br />
<br />
Unix has a rich set of commands for manipulating text output exchanged through pipes. Examples include:<br />
\begin{itemize}<br />
\item {\bf cat} \> Send the contents of a file to the output pipe (stdout).<br />
\item {\bf less} \> Like {\bf more}. Buffers output and allows to you interactively page though it. Can also operate directly on a file.<br />
\item {\bf sort} \> Sort the lines of the output (with optional control over how to sort).<br />
\tiem {\bf uniq} \> List only one instance of consecutive unique lines (pair with {\tt uniq} to get all the unique lines).<br />
\item {\bf wc} \> Word count. Counts the characters, words, and lines in the output.<br />
\item {\bf awk} \> A very powerful parser for extracting fields from text output. Often coupled with {\bf sed} (a file editor) to reparse and format information.<br />
\end{itemize}<br />
<br />
Normally the result of a UNIX command is written to the terminal<br />
for you to see. However, you can direct the output elsewhere. For<br />
example, <br />
<br />
\begin{verbatim}<br />
more love1<br />
\end{verbatim}<br />
<br />
\noindent prints the file {\tt love1} on your screen, while<br />
<br />
\begin{verbatim}<br />
more love1 > love2<br />
\end{verbatim}<br />
<br />
\noindent creates the file {\tt love2} and writes the content into it.<br />
<br />
Normally the input to a UNIX command is expected to be from the<br />
terminal. However, you can get the input from elsewhere. For example, <br />
<br />
\begin{verbatim}<br />
mail aparsons < idea.txt<br />
\end{verbatim}<br />
<br />
\noindent uses the file {\tt idea.txt} as input to the command {\tt<br />
mail}, which means that it mails the file {\tt idea.txt} to<br />
the user aparsons on this computer. You can try it, but mail on this account is not checked.<br />
<br />
\subsection{Text Editing}<br />
<br />
Unix comes with some build-in text editors (e.g. vim, emacs, nano/pico). You can always use a different one, but it's a good idea <br />
to be reasonably conversant in one of these, since it's guaranteed to be installed on any UNIX system.<br />
Moreover, you may find that vim and emacs, in particular, are actually incredible powerful and streamlined. Of the two,<br />
{\bf vim} (VI iMproved) is terser, more baroque, and arguably faster for expert use, but it has a steeper learning curve.<br />
{\bf emacs} is similarly powerful, but with perhaps an easier learning curve because it takes more Ctrl key presses (which slows down editing). <br />
<br />
\subsection{Scripting}<br />
<br />
Once you can write files, it becomes easy to write scripts. The easiest way is to put commands into a file and then run that file from the command line.<br />
These commands could be {\tt bash}, but they could also be {\tt python} or any other programming language. For example, edit a file {\tt test.py} with the following:<br />
\begin{verbatim}<br />
a = 1<br />
b = 2<br />
print(a + b)<br />
\end{verbatim}<br />
Then from the command line, run<br />
\begin{verbatim}<br />
$ python test.py<br />
\end{verbatim}<br />
If you'd like to not have to type "python", but instead just run the script as if it were a program, you need to do two things:<br />
\begin{enumerate}<br />
\item Add {\tt #! /usr/bin/env python} to the top of the text of your script. This uses the {\bf env} command to find where python is on this computer.<br />
\item Make your script executable ({\tt chmod a+x test.py})<br />
\end{enumerate}<br />
Now you can run your script directly from the command line. Bash scripting works just as easily. Edit test.sh:<br />
\begin{verbatim}<br />
#! /usr/bin/env bash<br />
for file in `ls`; do<br />
echo $file<br />
echo `wc $file`<br />
done<br />
\end{verbatim}<br />
You can run this script (don't forget to make it executable) to print out the word count of each file in the current directory. A full bash script tutorial is beyond the scope<br />
of this document, but there are many tutorials online. For reading this script, it helps to know that backticks enclosing a command replace the text of the command with the text that<br />
command outputs, and that dollar signs are used to extract a value from a variable name. If you find yourself (as a python programmer) using bash scripting, you may find<br />
that using {\tt python -c "<some quick one-line script here>"} is very helpful for gluing bash scripts together.<br />
<br />
All of this is to say, if you want to edit code and run it exclusively over the command line, there are many versatile tools at your disposal.<br />
<br />
\subsection{Remote Logging In}\label{remote}<br />
<br />
You can log in from home {\it if} your computer has the secure<br />
login software, called {\tt ssh}. <br />
If you have Linux, type {\tt ssh ugastro.berkeley.edu}<br />
<br />
If you're logging in from home on an (ugh!) Windows machine, you need to<br />
be able to use X windows and a SSH client. To enable X11 forwarding (X windows) run SSH with the {\tt -X} and {\tt -Y} flags.<br />
<br />
\section{COMMON COMMANDS}\label{commands}<br />
\vspace{-0.2in}<br />
<br />
\begin{itemize}<br />
<br />
\item {\bf passwd} \> Change your account password.<br />
\item {\bf man commandname} \> Gets voluminous (usually overly so) info for you on a specific command. Old-school StackExchange that works without an internet connection.<br />
%\item {\bf apropos topic} \> Tells which commands are relevant to the {\bf topic}.<br />
<br />
\item {\bf pwd} \> Shows your ``present working directory''.<br />
\item {\bf cd dirname} \> Moves you into the subdirectory, below your <br />
present directory.<br />
\item {\bf cd ..} \> Moves you out of a subdirectory into the directory above<br />
it.<br />
\item {\bf cd -} \> Moves you to previous directory you were in.<br />
\item {\bf mkdir dirname} \> Creates a subdirectory named {\bf dirname}.<br />
\item {\bf rmdir dirname} \> Removes a subdirectory named {\bf dirname}.<br />
<br />
\item {\bf rm filename} \> Removes a file named {\bf filename}; it must<br />
be empty.<br />
\item {\bf cp file1 file2} \> Copies the contents of {\bf file1} into {\bf file2}. You are left with two files.<br />
\item {\bf mv oldfile newfile} \> Moves (or renames) {\bf oldfile} as {\bf newfile}.<br />
\item {\bf cat file1 file2 $>$ fileboth} \> Concatenates {\bf file1} and {\bf<br />
file2}, writing them into the new {\bf fileboth}.<br />
<br />
\item {\bf which cp} \> Tells the current definition of {\bf cp} ({\bf which}<br />
works for any command);<br />
\item {\bf history} \> Gives a numbered list of the previous commands you've<br />
typed;<br />
\> typing {\bf !number} repeats that command.<br />
\item {\bf !!} \> Repeats the previous UNIX command.<br />
<br />
\item {\bf find dirname -name filename} \> finds all files with {\bf<br />
filename} in and under the directory with {\bf dirname}.<br />
\item {\bf find dirname -name '*love*'} \> Finds all files whose names <br />
contain the string ``love''.<br />
<br />
\item {\bf ls -lrt} \> Lists the files and subdirectories <br />
in the present directory.<br />
\>The {\bf -lrt} gives a long format in reverse time order.<br />
{\bf ls -lrt $|$ grep /} \> Pipes the output to {\bf grep}, which <br />
\> selects only those names containing ``/'' (which are directories).<br />
<br />
\item {\bf grep -il text file} \> Searches the {\bf file} for occurrences of<br />
the string {\bf text}<br />
\> The {\bf -i} ignores capitalization and {\bf l} lists only the filename.<br />
<br />
%\item {\bf lp filename} \> Prints the contents of {\bf filename}.<br />
%\item {\bf enscript filename} \> Fancier print than {\bf lp}.<br />
<br />
\item {\bf less filename} \> Shows you the contents of the file named {\bf filename} one screen at a time;<br />
\> more flexible than {\textit more}.<br />
\item {\bf tail -40 filename} \> Shows you the last 40 lines of the file<br />
{\bf filename}.<br />
<br />
%\item {\bf lpq} \> Displays the print queue.<br />
%\item {\bf cancel jobnum} \> Removes the {\bf jobnum} in the print queue. You must own the job<br />
<br />
\item {\bf du -h dirname} \> Tells the disk space used by everything in dirname.<br />
\>The ``h'' means in ``human units''.<br />
\>Also handy for giving the directory tree structure.<br />
\item {\bf df -k} \> Tells kilobytes used and available on all<br />
disks. (``-h'' works here too!)<br />
\item {\bf top} \> Shows CPU usage, etc, for jobs on your machine.<br />
\item {\bf ps -u username} \> List the programs that {\bf username} is<br />
currently<br />
\> running on the machine you are logged onto.<br />
\item {\bf kill processnum} \> Kills the process listed with<br />
{\bf processnum}. You must own the process<br />
\end{itemize}<br />
<br />
\end{document}<br />
<br />
<br />
</latex></div>AparsonsUnix Primer2022-01-13T18:56:20Z<p>Aparsons: </p>
<hr />
<div>===Short Topical Videos===<br />
* [http://www.youtube.com/watch?v=Ms5sNYyejEw Basic Unix Commands (Bergey, NYU)]<br />
<br />
===Reference Material===<br />
* [http://genepath.med.harvard.edu/~depalma/unixPrimer.html A Brief Unix Primer (Harvard)]<br />
* [http://www.ks.uiuc.edu/Training/Tutorials/Reference/unixprimer.html Unix Primer (Univ. Illinois Urbana Champaign)]<br />
<br />
<latex><br />
\documentclass[]{article}<br />
%\usepackage[top=1in,bottom=1in,left=1in,right=1in]{geometry}<br />
%\usepackage{amsmath}<br />
%\usepackage{graphicx}<br />
%\usepackage{natbib}<br />
%\documentclass[psfig,preprint]{aastex}<br />
\begin{document}<br />
<br />
\title{A SHORT UNIX PRIMER}<br />
<br />
This document provides a short primer on how to navigate Unix-like operating systems (e.g. Linux).<br />
Unix has a long tradition of use in scientific computing. That tradition was bolstered when Linus<br />
Torvalds developed an open-source implementation of Unix (Linux) which enabled the operating system<br />
to be continuously developed and distributed for free. Today, Linux has become almost synonymous with Unix,<br />
and you will find many flavors<br />
of Linux (e.g. Ubuntu, Debian, CentOS, Raspbian, Fedora, etc.) available supporting most modern hardware. <br />
You can even find closely related Unix<br />
variants in other major operating systems (e.g. {\tt terminal} in Mac OSX and {\tt cygwin} on Windows}).<br />
<br />
Unix (or Linux, if you like) supports graphical user interfaces (e.g. Gnome, GTK), but it was originally<br />
written to support command-line (text) processing, and that is where its true power shines. The learning<br />
curve can be a bit steep at first. Many of the commands are quite terse/baroque, as they date from a time<br />
when keystrokes were slow to be processed. Once you master the tools, though, you may find that you spend a lot<br />
less time clicking through menus or manually renaming files, and a lot more time doing fun things like<br />
programming/scripting and getting things done.<br />
<br />
Everything below assumes you are at a command-line prompt. If you are using a graphic interface,<br />
you may need to find the "terminal" icon and click it to get started. The command line is actually<br />
an interface to a program that interprets the text you enter. There are various flavors of command-line<br />
programs (called "shells, which include {\tt bash}, {\tt zsh}, {\tt csh}, etc.). We will use {\tt bash} because it is among<br />
the most prevalent and full-featured, but most of the commands below will work on any of these shells.<br />
<br />
\section{DIRECTORY STRUCTURE} \label{directories}<br />
<br />
The Unix file system is all held inside the root directory ({\tt /}). All other directories<br />
are subdirectories off of this one. When you log in, you will usually start in a user directory<br />
bearing your username. For most Unix flavors, this is in {\tt /home/<username>}. This is where you<br />
will put most of your files (preferably in a subdirectory off of your home directory, as it tends to<br />
get cluttered). It is also where a lot of configuration files get stored. These files tend to begin with<br />
a dot (e.g. {\tt .bashrc}). These files don't tend to be visible to you by default, but as you will see below,<br />
they are there if you know how to look for them.<br />
<br />
All of the rest of the stuff your computer and operating system needs is also linked off of root.<br />
This includes places where executable programs ("applications," if you like) are stored<br />
(e.g. {\tt /bin}, {\tt /usr/bin}, {\tt /usr/local/bin}), where all of the run-time program and<br />
system information is stored ({\tt /var}), where configuration and resource for your programs<br />
are stored ({\tt /etc}), where external devices ({\tt /dev}) and mounted disks ({\tt /mnt}) are held,<br />
and even where the boot instructions of your computer are held ({\tt /boot}). Until you know what you<br />
are doing, though, best not to mess with these things.<br />
<br />
\subsection{Navigating the Directory Tree}\label{thedirtree}<br />
<br />
The first thing you will need to learn is to navigate between directories,<br />
find out what is in them, make/remove directories, and copy/move<br />
files between directories.<br />
<br />
Here is a list of the most important commands relevant to directories include:<br />
<br />
\begin{itemize}<br />
\item To see a listing of the files and subdirectories of the present working<br />
directory (pwd), use<br />
the {\tt ls} command. It has some useful<br />
options. One of my favorite combinations of options is {\tt ls -lrt}:<br />
the {\tt l} means ``long listing format'', the {\tt t} means ``time<br />
order'', and the {\tt r} means ``reverse order''---so this lists all<br />
files in reverse time order so that the most recent file appears as the<br />
last line of the list. You can also use the {\tt *} character as a<br />
wildcard: for example, {\tt ls *pdf} lists all files with the suffix {\tt<br />
pdf} (i.e. PDF files). <br />
<br />
\item To change to a directory, e.g.\ the {\tt tex} directory under {\tt<br />
lab1}, type <br />
\begin{verbatim}<br />
cd /home/user_name/lab1/tex<br />
\end{verbatim}<br />
Or, shorter: $\sim$ stands for your home directory, so you can type<br />
\begin{verbatim}<br />
cd ~/lab1/tex<br />
\end{verbatim}<br />
Or, if your present working directory (pwd) is {\tt lab1}, you can type just {\tt cd tex}.<br />
<br />
<br />
\item To create a new directory, e.g.\ a directory called {\tt monday}<br />
under {\tt data}, type <br />
\begin{verbatim}<br />
mkdir ~/lab1/data/monday<br />
\end{verbatim}<br />
Or, if your cwd is {\tt ~/lab1/data}, you need only type {\tt mkdir monday}. If<br />
you want to eliminate (remove) a directory, get rid of all the files<br />
and type {\tt rmdir monday}.<br />
<br />
\item To copy a file from one directory to another, e.g.\ the file {\tt<br />
carl} from $\sim$ to {\tt \~{}/lab1/src}, type<br />
\begin{verbatim}<br />
cp ~/carl ~/lab1/src<br />
\end{verbatim}<br />
You end up with two copies of the file. You<br />
can instead move the file using {\tt mv}. To remove a file, use {\tt<br />
rm}.<br />
<br />
We have defined the following options for these commands:<br />
\begin{itemize}<br />
<br />
\item For {\tt cp}: {\tt cp -ip}. The {\tt i} means ``inquire before<br />
overwriting a file of the same name''; once you overwrite the original<br />
version, it's gone! the {\tt p} means ''preserve the original time<br />
information about the file''; otherwise, it would tag the copied file<br />
with the current time.<br />
<br />
\item For {\tt mv}: {\tt mv -i}. As above. inquire!<br />
<br />
\item For {\tt rm}: {\tt rm -i}. Ask to confirm your intention to<br />
eliminate the file. Once it's gone, it's gone---there's no<br />
``wastebasket''. <br />
\end{itemize}<br />
<br />
\end{itemize}<br />
<br />
\subsection{Permissions for Directories and Files} \label{perm}<br />
<br />
Permissions determine who has access. You might want your data to be<br />
accessible by everybody, for reading, but you probably don't want other<br />
people writing over your data! And you shouldn't want your lab writeup<br />
to be accessible by anybody, either reading or writing---you don't want<br />
to facilitate plagiarism! And it makes sense to keep all your love<br />
letters in a separate directory that isn't accessible in any way by<br />
anybody else---including their recipient(s)!<br />
<br />
You set permissions with {\tt chmod}. Permissions recognize three<br />
classes of people: {\tt u} ({\it user}---yourself!), {\tt g} ({\it<br />
group}---that's usually all the users of {\tt ugastro}), and {\tt o}<br />
({\it other}---everybody else, {\it including} somebody in Timbuktu who<br />
happens to crash into our system). Note that {\it group} is essentially<br />
like {\it other}---almost everybody! Each class can have three<br />
permissions: {\tt r} (read permission), {\tt w} (write permission), and<br />
{\tt x} (execute permission). {\tt chmod} allows you to add, take away,<br />
and set exactly permissions for different users with the operators ({\tt<br />
+, -, =}).<br />
<br />
Suppose, for your data subdirectory, you want read permission for<br />
everyone and write permission only for yourself. To grant the read<br />
permissions to {\it group} and {\it other}, get into the directory above<br />
{\tt data} (that's {\tt lab1}) and then type {\tt chmod go+rx data}; to<br />
eliminate the write permissions, {\tt chmod go-w data}. To check your<br />
work, do a long listing of the directory ({\tt ls -l data}). On your<br />
screen, it would write<br />
<br />
\begin{verbatim}<br />
drwxr-xr-x 1 heiles bin 10 2007-01-20 17:58 data/<br />
\end{verbatim}<br />
<br />
\noindent Translation: The first character, {\tt d}, means it's a<br />
directory. The next three specify the permissions for the user (that's<br />
you): {\tt rw} means you have read, write privileges, and the {\tt x} means<br />
you can access the directory. The next set of three characters {\tt<br />
r-x} is for<br />
the group (all your classmates); the final set of three characters {\tt<br />
r-x} means that everybody can read and access the directory contents,<br />
but can't write into it.<br />
<br />
For your love letter directory (called {\tt love}), you'd want {\tt chmod<br />
go-rwx love}<br />
<br />
Permissions apply slightly differently to directories and files: \begin{enumerate} <br />
<br />
\item {\it Directories.} In order to access any file in a<br />
directory---even to obtain a listing of the files with the {\tt ls}<br />
command---the person needs {\it execute} permission. The read and<br />
write permissions are as you'd expect.<br />
<br />
\item {\it Files.} Most files don't need execute permission. By<br />
default, when you create a file, it has read/write permissions for you<br />
and read for the other two classes.<br />
<br />
\end{enumerate}<br />
<br />
\section{OTHER ASPECTS\dots}<br />
<br />
<br />
\subsection{Command-Line Editing in Linux/UNIX, Emacs, and Python}<br />
<br />
\label{keycommands}<br />
<br />
One of the joys of Linux/UNIX is command-line editing using keystrokes. We have<br />
configured IDL to use the same keystroke commands; Emacs already does so.<br />
The most important command-line editing commands are:<br />
<br />
\begin {tabbing}<br />
{\bf arrow keys} \hspace{0.8in} \= move the cursor as you'd expect. \\<br />
{\bf Ctrl-d} \> deletes the character under the cursor. \\<br />
{\bf Backspace} \> deletes the character behind the cursor. \\<br />
{\bf Ctrl-e} \> moves the cursor to the end of the line. \\<br />
{\bf Ctrl-a} \> moves the cursor to the beginning of the line. \\<br />
{\bf Ctrl-k} \> deletes the the rest of the line.<br />
\end{tabbing}<br />
<br />
\noindent Sometimes, when command-line editing, you inadvertently hit<br />
{\bf Ctrl-s}; this prevents the cursor from responding to your<br />
keystrokes. If you encounter this condition, type {\bf Ctrl-q}, after<br />
which things will work normally again.<br />
<br />
In X windows, you can customize any X window to your desires<br />
(e.g.\ fontsize) by putting the cursor on the window, holding down the<br />
CTRL or SHIFT key and, simultaneously, holding down a mouse button; each one<br />
provides different options. If you are using KDE or Gnome, the details<br />
differ. <br />
<br />
\subsection{Aliases}\label{short}<br />
<br />
Aliases are shortcuts that you can use in place of typing out a<br />
long command over and over again. You can define an alias on the<br />
command line; alternatively, if you want to define it permanently, you<br />
can define it by editing your {\tt .cshrc} or {\tt .aliasfile} file<br />
(which reside in your home directory).<br />
<br />
Here's an example. Suppose that you want to force UNIX to check<br />
whether it will overwrite a file when you use the {\tt mv} command and,<br />
also, to ask you about it. To do this,<br />
you use the {\tt -i} option, and you redefine the command {\tt mv} by<br />
typing<br />
<br />
\begin{verbatim}<br />
alias mv "mv -i"<br />
\end{verbatim}<br />
<br />
\noindent If you type it in a window, it will apply henceforth to that<br />
window alone. <br />
<br />
We have included this definition in your {\tt .aliasfile}, which<br />
resides in your home directory and is automatically invoked whenever<br />
you open a new terminal window---because your {\tt .cshrc} file invokes<br />
your {\tt .aliasfile}. <br />
<br />
You can check the definition of the alias for {\tt mv} by typing<br />
<br />
\begin{verbatim}<br />
which mv<br />
\end{verbatim}<br />
<br />
Finally, you can bypass any defined alias by using a backslash. For<br />
example, {\tt \\rm carl} invokes the {\tt rm} command without the {\tt<br />
-i} option that is defined in your {\tt .aliasfile}, which means\dots it<br />
removes the file {\tt carl} {\it without asking}. Using {\tt rm}, {\tt<br />
cp}, or {\tt mv} without the {\tt -i} option is {\it dangerous}: Once<br />
a file has been overwritten or deleted, it's gone for good!<br />
<br />
\subsection{Piping, etc: $|, >, <$}\label{help}<br />
<br />
Piping ($|$) directs the output of a command to the next succeeding<br />
command. For example,<br />
<br />
\begin{verbatim}<br />
ls | grep /<br />
\end{verbatim}<br />
<br />
\noindent directs the output of the listing command to {\it grep}, which<br />
here selects all names containing the string ``/''; those are<br />
directories, so this gives a list of directories just under the current<br />
directory. <br />
<br />
Normally the result of a UNIX command is written to the terminal<br />
for you to see. However, you can direct the output elsewhere. For<br />
example, <br />
<br />
\begin{verbatim}<br />
more love1<br />
\end{verbatim}<br />
<br />
\noindent prints the file {\tt love1} on your screen, while<br />
<br />
\begin{verbatim}<br />
more love1 > love2<br />
\end{verbatim}<br />
<br />
\noindent creates the file {\tt love2} and writes the content into it.<br />
<br />
Normally the input to a UNIX command is expected to be from the<br />
terminal. However, you can get the input from elsewhere. For example, <br />
<br />
\begin{verbatim}<br />
mail heiles < complaint.txt<br />
\end{verbatim}<br />
<br />
\noindent uses the file {\tt complaint.txt} as input to the command {\tt<br />
mail}, which means that it mails the file {\tt complaint.txt} to<br />
heiles; try it! (Do you think he pays any attention to his mail? Do<br />
you think it will do any good???)<br />
<br />
\subsection{Remote Logging In}\label{remote}<br />
<br />
You can log in from home {\it if} your computer has the secure<br />
login software, called {\tt ssh}. <br />
If you have Linux, type {\tt ssh ugastro.berkeley.edu}<br />
<br />
If you're logging in from home on an (ugh!) Windows machine, you need to<br />
be able to use X windows and a SSH client. A good resource for obtaining and implementing both of these items is [http://courses.cms.caltech.edu/cs11/misc/xwindows.html this] Caltech course page. To enable X11 forwarding (X windows) run the program {\tt exceed} before<br />
logging in. You can get such software from the CD {\it Connecting @<br />
Berkeley}, available for free from the big U.<br />
<br />
\eject<br />
<br />
\section{COMMON COMMANDS}\label{commands}<br />
\vspace{-0.2in}<br />
<br />
\begin{itemize}<br />
<br />
%{\it passwd} \hspace{1.6in} \= Useful for changing your account password.<br />
\item {\bf man commandname} \hspace{0.8in} \= Gets voluminous (usually overly so) info for you on a specific command.<br />
\item {\bf apropos topic} \> Tells which commands are<br />
relevant to the {\bf topic}.<br />
<br />
\item {\bf pwd} \> Shows your ``present working directory''.<br />
\item {\bf cd dirname} \> Moves you into the subdirectory, below your <br />
present directory.<br />
\item {\bf cd ..} \> Moves you out of a subdirectory into the directory above<br />
it.<br />
\item {\bf cd -} \> Moves you to previous directory you were in.<br />
\item {\bf mkdir dirname} \> Creates a subdirectory named {\bf dirname}.<br />
\item {\bf rmdir dirname} \> Removes a subdirectory named {\bf dirname}.<br />
<br />
\item {\bf rm filename} \> Removes a file named {\bf filename}; it must<br />
be empty.<br />
\item {\bf cp file1 file2} \> Copies the contents of {\bf file1} into {\bf file2}. You are left with two files.<br />
\item {\bf mv oldfile newfile} \> Moves (or renames) {\bf oldfile} as {\bf newfile}.<br />
\item {\bf cat file1 file2 $>$ fileboth} \> Concatenates {\bf file1} and {\bf<br />
file2}, writing them into the new {\bf fileboth}.<br />
<br />
\item {\bf which cp} \> Tells the current definition of {\bf cp} ({\bf which}<br />
works for any command);<br />
\item {\bf history} \> Gives a numbered list of the previous commands you've<br />
typed;<br />
\> typing {\bf !number} repeats that command.<br />
\item {\bf !!} \> Repeats the previous UNIX command.<br />
<br />
\item {\bf find dirname -name filename} \> finds all files with {\bf<br />
filename} in and under the directory with {\bf dirname}.<br />
\item {\bf find dirname -name '*love*'} \> Finds all files whose names <br />
contain the string ``love''.<br />
<br />
\item {\bf ls -lrt} \> Lists the files and subdirectories <br />
in the present directory.<br />
\>The {\bf -lrt} gives a long format in reverse time order.<br />
{\bf ls -lrt $|$ grep /} \> Pipes the output to {\bf grep}, which <br />
\> selects only those names containing ``/'' (which are directories).<br />
<br />
\item {\bf grep -il text file} \> Searches the {\bf file} for occurrences of<br />
the string {\bf text}<br />
\> The {\bf -i} ignores capitalization and {\bf l} lists only the filename.<br />
<br />
%\item {\bf lp filename} \> Prints the contents of {\bf filename}.<br />
%\item {\bf enscript filename} \> Fancier print than {\bf lp}.<br />
<br />
\item {\bf less filename} \> Shows you the contents of the file named {\bf filename} one screen at a time;<br />
\> more flexible than {\textit more}.<br />
\item {\bf tail -40 filename} \> Shows you the last 40 lines of the file<br />
{\bf filename}.<br />
<br />
%\item {\bf lpq} \> Displays the print queue.<br />
%\item {\bf cancel jobnum} \> Removes the {\bf jobnum} in the print queue. You must own the job<br />
<br />
\item {\bf du -h dirname} \> Tells the disk space used by everything in dirname.<br />
\>The ``h'' means in ``human units''.<br />
\>Also handy for giving the directory tree structure.<br />
\item {\bf df -k} \> Tells kilobytes used and available on all<br />
disks. (``-h'' works here too!)<br />
\item {\bf top} \> Shows CPU usage, etc, for jobs on your machine.<br />
\item {\bf ps -u username} \> List the programs that {\bf username} is<br />
currently<br />
\> running on the machine you are logged onto.<br />
\item {\bf kill processnum} \> Kills the process listed with<br />
{\bf processnum}. You must own the process<br />
\end{itemize}<br />
<br />
\end{document}<br />
<br />
<br />
</latex></div>AparsonsUnix Primer2022-01-13T18:13:46Z<p>Aparsons: </p>
<hr />
<div>===Short Topical Videos===<br />
* [http://www.youtube.com/watch?v=Ms5sNYyejEw Basic Unix Commands (Bergey, NYU)]<br />
<br />
===Reference Material===<br />
* [http://genepath.med.harvard.edu/~depalma/unixPrimer.html A Brief Unix Primer (Harvard)]<br />
* [http://www.ks.uiuc.edu/Training/Tutorials/Reference/unixprimer.html Unix Primer (Univ. Illinois Urbana Champaign)]<br />
<br />
<br />
<br />
<latex><br />
\documentclass[]{article}<br />
%\usepackage[top=1in,bottom=1in,left=1in,right=1in]{geometry}<br />
%\usepackage{amsmath}<br />
%\usepackage{graphicx}<br />
%\usepackage{natbib}<br />
%\documentclass[psfig,preprint]{aastex}<br />
\begin{document}<br />
<br />
\title{A SHORT UNIX PRIMER}<br />
%\author{Carl Heiles \\ \today}<br />
<br />
<br />
%\author{Carl Heiles \altaffilmark{1} \\ \today}<br />
%\altaffiltext{1}{Based on earlier versions by Anthony Truong and<br />
%Jennefer King.}<br />
<br />
%\tableofcontents<br />
<br />
\section{DIRECTORIES AND SUBDIRECTORIES} \label{directories}<br />
<br />
For experienced programmers the hardest thing about computing is keeping<br />
things organized. You end up with thousands of files and need to keep<br />
them in functional categories. You do this by creating appropriate<br />
directories and keeping your files there. <br />
<br />
\subsection{The Directory Tree}\label{thedirtree}<br />
<br />
For example, when you begin a project, such as an experiment, you should<br />
create a directory for that project---and that directory needs an<br />
appropriate name. For the lab class, you might name the directory<br />
{\tt lab1}. For this project<br />
you will have several activities: taking data, analyzing data, and<br />
writing the lab report. So under the {\tt lab1} directory you might<br />
create three subdirectories entitled {\tt data}, {\tt idl}, and {\tt<br />
tex}. You have created a little directory tree!<br />
<br />
This tree lives under your main directory, called your {\tt home}<br />
directory. The name of your home directory is your login name, which is<br />
(probably) the first letter of your first name plus the first seven<br />
letters of your last name. Your home directory has, as its root, a<br />
system directory called {\tt home}. Thus, {\tt home} is the origin of<br />
all users' directories. Your personal tree has, as its origin, your home<br />
directory. When you create the lab1 directory under your home directory,<br />
you've created a new branch of your directory tree.<br />
<br />
%\begin{figure}<br />
%\includegraphics[width=2in]{dirtree.png}<br />
\caption{The directory tree described in the text.}<br />
%\end{figure}<br />
%Figure \ref{dirtree} shows the schematic structure of this directory<br />
%tree. It is impossible to overemphasize the importance of your creating<br />
%and maintaining a sensible directory tree.<br />
<br />
\subsection{Working with Directories}<br />
<br />
We have configured our system so that the prompt contains the name of<br />
the current directory. Another way to determine where you are is with<br />
the Linux/UNIX command {\tt pwd} (short for ``Present Working<br />
Directory''). Try it!<br />
<br />
The most important commands relevant to directories include: \begin{enumerate}<br />
<br />
\item To see a listing of the files and subdirectories of the present working<br />
directory (pwd), use<br />
the {\tt ls} command. It has some useful<br />
options. One of my favorite combinations of options is {\tt ls -lrt}:<br />
the {\tt l} means ``long listing format'', the {\tt t} means ``time<br />
order'', and the {\tt r} means ``reverse order''---so this lists all<br />
files in reverse time order so that the most recent file appears as the<br />
last line of the list. You can also use the {\tt *} character as a<br />
wildcard: for example, {\tt ls *ps} lists all files with the suffix {\tt<br />
ps} (these are usually PostScript files). <br />
<br />
\item To change to a directory, e.g.\ the {\tt tex} directory under {\tt<br />
lab1}, type <br />
\begin{verbatim}<br />
cd /home/loginname/lab1/tex<br />
\end{verbatim}<br />
Or, shorter: $\sim$ stands for your home directory, so you can type<br />
\begin{verbatim}<br />
cd ~/lab1/tex<br />
\end{verbatim}<br />
Or, if your present working directory (pwd) is<br />
{\tt lab1}, you can type just {\tt cd tex}.<br />
<br />
<br />
\item To create a new directory, e.g.\ a directory called {\tt monday}<br />
under {\tt data}, type <br />
\begin{verbatim}<br />
mkdir ~/lab1/data/monday<br />
\end{verbatim}<br />
Or, if your cwd is {\tt ~/lab1/data}, you need only type {\tt mkdir monday}. If<br />
you want to eliminate (remove) a directory, get rid of all the files<br />
and type {\tt rmdir monday}.<br />
<br />
\item To copy a file from one directory to another, e.g.\ the file {\tt<br />
carl} from $\sim$ to {\tt \~{}/lab1/idl}, type<br />
\begin{verbatim}<br />
cp ~/carl ~/lab1/idl<br />
\end{verbatim}<br />
You end up with two copies of the file. You<br />
can instead move the file using {\tt mv}. To remove a file, use {\tt<br />
rm}.<br />
<br />
We have defined the following options for these commands:<br />
\begin{enumerate}<br />
<br />
\item For {\tt cp}: {\tt cp -ip}. The {\tt i} means ``inquire before<br />
overwriting a file of the same name''; once you overwrite the original<br />
version, it's gone! the {\tt p} means ''preserve the original time<br />
information about the file''; otherwise, it would tag the copied file<br />
with the current time.<br />
<br />
\item For {\tt mv}: {\tt mv -i}. As above. inquire!<br />
<br />
\item For {\tt rm}: {\tt rm -i}. Ask to confirm your intention to<br />
eliminate the file. Once it's gone, it's gone---there's no<br />
``wastebasket''. <br />
\end{enumerate}<br />
<br />
\end{enumerate}<br />
<br />
\subsection{Permissions for Directories and Files} \label{perm}<br />
<br />
Permissions determine who has access. You might want your data to be<br />
accessible by everybody, for reading, but you probably don't want other<br />
people writing over your data! And you shouldn't want your lab writeup<br />
to be accessible by anybody, either reading or writing---you don't want<br />
to facilitate plagiarism! And it makes sense to keep all your love<br />
letters in a separate directory that isn't accessible in any way by<br />
anybody else---including their recipient(s)!<br />
<br />
You set permissions with {\tt chmod}. Permissions recognize three<br />
classes of people: {\tt u} ({\it user}---yourself!), {\tt g} ({\it<br />
group}---that's usually all the users of {\tt ugastro}), and {\tt o}<br />
({\it other}---everybody else, {\it including} somebody in Timbuktu who<br />
happens to crash into our system). Note that {\it group} is essentially<br />
like {\it other}---almost everybody! Each class can have three<br />
permissions: {\tt r} (read permission), {\tt w} (write permission), and<br />
{\tt x} (execute permission). {\tt chmod} allows you to add, take away,<br />
and set exactly permissions for different users with the operators ({\tt<br />
+, -, =}).<br />
<br />
Suppose, for your data subdirectory, you want read permission for<br />
everyone and write permission only for yourself. To grant the read<br />
permissions to {\it group} and {\it other}, get into the directory above<br />
{\tt data} (that's {\tt lab1}) and then type {\tt chmod go+rx data}; to<br />
eliminate the write permissions, {\tt chmod go-w data}. To check your<br />
work, do a long listing of the directory ({\tt ls -l data}). On your<br />
screen, it would write<br />
<br />
\begin{verbatim}<br />
drwxr-xr-x 1 heiles bin 10 2007-01-20 17:58 data/<br />
\end{verbatim}<br />
<br />
\noindent Translation: The first character, {\tt d}, means it's a<br />
directory. The next three specify the permissions for the user (that's<br />
you): {\tt rw} means you have read, write privileges, and the {\tt x} means<br />
you can access the directory. The next set of three characters {\tt<br />
r-x} is for<br />
the group (all your classmates); the final set of three characters {\tt<br />
r-x} means that everybody can read and access the directory contents,<br />
but can't write into it.<br />
<br />
For your love letter directory (called {\tt love}), you'd want {\tt chmod<br />
go-rwx love}<br />
<br />
Permissions apply slightly differently to directories and files: \begin{enumerate} <br />
<br />
\item {\it Directories.} In order to access any file in a<br />
directory---even to obtain a listing of the files with the {\tt ls}<br />
command---the person needs {\it execute} permission. The read and<br />
write permissions are as you'd expect.<br />
<br />
\item {\it Files.} Most files don't need execute permission. By<br />
default, when you create a file, it has read/write permissions for you<br />
and read for the other two classes.<br />
<br />
\end{enumerate}<br />
<br />
\section{OTHER ASPECTS\dots}<br />
<br />
<br />
\subsection{Command-Line Editing in Linux/UNIX, Emacs, and IDL}<br />
<br />
\label{keycommands}<br />
<br />
One of the joys of Linux/UNIX is command-line editing using keystrokes. We have<br />
configured IDL to use the same keystroke commands; Emacs already does so.<br />
The most important command-line editing commands are:<br />
<br />
\begin {tabbing}<br />
{\bf arrow keys} \hspace{0.8in} \= move the cursor as you'd expect. \\<br />
{\bf Ctrl-d} \> deletes the character under the cursor. \\<br />
{\bf Backspace} \> deletes the character behind the cursor. \\<br />
{\bf Ctrl-e} \> moves the cursor to the end of the line. \\<br />
{\bf Ctrl-a} \> moves the cursor to the beginning of the line. \\<br />
{\bf Ctrl-k} \> deletes the the rest of the line.<br />
\end{tabbing}<br />
<br />
\noindent Sometimes, when command-line editing, you inadvertently hit<br />
{\bf Ctrl-s}; this prevents the cursor from responding to your<br />
keystrokes. If you encounter this condition, type {\bf Ctrl-q}, after<br />
which things will work normally again.<br />
<br />
In X windows, you can customize any X window to your desires<br />
(e.g.\ fontsize) by putting the cursor on the window, holding down the<br />
CTRL or SHIFT key and, simultaneously, holding down a mouse button; each one<br />
provides different options. If you are using KDE or Gnome, the details<br />
differ. <br />
<br />
\subsection{Aliases}\label{short}<br />
<br />
Aliases are shortcuts that you can use in place of typing out a<br />
long command over and over again. You can define an alias on the<br />
command line; alternatively, if you want to define it permanently, you<br />
can define it by editing your {\tt .cshrc} or {\tt .aliasfile} file<br />
(which reside in your home directory).<br />
<br />
Here's an example. Suppose that you want to force UNIX to check<br />
whether it will overwrite a file when you use the {\tt mv} command and,<br />
also, to ask you about it. To do this,<br />
you use the {\tt -i} option, and you redefine the command {\tt mv} by<br />
typing<br />
<br />
\begin{verbatim}<br />
alias mv "mv -i"<br />
\end{verbatim}<br />
<br />
\noindent If you type it in a window, it will apply henceforth to that<br />
window alone. <br />
<br />
We have included this definition in your {\tt .aliasfile}, which<br />
resides in your home directory and is automatically invoked whenever<br />
you open a new terminal window---because your {\tt .cshrc} file invokes<br />
your {\tt .aliasfile}. <br />
<br />
You can check the definition of the alias for {\tt mv} by typing<br />
<br />
\begin{verbatim}<br />
which mv<br />
\end{verbatim}<br />
<br />
Finally, you can bypass any defined alias by using a backslash. For<br />
example, {\tt \\rm carl} invokes the {\tt rm} command without the {\tt<br />
-i} option that is defined in your {\tt .aliasfile}, which means\dots it<br />
removes the file {\tt carl} {\it without asking}. Using {\tt rm}, {\tt<br />
cp}, or {\tt mv} without the {\tt -i} option is {\it dangerous}: Once<br />
a file has been overwritten or deleted, it's gone for good!<br />
<br />
\subsection{Piping, etc: $|, >, <$}\label{help}<br />
<br />
Piping ($|$) directs the output of a command to the next succeeding<br />
command. For example,<br />
<br />
\begin{verbatim}<br />
ls | grep /<br />
\end{verbatim}<br />
<br />
\noindent directs the output of the listing command to {\it grep}, which<br />
here selects all names containing the string ``/''; those are<br />
directories, so this gives a list of directories just under the current<br />
directory. <br />
<br />
Normally the result of a UNIX command is written to the terminal<br />
for you to see. However, you can direct the output elsewhere. For<br />
example, <br />
<br />
\begin{verbatim}<br />
more love1<br />
\end{verbatim}<br />
<br />
\noindent prints the file {\tt love1} on your screen, while<br />
<br />
\begin{verbatim}<br />
more love1 > love2<br />
\end{verbatim}<br />
<br />
\noindent creates the file {\tt love2} and writes the content into it.<br />
<br />
Normally the input to a UNIX command is expected to be from the<br />
terminal. However, you can get the input from elsewhere. For example, <br />
<br />
\begin{verbatim}<br />
mail heiles < complaint.txt<br />
\end{verbatim}<br />
<br />
\noindent uses the file {\tt complaint.txt} as input to the command {\tt<br />
mail}, which means that it mails the file {\tt complaint.txt} to<br />
heiles; try it! (Do you think he pays any attention to his mail? Do<br />
you think it will do any good???)<br />
<br />
\subsection{Remote Logging In}\label{remote}<br />
<br />
You can log in from home {\it if} your computer has the secure<br />
login software, called {\tt ssh}. <br />
If you have Linux, type {\tt ssh ugastro.berkeley.edu}<br />
<br />
If you're logging in from home on an (ugh!) Windows machine, you need to<br />
be able to use X windows and a SSH client. A good resource for obtaining and implementing both of these items is [http://courses.cms.caltech.edu/cs11/misc/xwindows.html this] Caltech course page. To enable X11 forwarding (X windows) run the program {\tt exceed} before<br />
logging in. You can get such software from the CD {\it Connecting @<br />
Berkeley}, available for free from the big U.<br />
<br />
\eject<br />
<br />
\section{COMMON COMMANDS}\label{commands}<br />
\vspace{-0.2in}<br />
<br />
\begin{itemize}<br />
<br />
%{\it passwd} \hspace{1.6in} \= Useful for changing your account password.<br />
\item {\bf man commandname} \hspace{0.8in} \= Gets voluminous (usually overly so) info for you on a specific command.<br />
\item {\bf apropos topic} \> Tells which commands are<br />
relevant to the {\bf topic}.<br />
<br />
\item {\bf pwd} \> Shows your ``present working directory''.<br />
\item {\bf cd dirname} \> Moves you into the subdirectory, below your <br />
present directory.<br />
\item {\bf cd ..} \> Moves you out of a subdirectory into the directory above<br />
it.<br />
\item {\bf cd -} \> Moves you to previous directory you were in.<br />
\item {\bf mkdir dirname} \> Creates a subdirectory named {\bf dirname}.<br />
\item {\bf rmdir dirname} \> Removes a subdirectory named {\bf dirname}.<br />
<br />
\item {\bf rm filename} \> Removes a file named {\bf filename}; it must<br />
be empty.<br />
\item {\bf cp file1 file2} \> Copies the contents of {\bf file1} into {\bf file2}. You are left with two files.<br />
\item {\bf mv oldfile newfile} \> Moves (or renames) {\bf oldfile} as {\bf newfile}.<br />
\item {\bf cat file1 file2 $>$ fileboth} \> Concatenates {\bf file1} and {\bf<br />
file2}, writing them into the new {\bf fileboth}.<br />
<br />
\item {\bf which cp} \> Tells the current definition of {\bf cp} ({\bf which}<br />
works for any command);<br />
\item {\bf history} \> Gives a numbered list of the previous commands you've<br />
typed;<br />
\> typing {\bf !number} repeats that command.<br />
\item {\bf !!} \> Repeats the previous UNIX command.<br />
<br />
\item {\bf find dirname -name filename} \> finds all files with {\bf<br />
filename} in and under the directory with {\bf dirname}.<br />
\item {\bf find dirname -name '*love*'} \> Finds all files whose names <br />
contain the string ``love''.<br />
<br />
\item {\bf ls -lrt} \> Lists the files and subdirectories <br />
in the present directory.<br />
\>The {\bf -lrt} gives a long format in reverse time order.<br />
{\bf ls -lrt $|$ grep /} \> Pipes the output to {\bf grep}, which <br />
\> selects only those names containing ``/'' (which are directories).<br />
<br />
\item {\bf grep -il text file} \> Searches the {\bf file} for occurrences of<br />
the string {\bf text}<br />
\> The {\bf -i} ignores capitalization and {\bf l} lists only the filename.<br />
<br />
%\item {\bf lp filename} \> Prints the contents of {\bf filename}.<br />
%\item {\bf enscript filename} \> Fancier print than {\bf lp}.<br />
<br />
\item {\bf less filename} \> Shows you the contents of the file named {\bf filename} one screen at a time;<br />
\> more flexible than {\textit more}.<br />
\item {\bf tail -40 filename} \> Shows you the last 40 lines of the file<br />
{\bf filename}.<br />
<br />
%\item {\bf lpq} \> Displays the print queue.<br />
%\item {\bf cancel jobnum} \> Removes the {\bf jobnum} in the print queue. You must own the job<br />
<br />
\item {\bf du -h dirname} \> Tells the disk space used by everything in dirname.<br />
\>The ``h'' means in ``human units''.<br />
\>Also handy for giving the directory tree structure.<br />
\item {\bf df -k} \> Tells kilobytes used and available on all<br />
disks. (``-h'' works here too!)<br />
\item {\bf top} \> Shows CPU usage, etc, for jobs on your machine.<br />
\item {\bf ps -u username} \> List the programs that {\bf username} is<br />
currently<br />
\> running on the machine you are logged onto.<br />
\item {\bf kill processnum} \> Kills the process listed with<br />
{\bf processnum}. You must own the process<br />
\end{itemize}<br />
<br />
\end{document}<br />
<br />
<br />
</latex></div>AparsonsUndergraduate Radio Lab2022-01-13T17:48:51Z<p>Aparsons: /* General Skills Used Through-Out Course */</p>
<hr />
<div>This course consists of four laboratory experiments that concentrate on radio instrumentation and laboratory techniques. We will build receiving, observing, and data analysis systems for two telescopes: a single-dish 21-cm line system, and a 10.7-GHz interferometer. We will use these telescopes for astronomical observing projects including structure of the Milky Way galaxy, precise position measurement of several radio sources, and measurement of the radio brightness distributions of the sun and moon with high angular resolution. There is a heavy emphasis on digital data acquisition, software development in the Python language, and high-quality written reports.<br />
<br />
=== Class Programmatics ===<br />
* Class Code Repository: [http://github.com/AaronParsons/ugradio http://github.com/AaronParsons/ugradio]<br />
* [https://github.com/AaronParsons/ugradio/raw/master/schedule/syllabus_2022_spring.docx Syllabus]<br />
* [https://berkeley.zoom.us/j/3587609756 Zoom Room: 358 760 9756]<br />
* Bcourses: [https://bcourses.berkeley.edu/courses/1512067 1512067]<br />
* Discord: https://discord.gg/vdmcyZcAbS<br />
* Class Hours:<br />
** Tuesday/Thursday 1:30-3:30pm<br />
* Office Hours:<br />
** Aaron Parsons (aparsons at berkeley): TBD, or by appointment, in standard [https://berkeley.zoom.us/j/3587609756 Zoom Room: 358 760 9756]<br />
** Christian Bye (chbye at berkeley): TBD or by appointment (Through Discord Office Hours Channel)<br />
** Mine Gokcen (minegokcen at berkeley):<br />
** Frank Latora (fjlatora at berkeley):<br />
* Lab Groups:<br />
** Group 1<br />
** Group 2<br />
** Group 3<br />
** Group 4<br />
** Group 5<br />
<br />
=== Experiments ===<br />
* Lab 1: [https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/allmixers.pdf Exploring Digital Sampling, Fourier Transforms, and both DSB and SSB Mixers]<br />
* Lab 2: [https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/bighorn.pdf Astronomy with the 21cm Line; Some Microwave Electronics]<br />
* Lab 3: [https://github.com/AaronParsons/ugradio/blob/master/lab_interf/interf.pdf Radio Interferometry at X Band]<br />
* Lab 4: [https://github.com/AaronParsons/ugradio/blob/master/lab_dish/HI1.pdf Mapping the HI Line: the Galaxy and Supershells]<br />
<br />
===Getting Set Up===<br />
* [[Getting Started in the Undergraduate Radio Lab]]<br />
** [[Setting Up Your Raspberry Pi]]<br />
** [[Connecting to the Lab Computers Remotely]]<br />
<br />
=== General Skills Used Through-Out Course ===<br />
<br />
* Navigating Linux/Unix-like Operating Systems<br />
** [[Unix Primer]]<br />
** [[Unix Text Editors]]<br />
* Programming in Python<br />
** [[Python Installation and Basic Programming]]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting]<br />
* Software Engineering<br />
** [[Revision Control]]<br />
** [[Getting Started w/ Github]]<br />
** [[Unit Testing]]<br />
* Report Writing<br />
** [[LaTeX]]<br />
<br />
== Topics by Date ==<br />
<br />
=== Lab 1 ([https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/allmixers.pdf Exploring Digital Sampling, Fourier Transforms, and both DSB and SSB Mixers]), Due Feb 8, 1:30p ===<br />
==== Lab 1, Week 1 (Jan 18): Sampling and Power Spectra ====<br />
* Resources and Handouts<br />
** [[Nyquist Sampling]]<br />
** [[Fourier Transform]]<br />
** [[Unix Primer]]<br />
** [[Python Installation and Basic Programming]]<br />
** [[Revision Control]]<br />
** [[Getting Started w/ Github]]<br />
** [[Unix Text Editors]]<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/Nyquist%20Sampling%20and%20Aliasing.ipynb Aliasing Demo]<br />
* In class:<br />
** Astrobaki, Syllabus, Office Hours<br />
** Getting accounts (premade by Bill Boyd, change password)<br />
** Lab access (email Mark Hayden)<br />
** Class philosophy and workflow<br />
** [[Nyquist Sampling]] and aliasing<br />
** [[Fourier Transform]] <br />
** Lab Hardware<br />
*** PicoScope 2206a<br />
** Data Challenge<br />
*** [https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/secret_message.npz Secret Message]<br />
** [https://youtu.be/Yb4K8t6SG4k Lecture 1 Zoom Recording]<br />
** [https://youtu.be/oJplegmHeAI Lecture 2 Zoom Recording]<br />
<br />
==== Lab 1, Week 2 (Jan 26): DSB and SSB Mixers ====<br />
* Theory and Background:<br />
** [[Heterodyne Mixers]]<br />
** [[Convolution Theorem]]<br />
** [[Fast Fourier Transform]]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/dft_intro/fourierc.pdf Spectral Analysis with Discrete Fourier Transforms]<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/Convolutions%20and%20Correlations.ipynb Convolutions and Correlations ]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/Sec%204.%20In%20the%20mind.ipynb In the Mind: Introduction to the Fourier Transform ]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/datatype_demo.ipynb Mommy Fortuna's Midnight Carnival of Python Oddities]<br />
** [[Data Representations]], with handout on [https://github.com/AaronParsons/ugradio/blob/master/pythonprimer/datatypes.pdf Data Types and Organizational Structures]<br />
** Data Challenge<br />
*** [https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/mixed_message.npz Secret Message 2]<br />
* In class:<br />
** [https://youtu.be/Ut_jTUoqcd8 Lecture 3: Discrete Fourier Transforms and the Convolution Theorem]<br />
** [https://youtu.be/ZxAWNiisn3Y Lecture 4: Show and Tell]<br />
** Lecture: Introduction to DSB and SSB Mixers<br />
** Show and Tell (10m per group)<br />
<br />
==== Lab 1, Week 3 (Feb 1): More Mixers, and Lab Reports ====<br />
* Theory and Background<br />
** [[LaTeX]]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting], second pass<br />
** [https://github.com/AaronParsons/ugradio/tree/master/latex_template/lab1 LaTex Template] Template you may use for your lab report<br />
*** [https://www.overleaf.com/read/hvrwkmfkvkhg Overleaf version of the lab template]<br />
* In Class:<br />
** Lecture: One more pass on [[Convolution Theorem]], [[Heterodyne Mixers]], and [https://github.com/AaronParsons/ugradio/blob/master/dft_intro/fourierc.pdf DFTs]<br />
** [https://youtu.be/igZPQQ-6ieo Lecture 5]<br />
** [https://youtu.be/53CZj1CCEm0 Lecture 6]<br />
** Show and Tell<br />
** Writing Lab Reports<br />
* Lab 1 Due Feb 8, 1:30p<br />
<br />
---------<br />
<br />
=== Lab 2 ([https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/bighorn.pdf Astronomy with the 21cm Line; Some Microwave Electronics]), due Mar 1, 1:30p ===<br />
==== Lab 2, Week 1 (Feb 8): 21cm Line and Waveguides ====<br />
* Theory and Background:<br />
** [https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/cal_intensity.pdf Calibrating the Intensity and Shape of Spectral Lines]<br />
** [[Specific Intensity]]<br />
** [[21cm Transition]]<br />
** [[Coordinates]]<br />
* Demos and Tutorials<br />
** Python Tutorial Part 3: Functions, Modules, and Objects<br />
** Matrix Math with Numpy<br />
** Doppler Corrections, ugradio.doppler<br />
* In class:<br />
** Introduction to Horn and Receiver<br />
** Time<br />
** Coordinates<br />
** [https://youtu.be/ouSTGedJtI4 Lecture 7]<br />
** [https://youtu.be/htF9zWPzeLQ Lecture 8]<br />
<br />
==== Lab 2, Week 2 (Feb 15): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Impedance]]<br />
** [[Transmission_Lines]]<br />
** [http://ugastro.berkeley.edu/radio/2017/handout_links/RWvD.pdf Fields and Waves in Communication Electronics (Ramo, Whinney, and Van Duzer)]<br />
** [[Central Limit Theorem]] and [[Random Walks]]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/least_squares/lsfit_lite.pdf Least Squares Lite for the Budding Aficionado: Art and Practice]<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab2/Central%20Limit%20Theorem%20and%20Averaging.ipynb Central Limit Theorem and Averaging]<br />
* In Class:<br />
** Show and Tell<br />
** Waveguides, Transmission Lines, and Rope<br />
** Fitting Gaussians and Polynomials, ugradio.gauss<br />
** [https://youtu.be/l6_qxtqGtuY Lecture 9]<br />
** [https://youtu.be/xre1hQiZKCM Lecture 10]<br />
<br />
==== Lab 2, Week 3 (Feb 22): Write Lab Report ====<br />
* Theory and Background<br />
** [https://github.com/AaronParsons/ugradio/blob/master/least_squares/lsfit_2008.pdf Least-Squares and Chi-Square for the Budding Aficionado: Art and Practice]<br />
* In Class:<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab2/chisq_intro.ipynb Chi-Square Jupyter Notebook]<br />
** Show and Tell<br />
** Least Squares Part 2<br />
** [https://youtu.be/M92l0k45Gjw Lecture 11]<br />
* Lab 2 Due Mar 1, 1:30p<br />
<br />
---------<br />
<br />
=== Lab 3 ([https://github.com/AaronParsons/ugradio/blob/master/lab_interf/interf.pdf Radio Interferometry at X Band]), due Apr 5, 1:00p ===<br />
<br />
==== Lab 3 Week 1 (Mar 1): Interferometer ====<br />
* Theory and Background<br />
** [[Coordinates]]<br />
** [[Basic Interferometry]]<br />
* In Class:<br />
** Tour of Rooftop Interferometer<br />
** Exercise Ball Coordinates<br />
** Interferometry with Strings<br />
** [https://youtu.be/NXvDSyCfHMQ Lecture 12]<br />
** [https://youtu.be/5IDLQMO6_8g Lecture 13]<br />
<br />
==== Lab 3 Week 2 (Mar 8): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Measurement Equation]]<br />
** [[Telescope Field of View/Resolution]]<br />
* In Class:<br />
** Show and Tell<br />
** Controlling the Telescope<br />
** Tracking the Sun<br />
** Scheduling Observations<br />
* Lecture Links<br />
** [https://youtu.be/bgDBf9bPSTA Lecture 14]<br />
** [https://youtu.be/xVtmz0TfUJg Lecture 15]<br />
<br />
==== Lab 3 Week 3 (Mar 15): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Basic Interferometry II]]<br />
** [[Least Squares]]<br />
* In Class:<br />
** Show and Tell<br />
** Linear Least-Squares in Python<br />
** Minimizing Chi-Square]<br />
** Noise in Observations<br />
* Lecture Links<br />
** [https://youtu.be/ZhMu_0YFxCo Lecture 16]<br />
** [https://youtu.be/n-FOeZVuHls Lecture 17]<br />
<br />
==== No class (Mar 23, 26) ====<br />
<br />
==== Lab 3 Week 4 (Mar 29): Write Lab Report ====<br />
* Theory and Background<br />
*** [[Correlators]]<br />
*** [[Units of radiation]]<br />
* In Class:<br />
** Show and Tell<br />
** Photon bucket demo<br />
* Lecture Links<br />
** [https://youtu.be/Nl5h3Hi51bQ Lecture 18]<br />
** [https://youtu.be/GVugVn5PdB0 Lecture 19]<br />
* Lab 3 Due Apr 6, 1:30p<br />
<br />
<br />
---------<br />
<br />
=== Lab 4 ([https://github.com/AaronParsons/ugradio/blob/master/lab_dish/HI1.pdf Mapping the HI Line: the Galaxy and Supershells]), due May 3, 1:30p ===<br />
<br />
==== Useful Links ====<br />
[https://teamup.com/ksd715ee7fb766a108/#/ Link to Observing Calendar]<br />
<br />
[http://leuschner.berkeley.edu:8080 Leuschner WebCam]<br />
<br />
==== Lab 4 Week 1 (Apr 5): Leuschner Dish ====<br />
* Theory and Background<br />
** [[Specific Intensity]]<br />
** [[Radio Sky]]<br />
** [[Screen Command]]<br />
* In Class:<br />
** Trip to Leuschner: Class will go later than usual<br />
** drive mechanism (how the dish moves)<br />
** feed (notice probes) and cables<br />
** IF setup (one channel for OH, one for HI)<br />
** interacting with a CASPER [https://github.com/AaronParsons/leuschner-spectrimeter spectrometer]<br />
** pointing control<br />
** spatial sampling with dish<br />
* Lecture Links<br />
** [https://youtu.be/ZeB9Gj3gHgs Lecture 20]<br />
** [https://berkeley.zoom.us/rec/share/yYtJDpzz52pOc5GR42PxBbA_QorFT6a81CAfr6IKyRre8X_2LRtd9NPzNNLXeBCw Lab 4 Lecture 2 (Thursday 4/9/20)]<br />
<br />
==== Lab 4 Week 2 (Apr 12): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[21cm Transition]]<br />
** [[Black-Body Radiation]]<br />
** [[Line Profile Functions]]<br />
* In Class:<br />
** Show and Tell<br />
** spatial sampling with a dish<br />
** interpolation<br />
** projection<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/3pBJILbBxE5JRpWSwkWOe6QYMoHlaaa823IZr_QNyE0M46G1NWz2KSaA40QwupHp Lab 4 Lecture 3 (Tuesday 4/14; access v7*1$5k7)]<br />
** [https://berkeley.zoom.us/rec/share/wsAsELX3yThOTJXExEjjWaI4Mdq7eaa8hicf__AEzEkISCgjfujdIe8CV-yXP8VP Lab 4 Lecture 4 (Thursday 4/16; access G7*##+1O)]<br />
<br />
==== Lab 4 Week 3 (Apr 19): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Emission Line Observing]]<br />
** [[Radiative Transfer Equation]]<br />
** [[Optical Depth]]<br />
** [[Estimating Atomic Transition Strengths]]<br />
* In Class:<br />
** Show and Tell<br />
** close-out plan<br />
** computing doppler width for a line of sight (assuming circular motion)<br />
** calibrating spectra<br />
** converting spectra to hydrogen<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/7Md4Fejz1FJLcqPEslDnAPFmTqGieaa81Cgb-PRczh6T0TBWOxVAZOoPk8cPBvsd Lab 4 Lecture 5 (Tuesday 4/21; access 7f!o&=J9)]<br />
** Lab 4 Lecture 6 (Thursday 4/23): share day; no recording<br />
<br />
==== Lab 4 Week 4 (Apr 26): Write Lab Report ====<br />
* Theory and Background<br />
** [https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/cal_intensity.pdf Calibrating the Intensity and Shape of Spectral Lines (Carl Heiles)] <br />
* In Class:<br />
** Show and Tell<br />
** displaying information in image form<br />
** Lab 4 Due May 3, 1:30p<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/6pVKDIHL7XlIQ5GVtAL4Q4klI7Tvaaa81HBP_vBezRuCI54jJ3AKdenjUZB-gScx Lab 4 Lecture 7 (Tuesday 4/28; access 3h=j11*@ )]<br />
** [https://berkeley.zoom.us/rec/share/teBrde3hr2lOHZ3V9GH4S6MAH5j7aaa8hCZN-PoOxUycBmjJiZYoIuqIb29LQg8W Lab 4 Lecture 8 (Thursday 4/30; access 5V$.3i8$ )]<br />
<br />
<br />
<!-- === Lab 2 (Digital Lab) ===<br />
* Lab 2, Part 1 <br />
** Quiz 4 on:<br />
** Breakout Sessions:<br />
** Discrete Fourier Transform<br />
*** Convolving and Smoothing<br />
*** Aliasing<br />
*** Intro to Lab 2, pick groups<br />
<br />
* Lab 2, Part 2 <br />
** Quiz 5 on:<br />
*** [[Data Representations]]<br />
*** [[Digital Down Conversion]]<br />
** Breakout Sessions:<br />
*** Data Representations demo<br />
*** Mixing, Filtering, Decimation, and the FFT<br />
*** [[Intro to ROACH]]<br />
<br />
* Lab 2, Part 3 <br />
** Quiz 6 on:<br />
*** [[Synchronous and Asynchronous Logic]]<br />
*** [[Processor Architectures]]<br />
*** [[FIR Filters]]<br />
** Breakout Sessions:<br />
*** Acting out various processors<br />
*** Simulating an FIR filter<br />
*** Lab feedback<br />
--><br />
<br />
== Unused but Useful? ==<br />
<br />
* [[Radiometer Equation]]<br />
* [[Quantization and Rounding]]<br />
* [[Reciprocity Theorem]]<br />
* [[Dipole Antennas]]<br />
* [[Impedance of Free Space]]<br />
* [[Radiometer Equation Applied to Telescopes]]<br />
* [[Radiometer Equation Applied to Interferometers]]<br />
* [[Fringe Stopping]]<br />
* [[Direction Dependent Beams]]<br />
* [[Self Calibration]]<br />
* [[Flux Calibration]]<br />
* [[Gridding]]<br />
* [[Earth Rotation Synthesis]]<br />
* [[Delay Imaging]]</div>AparsonsGetting Started in the Undergraduate Radio Lab2022-01-13T17:43:02Z<p>Aparsons: </p>
<hr />
<div>This page summarizes the procedure for getting yourself setup for the [[Undergraduate Radio Lab]].<br />
<br />
Besides the usual course instructions for lecture, etc., there are several things that need to be done at the beginning of the semester.<br />
<br />
* Request access to Campbell 541 using [https://docs.google.com/forms/d/e/1FAIpQLScUdG9xH7s8mrwH1yY6oOyWMYPjUKVGpEXPABxBTamJIwxlsA/viewform this form]. You need keycard access to enter the lab outside of class to do your lab work.<br />
* Request an account on the laboratory network using [https://docs.google.com/forms/d/e/1FAIpQLSeqWMwZrb3o1UdWIK_mP9S6jYBVy9vYtNHh5nmT24Gyr2Ze2w/viewform?usp=sf_link this form]. Once an account has been made for you, follow the instructions at the bottom of this page.<br />
** Optional (required if in pandemic mode): Set up remote (off-campus) logins following the instructions in [[Connecting to the Lab Computers Remotely]].<br />
** Optional: if you have your own Raspberry Pi (or want to get one), follow the instructions at [[Setting Up Your Raspberry Pi]].<br />
* Pick a lab group of 3-5 people who you will work with to collect data. If in pandemic mode, this will be your pod, so pick people with similar dispositions for in-person vs. remote activities.<br />
<br />
====Setting Up Your Environment on the Undergraduate Lab Network====<br />
Follow these steps to set up your shell (default bash) environment on the lab computers (and when you log in):<br />
* Get a bashrc file:<br />
<source lang="bash"><br />
cp /home/global/ay121/ugradio/environment/bashrc ~/.bashrc<br />
source ~/.bashrc<br />
</source><br />
* Test your lab Python environment by executing:<br />
<source lang="bash"><br />
ipython<br />
>>> import ugradio<br />
</source><br />
If this works, you are all set for the next time you log in.</div>AparsonsSetting Up Your Raspberry Pi2022-01-12T23:29:38Z<p>Aparsons: </p>
<hr />
<div>With the growing utility and prevalence of low-cost computing boards, it is becoming increasingly common to embed computing directly into instrumentation.<br />
The Raspberry Pi is an example of a relatively low-cost but very versatile computer capable of running a full-fledged (Linux) operating system and performing a non-trivial amount of computing, while also providing interfaces for low-level communication with electronics.<br />
The Raspberry PI (RPi) is not the only example of such board, and it is not necessarily suited to all embedded computing applications, but it is widely used and quite capable.<br />
<br />
Because of its ubiquity and versatility, we have chosen the RPi as a platform for data acquisition and computing for the [[Undergraduate Radio Lab]].<br />
Having a common computing platform for the class makes it easy for us to introduce you to the Linux operating system (a mainstay of scientific computing), the world of embedded computing, and new developments in software-defined radio (SDR). I strongly encourage you to buy your own for use in this class so that you can take it home with you. These little computers are super versatile and you will find that you can use them for all sorts of things. In my home, I use them for wireless print servers, robot controllers, roku-like TV streamers, video game emulators, and as a straight-up desktop computer for kids doing remote schooling. Think of this purchase as your "textbook" for this class.<br />
<br />
To get started, here is a parts list:<br />
<br />
==Raspberry Pi==<br />
* Raspberry PI 4 version B (2 or 4 GB RAM) (~$45/$55 ea). Alternately, may use RPI 3.<br />
** stock is low because of pandemic supply chain problems. Try https://www.canakit.com/raspberry-pi-4-4gb.html or https://www.sparkfun.com/products/15446.<br />
** if stock is exhausted, back-order and switch to using it whenever it arrives (using the class ones in the meantime)<br />
** the computing board does not come with: monitor, keyboard, mouse, power supply, SD card (its hard drive), or even a case to hold it. Some places sell a "starter kit" that has many of these things, or you can buy them separately (under accessories below).<br />
<br />
====RPi Accessories====<br />
* plastic case ($6 ea; e.g. https://www.adafruit.com/product/4301)<br />
** note that RPi1-3 cases are not compatible with RPi4<br />
* 15W USB-C charger w/ cable (~$15 ea; e.g. https://www.adafruit.com/product/4298)<br />
** not all USB-C chargers source the same power. Any USB-C charger will work, provided it supplies >= 15 W.<br />
** RPi1-3 use micro-USB (not USB-C). a cheap USB-C to micro-USB adapter (e.g. https://www.amazon.com/Adapter-Convert-Connector-Support-Compatible/dp/B07GH5KJH2) will do the trick.<br />
* micro-HDMI to HDMI cable (~$10 ea; e.g. https://www.adafruit.com/product/1322)<br />
** necessary for RPi4 (RPi1-3 use HDMI)<br />
** we will have these in class, but if you want to plug into a monitor (or TV) at home, you'll need this<br />
* aluminum 15x15x15 mm heatsink ($2 ea; e.g. https://www.adafruit.com/product/3082)<br />
** keeps your RPI from overheating on processing-intensive applications. Particularly necessary for RPI 3.<br />
* bluetooth keyboard/mouse (~$20 ea; e.g. https://www.amazon.com/Rii-Ultra-slim-Wireless-Multimedia-Raspberry/dp/B07BF3LFN3)<br />
** only buy this if you don't have another one lying around you could use<br />
* Samsung EVO plus 32 GB (95 MB/s read, 20 MB/s write) micro SD Card (~$10 ea)<br />
** suggest only buying this brand (others seem more prone to corruption, or are slow).<br />
** blank is fine, we'll copy over our class "image" to it for you.<br />
** it's often handy to have more than one of these on hand; consider buying a couple<br />
<br />
==Software-Defined Radio (SDR) Receiver==<br />
To digitize radio-frequency (RF) signals and get them on an RPi, you need SDR receiver (we will stock these in class, but if you want one for home, or if you are working remotely, consider buying). These are only necessary for "radio" applications. They come with some cheap antennas you can use to listen to, e.g., FM radio on your RPI. Cheap SDRs have become available because they are used for tuning in to broadcast TV and FM radio.<br />
* (option 1, preferred) Nooelec NESDR SMARTee v4 (~$35 ea; e.g. https://www.nooelec.com/store/sdr/sdr-receivers/smart/nesdr-smart-sdr.html)<br />
** more rugged/isolated version with the same chipset as the rest below. Has an SMA connector that is easier to interface to stuff in the class<br />
* (option 2) Nooelec NESDR Mini R820T SDR & DVB-T (~$25 ea; e.g. https://www.nooelec.com/store/sdr/sdr-receivers/nesdr-mini.html)<br />
** same chipset as above, but less rugged. has a mcx connector that requires a male mcx to male sma pigtail connector ($10, https://www.nooelec.com/store/male-mcx-to-male-sma-pigtail-rg316-0-5-length.html) to connect to other stuff in class, but we will buy some of these to have on hand.<br />
<br />
==Setup==<br />
The SD card you ordered functions as your RPi's hard drive. You will need to install it with an operating system, along with any software you will need. The easy way to do this is to clone an existing installation from another card. If you come to class, we will do this for you. Otherwise, follow the instructions below.<br />
<br />
===Setup from Scratch===<br />
Raspberry Pi's benefit from being a standard set of hardware. As such, they have a customized version of Linux (a free, open-source version of Unix) that runs on them an includes drivers for all their hardware. That customized Linux version is called Raspbian (being a branch of Debian Linux for a Raspberry Pi). Other operating systems exist, but we will only support Raspbian in class.<br />
<br />
* Set up SD Card<br />
** This has to be done on an already working computer with an SD Card reader. Instructions are [https://elinux.org/RPi_Easy_SD_Card_Setup here]. Below is a summary outline for Linux.<br />
** On an existing linux installation, you can use <tt>gparted</tt><br />
*** plug in SD card<br />
*** use <tt>dmesg</tt> to find the <tt>/dev/</tt> path to the device (<tt>/dev/mmcblk0</tt> in this tutorial). Do *not* use any <tt>pN</tt> extensions to this name (e.g. <tt>mmcblk0p1</tt>).<br />
*** format SD Card as FAT32<br />
*** <tt>unmount /dev/mmcblk0</tt><br />
*** download a basic Raspbian install from https://www.raspberrypi.com/software/operating-systems<br />
**** current (Jan. 2022) version is https://downloads.raspberrypi.org/raspios_full_armhf/images/raspios_full_armhf-2021-11-08/2021-10-30-raspios-bullseye-armhf-full.zip<br />
*** <tt>sudo dd bs=1M if=2021-10-30-raspios-bullseye-armhf-full.img of=/dev/mmcblk0<br />
**** (can check progress with <tt>sudo iotop -o </tt>, takes about 5 min)<br />
<br />
* Initial boot<br />
** get wireless up (click Desktop icon in top-right)<br />
** open up a terminal and run the following commands<br />
*** <tt>sudo apt update</tt><br />
*** <tt>sudo apt upgrade</tt><br />
** open Raspberry Pi Configuration (menu)<br />
*** change hostname to, e.g., radiopi<br />
*** Interfaces: ssh=enabled, vnc=enabled, remote gpio=enabled<br />
*** Localisation: Keyboard US layout<br />
** reboot<br />
** change passwd<br />
<br />
* Software Install<br />
** <tt>sudo apt install python3-ipython jupyter vim texlive</tt><br />
** Copy over VIM config (if you use vim)<br />
** <tt>scp .vimrc pi@radiopi:</tt><br />
** Fix missing ipython command<br />
*** <tt>vi .pydisutils.cfg</tt> and add these lines:<br />
**** <tt>[install]<br />
**** <tt>install-scripts=/usr/local/bin</tt><br />
*** <tt>sudo pip3 install --force ipython</tt><br />
*** <tt>sudo pip3 install astropy</tt><br />
<br />
===SDR Setup===<br />
See https://wiki.gentoo.org/wiki/Rtl-sdr<br />
* Plug SDR module in<br />
* Force detect as sdr, not dvb<br />
** <tt>sudo vi /etc/modprobe.d/blacklist-dvb.conf</tt> add the following line:<br />
*** <tt>blacklist dvb_usb_rtl28xxu</tt><br />
** <tt>sudo apt install rtl-sdr gqrx-sdr</tt><br />
** <tt>sudo vi /etc/udev/rules.d/20-rtlsdr.rules</tt> add the following line:<br />
*** <tt>SUBSYSTEM==”usb”, ATTRS{idVentor}==”0bda”, ATTRS{idProduct}==”2838”, GROUP=”pi”, MODE=”0666”, SYMLINK+=”rtl_sdr”</tt><br />
<br />
===Class Software===<br />
* install <tt>ugradio</tt><br />
** <tt>git clone https://github.com/AaronParsons/ugradio.git</tt><br />
** <tt>cd ugradio/ugradio_code</tt><br />
** <tt>sudo pip3 install .</tt></div>AparsonsSetting Up Your Raspberry Pi2022-01-12T23:26:50Z<p>Aparsons: </p>
<hr />
<div>With the growing utility and prevalence of low-cost computing boards, it is becoming increasingly common to embed computing directly into instrumentation.<br />
The Raspberry Pi is an example of a relatively low-cost but very versatile computer capable of running a full-fledged (Linux) operating system and performing a non-trivial amount of computing, while also providing interfaces for low-level communication with electronics.<br />
The Raspberry PI (RPi) is not the only example of such board, and it is not necessarily suited to all embedded computing applications, but it is widely used and quite capable.<br />
<br />
Because of its ubiquity and versatility, we have chosen the RPi as a platform for data acquisition and computing for the [[Undergraduate Radio Lab]].<br />
Having a common computing platform for the class makes it easy for us to introduce you to the Linux operating system (a mainstay of scientific computing), the world of embedded computing, and new developments in software-defined radio (SDR). I strongly encourage you to buy your own for use in this class so that you can take it home with you. These little computers are super versatile and you will find that you can use them for all sorts of things. In my home, I use them for wireless print servers, robot controllers, roku-like TV streamers, video game emulators, and as a straight-up desktop computer for kids doing remote schooling. Think of this purchase as your "textbook" for this class.<br />
<br />
To get started, here is a parts list:<br />
<br />
==Raspberry Pi==<br />
* Raspberry PI 4 version B (2 or 4 GB RAM) (~$45/$55 ea). Alternately, may use RPI 3.<br />
** stock is low because of pandemic supply chain problems. Try https://www.canakit.com/raspberry-pi-4-4gb.html or https://www.sparkfun.com/products/15446.<br />
** if stock is exhausted, back-order and switch to using it whenever it arrives (using the class ones in the meantime)<br />
** the computing board does not come with: monitor, keyboard, mouse, power supply, SD card (its hard drive), or even a case to hold it. Some places sell a "starter kit" that has many of these things, or you can buy them separately (under accessories below).<br />
<br />
====RPi Accessories====<br />
* plastic case ($6 ea; e.g. https://www.adafruit.com/product/4301)<br />
** note that RPi1-3 cases are not compatible with RPi4<br />
* 15W USB-C charger w/ cable (~$15 ea; e.g. https://www.adafruit.com/product/4298)<br />
** not all USB-C chargers source the same power. Any USB-C charger will work, provided it supplies >= 15 W.<br />
** RPi1-3 use micro-USB (not USB-C). a cheap USB-C to micro-USB adapter (e.g. https://www.amazon.com/Adapter-Convert-Connector-Support-Compatible/dp/B07GH5KJH2) will do the trick.<br />
* micro-HDMI to HDMI cable (~$10 ea; e.g. https://www.adafruit.com/product/1322)<br />
** necessary for RPi4 (RPi1-3 use HDMI)<br />
** we will have these in class, but if you want to plug into a monitor (or TV) at home, you'll need this<br />
* aluminum 15x15x15 mm heatsink ($2 ea; e.g. https://www.adafruit.com/product/3082)<br />
** keeps your RPI from overheating on processing-intensive applications. Particularly necessary for RPI 3.<br />
* bluetooth keyboard/mouse (~$20 ea; e.g. https://www.amazon.com/Rii-Ultra-slim-Wireless-Multimedia-Raspberry/dp/B07BF3LFN3)<br />
** only buy this if you don't have another one lying around you could use<br />
* Samsung EVO plus 32 GB (95 MB/s read, 20 MB/s write) micro SD Card (~$10 ea)<br />
** suggest only buying this brand (others seem more prone to corruption, or are slow).<br />
** blank is fine, we'll copy over our class "image" to it for you.<br />
** it's often handy to have more than one of these on hand; consider buying a couple<br />
<br />
==Software-Defined Radio (SDR) Receiver==<br />
To digitize radio-frequency (RF) signals and get them on an RPi, you need SDR receiver (we will stock these in class, but if you want one for home, or if you are working remotely, consider buying). These are only necessary for "radio" applications. They come with some cheap antennas you can use to listen to, e.g., FM radio on your RPI. Cheap SDRs have become available because they are used for tuning in to broadcast TV and FM radio.<br />
* (option 1, preferred) Nooelec NESDR SMARTee v4 (~$35 ea; e.g. https://www.nooelec.com/store/sdr/sdr-receivers/smart/nesdr-smart-sdr.html)<br />
** more rugged/isolated version with the same chipset as the rest below. Has an SMA connector that is easier to interface to stuff in the class<br />
* (option 2) Nooelec NESDR Mini R820T SDR & DVB-T (~$25 ea; e.g. https://www.nooelec.com/store/sdr/sdr-receivers/nesdr-mini.html)<br />
** same chipset as above, but less rugged. has a mcx connector that requires a male mcx to male sma pigtail connector ($10, https://www.nooelec.com/store/male-mcx-to-male-sma-pigtail-rg316-0-5-length.html) to connect to other stuff in class, but we will buy some of these to have on hand.<br />
<br />
==Setup==<br />
The SD card you ordered functions as your RPi's hard drive. You will need to install it with an operating system, along with any software you will need. The easy way to do this is to clone an existing installation from another card. If you come to class, we will do this for you. Otherwise, follow the instructions below.<br />
<br />
====Setup from Scratch====<br />
Raspberry Pi's benefit from being a standard set of hardware. As such, they have a customized version of Linux (a free, open-source version of Unix) that runs on them an includes drivers for all their hardware. That customized Linux version is called Raspbian (being a branch of Debian Linux for a Raspberry Pi). Other operating systems exist, but we will only support Raspbian in class.<br />
<br />
* Set up SD Card<br />
** This has to be done on an already working computer with an SD Card reader. Instructions are [https://elinux.org/RPi_Easy_SD_Card_Setup here]. Below is a summary outline for Linux.<br />
** On an existing linux installation, you can use <tt>gparted</tt><br />
*** plug in SD card<br />
*** use <tt>dmesg</tt> to find the <tt>/dev/</tt> path to the device (<tt>/dev/mmcblk0</tt> in this tutorial). Do *not* use any <tt>pN</tt> extensions to this name (e.g. <tt>mmcblk0p1</tt>).<br />
*** format SD Card as FAT32<br />
*** <tt>unmount /dev/mmcblk0</tt><br />
*** download a basic Raspbian install from https://www.raspberrypi.com/software/operating-systems<br />
**** current (Jan. 2022) version is https://downloads.raspberrypi.org/raspios_full_armhf/images/raspios_full_armhf-2021-11-08/2021-10-30-raspios-bullseye-armhf-full.zip<br />
*** <tt>sudo dd bs=1M if=2021-10-30-raspios-bullseye-armhf-full.img of=/dev/mmcblk0<br />
**** (can check progress with <tt>sudo iotop -o </tt>, takes about 5 min)<br />
<br />
* Initial boot<br />
** get wireless up (click Desktop icon in top-right)<br />
** open up a terminal and run the following commands<br />
*** <tt>sudo apt update</tt><br />
*** <tt>sudo apt upgrade</tt><br />
** open Raspberry Pi Configuration (menu)<br />
*** change hostname to, e.g., radiopi<br />
*** Interfaces: ssh=enabled, vnc=enabled, remote gpio=enabled<br />
*** Localisation: Keyboard US layout<br />
** reboot<br />
** change passwd<br />
<br />
* Software Install<br />
** <tt>sudo apt install python3-ipython jupyter vim texlive</tt><br />
** Copy over VIM config (if you use vim)<br />
** <tt>scp .vimrc pi@radiopi:</tt><br />
** Fix missing ipython command<br />
*** <tt>vi .pydisutils.cfg</tt> and add these lines:<br />
**** <tt>[install]<br />
**** <tt>install-scripts=/usr/local/bin</tt><br />
*** <tt>sudo pip3 install --force ipython</tt><br />
*** <tt>sudo pip3 install astropy</tt><br />
<br />
==SDR Setup==<br />
See https://wiki.gentoo.org/wiki/Rtl-sdr<br />
* Plug SDR module in<br />
* Force detect as sdr, not dvb<br />
** <tt>sudo vi /etc/modprobe.d/blacklist-dvb.conf</tt> add the following line:<br />
*** <tt>blacklist dvb_usb_rtl28xxu</tt><br />
** <tt>sudo apt install rtl-sdr gqrx-sdr</tt><br />
** <tt>sudo vi /etc/udev/rules.d/20-rtlsdr.rules</tt> add the following line:<br />
*** <tt>SUBSYSTEM==”usb”, ATTRS{idVentor}==”0bda”, ATTRS{idProduct}==”2838”, GROUP=”pi”, MODE=”0666”, SYMLINK+=”rtl_sdr”</tt><br />
<br />
==Class Software==<br />
* install <tt>ugradio</tt><br />
** <tt>git clone https://github.com/AaronParsons/ugradio.git</tt><br />
** <tt>cd ugradio/ugradio_code</tt><br />
** <tt>sudo pip3 install .</tt></div>AparsonsSetting Up Your Raspberry Pi2022-01-12T22:54:18Z<p>Aparsons: Created page with "With the growing utility and prevalence of low-cost computing boards, it is becoming increasingly common to embed computing directly into instrumentation. The Raspberry Pi is..."</p>
<hr />
<div>With the growing utility and prevalence of low-cost computing boards, it is becoming increasingly common to embed computing directly into instrumentation.<br />
The Raspberry Pi is an example of a relatively low-cost but very versatile computer capable of running a full-fledged (Linux) operating system and performing a non-trivial amount of computing, while also providing interfaces for low-level communication with electronics.<br />
The Raspberry PI (RPi) is not the only example of such board, and it is not necessarily suited to all embedded computing applications, but it is widely used and quite capable.<br />
<br />
Because of its ubiquity and versatility, we have chosen the RPi as a platform for data acquisition and computing for the [[Undergraduate Radio Lab]].<br />
Having a common computing platform for the class makes it easy for us to introduce you to the Linux operating system (a mainstay of scientific computing), the world of embedded computing, and new developments in software-defined radio (SDR). I strongly encourage you to buy your own for use in this class so that you can take it home with you. These little computers are super versatile and you will find that you can use them for all sorts of things. In my home, I use them for wireless print servers, robot controllers, roku-like TV streamers, video game emulators, and as a straight-up desktop computer for kids doing remote schooling. Think of this purchase as your "textbook" for this class.<br />
<br />
To get started, here is a parts list:<br />
<br />
==Raspberry Pi==<br />
* Raspberry PI 4 version B (2 or 4 GB RAM) (~$45/$55 ea). Alternately, may use RPI 3.<br />
** stock is low because of pandemic supply chain problems. Try https://www.canakit.com/raspberry-pi-4-4gb.html or https://www.sparkfun.com/products/15446.<br />
** if stock is exhausted, back-order and switch to using it whenever it arrives (using the class ones in the meantime)<br />
** the computing board does not come with: monitor, keyboard, mouse, power supply, SD card (its hard drive), or even a case to hold it. Some places sell a "starter kit" that has many of these things, or you can buy them separately (under accessories below).<br />
<br />
====RPi Accessories====<br />
* plastic case ($6 ea; e.g. https://www.adafruit.com/product/4301)<br />
* 15W USB-C charger w/ cable (~$15 ea; e.g. https://www.adafruit.com/product/4298)<br />
* micro HDMI to HDMI cable (~$10 ea; e.g. https://www.adafruit.com/product/1322)<br />
** we will have these in class, but if you want to plug into a monitor (or TV) at home, you'll need this<br />
* aluminum 15x15x15 mm heatsink ($2 ea; e.g. https://www.adafruit.com/product/3082)<br />
** keeps your RPI from overheating on processing-intensive applications. Particularly necessary for RPI 3.<br />
* bluetooth keyboard/mouse (~$20 ea; e.g. https://www.amazon.com/Rii-Ultra-slim-Wireless-Multimedia-Raspberry/dp/B07BF3LFN3)<br />
** only buy this if you don't have another one lying around you could use<br />
* Samsung EVO plus 32 GB (95 MB/s read, 20 MB/s write) micro SD Card (~$10 ea)<br />
** suggest only buying this brand (others seem more prone to corruption, or are slow).<br />
** blank is fine, we'll copy over our class "image" to it for you.<br />
** it's often handy to have more than one of these on hand; consider buying a couple<br />
<br />
==Software-Defined Radio (SDR) Receiver==<br />
To digitize radio-frequency (RF) signals and get them on an RPi, you need SDR receiver (we will stock these in class, but if you want one for home, or if you are working remotely, consider buying). These are only necessary for "radio" applications. They come with some cheap antennas you can use to listen to, e.g., FM radio on your RPI. Cheap SDRs have become available because they are used for tuning in to broadcast TV and FM radio.<br />
* (option 1, preferred) Nooelec NESDR SMARTee v4 (~$35 ea; e.g. https://www.nooelec.com/store/sdr/sdr-receivers/smart/nesdr-smart-sdr.html)<br />
** more rugged/isolated version with the same chipset as the rest below. Has an SMA connector that is easier to interface to stuff in the class<br />
* (option 2) Nooelec NESDR Mini R820T SDR & DVB-T (~$25 ea; e.g. https://www.nooelec.com/store/sdr/sdr-receivers/nesdr-mini.html)<br />
** same chipset as above, but less rugged. has a mcx connector that requires a male mcx to male sma pigtail connector ($10, https://www.nooelec.com/store/male-mcx-to-male-sma-pigtail-rg316-0-5-length.html) to connect to other stuff in class, but we will buy some of these to have on hand.</div>AparsonsUndergraduate Radio Lab2022-01-12T22:03:02Z<p>Aparsons: </p>
<hr />
<div>This course consists of four laboratory experiments that concentrate on radio instrumentation and laboratory techniques. We will build receiving, observing, and data analysis systems for two telescopes: a single-dish 21-cm line system, and a 10.7-GHz interferometer. We will use these telescopes for astronomical observing projects including structure of the Milky Way galaxy, precise position measurement of several radio sources, and measurement of the radio brightness distributions of the sun and moon with high angular resolution. There is a heavy emphasis on digital data acquisition, software development in the Python language, and high-quality written reports.<br />
<br />
=== Class Programmatics ===<br />
* Class Code Repository: [http://github.com/AaronParsons/ugradio http://github.com/AaronParsons/ugradio]<br />
* [https://github.com/AaronParsons/ugradio/raw/master/schedule/syllabus_2022_spring.docx Syllabus]<br />
* [https://berkeley.zoom.us/j/3587609756 Zoom Room: 358 760 9756]<br />
* Bcourses: [https://bcourses.berkeley.edu/courses/1512067 1512067]<br />
* Discord: https://discord.gg/vdmcyZcAbS<br />
* Class Hours:<br />
** Tuesday/Thursday 1:30-3:30pm<br />
* Office Hours:<br />
** Aaron Parsons (aparsons at berkeley): TBD, or by appointment, in standard [https://berkeley.zoom.us/j/3587609756 Zoom Room: 358 760 9756]<br />
** Christian Bye (chbye at berkeley): TBD or by appointment (Through Discord Office Hours Channel)<br />
** Mine Gokcen (minegokcen at berkeley):<br />
** Frank Latora (fjlatora at berkeley):<br />
* Lab Groups:<br />
** Group 1<br />
** Group 2<br />
** Group 3<br />
** Group 4<br />
** Group 5<br />
<br />
=== Experiments ===<br />
* Lab 1: [https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/allmixers.pdf Exploring Digital Sampling, Fourier Transforms, and both DSB and SSB Mixers]<br />
* Lab 2: [https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/bighorn.pdf Astronomy with the 21cm Line; Some Microwave Electronics]<br />
* Lab 3: [https://github.com/AaronParsons/ugradio/blob/master/lab_interf/interf.pdf Radio Interferometry at X Band]<br />
* Lab 4: [https://github.com/AaronParsons/ugradio/blob/master/lab_dish/HI1.pdf Mapping the HI Line: the Galaxy and Supershells]<br />
<br />
=== General Skills Used Through-Out Course ===<br />
<br />
* [[Getting Started in the Undergraduate Radio Lab]]<br />
* [[Setting Up Your Raspberry Pi]]<br />
* [[Python Installation and Basic Programming]]<br />
* [[Connecting to the Lab Computers Remotely]]<br />
* [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting]<br />
* [[Unix Primer]]<br />
* [[Unix Text Editors]]<br />
* [[LaTeX]]<br />
* [[Revision Control]]<br />
* [[Getting Started w/ Github]]<br />
* [[Unit Testing]]<br />
<br />
== Topics by Date ==<br />
<br />
=== Lab 1 ([https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/allmixers.pdf Exploring Digital Sampling, Fourier Transforms, and both DSB and SSB Mixers]), Due Feb 8, 1:30p ===<br />
==== Lab 1, Week 1 (Jan 18): Sampling and Power Spectra ====<br />
* Resources and Handouts<br />
** [[Nyquist Sampling]]<br />
** [[Fourier Transform]]<br />
** [[Unix Primer]]<br />
** [[Python Installation and Basic Programming]]<br />
** [[Revision Control]]<br />
** [[Getting Started w/ Github]]<br />
** [[Unix Text Editors]]<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/Nyquist%20Sampling%20and%20Aliasing.ipynb Aliasing Demo]<br />
* In class:<br />
** Astrobaki, Syllabus, Office Hours<br />
** Getting accounts (premade by Bill Boyd, change password)<br />
** Lab access (email Mark Hayden)<br />
** Class philosophy and workflow<br />
** [[Nyquist Sampling]] and aliasing<br />
** [[Fourier Transform]] <br />
** Lab Hardware<br />
*** PicoScope 2206a<br />
** Data Challenge<br />
*** [https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/secret_message.npz Secret Message]<br />
** [https://youtu.be/Yb4K8t6SG4k Lecture 1 Zoom Recording]<br />
** [https://youtu.be/oJplegmHeAI Lecture 2 Zoom Recording]<br />
<br />
==== Lab 1, Week 2 (Jan 26): DSB and SSB Mixers ====<br />
* Theory and Background:<br />
** [[Heterodyne Mixers]]<br />
** [[Convolution Theorem]]<br />
** [[Fast Fourier Transform]]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/dft_intro/fourierc.pdf Spectral Analysis with Discrete Fourier Transforms]<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/Convolutions%20and%20Correlations.ipynb Convolutions and Correlations ]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/Sec%204.%20In%20the%20mind.ipynb In the Mind: Introduction to the Fourier Transform ]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/datatype_demo.ipynb Mommy Fortuna's Midnight Carnival of Python Oddities]<br />
** [[Data Representations]], with handout on [https://github.com/AaronParsons/ugradio/blob/master/pythonprimer/datatypes.pdf Data Types and Organizational Structures]<br />
** Data Challenge<br />
*** [https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/mixed_message.npz Secret Message 2]<br />
* In class:<br />
** [https://youtu.be/Ut_jTUoqcd8 Lecture 3: Discrete Fourier Transforms and the Convolution Theorem]<br />
** [https://youtu.be/ZxAWNiisn3Y Lecture 4: Show and Tell]<br />
** Lecture: Introduction to DSB and SSB Mixers<br />
** Show and Tell (10m per group)<br />
<br />
==== Lab 1, Week 3 (Feb 1): More Mixers, and Lab Reports ====<br />
* Theory and Background<br />
** [[LaTeX]]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting], second pass<br />
** [https://github.com/AaronParsons/ugradio/tree/master/latex_template/lab1 LaTex Template] Template you may use for your lab report<br />
*** [https://www.overleaf.com/read/hvrwkmfkvkhg Overleaf version of the lab template]<br />
* In Class:<br />
** Lecture: One more pass on [[Convolution Theorem]], [[Heterodyne Mixers]], and [https://github.com/AaronParsons/ugradio/blob/master/dft_intro/fourierc.pdf DFTs]<br />
** [https://youtu.be/igZPQQ-6ieo Lecture 5]<br />
** [https://youtu.be/53CZj1CCEm0 Lecture 6]<br />
** Show and Tell<br />
** Writing Lab Reports<br />
* Lab 1 Due Feb 8, 1:30p<br />
<br />
---------<br />
<br />
=== Lab 2 ([https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/bighorn.pdf Astronomy with the 21cm Line; Some Microwave Electronics]), due Mar 1, 1:30p ===<br />
==== Lab 2, Week 1 (Feb 8): 21cm Line and Waveguides ====<br />
* Theory and Background:<br />
** [https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/cal_intensity.pdf Calibrating the Intensity and Shape of Spectral Lines]<br />
** [[Specific Intensity]]<br />
** [[21cm Transition]]<br />
** [[Coordinates]]<br />
* Demos and Tutorials<br />
** Python Tutorial Part 3: Functions, Modules, and Objects<br />
** Matrix Math with Numpy<br />
** Doppler Corrections, ugradio.doppler<br />
* In class:<br />
** Introduction to Horn and Receiver<br />
** Time<br />
** Coordinates<br />
** [https://youtu.be/ouSTGedJtI4 Lecture 7]<br />
** [https://youtu.be/htF9zWPzeLQ Lecture 8]<br />
<br />
==== Lab 2, Week 2 (Feb 15): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Impedance]]<br />
** [[Transmission_Lines]]<br />
** [http://ugastro.berkeley.edu/radio/2017/handout_links/RWvD.pdf Fields and Waves in Communication Electronics (Ramo, Whinney, and Van Duzer)]<br />
** [[Central Limit Theorem]] and [[Random Walks]]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/least_squares/lsfit_lite.pdf Least Squares Lite for the Budding Aficionado: Art and Practice]<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab2/Central%20Limit%20Theorem%20and%20Averaging.ipynb Central Limit Theorem and Averaging]<br />
* In Class:<br />
** Show and Tell<br />
** Waveguides, Transmission Lines, and Rope<br />
** Fitting Gaussians and Polynomials, ugradio.gauss<br />
** [https://youtu.be/l6_qxtqGtuY Lecture 9]<br />
** [https://youtu.be/xre1hQiZKCM Lecture 10]<br />
<br />
==== Lab 2, Week 3 (Feb 22): Write Lab Report ====<br />
* Theory and Background<br />
** [https://github.com/AaronParsons/ugradio/blob/master/least_squares/lsfit_2008.pdf Least-Squares and Chi-Square for the Budding Aficionado: Art and Practice]<br />
* In Class:<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab2/chisq_intro.ipynb Chi-Square Jupyter Notebook]<br />
** Show and Tell<br />
** Least Squares Part 2<br />
** [https://youtu.be/M92l0k45Gjw Lecture 11]<br />
* Lab 2 Due Mar 1, 1:30p<br />
<br />
---------<br />
<br />
=== Lab 3 ([https://github.com/AaronParsons/ugradio/blob/master/lab_interf/interf.pdf Radio Interferometry at X Band]), due Apr 5, 1:00p ===<br />
<br />
==== Lab 3 Week 1 (Mar 1): Interferometer ====<br />
* Theory and Background<br />
** [[Coordinates]]<br />
** [[Basic Interferometry]]<br />
* In Class:<br />
** Tour of Rooftop Interferometer<br />
** Exercise Ball Coordinates<br />
** Interferometry with Strings<br />
** [https://youtu.be/NXvDSyCfHMQ Lecture 12]<br />
** [https://youtu.be/5IDLQMO6_8g Lecture 13]<br />
<br />
==== Lab 3 Week 2 (Mar 8): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Measurement Equation]]<br />
** [[Telescope Field of View/Resolution]]<br />
* In Class:<br />
** Show and Tell<br />
** Controlling the Telescope<br />
** Tracking the Sun<br />
** Scheduling Observations<br />
* Lecture Links<br />
** [https://youtu.be/bgDBf9bPSTA Lecture 14]<br />
** [https://youtu.be/xVtmz0TfUJg Lecture 15]<br />
<br />
==== Lab 3 Week 3 (Mar 15): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Basic Interferometry II]]<br />
** [[Least Squares]]<br />
* In Class:<br />
** Show and Tell<br />
** Linear Least-Squares in Python<br />
** Minimizing Chi-Square]<br />
** Noise in Observations<br />
* Lecture Links<br />
** [https://youtu.be/ZhMu_0YFxCo Lecture 16]<br />
** [https://youtu.be/n-FOeZVuHls Lecture 17]<br />
<br />
==== No class (Mar 23, 26) ====<br />
<br />
==== Lab 3 Week 4 (Mar 29): Write Lab Report ====<br />
* Theory and Background<br />
*** [[Correlators]]<br />
*** [[Units of radiation]]<br />
* In Class:<br />
** Show and Tell<br />
** Photon bucket demo<br />
* Lecture Links<br />
** [https://youtu.be/Nl5h3Hi51bQ Lecture 18]<br />
** [https://youtu.be/GVugVn5PdB0 Lecture 19]<br />
* Lab 3 Due Apr 6, 1:30p<br />
<br />
<br />
---------<br />
<br />
=== Lab 4 ([https://github.com/AaronParsons/ugradio/blob/master/lab_dish/HI1.pdf Mapping the HI Line: the Galaxy and Supershells]), due May 3, 1:30p ===<br />
<br />
==== Useful Links ====<br />
[https://teamup.com/ksd715ee7fb766a108/#/ Link to Observing Calendar]<br />
<br />
[http://leuschner.berkeley.edu:8080 Leuschner WebCam]<br />
<br />
==== Lab 4 Week 1 (Apr 5): Leuschner Dish ====<br />
* Theory and Background<br />
** [[Specific Intensity]]<br />
** [[Radio Sky]]<br />
** [[Screen Command]]<br />
* In Class:<br />
** Trip to Leuschner: Class will go later than usual<br />
** drive mechanism (how the dish moves)<br />
** feed (notice probes) and cables<br />
** IF setup (one channel for OH, one for HI)<br />
** interacting with a CASPER [https://github.com/AaronParsons/leuschner-spectrimeter spectrometer]<br />
** pointing control<br />
** spatial sampling with dish<br />
* Lecture Links<br />
** [https://youtu.be/ZeB9Gj3gHgs Lecture 20]<br />
** [https://berkeley.zoom.us/rec/share/yYtJDpzz52pOc5GR42PxBbA_QorFT6a81CAfr6IKyRre8X_2LRtd9NPzNNLXeBCw Lab 4 Lecture 2 (Thursday 4/9/20)]<br />
<br />
==== Lab 4 Week 2 (Apr 12): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[21cm Transition]]<br />
** [[Black-Body Radiation]]<br />
** [[Line Profile Functions]]<br />
* In Class:<br />
** Show and Tell<br />
** spatial sampling with a dish<br />
** interpolation<br />
** projection<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/3pBJILbBxE5JRpWSwkWOe6QYMoHlaaa823IZr_QNyE0M46G1NWz2KSaA40QwupHp Lab 4 Lecture 3 (Tuesday 4/14; access v7*1$5k7)]<br />
** [https://berkeley.zoom.us/rec/share/wsAsELX3yThOTJXExEjjWaI4Mdq7eaa8hicf__AEzEkISCgjfujdIe8CV-yXP8VP Lab 4 Lecture 4 (Thursday 4/16; access G7*##+1O)]<br />
<br />
==== Lab 4 Week 3 (Apr 19): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Emission Line Observing]]<br />
** [[Radiative Transfer Equation]]<br />
** [[Optical Depth]]<br />
** [[Estimating Atomic Transition Strengths]]<br />
* In Class:<br />
** Show and Tell<br />
** close-out plan<br />
** computing doppler width for a line of sight (assuming circular motion)<br />
** calibrating spectra<br />
** converting spectra to hydrogen<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/7Md4Fejz1FJLcqPEslDnAPFmTqGieaa81Cgb-PRczh6T0TBWOxVAZOoPk8cPBvsd Lab 4 Lecture 5 (Tuesday 4/21; access 7f!o&=J9)]<br />
** Lab 4 Lecture 6 (Thursday 4/23): share day; no recording<br />
<br />
==== Lab 4 Week 4 (Apr 26): Write Lab Report ====<br />
* Theory and Background<br />
** [https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/cal_intensity.pdf Calibrating the Intensity and Shape of Spectral Lines (Carl Heiles)] <br />
* In Class:<br />
** Show and Tell<br />
** displaying information in image form<br />
** Lab 4 Due May 3, 1:30p<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/6pVKDIHL7XlIQ5GVtAL4Q4klI7Tvaaa81HBP_vBezRuCI54jJ3AKdenjUZB-gScx Lab 4 Lecture 7 (Tuesday 4/28; access 3h=j11*@ )]<br />
** [https://berkeley.zoom.us/rec/share/teBrde3hr2lOHZ3V9GH4S6MAH5j7aaa8hCZN-PoOxUycBmjJiZYoIuqIb29LQg8W Lab 4 Lecture 8 (Thursday 4/30; access 5V$.3i8$ )]<br />
<br />
<br />
<!-- === Lab 2 (Digital Lab) ===<br />
* Lab 2, Part 1 <br />
** Quiz 4 on:<br />
** Breakout Sessions:<br />
** Discrete Fourier Transform<br />
*** Convolving and Smoothing<br />
*** Aliasing<br />
*** Intro to Lab 2, pick groups<br />
<br />
* Lab 2, Part 2 <br />
** Quiz 5 on:<br />
*** [[Data Representations]]<br />
*** [[Digital Down Conversion]]<br />
** Breakout Sessions:<br />
*** Data Representations demo<br />
*** Mixing, Filtering, Decimation, and the FFT<br />
*** [[Intro to ROACH]]<br />
<br />
* Lab 2, Part 3 <br />
** Quiz 6 on:<br />
*** [[Synchronous and Asynchronous Logic]]<br />
*** [[Processor Architectures]]<br />
*** [[FIR Filters]]<br />
** Breakout Sessions:<br />
*** Acting out various processors<br />
*** Simulating an FIR filter<br />
*** Lab feedback<br />
--><br />
<br />
== Unused but Useful? ==<br />
<br />
* [[Radiometer Equation]]<br />
* [[Quantization and Rounding]]<br />
* [[Reciprocity Theorem]]<br />
* [[Dipole Antennas]]<br />
* [[Impedance of Free Space]]<br />
* [[Radiometer Equation Applied to Telescopes]]<br />
* [[Radiometer Equation Applied to Interferometers]]<br />
* [[Fringe Stopping]]<br />
* [[Direction Dependent Beams]]<br />
* [[Self Calibration]]<br />
* [[Flux Calibration]]<br />
* [[Gridding]]<br />
* [[Earth Rotation Synthesis]]<br />
* [[Delay Imaging]]</div>AparsonsUndergraduate Radio Lab2022-01-12T21:54:49Z<p>Aparsons: </p>
<hr />
<div>This course consists of four laboratory experiments that concentrate on radio instrumentation and laboratory techniques. We will build receiving, observing, and data analysis systems for two telescopes: a single-dish 21-cm line system, and a 10.7-GHz interferometer. We will use these telescopes for astronomical observing projects including structure of the Milky Way galaxy, precise position measurement of several radio sources, and measurement of the radio brightness distributions of the sun and moon with high angular resolution. There is a heavy emphasis on digital data acquisition, software development in the Python language, and high-quality written reports.<br />
<br />
=== Class Programmatics ===<br />
* Class Code Repository: [http://github.com/AaronParsons/ugradio http://github.com/AaronParsons/ugradio]<br />
* [https://github.com/AaronParsons/ugradio/raw/master/schedule/syllabus_2022_spring.docx Syllabus]<br />
* [https://berkeley.zoom.us/j/3587609756 Zoom Room: 358 760 9756]<br />
* Bcourses: [https://bcourses.berkeley.edu/courses/1512067 1512067]<br />
* Discord: https://discord.gg/vdmcyZcAbS<br />
* Class Hours:<br />
** Tuesday/Thursday 1:30-3:30pm<br />
* Office Hours:<br />
** Aaron Parsons (aparsons at berkeley): TBD, or by appointment, in standard [https://berkeley.zoom.us/j/3587609756 Zoom Room: 358 760 9756]<br />
** Christian Bye (chbye at berkeley): TBD or by appointment (Through Discord Office Hours Channel)<br />
** Mine Gokcen (minegokcen at berkeley):<br />
** Frank Latora (fjlatora at berkeley):<br />
* Lab Groups:<br />
** Group 1<br />
** Group 2<br />
** Group 3<br />
** Group 4<br />
** Group 5<br />
<br />
=== Experiments ===<br />
* Lab 1: [https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/allmixers.pdf Exploring Digital Sampling, Fourier Transforms, and both DSB and SSB Mixers]<br />
* Lab 2: [https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/bighorn.pdf Astronomy with the 21cm Line; Some Microwave Electronics]<br />
* Lab 3: [https://github.com/AaronParsons/ugradio/blob/master/lab_interf/interf.pdf Radio Interferometry at X Band]<br />
* Lab 4: [https://github.com/AaronParsons/ugradio/blob/master/lab_dish/HI1.pdf Mapping the HI Line: the Galaxy and Supershells]<br />
<br />
=== General Skills Used Through-Out Course ===<br />
<br />
* [[Getting Started in the Undergraduate Radio Lab]]<br />
* [[Python Installation and Basic Programming]]<br />
* [[Connecting to the Lab Computers Remotely]]<br />
* [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting]<br />
* [[Unix Primer]]<br />
* [[Unix Text Editors]]<br />
* [[LaTeX]]<br />
* [[Revision Control]]<br />
* [[Getting Started w/ Github]]<br />
* [[Unit Testing]]<br />
<br />
== Topics by Date ==<br />
<br />
=== Lab 1 ([https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/allmixers.pdf Exploring Digital Sampling, Fourier Transforms, and both DSB and SSB Mixers]), Due Feb 8, 1:30p ===<br />
==== Lab 1, Week 1 (Jan 18): Sampling and Power Spectra ====<br />
* Resources and Handouts<br />
** [[Nyquist Sampling]]<br />
** [[Fourier Transform]]<br />
** [[Unix Primer]]<br />
** [[Python Installation and Basic Programming]]<br />
** [[Revision Control]]<br />
** [[Getting Started w/ Github]]<br />
** [[Unix Text Editors]]<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/Nyquist%20Sampling%20and%20Aliasing.ipynb Aliasing Demo]<br />
* In class:<br />
** Astrobaki, Syllabus, Office Hours<br />
** Getting accounts (premade by Bill Boyd, change password)<br />
** Lab access (email Mark Hayden)<br />
** Class philosophy and workflow<br />
** [[Nyquist Sampling]] and aliasing<br />
** [[Fourier Transform]] <br />
** Lab Hardware<br />
*** PicoScope 2206a<br />
** Data Challenge<br />
*** [https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/secret_message.npz Secret Message]<br />
** [https://youtu.be/Yb4K8t6SG4k Lecture 1 Zoom Recording]<br />
** [https://youtu.be/oJplegmHeAI Lecture 2 Zoom Recording]<br />
<br />
==== Lab 1, Week 2 (Jan 26): DSB and SSB Mixers ====<br />
* Theory and Background:<br />
** [[Heterodyne Mixers]]<br />
** [[Convolution Theorem]]<br />
** [[Fast Fourier Transform]]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/dft_intro/fourierc.pdf Spectral Analysis with Discrete Fourier Transforms]<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/Convolutions%20and%20Correlations.ipynb Convolutions and Correlations ]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/Sec%204.%20In%20the%20mind.ipynb In the Mind: Introduction to the Fourier Transform ]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/datatype_demo.ipynb Mommy Fortuna's Midnight Carnival of Python Oddities]<br />
** [[Data Representations]], with handout on [https://github.com/AaronParsons/ugradio/blob/master/pythonprimer/datatypes.pdf Data Types and Organizational Structures]<br />
** Data Challenge<br />
*** [https://github.com/AaronParsons/ugradio/blob/master/lab_mixers/mixed_message.npz Secret Message 2]<br />
* In class:<br />
** [https://youtu.be/Ut_jTUoqcd8 Lecture 3: Discrete Fourier Transforms and the Convolution Theorem]<br />
** [https://youtu.be/ZxAWNiisn3Y Lecture 4: Show and Tell]<br />
** Lecture: Introduction to DSB and SSB Mixers<br />
** Show and Tell (10m per group)<br />
<br />
==== Lab 1, Week 3 (Feb 1): More Mixers, and Lab Reports ====<br />
* Theory and Background<br />
** [[LaTeX]]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab1/python_intro.ipynb Introduction to Python and Plotting], second pass<br />
** [https://github.com/AaronParsons/ugradio/tree/master/latex_template/lab1 LaTex Template] Template you may use for your lab report<br />
*** [https://www.overleaf.com/read/hvrwkmfkvkhg Overleaf version of the lab template]<br />
* In Class:<br />
** Lecture: One more pass on [[Convolution Theorem]], [[Heterodyne Mixers]], and [https://github.com/AaronParsons/ugradio/blob/master/dft_intro/fourierc.pdf DFTs]<br />
** [https://youtu.be/igZPQQ-6ieo Lecture 5]<br />
** [https://youtu.be/53CZj1CCEm0 Lecture 6]<br />
** Show and Tell<br />
** Writing Lab Reports<br />
* Lab 1 Due Feb 8, 1:30p<br />
<br />
---------<br />
<br />
=== Lab 2 ([https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/bighorn.pdf Astronomy with the 21cm Line; Some Microwave Electronics]), due Mar 1, 1:30p ===<br />
==== Lab 2, Week 1 (Feb 8): 21cm Line and Waveguides ====<br />
* Theory and Background:<br />
** [https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/cal_intensity.pdf Calibrating the Intensity and Shape of Spectral Lines]<br />
** [[Specific Intensity]]<br />
** [[21cm Transition]]<br />
** [[Coordinates]]<br />
* Demos and Tutorials<br />
** Python Tutorial Part 3: Functions, Modules, and Objects<br />
** Matrix Math with Numpy<br />
** Doppler Corrections, ugradio.doppler<br />
* In class:<br />
** Introduction to Horn and Receiver<br />
** Time<br />
** Coordinates<br />
** [https://youtu.be/ouSTGedJtI4 Lecture 7]<br />
** [https://youtu.be/htF9zWPzeLQ Lecture 8]<br />
<br />
==== Lab 2, Week 2 (Feb 15): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Impedance]]<br />
** [[Transmission_Lines]]<br />
** [http://ugastro.berkeley.edu/radio/2017/handout_links/RWvD.pdf Fields and Waves in Communication Electronics (Ramo, Whinney, and Van Duzer)]<br />
** [[Central Limit Theorem]] and [[Random Walks]]<br />
** [https://github.com/AaronParsons/ugradio/blob/master/least_squares/lsfit_lite.pdf Least Squares Lite for the Budding Aficionado: Art and Practice]<br />
* Demos and Tutorials<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab2/Central%20Limit%20Theorem%20and%20Averaging.ipynb Central Limit Theorem and Averaging]<br />
* In Class:<br />
** Show and Tell<br />
** Waveguides, Transmission Lines, and Rope<br />
** Fitting Gaussians and Polynomials, ugradio.gauss<br />
** [https://youtu.be/l6_qxtqGtuY Lecture 9]<br />
** [https://youtu.be/xre1hQiZKCM Lecture 10]<br />
<br />
==== Lab 2, Week 3 (Feb 22): Write Lab Report ====<br />
* Theory and Background<br />
** [https://github.com/AaronParsons/ugradio/blob/master/least_squares/lsfit_2008.pdf Least-Squares and Chi-Square for the Budding Aficionado: Art and Practice]<br />
* In Class:<br />
** [https://github.com/AaronParsons/ugradio/blob/master/jupyter_tutorials/lab2/chisq_intro.ipynb Chi-Square Jupyter Notebook]<br />
** Show and Tell<br />
** Least Squares Part 2<br />
** [https://youtu.be/M92l0k45Gjw Lecture 11]<br />
* Lab 2 Due Mar 1, 1:30p<br />
<br />
---------<br />
<br />
=== Lab 3 ([https://github.com/AaronParsons/ugradio/blob/master/lab_interf/interf.pdf Radio Interferometry at X Band]), due Apr 5, 1:00p ===<br />
<br />
==== Lab 3 Week 1 (Mar 1): Interferometer ====<br />
* Theory and Background<br />
** [[Coordinates]]<br />
** [[Basic Interferometry]]<br />
* In Class:<br />
** Tour of Rooftop Interferometer<br />
** Exercise Ball Coordinates<br />
** Interferometry with Strings<br />
** [https://youtu.be/NXvDSyCfHMQ Lecture 12]<br />
** [https://youtu.be/5IDLQMO6_8g Lecture 13]<br />
<br />
==== Lab 3 Week 2 (Mar 8): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Measurement Equation]]<br />
** [[Telescope Field of View/Resolution]]<br />
* In Class:<br />
** Show and Tell<br />
** Controlling the Telescope<br />
** Tracking the Sun<br />
** Scheduling Observations<br />
* Lecture Links<br />
** [https://youtu.be/bgDBf9bPSTA Lecture 14]<br />
** [https://youtu.be/xVtmz0TfUJg Lecture 15]<br />
<br />
==== Lab 3 Week 3 (Mar 15): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Basic Interferometry II]]<br />
** [[Least Squares]]<br />
* In Class:<br />
** Show and Tell<br />
** Linear Least-Squares in Python<br />
** Minimizing Chi-Square]<br />
** Noise in Observations<br />
* Lecture Links<br />
** [https://youtu.be/ZhMu_0YFxCo Lecture 16]<br />
** [https://youtu.be/n-FOeZVuHls Lecture 17]<br />
<br />
==== No class (Mar 23, 26) ====<br />
<br />
==== Lab 3 Week 4 (Mar 29): Write Lab Report ====<br />
* Theory and Background<br />
*** [[Correlators]]<br />
*** [[Units of radiation]]<br />
* In Class:<br />
** Show and Tell<br />
** Photon bucket demo<br />
* Lecture Links<br />
** [https://youtu.be/Nl5h3Hi51bQ Lecture 18]<br />
** [https://youtu.be/GVugVn5PdB0 Lecture 19]<br />
* Lab 3 Due Apr 6, 1:30p<br />
<br />
<br />
---------<br />
<br />
=== Lab 4 ([https://github.com/AaronParsons/ugradio/blob/master/lab_dish/HI1.pdf Mapping the HI Line: the Galaxy and Supershells]), due May 3, 1:30p ===<br />
<br />
==== Useful Links ====<br />
[https://teamup.com/ksd715ee7fb766a108/#/ Link to Observing Calendar]<br />
<br />
[http://leuschner.berkeley.edu:8080 Leuschner WebCam]<br />
<br />
==== Lab 4 Week 1 (Apr 5): Leuschner Dish ====<br />
* Theory and Background<br />
** [[Specific Intensity]]<br />
** [[Radio Sky]]<br />
** [[Screen Command]]<br />
* In Class:<br />
** Trip to Leuschner: Class will go later than usual<br />
** drive mechanism (how the dish moves)<br />
** feed (notice probes) and cables<br />
** IF setup (one channel for OH, one for HI)<br />
** interacting with a CASPER [https://github.com/AaronParsons/leuschner-spectrimeter spectrometer]<br />
** pointing control<br />
** spatial sampling with dish<br />
* Lecture Links<br />
** [https://youtu.be/ZeB9Gj3gHgs Lecture 20]<br />
** [https://berkeley.zoom.us/rec/share/yYtJDpzz52pOc5GR42PxBbA_QorFT6a81CAfr6IKyRre8X_2LRtd9NPzNNLXeBCw Lab 4 Lecture 2 (Thursday 4/9/20)]<br />
<br />
==== Lab 4 Week 2 (Apr 12): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[21cm Transition]]<br />
** [[Black-Body Radiation]]<br />
** [[Line Profile Functions]]<br />
* In Class:<br />
** Show and Tell<br />
** spatial sampling with a dish<br />
** interpolation<br />
** projection<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/3pBJILbBxE5JRpWSwkWOe6QYMoHlaaa823IZr_QNyE0M46G1NWz2KSaA40QwupHp Lab 4 Lecture 3 (Tuesday 4/14; access v7*1$5k7)]<br />
** [https://berkeley.zoom.us/rec/share/wsAsELX3yThOTJXExEjjWaI4Mdq7eaa8hicf__AEzEkISCgjfujdIe8CV-yXP8VP Lab 4 Lecture 4 (Thursday 4/16; access G7*##+1O)]<br />
<br />
==== Lab 4 Week 3 (Apr 19): Collect and Analyze Data ====<br />
* Theory and Background<br />
** [[Emission Line Observing]]<br />
** [[Radiative Transfer Equation]]<br />
** [[Optical Depth]]<br />
** [[Estimating Atomic Transition Strengths]]<br />
* In Class:<br />
** Show and Tell<br />
** close-out plan<br />
** computing doppler width for a line of sight (assuming circular motion)<br />
** calibrating spectra<br />
** converting spectra to hydrogen<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/7Md4Fejz1FJLcqPEslDnAPFmTqGieaa81Cgb-PRczh6T0TBWOxVAZOoPk8cPBvsd Lab 4 Lecture 5 (Tuesday 4/21; access 7f!o&=J9)]<br />
** Lab 4 Lecture 6 (Thursday 4/23): share day; no recording<br />
<br />
==== Lab 4 Week 4 (Apr 26): Write Lab Report ====<br />
* Theory and Background<br />
** [https://github.com/AaronParsons/ugradio/blob/master/lab_bighorn/cal_intensity.pdf Calibrating the Intensity and Shape of Spectral Lines (Carl Heiles)] <br />
* In Class:<br />
** Show and Tell<br />
** displaying information in image form<br />
** Lab 4 Due May 3, 1:30p<br />
* Lecture Links<br />
** [https://berkeley.zoom.us/rec/share/6pVKDIHL7XlIQ5GVtAL4Q4klI7Tvaaa81HBP_vBezRuCI54jJ3AKdenjUZB-gScx Lab 4 Lecture 7 (Tuesday 4/28; access 3h=j11*@ )]<br />
** [https://berkeley.zoom.us/rec/share/teBrde3hr2lOHZ3V9GH4S6MAH5j7aaa8hCZN-PoOxUycBmjJiZYoIuqIb29LQg8W Lab 4 Lecture 8 (Thursday 4/30; access 5V$.3i8$ )]<br />
<br />
<br />
<!-- === Lab 2 (Digital Lab) ===<br />
* Lab 2, Part 1 <br />
** Quiz 4 on:<br />
** Breakout Sessions:<br />
** Discrete Fourier Transform<br />
*** Convolving and Smoothing<br />
*** Aliasing<br />
*** Intro to Lab 2, pick groups<br />
<br />
* Lab 2, Part 2 <br />
** Quiz 5 on:<br />
*** [[Data Representations]]<br />
*** [[Digital Down Conversion]]<br />
** Breakout Sessions:<br />
*** Data Representations demo<br />
*** Mixing, Filtering, Decimation, and the FFT<br />
*** [[Intro to ROACH]]<br />
<br />
* Lab 2, Part 3 <br />
** Quiz 6 on:<br />
*** [[Synchronous and Asynchronous Logic]]<br />
*** [[Processor Architectures]]<br />
*** [[FIR Filters]]<br />
** Breakout Sessions:<br />
*** Acting out various processors<br />
*** Simulating an FIR filter<br />
*** Lab feedback<br />
--><br />
<br />
== Unused but Useful? ==<br />
<br />
* [[Radiometer Equation]]<br />
* [[Quantization and Rounding]]<br />
* [[Reciprocity Theorem]]<br />
* [[Dipole Antennas]]<br />
* [[Impedance of Free Space]]<br />
* [[Radiometer Equation Applied to Telescopes]]<br />
* [[Radiometer Equation Applied to Interferometers]]<br />
* [[Fringe Stopping]]<br />
* [[Direction Dependent Beams]]<br />
* [[Self Calibration]]<br />
* [[Flux Calibration]]<br />
* [[Gridding]]<br />
* [[Earth Rotation Synthesis]]<br />
* [[Delay Imaging]]</div>AparsonsPoynting-Robertson Effect2021-11-16T18:48:22Z<p>Aparsons: </p>
<hr />
<div>[[Radiative Processes in Astrophysics|Course Home]]<br />
<br />
===Short Topical Videos===<br />
<br />
<br />
===Reference Material===<br />
* [https://en.wikipedia.org/wiki/Poynting%E2%80%93Robertson_effect Poynting-Robertson Effect (Wikipedia)]<br />
* [https://link.springer.com/book/10.1007/978-3-642-56428-4 Interplanetary Dust (Grun et al.) - Section on Orbital Evolution]<br />
<br />
===Need to Review?===<br />
* [[Radiative Transfer Equation]]<br />
* [[Radiative Equilibrium]]<br />
* [[Dust Absorption and Scattering]]<br />
<br />
<br />
<latex><br />
\documentclass[11pt]{article}<br />
\def\inv#1{{1 \over #1}}<br />
\def\ddt{{d \over dt}}<br />
\def\mean#1{\left\langle #1\right\rangle}<br />
\def\sigot{\sigma_{12}}<br />
\def\sigto{\sigma_{21}}<br />
\def\eval#1{\big|_{#1}}<br />
\def\tr{\nabla}<br />
\def\dce{\vec\tr\times\vec E}<br />
\def\dcb{\vec\tr\times\vec B}<br />
\def\wz{\omega_0}<br />
\def\ef{\vec E}<br />
\def\ato{{A_{21}}}<br />
\def\bto{{B_{21}}}<br />
\def\bot{{B_{12}}}<br />
\def\bfield{{\vec B}}<br />
\def\ap{{a^\prime}}<br />
\def\xp{{x^{\prime}}}<br />
\def\yp{{y^{\prime}}}<br />
\def\zp{{z^{\prime}}}<br />
\def\tp{{t^{\prime}}}<br />
\def\upx{{u_x^\prime}}<br />
\def\upy{{u_y^\prime}}<br />
\def\e#1{\cdot10^{#1}}<br />
\def\eikrwt{e^{i(\vec k\vec r-wt)}}<br />
<br />
\usepackage{fullpage}<br />
\usepackage{amsmath}<br />
\usepackage{eufrak}<br />
\usepackage{graphicx}<br />
\begin{document}<br />
\def\lya{Ly\alpha}<br />
<br />
\section{What is Poynting-Robertson Drag?}<br />
<br />
<br />
Dust grains orbiting a central star are affected by both the gravitational force, as well as photons emitted from the star. <br />
<br />
The gravitational force is given simply by:<br />
<br />
\begin{equation}<br />
\vec{F}_g = -\frac{GMm}{r^2}\hat{r} <br />
\end{equation}<br />
<br />
\noindent where $G$ is the gravitational constant, $M$ is the mass of the star, $m$ is the dust grain's mass, $r$ is the distance from the dust grain to the star, and $\hat{r}$ is the radial direction from the star. This force alone would cause the dust to orbit the star on a circular, Keplerian orbit. <br />
<br />
Photons emitted from the star will be absorbed by the dust grain and then re-emitted. While the re-emission of energy will be isotropic in the grain's frame of reference (assuming the grain is spherical and made of the a homogeneous material), it will not be isotropic in the Sun's frame due to the relative velocity of the grain compared to the star. This will give rise to a non-radial 'drag' force, called Poynting-Robertson drag, which will result in the slow spiral of the grain in towards the star, where it will eventually be destroyed by dust sublimation or sputtering, or collide to form much smaller grains which are then launched out of the solar system on hyperbolic orbits (since, for smaller grains, the radiation pressure will be much larger than the graviational force). <br />
<br />
\section{P-R Drag Derivation}<br />
<br />
Note that this derivation is non-relativistic, and so is not strictly accurate, but gives a good picture of how and why P-R drag arises. For a more accurate (and complex) derivation and discussion see, e.g. Klacka 1992. <br />
<br />
First, consider the radiation pressure force on the dust grain. Let $S$ be the energy flux [erg cm$^{-2}$ s$^{-1}$] at the location of a stationary dust grain a distance $r$ away from the star. If the particle has any component of its velocity in the direction from which the photons are streaming, then the flux of photons impacting the grain must be adjusted due to the Doppler shift as:<br />
<br />
\begin{equation}<br />
S^\prime = S\left(1 - \frac{\vec{v}\cdot\hat{S}}{c}\right)<br />
\end{equation}<br />
<br />
\noindent where $\vec{v}$ is the grain velocity as measured in the frame of the star and $\hat{S}$ is the direction from which the photons are streaming, also in the frame of the star. <br />
<br />
The absorbed energy flux is therefore $S^\prime\sigma_\textrm{dust}$, where $\sigma_\textrm{dust}$ is the absorption cross section of the dust grain to the incoming photons, which can be reasonably taken to be the grain's geometrical cross-section. The force due to radiation pressure is therefore:<br />
<br />
\begin{equation}<br />
\vec{F}_r = \frac{S^\prime\sigma_\textrm{dust}}{c}\hat{S}<br />
\end{equation}<br />
<br />
However, we still need to consider the effect of the particle re-radiating the energy. As mentioned, we assume that this re-radiation will be isotropic in the grain's frame, meaning it will be non-isotropic in the star's frame. Via $E=mc^2$, the energy radiated in the grain's frame is equivalent to a mass loss rate of $S^\prime\sigma_\textrm{dust}/c^2$, which, in the star's frame, gives a momentum flux of $-(S^\prime\sigma_\textrm{dust}/c^2)\vec{v}$, which effectively creates a drag on the particle. Thus, the total force on a perfectly absorbing particle due to radiation is:<br />
<br />
\begin{equation}<br />
\vec{F} = \frac{S^\prime\sigma_\textrm{dust}}{c}\hat{S} - \frac{S^\prime\sigma_\textrm{dust}}{c^2}\vec{v}<br />
\end{equation}<br />
<br />
Rewriting this and keeping only factors to order $v/c$ (since the dust velocity will be much less than the speed of light), we have:<br />
<br />
\begin{equation}<br />
\vec{F} = \frac{S\sigma_\textrm{dust}}{c}\left(\left(1 - \frac{\vec{v}\cdot\hat{S}}{c}\right)\hat{S} - \frac{\vec{v}}{c}\right)<br />
\end{equation}<br />
<br />
\section{Sample Model: Dust affected by PR drag}<br />
<br />
Simplifying to a 2D system, and using the solar luminosity and mass, we can plot the distance of a grain of dust to the Sun as a function of time. For a 10$\mu$m dust grain with density 2.5g/cm$^3$, the distance as a function of time is plotted in the figure below. Notice that the dust moves from close to the radius of Earth to within the radius of mercury on the timescale of several thousand years. For larger dust grains, the timescale can increase up to hundreds of thousands of years. <br />
<br />
\begin{figure}<br />
\centering<br />
\includegraphics[width = 5in]{PR_drag.png}<br />
\caption{Distance from the sun for a dust grain acted on by PR drag as a function of time.}<br />
\end{figure}<br />
<br />
\end{document}<br />
</latex></div>AparsonsSynchrotron Self-Interactions2021-11-16T17:46:27Z<p>Aparsons: </p>
<hr />
<div>[[Radiative Processes in Astrophysics|Course Home]]<br />
<br />
===Short Topical Videos===<br />
* [https://youtu.be/HeuuX31Cyq0 Synchrotron Self-Interactions (Aaron Parsons)]<br />
<br />
===Reference Material===<br />
<br />
===Need to Review?===<br />
* [[Black-Body Radiation]]<br />
* [[Synchrotron Radiation]]<br />
* [[Inverse Compton Scattering]]<br />
* [[Energy Density]]<br />
<br />
<latex><br />
\documentclass[11pt]{article}<br />
\def\inv#1{{1 \over #1}}<br />
\def\ddt{{d \over dt}}<br />
\def\mean#1{\left\langle {#1}\right\rangle}<br />
\def\sigot{\sigma_{12}}<br />
\def\sigto{\sigma_{21}}<br />
\def\eval#1{\big|_{#1}}<br />
\def\tr{\nabla}<br />
\def\dce{\vec\tr\times\vec E}<br />
\def\dcb{\vec\tr\times\vec B}<br />
\def\wz{\omega_0}<br />
\def\ef{\vec E}<br />
\def\ato{{A_{21}}}<br />
\def\bto{{B_{21}}}<br />
\def\bot{{B_{12}}}<br />
\def\bfield{{\vec B}}<br />
\def\ap{{a^\prime}}<br />
\def\xp{{x^{\prime}}}<br />
\def\yp{{y^{\prime}}}<br />
\def\zp{{z^{\prime}}}<br />
\def\tp{{t^{\prime}}}<br />
\def\upx{{u_x^\prime}}<br />
\def\upy{{u_y^\prime}}<br />
\def\e#1{\cdot10^{#1}}<br />
\def\hf{\frac12}<br />
\def\^{\hat }<br />
\def\.{\dot }<br />
\usepackage{fullpage}<br />
\usepackage{amsmath}<br />
\usepackage{eufrak}<br />
\begin{document}<br />
<br />
\section*{ Synchrotron Self-Absorption}<br />
To discuss synchrotron self-absorption, we need to discuss what the spectrum<br />
of an optically {\it thick} medium of relativistic electrons looks like.<br />
If we take a bunch of $e^-$ spiraling around magnetic field lines with<br />
$E=\gamma m_ec^2$, then the energy of the photons emitted by these<br />
electrons is $h\nu\sim h\nu_{sync}\sim h\nu_{cyc}\gamma^2$. This emitted photon can be absorbed be a neighboring relatvistic electron in the self-absorption process.<br />
<br />
If this gas<br />
were optically thin, we'd just see a sharply peaked spectrum around $\nu_{sync}$<br />
with $\nu\ll\nu_{sync}$ going as $\nu^{1\over3}$ and $\nu\gg\nu_{sync}$ going<br />
as $\nu^\hf e^{-{\nu\over\nu_{sync}}}$. That is, when we are in the optically thin regime, more electrons in the synchrotron lead to more emission. Now let's add more electrons to this<br />
gas. For a while in the optically thick regime, the more electrons we add, the more emission we see.<br />
<br />
At some point, though, self-absorption starts making a difference, and we<br />
get less emission per electron added.<br />
<br />
Let's examine the <br />
peak amplitude of emission (that is, $I_\nu$ at $\nu=\nu_{sync}$). <br />
To do this,<br />
imagine we have an optically thick ball of [[Black-Body Radiation|blackbody]] (perfectly absorbing <br />
and emitting) particles<br />
with a temperature carefully chosen so that $kT_{\nu}\sim\gamma m_e c^2$. Then:<br />
\def\nucrit{{\nu_{sync}}}<br />
$$I_\nu(\nu=\nucrit)=B_\nu(T\sim{\gamma m_ec^2\over k},\nu=\nucrit)$$<br />
<br />
We are assuming we are in the Rayleigh-Jeans tail. Note that we are not arguing that we are operating in thermal equilibrium. Instead, we know that [[Black-Body Radiation|blackbodies]] are perfect absorbers and perfect emitters. By taking a blackbody as our model, we are defining the maximum intensity, $I_{max}$ we can observe. The actual observed intensity will be below $I_{max}$, but this gives us a good upper limit.<br />
<br />
If $h\nucrit\ll\gamma m_ec^2$, then:<br />
$$\begin{aligned}I_\nu(\nucrit)|_{e^-,thick}<br />
&=B_\nu(T\sim{\gamma m_ec^2\over k},\nu=\nucrit)\\ <br />
&={2kT\over\lambda_{crit}^2}={2\gamma m_ec^2\over\lambda_{crit}^2}\\ <br />
&=2\gamma m_e\nucrit^2\\ \end{aligned}$$<br />
Since $\nucrit\sim\nu_{cyc}\gamma^2\propto B\gamma^2$, we have that<br />
$\gamma\sim\left({\nucrit\over B}\right)^\hf$. Thus, for an optically<br />
thick gas:<br />
$$I_{\nu,max}\propto\nucrit^{5\over2}B^{-\hf}\propto\nu^{5\over2}B^{-\hf}$$<br />
It is important to remember that each $\gamma$ has a unique corresponding<br />
$\nucrit$. Also note that optical thickness depends inversely on frequency,<br />
so if we plot $I_\nu$ vs. $\nu$, we get a power law $\nu^{(1+p)\over2}$ for<br />
high frequencies ($I_\nu$ for low optical thickness), and a $\nu^{5\over2}$ dependence<br />
for low frequencies ($I_\nu$ for high optical thickness, under self-absorption). This implies that there will be some turnover point at $\nu_m$ where $I_\nu$ is maximal. This turnover point can give us information about the strength of the B-field and the density of electroncs in the region.<br />
<br />
\section*{ Synchrotron Self-Compton (SSC)}<br />
<br />
Electrons undergoing synchrotron radiation create a photon bath which<br />
other electrons will then interact with via [[Inverse Compton Scattering]]. For original [[Synchrotron Radiation]], that $F_\nu$, between<br />
some minimum and maximum frequency cut-off, goes as $K\nu^\alpha$, and that<br />
the number of photons per $\gamma$ is ${dN\over d\gamma}=N_0\gamma^s$, where<br />
$\alpha={1+s\over2}$. These frequency cut-offs were set by $\gamma_{min}^2<br />
\nu_{cyc}$ and $\gamma_{max}^2\nu_{cyc}$. After this radiation is processed<br />
by SSC, approximately every photon is upscattered to a new energy<br />
${4\over3}\gamma^2\nu$. We are assuming that the relationship between<br />
an incoming photon frequency and its final frequency are related via a<br />
delta function. Thus:<br />
\def\tn{{\tilde\nu}}<br />
$$F_{\nu,SSC}(\nu)=\tau\int_{\tn}{K\tn^\alpha d\tn\delta\left(\tn-<br />
{\nu\over\gamma^2}\right)\int_\gamma{N_0\gamma^sd\gamma}}$$<br />
Keep in mind that $N_0$ is normalized to so the integral comes out to 1<br />
(it just accounts for the <br />
``shape'' of the energy distribution function). $\tau$ is what contains the actual<br />
\# density of $e^-$'s. It is the fraction scattered,<br />
and is generally $\ll1$. $\nu\sim\tn\gamma^2$.\par<br />
For a fixed $\nu\sim\tn\gamma^2$, we find that $\gamma\sim\left({\nu\over<br />
\tn}\right)^\hf\propto\tn^{-\hf}$.<br />
<br />
\def\numin{{\nu_{min}}}<br />
\def\numax{{\nu_{max}}}<br />
\def\gamin{\gamma_{min}}<br />
\def\gamax{\gamma_{max}}<br />
\def\gul{{min(\sqrt{\nu\over\numin},\gamax)}}<br />
\def\gll{{max(\sqrt{\nu\over\numax},\gamin)}}<br />
In deriving the interaction of synchrotron radiation with<br />
synchrotron electrons, we derived the following formula for flux:<br />
$$F_{\nu,SSC}(\nu)=\tau\int_{\tn}{K\tn^\alpha d\tn\delta\left(\tn-<br />
{\nu\over\gamma^2}\right)\int_\gamma{N_0\gamma^sd\gamma}}$$<br />
Now the integral over $\gamma$ is along ``slant paths'' through<br />
the rectangle ($\gamin\to\gamax$, $\numin\to\numax$).<br />
Some of these slant paths will not stretch all the way to $\gamax$<br />
or $\gamin$ because of the boundaries imposed by $\numin$ and<br />
$\numax$. That is to say, photons emitted by an electron at $\gamin$ can be scattered off another electron at $\gamax$ or vice versa. So we need to be a little more precise about the bounds<br />
on the $\gamma$ integral:<br />
$$\begin{aligned}F_{\nu,SSC}(\nu)<br />
&\sim\tau\int_\numin^\numax{K\tn^\alpha\delta(\tn-{\nu\over\gamma^2})d\tn<br />
\int_\gll^\gul{N_0\gamma^sd\gamma}}\\ <br />
&\sim\tau K\left({\nu\over\gamma^2}\right)^\alpha<br />
\int_\gll^\gul{N_0\gamma^sd\gamma}\\ <br />
&\sim\tau K\nu^\alpha N_0<br />
\int_\gll^\gul{{\gamma^s\over\gamma^{2\alpha}}d\gamma}\\ \end{aligned}$$<br />
But since $\alpha={1+s\over2}$, the integrand is simply $\inv{\gamma}$,<br />
giving us:<br />
$$\boxed{F_{\nu,SSC}(\nu)\sim\tau k\nu^\alpha N_0\ln\left({\gul\over\gll}\right)}$$<br />
Recall that $N_0$ was normalized so that $\int{N_0\gamma^sd\gamma}=1$, so<br />
saying that $\gamax$ is just some multiple of $\gamin$, it must be that<br />
$$N_0\sim\gamin^{-1-s}$$<br />
Note for $\nu\sim\gamin^2\numin$, $F_\nu$ looks like (using the above <br />
relationship):<br />
\def\gllogul{\left({\gul\over\gll}\right)}<br />
$$\begin{aligned}F_{\nu,SSC}&=\tau K\gamin^{2\alpha}\numin^\alpha N_0\ln\gllogul\\ <br />
&=\tau K\numin^\alpha\gamin^{2\alpha}\gamin^{-1-s}\ln\gllogul\\ <br />
&=\tau K \numin^\alpha\ln\gllogul\\ \end{aligned}$$<br />
<br />
\def\gul{{min(\sqrt{\nu\over\numin},\gamax)}}<br />
\def\gll{{max(\sqrt{\nu\over\numax},\gamin)}}<br />
<br />
<br />
[[File:Synchrotron_Self_Interaction.png|500px|thumb|center|Spectra for synchrotron radiation, with and without self-interactions. The model used to generate this figure assumes a rectangular slab as the emitting/absorbing region and that the initially emitted photons only interact with other electrons once before leaving the radiating slab. The radiating region is 1 pc thick, has an electron number density of 1 cm$^{-3}$, and is immersed in a uniform magnetic field of 100 $\mu$G. The electrons obey a power law distribution in energy, with a minimum Lorentz factor of 10, a maximum Lorentz factor of 10,000, and a power-law index of -2.5. Note that $I_\nu$ has a slope of 5/2 for low frequencies, and a slope of -3/4 after the turnover, as expected from the above discussion about self-absorption. Also note the bounds on the range of frequencies for the SSC spectrum\textemdash the lower bound is $\gamma_\mathrm{min}^2$ times greater than the minimum frequency of the original synchrotron spectrum, and the upper bound is $\gamma_\mathrm{max}^2$ times greater than the upper bound of the original spectrum.}]]<br />
<br />
\section*{ Compton Catastrophe}<br />
<br />
\def\gamax{\gamma_{max}}<br />
<br />
If you keep scattering the same electrons via Synchrotron Self-Compton and things are dense enough,<br />
there is a danger of a runaway amplification<br />
of radiation energy density, or a ``Compton Cooling Catastrophe''. However,<br />
we've never seen anything with a brightness temperature of $10^{12}K$. <br />
What sets the ``inverse Compton limit'' at this temperature? Comparing,<br />
for a single electron,<br />
the luminosity of inverse Compton scattering to synchrotron scattering:<br />
$${L_{IC}\over L_{sync}}={{4\over3}\beta^2\gamma^2\sigma_TcU_{ph}\over<br />
{4\over3}\beta^2\gamma^2\sigma_TcU_B}={U_{ph}\over U_B}<br />
\begin{cases} >1&catastrophe\\ <1 &no\ catastrophe\end{cases}$$<br />
<br />
Now we're going to make an approximation that we are on the Rayleigh-Jeans<br />
side of the [[Black-Body Radiation|blackbody curve]], so that:<br />
$$\begin{aligned}U_{ph}=U_{ph,sync}&\propto\nu_mI_\nu(\nu_m)\\ <br />
&\propto\nu_m{2kT_B\over\lambda_m^2}\\ <br />
&\propto\nu_m^3T_B\\ \end{aligned}$$<br />
where $\nu_m$ is the frequency of peak of synchrotron emission. <br />
<br />
Now $U_B\propto B^2$ (see [[Energy Density]]): <br />
$$\nu_m\sim\gamma_m^2\nu_{cyc}\propto\gamma_m^2B$$<br />
where this $\gamma_m$ is not $\gamax$. Making the approximation that we<br />
are in the optically thick synchrotron spectrum, so that $\gamma m_ec^2\sim<br />
kT$, then we get $\nu_m\sim T_B^2B$. We can say that the kinetic temperature<br />
is the brightness temperature because we are talking about the average kinetic<br />
energy of the electrons generating the synchrotron radiation with a particular<br />
brightness temperature (i.e. another frequency of synchrotron radiation will<br />
have another brightness temperature, and another set of electrons moving<br />
with a different amount of kinetic energy). Thus,<br />
$${U_{ph}\over U_B}=C{\nu_m^3T_B\over\nu_m^2}T_B^4<br />
=\left({\nu_m\over10^9Hz}\right)\left({T_B\over10^{12}K}\right)^5=1$$<br />
<br />
A way of think about this is that, in order to avoid having infinite energy<br />
in this gas of electrons, there has to be a limit on the brightness <br />
temperature (which is determined by the density of electrons). This is a<br />
self-regulating process--if the brightness temperature goes too high, an<br />
infinite energy demand is set up, knocking it back down.<br />
<br />
\end{document}<br />
<br />
</latex></div>AparsonsMasers2021-10-05T13:55:45Z<p>Aparsons: </p>
<hr />
<div>[[Radiative Processes in Astrophysics|Course Home]]<br />
<br />
===Short Topical Videos===<br />
<br />
* [https://www.youtube.com/watch?v=PusNutZMGB8 AT&T Archives: Principles of the Optical Maser (Bonus Edition)]<br />
* [https://youtu.be/hjCotMMoVYk MASERs (Frida Woldstad Furmyr)]<br />
<br />
===Reference Materials===<br />
* [http://en.wikipedia.org/wiki/Population_inversion Population Inversion (Wikipedia)]<br />
* [http://en.wikipedia.org/wiki/Astrophysical_maser Astrophysical Masers (Wikipedia)]<br />
* [http://www.annualreviews.org/doi/pdf/10.1146/annurev.astro.41.011802.094927 "Mega-Masers and Galaxies"(K.Y. Lo, Annual Review)]<br />
* [http://rsta.royalsocietypublishing.org/content/357/1763/3277.full.pdf "Astrophysical Masers" (Gray, Malcolm, RAS review)]<br />
<br />
===Need to Review?===<br />
* [[Radiative Transfer Equation]]<br />
* [[Einstein Coefficients]]<br />
* [[Line Profile Functions]]<br />
<br />
===Related Topics===<br />
* [[Collisional Excitations]]<br />
<br />
<br />
<latex><br />
\documentclass[11pt]{article}<br />
\def\inv#1{{1 \over #1}}<br />
\def\ddt{{d \over dt}}<br />
\def\mean#1{\left\langle {#1}\right\rangle}<br />
\def\sigot{\sigma_{12}}<br />
\def\sigto{\sigma_{21}}<br />
\def\eval#1{\big|_{#1}}<br />
\def\tr{\nabla}<br />
\def\dce{\vec\tr\times\vec E}<br />
\def\dcb{\vec\tr\times\vec B}<br />
\def\wz{\omega_0}<br />
\def\ef{\vec E}<br />
\def\ato{{A_{21}}}<br />
\def\bto{{B_{21}}}<br />
\def\bot{{B_{12}}}<br />
\def\bfield{{\vec B}}<br />
\def\ap{{a^\prime}}<br />
\def\xp{{x^{\prime}}}<br />
\def\yp{{y^{\prime}}}<br />
\def\zp{{z^{\prime}}}<br />
\def\tp{{t^{\prime}}}<br />
\def\upx{{u_x^\prime}}<br />
\def\upy{{u_y^\prime}}<br />
\def\e#1{\cdot10^{#1}}<br />
\def\hf{\frac12}<br />
\def\^{\hat }<br />
\def\.{\dot }<br />
\usepackage{fullpage}<br />
\usepackage{amsmath}<br />
\usepackage{eufrak}<br />
\begin{document}<br />
\subsection*{ Cosmic Masers }<br />
<br />
$OH$ and $H_20$ masers can occur in dusty, star-forming regions which are cold<br />
enough for these molecules to form. The dust's black-body radiation in<br />
the infrared band is absorbed by these molecules and a population<br />
inversion is established. When maser emission is caused by via stimulated<br />
emission, these clouds can get very bright (brightness temperatures $\sim<br />
10^{14}K$). Temperatures this high cannot be thermal, so we know a maser<br />
when we see one. \par<br />
Generally, masers are useful for tracing the galaxy's magnetic field (emission<br />
lines are Zeeman split), and for following disks of gas and dust around stars<br />
in star-forming regions. In order to detect them, we need clouds which are<br />
moving uniformly together, and have velocity coherence both $\perp, \|$ to<br />
our line-of-sight through a disk of rotation gas. <br />
In general, the intensity we observe depends on the<br />
path length through the masing cloud, so we like long path lengths with the<br />
same velocity.<br />
<br />
\subsection*{ How masers Work }<br />
We will disucss population inversion a bit later, for now lets just assume that there are many more atoms in state 2 then state 1, where state 2 has higher energy than state 1. If a photon with an energy equal to E2-E1 comes along and interacts with an atom, it will thus be significantly more likely to produce stimulated emission (ie cause the atom to emit an identical photon with energy E2-E1 and drop from state 2 to 1) than to radiatively excite the atom (ie absorb the photon and transition from state 1 to 2). We will ignore the possibility of radiative excitation from state 1 to 2 entirely. The duplicate pair of photons produced by stimulated emission then go on to interact with other atoms leading to an exponential increase in the number of photons (and thus the intensity of radiation). <br />
Now onto the math.<br />
Consider a molecule with two rotational energy levels. Observing a homogeneous<br />
slab of this molecule, the intensity we receive is given by the familiar (see [[Radiative Transfer Equation]]):<br />
$$I_\nu=S_\nu(1-e^{-\tau_\nu})$$<br />
where $S_\nu={j_\nu\over\alpha_\nu}$. $j_\nu$ and $\alpha_\nu$ are given by (see [[Einstein Coefficients]]):<br />
$$\begin{aligned}j_\nu&=\overbrace{n_2\ato}^{per time}\overbrace{h\nu}^{per E}<br />
\overbrace{\phi(\nu)}^{per\ Hz}\overbrace{\inv{4\pi}}^{per steradian}\\ <br />
\alpha_\nu&={h\nu\over4\pi}\phi(\nu)[\overbrace{n_1\bot}^{abs}-\overbrace{<br />
n_2\bto}^{stim\atop emis}]\\ \end{aligned}$$<br />
Thus, our source function looks like:<br />
$$S_\nu={n_2\ato\phi(\nu)h\nu\inv{4\pi}\over{h\nu\over4\pi}\phi(\nu)[n_1\bot-<br />
n_2\bto]}$$<br />
Then since $g_1\bot=g_2\bto$ and ${\ato\over\bto}={2h\nu^3\over c^2}$, we have:<br />
$$S_\nu={2h\nu^3\over c^2}\inv{{n_1g_2\over g_1n_2}-1}$$<br />
A population is said to be inverted when $n_1g_2<g_1n_2$ (not $n_1<n_2$).<br />
$n_1\over g_1$ is an expression for the population per degenerate sub-level in<br />
energy level 1. If ${n_1\over g_1}<{n_2\over g_2}$, then $S_\nu<0$, and we<br />
have a maser. Expressed in terms of the excitation temperature (${n_2\over n_1}<br />
={g_2\over g_1}e^{-{h\nu\over kT_{ex}}}$), we have:<br />
$$S_\nu={2h\nu^3\over c^2}\inv{e^{h\nu\over kT_{ex}}-1}$$<br />
which is less than 0 when $T_{ex}<0$. We can express the optical depth of<br />
this slab to maser radiation as:<br />
$$\tau_\nu=\alpha_\nu L<br />
={h\nu\over4\pi}\phi(\nu)\bto\left[{n_1g_2\over g_1}-n_2\right] L<br />
={h\nu\over4\pi}\phi(\nu)\bto n_2\left[{n_1g_2\over g_1n_2}-1\right] L$$<br />
If ${n_2\over g_2}>{n_1\over g_1}$, then $\tau_\nu<0$. Now you might think<br />
we're talking nonsense with a negative source function and a negative optical<br />
depth, but we're not. Only observable quantities need to be positive, since optical depth and the source function are just mathematical record keeping objects,<br />
they can take on any values.<br />
Recall that the intensity is:<br />
$$I_\nu=S_\nu(1-e^{-\tau})$$<br />
If $\tau\to-\infty$, then $I_\nu\to-S_\nu e^{\tau_\nu}$, so $I_\nu\gg1$. <br />
On the other hand, if $\tau<0$ and $|\tau|\ll1$, then $I_\nu\to S_\nu\tau_\nu$,<br />
which is the product of two negatives = positive. This should be convincing<br />
you that $I_\nu$ is always positive, and therefore, actually manifested.<br />
<br />
\subsection*{ Maser Species }<br />
<br />
$OH$ mases at around 18 cm, and is found around AGB (asymptotic-giant-branch)<br />
stars in star-forming regions and around the galactic nucleus. AGB's are<br />
important because they have lots of dust. The two masing transitions are<br />
from $1667\to1612MHz$ and $1720\to1665MHz$.\par<br />
$H_2O$ mases at $1.35 cm$ in a transition to its ground rotational state. Note<br />
that an order-of-magnitude calculation of $\Delta E={\hbar\over 2I}$ for $H_2O$<br />
gives us an estimate of $\sim 1 mm$, which is incorrect. The correct <br />
transitional energy is caused by a slight degeneracy in water molecules.\par<br />
$SiO$ mases at $3.4 mm$ in its ground vibrational state, and is typically<br />
found in star-forming regions and around AGB stars.\par<br />
Other molecules mase, and there is even potential for detecting atomic lasers <br />
around massive stars ($L\sim10^5 L_\odot$). Hydrogen transitions from $10\to9$<br />
have been observed (at $55\mu m$), and Stielnitski 1996 claims to have observed<br />
a population inversion in atomic H.<br />
<br />
\subsection*{ Saturated vs. Unsaturated masers }<br />
<br />
There are two modes of operation for masers. For unsaturated masers, the gain<br />
is exponential with the path length, and for saturated ones, the gain only<br />
grows linearly with path length. The masers we find in the cosmos are typically<br />
saturated. The following is working toward understanding why there are two<br />
modes in masers. Before we start with the math lets imagine a sequence of events that<br />
might lead to saturation. Initially we have lots of atoms in state 2. If a photon that has<br />
energy E2-E1 interacts with one of these atoms we get two identical photons. Both of these photons<br />
can then interact with other atoms in state 2 giving 4 photons. This leads to an exponential amplification<br />
of the number of photons. If this increasing number of photons continues to propogate through the atoms, a point will eventually be reached where <br />
there are more photons with energy E2-E1 then there are atoms in state 2 for them to interact with. This means that we transition from an exponential amplification<br />
(from photon doubling) to a linear amplification (from continuing to travel through a medium with some density of atoms in state 2). This is called saturation.<br />
The graph given below shows intensity $I_\nu$ as a function of optical depth $\tau$. The discontinuity in the derivative on the graph is the saturation point.<br />
[[File:MaserIntensity.png]]<br />
<br />
Now let us prove this intuitive solution mathematically.<br />
We begin with the expression for specific intensity from<br />
emissivity (see [[Radiative Transfer Equation]] and [[Einstein Coefficients]]):<br />
$$\begin{aligned}{dI_\nu\over dz}&=j_\nu-\alpha_\nu I_\nu\\ <br />
&={h\nu\over4\pi}\phi(\nu)n_2A_{21}-{h\nu\over4\pi}<br />
\phi(\nu)[n_1\bot-n_2\bto]I_\nu\\ \end{aligned}$$<br />
In principle, the [[Line Profile Functions]] governing spontaneous emission and the<br />
line-profile governing stimulated emission might not have to be the same, but<br />
evidence seems to suggest they are. Let's assume they are, and rewrite this:<br />
$$\begin{aligned}{dI_\nu\over dz}&={h\nu\over4\pi}\phi(\nu){n_2\ato\over g_2}\cdot g_2<br />
-{h\nu\over4\pi}\phi(\nu)g_2\bto\left[{n_1\over g_1}-{n_2\over g_2}\right]<br />
\end{aligned}$$<br />
Defining $N_1\equiv{n_1\over g_1}$, $N_2\equiv{n_2\over g_2}$, $A\equiv<br />
\ato g_2$, and $B=\bto g_2$, our equation looks like:<br />
$${dI_\nu\over dz}={h\nu\over4\pi}\phi(\nu)[N_2A+B(N_2-N_1)I_\nu]$$<br />
Now we'll integrate over frequency. $\phi(\nu)$ is a sharply peaked function,<br />
so we'll treat it as a $\delta$-function. Then substituting<br />
$I\equiv\int{\phi(\nu)I_\nu d\nu}$, we have:<br />
$${\int{I_\nu d\nu}\over\Delta\nu}\equiv\int{I_\nu\phi(\nu)d\nu}$$<br />
which is true by definition of $\Delta\nu$: $\int{I_\nu d\nu}=I\Delta\nu$.<br />
So now we have:<br />
$${dI\over dz}={h\nu\over4\pi\Delta\nu}[(N_2-N_1)BI+N_2A]$$<br />
This is an equation with three unknowns. To close this system, we'll use the<br />
equations of statistical equilibrium, which say:<br />
$${dN_2\over dt}=-N_2BJ+N_1BJ-N_2A+R_2(N-N_1-N_2)-\Gamma_2N_2$$<br />
where $J\equiv\int{I_\nu\phi(\nu)d\nu}$, and $J_\nu=\inv{4\pi}\int{I_\nu<br />
d\Omega}$. $R_2$ is the ``pumping rate''. It describes the rate at which<br />
molecules not in state 1 or 2 (counted by $N-N_1-N_2$) are radiatively or <br />
collisionally<br />
knocked into state 2. $\Gamma_2$ is the loss rate of molecules in state 2 into<br />
any state other than state 1. In the above equation, we've neglected two<br />
terms: collisional excitation $1\to2$ and $2\to1$. These are crucial terms,<br />
being tightly related to local thermal equilibrium. However, we will neglect<br />
them to simplify analysis. We also have a similar equation for state 1:<br />
$${dN_1\over dt}=N_2BJ-N_1BJ+N_2A+R_1(N-N_1-N_2)-\Gamma_1N_1$$<br />
We'll further simply matters by setting the loss-rates for the two populations<br />
equal to each other ($\Gamma_1=\Gamma_2=\Gamma$). Now let's solve for the <br />
steady-state solution (${dN\over dt}=0$).<br />
$${d(N_2-N_1)\over dt}=-(N_2-N_1)2BJ-2N_2A+(R_2-R_1)(N-N_{12})-\Gamma(N_2-N_1)$$<br />
where $N_{12}=N_1+N_2$.<br />
Two terms in this equation are acting to reduce the population inversion of<br />
state 2 with respect to state 1: $(N_1-N_1)2BJ$ and $\Gamma(N_2-N_1)$. In the<br />
{\it unsaturated regime} where $BJ\ll\Gamma$, stimulated emission is a minor<br />
perturbation to the inverse. In this case we can solve the system of equations:<br />
$$\begin{aligned}{d\Delta N\over dt}={d(N_2-N_1)\over dt}&=-2N_2A+(R_2-R_1)(N-N_{12})<br />
-\Gamma\Delta N=0\\ <br />
{dN_{12}\over dt}&=(R_2+R_1)(N-N_{12})-\Gamma(N_1+N_2)=0\\ \end{aligned}$$<br />
Then solving for $N-N_{12}$:<br />
$$N-N_{12}={\Gamma(N_1+N_2)\over R_1+R_2}={\Gamma N_{12}\over R_1+R_2}$$<br />
Substituting this into the difference equation, which reads:<br />
$$-2N_2A={R_2-R_1\over R_1+R_2}\Gamma N_{12}-\Gamma\Delta N=0$$<br />
the using $N_2={N_{12}+\Delta N\over2}$ (this is just an identity), we get:<br />
$$\underbrace{\left(1+{\Gamma\over A}\right)}_{\equiv2\beta}\Delta N<br />
=N_{12}\left[\underbrace{{R_2-R_1\over R_1+R_2}{\Gamma\over A}}_{\equiv<br />
\inv{\alpha}}-1\right]$$<br />
Thus:<br />
$$\Delta N={N_{12}\over2\beta}\left[\inv{\alpha}-1\right]={N_{12}(1-\alpha)\over<br />
1\alpha\beta}$$<br />
Now we'll define $S\equiv{\alpha\beta\over1-\alpha}$. $S$ is meant to connote<br />
the source function here. The reason we might expect $S$ to be related to<br />
the source function is that $S_\nu\propto{N_2\over N_2-N_1}\propto{N_2\over<br />
\Delta N}$, so $\Delta N\propto {N_{12}\over2S}$. This is why we use an $S$<br />
here. Getting back to our original equation, we have:<br />
$${4\pi\Delta\nu\over h\nu A}{dI\over dz}=\Delta N\underbrace{BI\over A}_{<br />
\equiv\mathfrak{I}}+N_2$$<br />
Using our newly defined $S$, this becomes:<br />
$${4\pi\Delta\nu\over h\nu B}{d\mathfrak{I}\over dz}={N_{12}\over2S}\mathfrak{I}+<br />
\hf(N_{12}+\Delta N)$$<br />
Finally, defining an unsaturated gain length $L\equiv{4\pi\Delta\nu\over Bh\nu}<br />
{2S\over N_{12}}$, we have:<br />
$$L=\mathfrak{I}+S+\hf$$<br />
Then using $ds={dz\over L}$, we have:<br />
$${d\mathfrak{I}\over ds}=\mathfrak{I}+\hf+S$$<br />
To order of magnitude:<br />
$$\begin{aligned}\mathfrak{I}&\equiv{B\over A}I={B\over A}B_\nu(T_{bright})\\ <br />
&={c^2\over2h\nu^3}{2h\nu^3\over c^2}\inv{e^{h\nu\over kT_{bright}}-1}\\ <br />
&=\inv{e^{h\nu\over kT_{bright}}-1}\\ \end{aligned}$$<br />
Now since $1\ll{kT_{bright}\over h\nu}$ (typical maser wavelengths are in<br />
mm and $T_{bright}$ is typically several K), we can throw away our $\hf$ in<br />
our equation for ${d\mathfrak{I}\over ds}$:<br />
$${d\mathfrak{I}\over ds}=\mathfrak{I}+S\Rightarrow<br />
\int{d\mathfrak{I}\over\mathfrak{I}+S}=\int{ds}\Rightarrow<br />
\mathfrak{I}+S=De^s$$<br />
Choosing $\mathfrak{I}=0, s=0$ (we're assuming there is no background source), then<br />
$D=S$, so:<br />
$$\boxed{\mathfrak{I}=S(e^s-1)}$$<br />
If $s\ll1$, we have $\mathfrak{I}=Ss$ from spontaneous emission, and this is the <br />
saturated case. If $s\gg1$, the $\mathfrak{I}=Se^s$ from stimulated emission, and<br />
this is the unsaturated case. Earlier we threw away the $BJ$ term, but we<br />
could have done all of this including that term, and the algebra would have<br />
been the same. If we do this, we get the answer:<br />
$$\boxed{{d\mathfrak{I}\over ds}={\beta(\mathfrak{I}+\hf)\over\beta+\mathfrak{J}}+S}$$<br />
where $\mathfrak{J}$ is the non-dimensionalized, integrated flux, <br />
$\mathfrak{J}={BJ\over A}$.<br />
<br />
\subsection*{ The Saturated Mode }<br />
<br />
Recall our masing equation:<br />
$${d\mathfrak{I}\over ds}={\beta(\mathfrak{I}+\hf)\over\beta+\mathfrak{J}}+S$$<br />
In the unsaturated case, ${\beta\over\beta+\mathfrak{J}}\to1\iff\beta\gg\mathfrak{J}$.<br />
This is equivalent to saying:<br />
$$\hf\left(1+{\Gamma\over A}\right)\gg{BJ\over A}$$<br />
And if $\Gamma\gg A$, then:<br />
$$A+\Gamma\gg BJ\iff\Gamma\gg BJ$$<br />
In the saturated case, then $\beta\ll\mathfrak{J}$. In this case:<br />
$${d\mathfrak{I}\over ds}={\beta\mathfrak{I}\over\mathfrak{J}}+S={4\pi\beta\mathfrak{I}\over<br />
\int{\mathfrak{I}ds}}+S$$<br />
where we used that $\mathfrak{J}\sim\inv{4\pi}\int{\mathfrak{I}d\Omega}$. If we consider<br />
a single beam of photons through a cloud, then $\int{\mathfrak{I}d\Omega}\approx<br />
\mathfrak{I}\Delta\Omega$, so:<br />
$$\boxed{<br />
\begin{aligned}{d\mathfrak{I}\over ds}&={4\pi\beta\mathfrak{I}\over\mathfrak{I}\Delta\Omega}+S\\ <br />
&={4\pi\beta\over\Delta\Omega}+S\\ \end{aligned}}$$<br />
<br />
\subsection*{ How We Get Population Inversions }<br />
[[File:Atom.png]]<br />
\n<br />
There is another dichotomy in masers: ones which are excited radiatively and<br />
those which are excited collisionally (see [[Collisional Excitation]]). We'll discuss a cloud of molecules<br />
which have 3 energy states which are populated by {\it simple collisional<br />
pumping}. Before we dive into the math lets consider conceptually what is going on.<br />
The diagram shows a simple 3 state atom. We can only go between state E1 and E3 collisionally (ie they do not communicate radiatively).<br />
State E3 spontaneously decays radiatively to state E2 with a short lifetime. State E2 radiatively decays to state E1, but with a very long lifetime.<br />
This means that there can be a large number of atoms that are in state E2. Thus we have the requisite population inversion for masing to occur.<br />
Now onto the math.<br />
The rate of change of the population of energy state<br />
1 in this case is given by (sources - sinks):<br />
$${dn_1\over dt}=n_2\ato+n_2C_{21}+n_3C_{31}+n_2\bto J_{21}-n_1\bot J_{12}<br />
-n_1C_{12}-n_1C_{13}$$<br />
Then $J_{12}=J_{21}$, and because of local collisional thermal equilibrium,<br />
$C_{12}=C_{21}{g_2\over g_1}e^{-{E_{21}\over kT}}$. Similarly,<br />
$C_{13}=C_{31}{g_3\over g_1}e^{-{E_{21}\over kT}}$. So dividing by $g$, and<br />
defining $N_1\equiv{n_1\over g_1}$, we have:<br />
$$\begin{aligned}{dN_1\over dt}=&\underbrace{n_2\over g_2}_{N_2}\underbrace{<br />
{\ato\over g_1}g_2}_{\ato}+\underbrace{n_2\over g_2}_{N_2}\underbrace{<br />
{C_{21}\over g_1}g_2}_{\equiv C}+\underbrace{n_2\over g_3}_{N_3}\underbrace{<br />
{C_{31}\over g_1}g_3}_{\equiv C}+\underbrace{n_2\over g_2}_{N_2}\underbrace{<br />
{\bto\over g_1}g_2}_{\bto}J_{21}\\<br />
&-N_1\underbrace{\bto}_{\bto{g_2\over g_1}\equiv<br />
\bto}-N_1\underbrace{C_{21}{g_2\over g_1}}_{\equiv C}e^{-{E_{21}\over kt}}-<br />
N_1\underbrace{C_{31}{g_3\over g_1}}_{\equiv C}e^{-{E_{31}\over kT}}\\<br />
\end{aligned}$$<br />
Phew. Notice that we set $C_{21}=C_{31}$. This is just to make our lives<br />
easier. We can do the same for $dN_2\over dt$, but omitting $B_{23}$, because<br />
we're deciding not to have absorptions from $2\to3$ and no stimulated emission<br />
from $3\to2$. Then our total population is $N=N_1+N_2+N_3$. Without being<br />
careful, instinct tells us that in steady state, we'll have a population<br />
inversion ${N_2\over N_1}>1$ if $C\ll A_{32}$. This<br />
instinct is correct, but let's do this carefully. First we'll make some<br />
assumptions:<br />
\begin{itemize}\item $\ato\ll C$. For $H_2O$: <br />
$$\ato\sim10^8s^{-1}\left({1216\AA\over1.35cm}\right)^3<br />
\sim10^8\e{-15}s^{-1}<br />
\sim10^{-7}s^{-1}\left({\mu\over ea_0}\right)^2$$<br />
where $\mu$ is our way of accommodating the fact that the dipole moment for<br />
$H_2O$ might not be the same as for the fine structure of hydrogen. It turns<br />
out the answer is $\ato\sim2\e{-9}s^{-1}$.\par<br />
Estimating C:<br />
$$C\sim n_{H_2}\sigma v_{rel}\sim n_{H_2}\e{-15}\cdot(3{km\over s})<br />
\sim n_{H_2}\cdot3\e{-10}$$<br />
which is $\gg10^{-7}s^{-1}\left({\mu\over ea_0}\right)^2$ when<br />
$n_{H_2}\gg10^3cm^{-3}\left({\mu\over ea_0}\right)^2$. <br />
\item Next we'll assume $E_{21}\ll kT$. Define ${E_{21}\over kT}\equiv\delta<br />
\ll1$.\end{itemize}<br />
Now we have a 2-step:<br />
\begin{itemize}\item Step 1: Since $1\to3$ are not linked by radiation,<br />
$${N_3\over N_1}\approx e^{-{E_{31}\over kT}}\equiv\theta\le1$$<br />
\item Step 2: Radiative decays from $3\to2$. To get an inversion, we'll<br />
argue that the sources into 2 are larger than the sinks out of 2 (this is <br />
a little weird because we're solving our steady-state equations, but whatever):<br />
$$N_3A_{32}+N_3C+N_1Ce^{-{E_{21}\over kT}}>N_2Ce^{-{E_{32}\over kT}}+N_2C$$<br />
We can rewrite this as:<br />
$$\begin{aligned}<br />
\underbrace{N_2\over N_1}_{=\theta}{A_{32}\over C}&>\left[{N_2\over N_1}<br />
\underbrace{e^{-{E_{32}\over kT}}}_{E_{32}=E_{32}-E_{12}}-{N_3\over N_2}\right]<br />
+\left[{N_2\over N_1}-e^{-{E_{21}\over kT}}\right]\\ <br />
{A_{32}\theta\over C}&>\left[\underbrace{N_2\over N_1}_{1}\theta(1+\delta)-<br />
\theta\right]+\left[\underbrace{N_2\over N_1}_{1}-(1-\delta)\right]\\ <br />
&=\theta\delta+\delta=\delta(\theta+1)\\ \end{aligned}$$<br />
Thus, the $\delta$ really helps get masing started. <br />
\end{itemize}<br />
Now one last thing: we'd<br />
chosen to ignore stimulated radiative transfer between energy states 3 and 2.<br />
In general, this process<br />
will tend to reduce the population inversion. However, for optically thick<br />
clouds $\tau\gg1$, photons only have a $P\sim\inv{\tau}$ probability of escaping,<br />
so we can describe this by ``diluting'' the $A_{32}$ term by $\inv{\tau}$.<br />
\subsubsection{The 4 state atom}<br />
[[File:4state.png]]<br />
While 3 state masers are possible, most actual masers involve 4 states. Lets discuss population inversion in a 4 state maser. We will relax the condition that collisions<br />
be responsible for the transition to the highest state. As shown in the diagram we require that there is some strong transition from state 1 to 4. This provides atoms in a state that can dexcite to our population-inverted state. Imagine that we want states 3 and 2 to be the population inverted states. To achieve this, we need a relatively strong transition from state 4 to 3 to populate state 3. Similarly we need a strong 2 to 1 transition to empty out state 2. We are thus left with lots of atoms in state 3, and almost none in 2. This provides the inversion necessary for masing. Our masing transition will be 3 to 2 (ie it will correspond to our population inverted states).<br />
\end{document}<br />
</latex></div>AparsonsBlack-Body Radiation2021-09-03T23:28:53Z<p>Aparsons: </p>
<hr />
<div>[[Radiative Processes in Astrophysics|Course Home]]<br />
<br />
===Short Topical Videos===<br />
<br />
* [https://www.youtube.com/watch?v=2AdvPdE0ebY Blackbody Radiation (Riko Schadow, UCB)]<br />
* [https://www.youtube.com/watch?v=oU8cUN6ZXeQ Properties of Light: Blackbody Radiation (Michael Koop, Penn State)]<br />
* [http://www.youtube.com/watch?v=syQbWP-7WC4 Simple derivation of Planck's Law (nanolearning)]<br />
<br />
===Reference Materials===<br />
* [http://www.cv.nrao.edu/course/astr534/BlackBodyRad.html Blackbody Radiation (Condon & Landon)]<br />
* [http://en.wikipedia.org/wiki/Black-body_radiation Black-body Radiation (Wikipedia)] <br />
<br />
===Need to Review?===<br />
* [[Specific Intensity]]<br />
* [[Radiative Transfer Equation]]<br />
<br />
===Related Topics===<br />
* [[Local Thermodynamic Equilibrium]]<br />
<br />
<latex><br />
\documentclass[11pt]{article}<br />
\usepackage{graphicx}<br />
\usepackage{amsmath}<br />
\usepackage{fullpage}<br />
\begin{document}<br />
<br />
\section*{Blackbody Radiation}<br />
<br />
A blackbody is the simplest source: it absorbs and re-emits radiation with<br />
100\% efficiency. The frequency content of blackbody radiation is given by<br />
the {\it Planck Function}:<br />
\begin{equation}<br />
B_\nu={2h\nu^3\over c^2(e^{\frac{h\nu}{kT}}-1)}<br />
\end{equation}<br />
\begin{figure}[h!]<br />
[[File:Blackbody_radiation.png|thumb|400px|center|Plot of the blackbody spectrum with linear axes for different temperatures]]<br />
\end{figure}<br />
<br />
Since radio photons typically have very low energies compared with the kinetic energy of most emitters,<br />
so that $h\nu\ll kT$, it is usually safe in radio astronomy to take the {\it Raleigh-Jeans} approximation to the blackbody spectrum:<br />
\begin{equation}<br />
B_\nu\approx\frac{2kT}{\lambda^2}<br />
\end{equation}<br />
Even though we've written $\lambda$ in place of $c/\nu$ above, remember that we are talking about $B_\nu$, which is a per-bandwidth (i.e. per Hz) quantity.<br />
<br />
The Raleigh-Jeans approximation is so common in radio astronomy that it is used to define a {\it brightness temperature}, $T_b$, given by:<br />
\begin{equation}<br />
\frac{2kT_b}{\lambda^2}\equiv I_\nu.<br />
\end{equation}<br />
The brightness temperature is the temperature a blackbody would have to be at to produce match the intensity $I_\nu$ at the frequency in question. Note that this is not saying that $I_\nu$ is a blackbody spectrum, or is at all thermal in nature. It's just matching the emission at a particular frequency to an equivalent temperature. Brightness temperatures are generally a function of frequency for non-thermal sources.<br />
\begin{figure}[h!]<br />
[[File:Blackbody_radiation_tails_noticks.png|thumb|600px|center|Approximations of the blackbody function for low and high frequencies, logarithmic plot]]<br />
\end{figure}<br />
<br />
\subsection*{Derivation}<br />
<br />
If you take Bose-Einstein statistics as a given, deriving the Planck function is pretty straightforward; it boils down to counting degenerate states for a given energy.<br />
<br />
To begin with, we need to relate the specific intensity of radiation from a blackbody, $B_\nu$, to an energy density that we can then count up states for:<br />
\begin{equation}<br />
\frac{4\pi}{c}B_\nu=D_\nu\cdot f(\nu)\cdot E,<br />
\end{equation}<br />
where $D_\nu$ counts up the specific degenerate states per volume for a given energy, $f(\nu)$ is the probability<br />
of occupying that energy, and $E$ is the energy of that state. Hence, the right side of this equation expresses specific energy density. On the left side,<br />
since $B_\nu$ has units of ${\rm ergs}/{\rm s}\cdot{\rm Hz}\cdot{\rm cm^2}\cdot{\rm sr}$, dividing by $c$ converts the specific flux to a specific<br />
energy density, with units of ${\rm ergs}/{\rm Hz}\cdot{\rm cm^3}\cdot{\rm sr}$ (recall "specific" means "per frequency"). The factor of $4\pi$ comes<br />
from assuming isotropic emission, and cancels out the factor of ${\rm sr}$.<br />
<br />
For energy, we can use $E=h\nu$, and assuming Bose-Einstein statistics (photons are bosons, after all), we have that $f(\nu)= 1/(e^\frac{h\nu}{kt}-1)$.<br />
All that remains is to figure out $D_\nu$, the number of degenerate states per volume per frequency for a given energy. To do this, let's<br />
examine a cube of space with length $L$ on a side. For a finite region of space, the energy states a photon can take are quantized. This is because, to be occupied in this volume, a photon go through an integral number of wavelengths in distance $L$ along each of the $\hat x, \hat y$, and $\hat z$ axes. An equivalent way of saying this is that frequency comes in units of $c/L$. <br />
<br />
So if we want to count the number of degenerate states that all have the same energy for some differential frequency interval $d\nu$, we can calculate<br />
that by calculating the volume these states occupy in phase space. Since $E=h\nu$, the surface area of a shell of constant energy is $4\pi\nu^2$,<br />
and since each quantized state occupies a volume $(c/L)^3$ is phase space, the total number of states is given by:<br />
\begin{equation}<br />
D_\nu\cdot V\cdot d\nu= \frac{4\pi\nu^2d\nu}{(c/L)^3}\cdot g,<br />
\end{equation}<br />
where the volume $V=L^3$, and $g=2$ is a final degeneracy factor that accounts for the fact that photons can have 2 different polarizations.<br />
<br />
Working out the algebra and plugging everything into our original equation for $B_\nu$, we end up with:<br />
\begin{equation}<br />
B_\nu = \frac{2h\nu^3}{c^2}\frac1{e^\frac{h\nu}{kT}-1}<br />
\end{equation}<br />
<br />
\section*{ Kirchoff's Law}<br />
<br />
Kirchoff's Law is a statement that may alternately be regarded as obvious or deeply insightful. Simply put, it<br />
states that, for an object in a (let's say, Planckian) radiation bath in thermal equilibrium, the energy absorbed<br />
equals the energy radiated. As obvious as this may seem, Kirchoff's Law can have non-obvious implications.<br />
For example, let's take the equation for Radiative Transport:<br />
\begin{equation}<br />
\frac{dI_\nu}{ds}=j_\nu - \alpha_\nu I_\nu.<br />
\end{equation}<br />
In the optically thick limit for blackbody radiation, $I_\nu=B_\nu$ and $dI_\nu/ds=0$. Hence,<br />
\begin{equation}<br />
j_\nu=\alpha_\nu B_\nu(T).<br />
\end{equation}<br />
On one level, this is simply saying that for a medium in local thermodynamic equilibrium, $S_\nu\equiv j_\nu/\alpha_\nu = B_\nu(T)$. But on another level, since the values of $j_\nu$ and $\alpha_\nu$ are inherent properties of a medium and don't depend on thermal equilibrium, this is a fundamental relationship between $j_\nu$ and $\alpha_\nu$. Kirchoff's law says that good emitters are good absorbers, and vice versa.<br />
<br />
This fundamental relationship between $j_\nu$ and $\alpha_\nu$ ensures that, when things are brought into thermal equilibrium, the resultant<br />
spectrum is always Planckian, and does not depend on the emissivity or absorptivity of the medium.<br />
<br />
\section*{Blackbody Sources}<br />
<br />
There are not many examples of true blackbody sources of radiation, but what few there are tend to be quite important.<br />
<br />
\subsection*{Cosmic Microwave Background}<br />
<br />
The mother of all blackbodies, this is the relic 2.7K radiation left over from the hot plasma that was generated by the Big Bang. Photons were produced and absorbed via the thermal radiation of charged particles (mostly electrons) scattering off one another, converging quickly on a blackbody spectrum. Once the universe cooled to the point that protons and electrons could bind to form neutral hydrogen without being immediately ionized, these photons stopped scattering, and have been free-streaming ever since. As the universe expands, the wavelength of these photons stretch with it, causing photon energies (and hence, the characteristic temperature) to gradually decline with time. Note that, at the current temperature of 2.7K, the CMB peaks at 160.2 GHz.<br />
<br />
\subsection*{Sun}<br />
<br />
Stars are generally blackbody-like, although most of them are so faint in the radio band as to be nearly unobservable. Just by sheer proximity, our Sun is the brightest radio source in the sky, but, particularly at lower frequencies, not by a huge margin. Emission from the quiet Sun is dominated at radio frequencies by the photosphere (6000K) around 100 GHz, the chromosphere (10,000K) at 1 GHz, and the corona (1,000,000K) at 100 MHz. As a result, the spectrum of the quiet Sun within a relatively narrow band is blackbody-like, but broadly departs from the characteristic blackbody spectrum.<br />
<br />
It should also be noted that during sunspot activity, which varies on an 11-year solar cycle, solar emission departs dramatically from that of a blackbody, and becomes dominated by intense emission from electrons trapped in the magnetic fields around sunspots. The perturbed sun can be orders of magnitude brighter than the quiet Sun, and with emission dominated by particular ``hot spots'' that rotate with the Sun.<br />
<br />
<br />
<br />
\end{document}<br />
</latex></div>AparsonsRadiative Processes in Astrophysics2021-09-02T17:27:26Z<p>Aparsons: </p>
<hr />
<div>An introduction to the basic physics of astronomy and astrophysics at the graduate level. Principles of energy transfer by radiation. Elements of classical and quantum theory of photon emission; bremsstrahlung, synchrotron radiation. Compton scattering, plasma effects, atomic and molecular electromagnetic transitions. With applications to current research into astrophysical phenomena.<br />
<br />
These are a collection of lectures covering topics in an introductory graduate astrophysics course on radiative processes. The subject matter is loosely drawn from [http://adsabs.harvard.edu/abs/1981PEPI...25..432L Radiative Processes in Astrophysics] by Rybicki & Lightman.<br />
<br />
At the end of the semester, each student will develop one new lecture on a subject of their choice to add to this website.<br />
<br />
=== Class Code Repository ===<br />
[http://github.com/AaronParsons/astro207 http://github.com/AaronParsons/astro207]<br />
<br />
=== Syllabus ===<br />
* [https://github.com/AaronParsons/astro207/blob/main/syllabus.docx Syllabus]<br />
* [https://github.com/AaronParsons/astro207/blob/main/constants/constants.pdf Sheet of constants and equations]<br />
<br />
=== Useful External References ===<br />
* Rybicki and Lightman, [http://books.google.com/books?id=eswe2StAspsC&printsec=frontcover&dq=radiative+processes+in+astrophysics&hl=en&sa=X&ei=wkcGT-6HMISTiQKo3IQa&ved=0CDgQ6AEwAA#v=onepage&q=radiative%20processes%20in%20astrophysics&f=false'' '''Radiative Processes in Astrophysics'''] (course reference)<br />
* Mihalas and Mihalas, [http://books.google.com/books?id=f75C_GN9KZwC&printsec=frontcover&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false '''Foundations of Radiation Hydrodynamics''']<br />
* Osterbrock and Ferland, [http://books.google.com/books?id=6GIXMFpET4cC&printsec=frontcover&dq=osterbrock&hl=en&sa=X&ei=OUgGT8-0MuOZiAKOmoUS&ved=0CDEQ6AEwAA#v=onepage&q=osterbrock&f=false '''Astrophysics of Gaseous Nebulae and Active Galactic Nuclei''']<br />
* Shu, '[http://books.google.com/books/about/The_Physics_of_Astrophysics_Radiation.html?id=BxE1AQAAIAAJ, '''The Physics of Astrophysics, Volume I: Radiation''']<br />
* Longair, [http://books.google.com/books?id=KGe3FVbDNk4C&printsec=frontcover&dq=longair+high+energy+astrophysics&hl=en&ei=2m4QT5GgEuTWiALvkdWjDQ&sa=X&oi=book_result&ct=book-thumbnail&resnum=1&ved=0CDQQ6wEwAA#v=onepage&q=longair%20high%20energy%20astrophysics&f=false, '''High Energy Astrophysics''']<br />
* Mihalas, [http://www.nhn.ou.edu/~baron/ast4303/index.html '''Stellar Atmospheres''']<br />
* Rutten, [http://ntc0.lbl.gov/~kasen/references/rutten_stellar_atmospheres.pdf '''Radiative Transfer in Stellar Atmospheres''']<br />
* Eddie Baron's [http://www.nhn.ou.edu/~baron/grk_lectures/index.html GRK Lectures on Radiation Transport]<br />
* Tony Readhead's [http://www.astro.caltech.edu/~ycao/ay121/Ay121/notes.html Notes]<br />
* Feynman's [http://www.feynmanlectures.caltech.edu/II_toc.html Lectures on Physics, Volume II]<br />
<br />
== Topics by Date ==<br />
<br />
====(Aug. 26) Radiative Quantities (RL 1.1-1.3; Mil 1.1-1.3)====<br />
* class mechanics<br />
** syllabus<br />
** references<br />
*** Rybicki & Lightman<br />
*** Astrobaki: learn better by teaching<br />
** tools for figuring stuff out<br />
*** theoretical derivation<br />
*** order-of-magnitude estimation<br />
*** physical intuition (hands-on modeling, analogies)<br />
*** numerical simulation<br />
** programming<br />
*** [[Python Installation and Basic Programming]]<br />
*** [[Revision Control]] (class repository)<br />
*** [[Jupyter Notebooks]] (for visualizations and collaborating)<br />
* Topics<br />
** [[Specific Intensity]] <br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/01_Activity_Sheet.ipynb Activity Sheet 1] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/01_Activity_Sheet.ipyn datahub.berkeley.edu])<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/01_Activity_Sheet_Answers.ipynb Activity Sheet 1 solutions]<br />
<br />
====(Aug. 31) radiative transport (RL 1.4; Mil 2.1-2.2)====<br />
* Topics<br />
** [[Radiative Transfer Equation]]<br />
** [[Optical Depth]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz02.ipynb Activity Sheet 2]<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz02-ans.ipynb Activity Sheet 2 solutions]<br />
** sliding pennies<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps01.pdf Problem Set 1] assigned<br />
** [https://github.com/AaronParsons/astro207/blob/main/vega_spectrum.dat vega_spectrum.dat]<br />
** [https://github.com/AaronParsons/astro207/blob/main/bessel_V.dat bessel_V.dat]<br />
<br />
==== (Sep. 2) Maxwell's Equations and Plane Waves ====<br />
* Topics<br />
** [[Maxwell Equations]] for Electromagnetic Waves<br />
** [[Electromagnetic Plane Waves]]<br />
** [[Energy Density]] of Electromagnetic Waves<br />
** [[Larmor Formula]]<br />
** [[Fourier Transform]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz03.ipynb Activity Sheet 3] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz03.ipynb datahub.berkeley.edu])<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz03-ans.ipynb Activity Sheet 3 solutions]<br />
** [https://github.com/AaronParsons/astro207/blob/main/notebooks/Larmor%20Radiation.ipynb Larmor Demo]<br />
** Impedance of free space<br />
<br />
====(Sep. 7) scattering and absorption (RL 1.4, 1.7; Mil 2.1-2.2)====<br />
* Topics:<br />
** [[Basic Scattering]]<br />
** [[Central Limit Theorem]]<br />
** [[Random Walks]]<br />
** [[Degeneracy]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz04.ipynb Activity Sheet 4] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz04.ipynb datahub.berkeley.edu])<br />
** photon diffusion<br />
** high beams in fog<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps02.pdf Problem Set 2] Assigned<br />
<br />
==== (Sep. 9) thermodynamic equilibrium (RL 1.5) ====<br />
* Topics<br />
** [[Black-Body Radiation]] (and Kirchoff's Law)<br />
** [[Boltzmann distribution]]<br />
** [[Maxwellian velocity distribution]]<br />
** [[Local Thermodynamic Equilibrium]] <br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz05.ipynb Activity Sheet 5] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz05.ipynb datahub.berkeley.edu])<br />
** flipping pennies, rolling dice<br />
** types of temperature<br />
<br />
==== (Sep. 14) semi-classical hydrogen ====<br />
* Topics:<br />
** [[Classical Bohr Atom]] <br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz06.ipynb Activity Sheet 6] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz06.ipynb datahub.berkeley.edu])<br />
** rederivation<br />
** Rydberg<br />
** dipoles/quadrupoles<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps03.pdf Problem Set 3] Assigned<br />
<br />
==== (Sep. 16) Einstein coefficients====<br />
* Topics:<br />
** [[Einstein Coefficients]]<br />
** [[Radiative Equilibrium]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz07.ipynb Activity Sheet 7] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz07.ipynb datahub.berkeley.edu])<br />
** estimating Einstein A for Ly-alpha<br />
** effective photon absorption crosssection<br />
<br />
==== (Sep. 21) spectral line broadening====<br />
* Topics<br />
** [[Line Profile Functions]]<br />
** [[Zeeman splitting]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz08.ipynb Activity Sheet 8] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz08.ipynb datahub.berkeley.edu])<br />
** what can you learn from a spectral line<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps04.pdf Problem Set 4] Assigned<br />
<br />
==== (Sep. 23) radiation from accelerating charges (RL 3.3-3.4)====<br />
* Topics<br />
** [[Estimating Atomic Transition Strengths]]<br />
** radiative dipole transitions<br />
** photoexcitation cross-section<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz09.ipynb Activity Sheet 9] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz09.ipynb datahub.berkeley.edu])<br />
** Einstein A for He+<br />
<br />
==== (Sep. 28) molecular lines (RL 11) ====<br />
* Topics<br />
** [[Atomic and Molecular Quantum Numbers]]<br />
** [[Rotational Transitions]]<br />
* Activities<br />
** CO Lecture <br />
* No Problem Set this week<br />
<br />
==== (Sep. 30) rovibrational transitions (RL 11) ====<br />
* Topics<br />
** [[Rovibrational Transitions]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz11.ipynb Activity Sheet 11] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz11.ipynb datahub.berkeley.edu])<br />
** Cooling with CO<br />
<br />
====(Oct. 5) masers ====<br />
* Topics<br />
** [[Masers]]<br />
* Activities<br />
** masers as transistors<br />
** laser pointers<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps05.pdf Problem Set 5] assigned<br />
<br />
==== (Oct. 7) collisional excitations ====<br />
* Topics:<br />
** [[Detailed Balance]]<br />
** [[Collisional Excitations]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz12.ipynb Activity Sheet 12] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz12.ipynb datahub.berkeley.edu])<br />
** more CO molecular clouds<br />
** collisional line-driven cooling<br />
<br />
==== (Oct. 12) free-free emission====<br />
* Topics<br />
** [[Thermal Bremsstrahlung]] (RL 5.1-5.3)<br />
** [[Opacity]]<br />
** [[Kramer's Opacity]]<br />
* Activities<br />
** free-free polarization<br />
** simulating a free-free interaction<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps06.pdf Problem Set 6] assigned<br />
<br />
==== (Oct. 14) charged cross-sections (RL 1.7-1.8; Mil 2.3-2.5)====<br />
* Topics:<br />
** [[Coulomb Focusing]]<br />
** [[Thomson Scattering]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz13.ipynb Activity Sheet 13] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz13.ipynb datahub.berkeley.edu])<br />
** electrons in the IGM<br />
<br />
==== (Oct. 19) bound-free transitions ====<br />
* Topics<br />
** [[Milne Relation]]<br />
** [[Saha Equation]]<br />
* Activities<br />
** stromgren spheres<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps07.pdf Problem Set 7] assigned<br />
<br />
==== (Oct. 21) LTE and non-LTE ====<br />
* Topics<br />
** [[Recombination Coefficients]]<br />
** [[Review of Equilibria]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz14.ipynb Activity Sheet 14] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz14.ipynb datahub.berkeley.edu])<br />
** estimating recombination coefficients<br />
** work out in detail redshift of recombination<br />
<br />
==== (Oct. 26) plasma effects====<br />
* Topics<br />
** [[Plasma Frequency]]<br />
** [[dispersion measure]] (RL 8.1)<br />
** polarization<br />
** [[Faraday rotation]] (RL 8.1-8.2)<br />
** [[Stokes parameters]]<br />
* Activities<br />
** start de-dispersion coding<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps08.pdf Problem Set 8] assigned<br />
** [https://github.com/AaronParsons/astro207/blob/main/pulsar.dat pulsar.dat]<br />
<br />
==== (Oct. 28) compton scattering ====<br />
* Topics<br />
** [[Lorentz transformations]]<br />
** [[Doppler shift]]<br />
** radiation from relativistic charges (RL 4.1, 4.2, 4.8; Grif 10.1)<br />
** [[Compton Scattering]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz15.ipynb Activity Sheet 15] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz15.ipynb datahub.berkeley.edu])<br />
** relativistic intuition, velocity raptor<br />
** CMB coupling via compton<br />
<br />
==== (Nov. 2) Inverse Compton scattering====<br />
* Topics:<br />
** [[Inverse Compton Scattering]]<br />
** [[SZ Effect]] (RL 7.1-7.5)<br />
* Activities<br />
** single scattering versus ensemble scattering<br />
** compton saturation<br />
* No problem set<br />
<br />
==== (Nov. 4) Synchrotron Introduction ====<br />
* Topics:<br />
** [[Introduction to Synchrotron Radiation and Relativistic Beaming]]<br />
<!-- ** [[Synchrotron Frequency]]<br />
** [[Synchrotron Polarization]] --><br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz16.ipynb Activity Sheet 16] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz16.ipynb datahub.berkeley.edu])<br />
** beaming, superluminal motion, monte carlo compton<br />
<br />
==== (Nov. 9) Synchrotron Radiation ====<br />
* Topics<br />
** [[Synchrotron Radiation]]<br />
<!-- ** [[Single Electron Power Spectrum]]<br />
** [[Synchrotron Spectrum]] (RL 6.1-6.8)<br />
** [[Effect of Cooling Time on Synchrotron Spectra]] --><br />
* Activities<br />
** re-deriving synchrotron spectrum<br />
** phenomenological description of synchrotron decay<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps09.pdf Problem Set 9] assigned<br />
<br />
==== (Nov. 11) No Class (Veterans day) ====<br />
<br />
==== (Nov. 16) Synchrotron Self-Interactions ====<br />
* Topics<br />
** [[Synchrotron Self-Interactions]]<br />
<!-- ** [[Synchrotron Self-Compton]] <br />
** [[Compton Catastrophe]] --><br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz17.ipynb Activity Sheet 17] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz17.ipynb datahub.berkeley.edu])<br />
** reading SSC spectra, inferring castrophe<br />
<br />
==== (Nov. 18) dust and grains====<br />
* Topics:<br />
** [[Dust Absorption and Scattering]]<br />
** dust formation/sublimation<br />
** [[Poynting-Robertson Effect]]<br />
* Activities<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps10.pdf Problem Set 10] assigned<br />
<br />
==== (Nov. 23) No Class ====<br />
<br />
==== (Nov. 25) No Class ====<br />
<br />
==== (Dec. 1) radiative diffusion ====<br />
* Topics:<br />
** [[Radiative Diffusion]]<br />
** bolometric radiative equilibrium<br />
** greenhouse effect<br />
* Activities<br />
**<br />
<br />
==== (Dec. 2) Review ====<br />
* Review<br />
<br />
== Misc Topics ==<br />
** [[21cm Transition]]<br />
** [[Wouthuysen Field effect]]<br />
** [[Radiative Transfer Codes]]<br />
** [[Frequency Redistribution in Non-Coherent Scattering]]<br />
** [[Cherenkov Radiation]]<br />
** [[Monte Carlo Methods]]<br />
** [[Numerical Methods for Ordinary Differential Equations]]<br />
<br />
== Legacy Lecture Notes ==<br />
# [[Radiation Lecture 01]]<br />
# [[Radiation Lecture 02]]<br />
# [[Radiation Lecture 03]]<br />
# [[Radiation Lecture 04]]<br />
# [[Radiation Lecture 05]]<br />
# [[Radiation Lecture 06]]<br />
# [[Radiation Lecture 07]]<br />
# [[Radiation Lecture 08]]<br />
# [[Radiation Lecture 09]]<br />
# [[Radiation Lecture 10]]<br />
# [[Radiation Lecture 11]]<br />
# [[Radiation Lecture 12]]<br />
# [[Radiation Lecture 13]]<br />
# [[Radiation Lecture 14]]<br />
# [[Radiation Lecture 15]]<br />
# [[Radiation Lecture 16]]<br />
# [[Radiation Lecture 17]]<br />
# [[Radiation Lecture 18]]<br />
# [[Radiation Lecture 19]]<br />
# [[Radiation Lecture 20]]<br />
# [[Radiation Lecture 21]]<br />
# [[Radiation Lecture 22]]<br />
# [[Radiation Lecture 23]]<br />
# [[Radiation Lecture 24]]<br />
# [[Radiation Lecture 25]]<br />
# [[Radiation Lecture 26]]</div>AparsonsRadiative Processes in Astrophysics2021-09-02T17:25:23Z<p>Aparsons: /* Topics by Date */</p>
<hr />
<div>An introduction to the basic physics of astronomy and astrophysics at the graduate level. Principles of energy transfer by radiation. Elements of classical and quantum theory of photon emission; bremsstrahlung, synchrotron radiation. Compton scattering, plasma effects, atomic and molecular electromagnetic transitions. With applications to current research into astrophysical phenomena.<br />
<br />
These are a collection of lectures covering topics in an introductory graduate astrophysics course on radiative processes. The subject matter is loosely drawn from [http://adsabs.harvard.edu/abs/1981PEPI...25..432L Radiative Processes in Astrophysics] by Rybicki & Lightman.<br />
<br />
At the end of the semester, each student will develop one new lecture on a subject of their choice to add to this website.<br />
<br />
=== Class Code Repository ===<br />
[http://github.com/AaronParsons/astro207 http://github.com/AaronParsons/astro207]<br />
<br />
=== Syllabus ===<br />
* [https://github.com/AaronParsons/astro207/blob/main/syllabus.docx Syllabus]<br />
* [https://github.com/AaronParsons/astro207/blob/main/constants/constants.pdf Sheet of constants and equations]<br />
<br />
=== Useful External References ===<br />
* Rybicki and Lightman, [http://books.google.com/books?id=eswe2StAspsC&printsec=frontcover&dq=radiative+processes+in+astrophysics&hl=en&sa=X&ei=wkcGT-6HMISTiQKo3IQa&ved=0CDgQ6AEwAA#v=onepage&q=radiative%20processes%20in%20astrophysics&f=false'' '''Radiative Processes in Astrophysics'''] (course reference)<br />
* Mihalas and Mihalas, [http://books.google.com/books?id=f75C_GN9KZwC&printsec=frontcover&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false '''Foundations of Radiation Hydrodynamics''']<br />
* Osterbrock and Ferland, [http://books.google.com/books?id=6GIXMFpET4cC&printsec=frontcover&dq=osterbrock&hl=en&sa=X&ei=OUgGT8-0MuOZiAKOmoUS&ved=0CDEQ6AEwAA#v=onepage&q=osterbrock&f=false '''Astrophysics of Gaseous Nebulae and Active Galactic Nuclei''']<br />
* Shu, '[http://books.google.com/books/about/The_Physics_of_Astrophysics_Radiation.html?id=BxE1AQAAIAAJ, '''The Physics of Astrophysics, Volume I: Radiation''']<br />
* Longair, [http://books.google.com/books?id=KGe3FVbDNk4C&printsec=frontcover&dq=longair+high+energy+astrophysics&hl=en&ei=2m4QT5GgEuTWiALvkdWjDQ&sa=X&oi=book_result&ct=book-thumbnail&resnum=1&ved=0CDQQ6wEwAA#v=onepage&q=longair%20high%20energy%20astrophysics&f=false, '''High Energy Astrophysics''']<br />
* Mihalas, [http://www.nhn.ou.edu/~baron/ast4303/index.html '''Stellar Atmospheres''']<br />
* Rutten, [http://ntc0.lbl.gov/~kasen/references/rutten_stellar_atmospheres.pdf '''Radiative Transfer in Stellar Atmospheres''']<br />
* Eddie Baron's [http://www.nhn.ou.edu/~baron/grk_lectures/index.html GRK Lectures on Radiation Transport]<br />
* Tony Readhead's [http://www.astro.caltech.edu/~ycao/ay121/Ay121/notes.html Notes]<br />
* Feynman's [http://www.feynmanlectures.caltech.edu/II_toc.html Lectures on Physics, Volume II]<br />
<br />
== Topics by Date ==<br />
<br />
====(Aug. 26) Radiative Quantities (RL 1.1-1.3; Mil 1.1-1.3)====<br />
* class mechanics<br />
** syllabus<br />
** references<br />
*** Rybicki & Lightman<br />
*** Astrobaki: learn better by teaching<br />
** tools for figuring stuff out<br />
*** theoretical derivation<br />
*** order-of-magnitude estimation<br />
*** physical intuition (hands-on modeling, analogies)<br />
*** numerical simulation<br />
** programming<br />
*** [[Python Installation and Basic Programming]]<br />
*** [[Revision Control]] (class repository)<br />
*** [[Jupyter Notebooks]] (for visualizations and collaborating)<br />
* Topics<br />
** [[Specific Intensity]] <br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/01_Activity_Sheet.ipynb Activity Sheet 1] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/01_Activity_Sheet.ipyn datahub.berkeley.edu])<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/01_Activity_Sheet_Answers.ipynb Activity Sheet 1 solutions]<br />
<br />
====(Aug. 31) radiative transport (RL 1.4; Mil 2.1-2.2)====<br />
* Topics<br />
** [[Radiative Transfer Equation]]<br />
** [[Optical Depth]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz02.ipynb Activity Sheet 2]<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz02-ans.ipynb Activity Sheet 2 solutions]<br />
** sliding pennies<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps01.pdf Problem Set 1] assigned<br />
** [https://github.com/AaronParsons/astro207/blob/main/vega_spectrum.dat vega_spectrum.dat]<br />
** [https://github.com/AaronParsons/astro207/blob/main/bessel_V.dat bessel_V.dat]<br />
<br />
==== (Sep. 2) Maxwell's Equations and Plane Waves ====<br />
* Topics<br />
** [[Maxwell Equations]] for Electromagnetic Waves<br />
** [[Electromagnetic Plane Waves]]<br />
** [[Energy Density]] of Electromagnetic Waves<br />
** [[Larmor Formula]]<br />
** [[Fourier Transform]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz03.ipynb Activity Sheet 3] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz03.ipynb datahub.berkeley.edu])<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz03-ans.ipynb Activity Sheet 3 solutions]<br />
** [https://github.com/AaronParsons/astro207/blob/main/notebooks/Larmor%20Radiation.ipynb Larmor Demo]<br />
** Impedance of free space<br />
<br />
====(Sep. 7) scattering and absorption (RL 1.4, 1.7; Mil 2.1-2.2)====<br />
* Topics:<br />
** [[Basic Scattering]]<br />
** [[Central Limit Theorem]]<br />
** [[Random Walks]]<br />
** [[Degeneracy]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz04.ipynb Activity Sheet 4] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz04.ipyn datahub.berkeley.edu])<br />
** photon diffusion<br />
** high beams in fog<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps02.pdf Problem Set 2] Assigned<br />
<br />
==== (Sep. 9) thermodynamic equilibrium (RL 1.5) ====<br />
* Topics<br />
** [[Black-Body Radiation]] (and Kirchoff's Law)<br />
** [[Boltzmann distribution]]<br />
** [[Maxwellian velocity distribution]]<br />
** [[Local Thermodynamic Equilibrium]] <br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz05.ipynb Activity Sheet 5] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz05.ipyn datahub.berkeley.edu])<br />
** flipping pennies, rolling dice<br />
** types of temperature<br />
<br />
==== (Sep. 14) semi-classical hydrogen ====<br />
* Topics:<br />
** [[Classical Bohr Atom]] <br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz06.ipynb Activity Sheet 6] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz06.ipyn datahub.berkeley.edu])<br />
** rederivation<br />
** Rydberg<br />
** dipoles/quadrupoles<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps03.pdf Problem Set 3] Assigned<br />
<br />
==== (Sep. 16) Einstein coefficients====<br />
* Topics:<br />
** [[Einstein Coefficients]]<br />
** [[Radiative Equilibrium]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz07.ipynb Activity Sheet 7] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz07.ipyn datahub.berkeley.edu])<br />
** estimating Einstein A for Ly-alpha<br />
** effective photon absorption crosssection<br />
<br />
==== (Sep. 21) spectral line broadening====<br />
* Topics<br />
** [[Line Profile Functions]]<br />
** [[Zeeman splitting]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz08.ipynb Activity Sheet 8] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz08.ipyn datahub.berkeley.edu])<br />
** what can you learn from a spectral line<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps04.pdf Problem Set 4] Assigned<br />
<br />
==== (Sep. 23) radiation from accelerating charges (RL 3.3-3.4)====<br />
* Topics<br />
** [[Estimating Atomic Transition Strengths]]<br />
** radiative dipole transitions<br />
** photoexcitation cross-section<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz09.ipynb Activity Sheet 9] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz09.ipyn datahub.berkeley.edu])<br />
** Einstein A for He+<br />
<br />
==== (Sep. 28) molecular lines (RL 11) ====<br />
* Topics<br />
** [[Atomic and Molecular Quantum Numbers]]<br />
** [[Rotational Transitions]]<br />
* Activities<br />
** CO Lecture <br />
* No Problem Set this week<br />
<br />
==== (Sep. 30) rovibrational transitions (RL 11) ====<br />
* Topics<br />
** [[Rovibrational Transitions]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz11.ipynb Activity Sheet 11] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz11.ipyn datahub.berkeley.edu])<br />
** Cooling with CO<br />
<br />
====(Oct. 5) masers ====<br />
* Topics<br />
** [[Masers]]<br />
* Activities<br />
** masers as transistors<br />
** laser pointers<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps05.pdf Problem Set 5] assigned<br />
<br />
==== (Oct. 7) collisional excitations ====<br />
* Topics:<br />
** [[Detailed Balance]]<br />
** [[Collisional Excitations]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz12.ipynb Activity Sheet 12] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz12.ipyn datahub.berkeley.edu])<br />
** more CO molecular clouds<br />
** collisional line-driven cooling<br />
<br />
==== (Oct. 12) free-free emission====<br />
* Topics<br />
** [[Thermal Bremsstrahlung]] (RL 5.1-5.3)<br />
** [[Opacity]]<br />
** [[Kramer's Opacity]]<br />
* Activities<br />
** free-free polarization<br />
** simulating a free-free interaction<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps06.pdf Problem Set 6] assigned<br />
<br />
==== (Oct. 14) charged cross-sections (RL 1.7-1.8; Mil 2.3-2.5)====<br />
* Topics:<br />
** [[Coulomb Focusing]]<br />
** [[Thomson Scattering]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz13.ipynb Activity Sheet 13] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz13.ipyn datahub.berkeley.edu])<br />
** electrons in the IGM<br />
<br />
==== (Oct. 19) bound-free transitions ====<br />
* Topics<br />
** [[Milne Relation]]<br />
** [[Saha Equation]]<br />
* Activities<br />
** stromgren spheres<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps07.pdf Problem Set 7] assigned<br />
<br />
==== (Oct. 21) LTE and non-LTE ====<br />
* Topics<br />
** [[Recombination Coefficients]]<br />
** [[Review of Equilibria]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz14.ipynb Activity Sheet 14] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz14.ipyn datahub.berkeley.edu])<br />
** estimating recombination coefficients<br />
** work out in detail redshift of recombination<br />
<br />
==== (Oct. 26) plasma effects====<br />
* Topics<br />
** [[Plasma Frequency]]<br />
** [[dispersion measure]] (RL 8.1)<br />
** polarization<br />
** [[Faraday rotation]] (RL 8.1-8.2)<br />
** [[Stokes parameters]]<br />
* Activities<br />
** start de-dispersion coding<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps08.pdf Problem Set 8] assigned<br />
** [https://github.com/AaronParsons/astro207/blob/main/pulsar.dat pulsar.dat]<br />
<br />
==== (Oct. 28) compton scattering ====<br />
* Topics<br />
** [[Lorentz transformations]]<br />
** [[Doppler shift]]<br />
** radiation from relativistic charges (RL 4.1, 4.2, 4.8; Grif 10.1)<br />
** [[Compton Scattering]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz15.ipynb Activity Sheet 15] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz15.ipyn datahub.berkeley.edu])<br />
** relativistic intuition, velocity raptor<br />
** CMB coupling via compton<br />
<br />
==== (Nov. 2) Inverse Compton scattering====<br />
* Topics:<br />
** [[Inverse Compton Scattering]]<br />
** [[SZ Effect]] (RL 7.1-7.5)<br />
* Activities<br />
** single scattering versus ensemble scattering<br />
** compton saturation<br />
* No problem set<br />
<br />
==== (Nov. 4) Synchrotron Introduction ====<br />
* Topics:<br />
** [[Introduction to Synchrotron Radiation and Relativistic Beaming]]<br />
<!-- ** [[Synchrotron Frequency]]<br />
** [[Synchrotron Polarization]] --><br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz16.ipynb Activity Sheet 16] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz16.ipyn datahub.berkeley.edu])<br />
** beaming, superluminal motion, monte carlo compton<br />
<br />
==== (Nov. 9) Synchrotron Radiation ====<br />
* Topics<br />
** [[Synchrotron Radiation]]<br />
<!-- ** [[Single Electron Power Spectrum]]<br />
** [[Synchrotron Spectrum]] (RL 6.1-6.8)<br />
** [[Effect of Cooling Time on Synchrotron Spectra]] --><br />
* Activities<br />
** re-deriving synchrotron spectrum<br />
** phenomenological description of synchrotron decay<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps09.pdf Problem Set 9] assigned<br />
<br />
==== (Nov. 11) No Class (Veterans day) ====<br />
<br />
==== (Nov. 16) Synchrotron Self-Interactions ====<br />
* Topics<br />
** [[Synchrotron Self-Interactions]]<br />
<!-- ** [[Synchrotron Self-Compton]] <br />
** [[Compton Catastrophe]] --><br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz17.ipynb Activity Sheet 17] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz17.ipyn datahub.berkeley.edu])<br />
** reading SSC spectra, inferring castrophe<br />
<br />
==== (Nov. 18) dust and grains====<br />
* Topics:<br />
** [[Dust Absorption and Scattering]]<br />
** dust formation/sublimation<br />
** [[Poynting-Robertson Effect]]<br />
* Activities<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps10.pdf Problem Set 10] assigned<br />
<br />
==== (Nov. 23) No Class ====<br />
<br />
==== (Nov. 25) No Class ====<br />
<br />
==== (Dec. 1) radiative diffusion ====<br />
* Topics:<br />
** [[Radiative Diffusion]]<br />
** bolometric radiative equilibrium<br />
** greenhouse effect<br />
* Activities<br />
**<br />
<br />
==== (Dec. 2) Review ====<br />
* Review<br />
<br />
== Misc Topics ==<br />
** [[21cm Transition]]<br />
** [[Wouthuysen Field effect]]<br />
** [[Radiative Transfer Codes]]<br />
** [[Frequency Redistribution in Non-Coherent Scattering]]<br />
** [[Cherenkov Radiation]]<br />
** [[Monte Carlo Methods]]<br />
** [[Numerical Methods for Ordinary Differential Equations]]<br />
<br />
== Legacy Lecture Notes ==<br />
# [[Radiation Lecture 01]]<br />
# [[Radiation Lecture 02]]<br />
# [[Radiation Lecture 03]]<br />
# [[Radiation Lecture 04]]<br />
# [[Radiation Lecture 05]]<br />
# [[Radiation Lecture 06]]<br />
# [[Radiation Lecture 07]]<br />
# [[Radiation Lecture 08]]<br />
# [[Radiation Lecture 09]]<br />
# [[Radiation Lecture 10]]<br />
# [[Radiation Lecture 11]]<br />
# [[Radiation Lecture 12]]<br />
# [[Radiation Lecture 13]]<br />
# [[Radiation Lecture 14]]<br />
# [[Radiation Lecture 15]]<br />
# [[Radiation Lecture 16]]<br />
# [[Radiation Lecture 17]]<br />
# [[Radiation Lecture 18]]<br />
# [[Radiation Lecture 19]]<br />
# [[Radiation Lecture 20]]<br />
# [[Radiation Lecture 21]]<br />
# [[Radiation Lecture 22]]<br />
# [[Radiation Lecture 23]]<br />
# [[Radiation Lecture 24]]<br />
# [[Radiation Lecture 25]]<br />
# [[Radiation Lecture 26]]</div>AparsonsRadiative Processes in Astrophysics2021-08-26T17:43:40Z<p>Aparsons: /* (Aug. 26) Radiative Quantities (RL 1.1-1.3; Mil 1.1-1.3) */</p>
<hr />
<div>An introduction to the basic physics of astronomy and astrophysics at the graduate level. Principles of energy transfer by radiation. Elements of classical and quantum theory of photon emission; bremsstrahlung, synchrotron radiation. Compton scattering, plasma effects, atomic and molecular electromagnetic transitions. With applications to current research into astrophysical phenomena.<br />
<br />
These are a collection of lectures covering topics in an introductory graduate astrophysics course on radiative processes. The subject matter is loosely drawn from [http://adsabs.harvard.edu/abs/1981PEPI...25..432L Radiative Processes in Astrophysics] by Rybicki & Lightman.<br />
<br />
At the end of the semester, each student will develop one new lecture on a subject of their choice to add to this website.<br />
<br />
=== Class Code Repository ===<br />
[http://github.com/AaronParsons/astro207 http://github.com/AaronParsons/astro207]<br />
<br />
=== Syllabus ===<br />
* [https://github.com/AaronParsons/astro207/blob/main/syllabus.docx Syllabus]<br />
* [https://github.com/AaronParsons/astro207/blob/main/constants/constants.pdf Sheet of constants and equations]<br />
<br />
=== Useful External References ===<br />
* Rybicki and Lightman, [http://books.google.com/books?id=eswe2StAspsC&printsec=frontcover&dq=radiative+processes+in+astrophysics&hl=en&sa=X&ei=wkcGT-6HMISTiQKo3IQa&ved=0CDgQ6AEwAA#v=onepage&q=radiative%20processes%20in%20astrophysics&f=false'' '''Radiative Processes in Astrophysics'''] (course reference)<br />
* Mihalas and Mihalas, [http://books.google.com/books?id=f75C_GN9KZwC&printsec=frontcover&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false '''Foundations of Radiation Hydrodynamics''']<br />
* Osterbrock and Ferland, [http://books.google.com/books?id=6GIXMFpET4cC&printsec=frontcover&dq=osterbrock&hl=en&sa=X&ei=OUgGT8-0MuOZiAKOmoUS&ved=0CDEQ6AEwAA#v=onepage&q=osterbrock&f=false '''Astrophysics of Gaseous Nebulae and Active Galactic Nuclei''']<br />
* Shu, '[http://books.google.com/books/about/The_Physics_of_Astrophysics_Radiation.html?id=BxE1AQAAIAAJ, '''The Physics of Astrophysics, Volume I: Radiation''']<br />
* Longair, [http://books.google.com/books?id=KGe3FVbDNk4C&printsec=frontcover&dq=longair+high+energy+astrophysics&hl=en&ei=2m4QT5GgEuTWiALvkdWjDQ&sa=X&oi=book_result&ct=book-thumbnail&resnum=1&ved=0CDQQ6wEwAA#v=onepage&q=longair%20high%20energy%20astrophysics&f=false, '''High Energy Astrophysics''']<br />
* Mihalas, [http://www.nhn.ou.edu/~baron/ast4303/index.html '''Stellar Atmospheres''']<br />
* Rutten, [http://ntc0.lbl.gov/~kasen/references/rutten_stellar_atmospheres.pdf '''Radiative Transfer in Stellar Atmospheres''']<br />
* Eddie Baron's [http://www.nhn.ou.edu/~baron/grk_lectures/index.html GRK Lectures on Radiation Transport]<br />
* Tony Readhead's [http://www.astro.caltech.edu/~ycao/ay121/Ay121/notes.html Notes]<br />
* Feynman's [http://www.feynmanlectures.caltech.edu/II_toc.html Lectures on Physics, Volume II]<br />
<br />
== Topics by Date ==<br />
<br />
====(Aug. 26) Radiative Quantities (RL 1.1-1.3; Mil 1.1-1.3)====<br />
* class mechanics<br />
** syllabus<br />
** references<br />
*** Rybicki & Lightman<br />
*** Astrobaki: learn better by teaching<br />
** tools for figuring stuff out<br />
*** theoretical derivation<br />
*** order-of-magnitude estimation<br />
*** physical intuition (hands-on modeling, analogies)<br />
*** numerical simulation<br />
** programming<br />
*** [[Python Installation and Basic Programming]]<br />
*** [[Revision Control]] (class repository)<br />
*** [[Jupyter Notebooks]] (for visualizations and collaborating)<br />
* Topics<br />
** [[Specific Intensity]] <br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/01_Activity_Sheet.ipynb Activity Sheet 1] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/01_Activity_Sheet.ipyn datahub.berkeley.edu])<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/01_Activity_Sheet_Answers.ipynb Activity Sheet 1 solutions]<br />
<br />
====(Aug. 31) radiative transport (RL 1.4; Mil 2.1-2.2)====<br />
* Topics<br />
** [[Radiative Transfer Equation]]<br />
** [[Optical Depth]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz02.ipynb Activity Sheet 2]<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz02-ans.ipynb Activity Sheet 2 solutions]<br />
** sliding pennies<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps01.pdf Problem Set 1] assigned<br />
** [https://github.com/AaronParsons/astro207/blob/main/vega_spectrum.dat vega_spectrum.dat]<br />
** [https://github.com/AaronParsons/astro207/blob/main/bessel_V.dat bessel_V.dat]<br />
<br />
==== (Sep. 2) Maxwell's Equations and Plane Waves ====<br />
* Topics<br />
** [[Maxwell Equations]] for Electromagnetic Waves<br />
** [[Electromagnetic Plane Waves]]<br />
** [[Energy Density]] of Electromagnetic Waves<br />
** [[Larmor Formula]]<br />
** [[Fourier Transform]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz03.ipynb Activity Sheet 3]<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz03-ans.ipynb Activity Sheet 3 solutions]<br />
** [https://github.com/AaronParsons/astro207/blob/main/notebooks/Larmor%20Radiation.ipynb Larmor Demo]<br />
** Impedance of free space<br />
<br />
====(Sep. 7) scattering and absorption (RL 1.4, 1.7; Mil 2.1-2.2)====<br />
* Topics:<br />
** [[Basic Scattering]]<br />
** [[Central Limit Theorem]]<br />
** [[Random Walks]]<br />
** [[Degeneracy]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz04.ipynb Activity Sheet 4] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz04.ipyn datahub.berkeley.edu])<br />
** photon diffusion<br />
** high beams in fog<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps02.pdf Problem Set 2] Assigned<br />
<br />
==== (Sep. 9) thermodynamic equilibrium (RL 1.5) ====<br />
* Topics<br />
** [[Black-Body Radiation]] (and Kirchoff's Law)<br />
** [[Boltzmann distribution]]<br />
** [[Maxwellian velocity distribution]]<br />
** [[Local Thermodynamic Equilibrium]] <br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz05.ipynb Activity Sheet 5] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz05.ipyn datahub.berkeley.edu])<br />
** flipping pennies, rolling dice<br />
** types of temperature<br />
<br />
==== (Sep. 14) semi-classical hydrogen ====<br />
* Topics:<br />
** [[Classical Bohr Atom]] <br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz06.ipynb Activity Sheet 6] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz06.ipyn datahub.berkeley.edu])<br />
** rederivation<br />
** Rydberg<br />
** dipoles/quadrupoles<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps03.pdf Problem Set 3] Assigned<br />
<br />
==== (Sep. 16) Einstein coefficients====<br />
* Topics:<br />
** [[Einstein Coefficients]]<br />
** [[Radiative Equilibrium]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz07.ipynb Activity Sheet 7] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz07.ipyn datahub.berkeley.edu])<br />
** estimating Einstein A for Ly-alpha<br />
** effective photon absorption crosssection<br />
<br />
==== (Sep. 21) spectral line broadening====<br />
* Topics<br />
** [[Line Profile Functions]]<br />
** [[Zeeman splitting]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz08.ipynb Activity Sheet 8] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz08.ipyn datahub.berkeley.edu])<br />
** what can you learn from a spectral line<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps04.pdf Problem Set 4] Assigned<br />
<br />
==== (Sep. 23) radiation from accelerating charges (RL 3.3-3.4)====<br />
* Topics<br />
** [[Estimating Atomic Transition Strengths]]<br />
** radiative dipole transitions<br />
** photoexcitation cross-section<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz09.ipynb Activity Sheet 9] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz09.ipyn datahub.berkeley.edu])<br />
** Einstein A for He+<br />
<br />
==== (Sep. 28) molecular lines (RL 11) ====<br />
* Topics<br />
** [[Atomic and Molecular Quantum Numbers]]<br />
** [[Rotational Transitions]]<br />
* Activities<br />
** CO Lecture <br />
* No Problem Set this week<br />
<br />
==== (Sep. 30) rovibrational transitions (RL 11) ====<br />
* Topics<br />
** [[Rovibrational Transitions]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz11.ipynb Activity Sheet 11] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz11.ipyn datahub.berkeley.edu])<br />
** Cooling with CO<br />
<br />
====(Oct. 5) masers ====<br />
* Topics<br />
** [[Masers]]<br />
* Activities<br />
** masers as transistors<br />
** laser pointers<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps05.pdf Problem Set 5] assigned<br />
<br />
==== (Oct. 7) collisional excitations ====<br />
* Topics:<br />
** [[Detailed Balance]]<br />
** [[Collisional Excitations]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz12.ipynb Activity Sheet 12] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz12.ipyn datahub.berkeley.edu])<br />
** more CO molecular clouds<br />
** collisional line-driven cooling<br />
<br />
==== (Oct. 12) free-free emission====<br />
* Topics<br />
** [[Thermal Bremsstrahlung]] (RL 5.1-5.3)<br />
** [[Opacity]]<br />
** [[Kramer's Opacity]]<br />
* Activities<br />
** free-free polarization<br />
** simulating a free-free interaction<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps06.pdf Problem Set 6] assigned<br />
<br />
==== (Oct. 14) charged cross-sections (RL 1.7-1.8; Mil 2.3-2.5)====<br />
* Topics:<br />
** [[Coulomb Focusing]]<br />
** [[Thomson Scattering]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz13.ipynb Activity Sheet 13] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz13.ipyn datahub.berkeley.edu])<br />
** electrons in the IGM<br />
<br />
==== (Oct. 19) bound-free transitions ====<br />
* Topics<br />
** [[Milne Relation]]<br />
** [[Saha Equation]]<br />
* Activities<br />
** stromgren spheres<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps07.pdf Problem Set 7] assigned<br />
<br />
==== (Oct. 21) LTE and non-LTE ====<br />
* Topics<br />
** [[Recombination Coefficients]]<br />
** [[Review of Equilibria]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz14.ipynb Activity Sheet 14] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz14.ipyn datahub.berkeley.edu])<br />
** estimating recombination coefficients<br />
** work out in detail redshift of recombination<br />
<br />
==== (Oct. 26) plasma effects====<br />
* Topics<br />
** [[Plasma Frequency]]<br />
** [[dispersion measure]] (RL 8.1)<br />
** polarization<br />
** [[Faraday rotation]] (RL 8.1-8.2)<br />
** [[Stokes parameters]]<br />
* Activities<br />
** start de-dispersion coding<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps08.pdf Problem Set 8] assigned<br />
** [https://github.com/AaronParsons/astro207/blob/main/pulsar.dat pulsar.dat]<br />
<br />
==== (Oct. 28) compton scattering ====<br />
* Topics<br />
** [[Lorentz transformations]]<br />
** [[Doppler shift]]<br />
** radiation from relativistic charges (RL 4.1, 4.2, 4.8; Grif 10.1)<br />
** [[Compton Scattering]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz15.ipynb Activity Sheet 15] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz15.ipyn datahub.berkeley.edu])<br />
** relativistic intuition, velocity raptor<br />
** CMB coupling via compton<br />
<br />
==== (Nov. 2) Inverse Compton scattering====<br />
* Topics:<br />
** [[Inverse Compton Scattering]]<br />
** [[SZ Effect]] (RL 7.1-7.5)<br />
* Activities<br />
** single scattering versus ensemble scattering<br />
** compton saturation<br />
* No problem set<br />
<br />
==== (Nov. 4) Synchrotron Introduction ====<br />
* Topics:<br />
** [[Introduction to Synchrotron Radiation and Relativistic Beaming]]<br />
<!-- ** [[Synchrotron Frequency]]<br />
** [[Synchrotron Polarization]] --><br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz16.ipynb Activity Sheet 16] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz16.ipyn datahub.berkeley.edu])<br />
** beaming, superluminal motion, monte carlo compton<br />
<br />
==== (Nov. 9) Synchrotron Radiation ====<br />
* Topics<br />
** [[Synchrotron Radiation]]<br />
<!-- ** [[Single Electron Power Spectrum]]<br />
** [[Synchrotron Spectrum]] (RL 6.1-6.8)<br />
** [[Effect of Cooling Time on Synchrotron Spectra]] --><br />
* Activities<br />
** re-deriving synchrotron spectrum<br />
** phenomenological description of synchrotron decay<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps09.pdf Problem Set 9] assigned<br />
<br />
==== (Nov. 11) No Class (Veterans day) ====<br />
<br />
==== (Nov. 16) Synchrotron Self-Interactions ====<br />
* Topics<br />
** [[Synchrotron Self-Interactions]]<br />
<!-- ** [[Synchrotron Self-Compton]] <br />
** [[Compton Catastrophe]] --><br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz17.ipynb Activity Sheet 17] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz17.ipyn datahub.berkeley.edu])<br />
** reading SSC spectra, inferring castrophe<br />
<br />
==== (Nov. 18) dust and grains====<br />
* Topics:<br />
** [[Dust Absorption and Scattering]]<br />
** dust formation/sublimation<br />
** [[Poynting-Robertson Effect]]<br />
* Activities<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps10.pdf Problem Set 10] assigned<br />
<br />
==== (Nov. 23) No Class ====<br />
<br />
==== (Nov. 25) No Class ====<br />
<br />
==== (Dec. 1) radiative diffusion ====<br />
* Topics:<br />
** [[Radiative Diffusion]]<br />
** bolometric radiative equilibrium<br />
** greenhouse effect<br />
* Activities<br />
**<br />
<br />
==== (Dec. 2) Review ====<br />
* Review<br />
<br />
== Misc Topics ==<br />
** [[21cm Transition]]<br />
** [[Wouthuysen Field effect]]<br />
** [[Radiative Transfer Codes]]<br />
** [[Frequency Redistribution in Non-Coherent Scattering]]<br />
** [[Cherenkov Radiation]]<br />
** [[Monte Carlo Methods]]<br />
** [[Numerical Methods for Ordinary Differential Equations]]<br />
<br />
== Legacy Lecture Notes ==<br />
# [[Radiation Lecture 01]]<br />
# [[Radiation Lecture 02]]<br />
# [[Radiation Lecture 03]]<br />
# [[Radiation Lecture 04]]<br />
# [[Radiation Lecture 05]]<br />
# [[Radiation Lecture 06]]<br />
# [[Radiation Lecture 07]]<br />
# [[Radiation Lecture 08]]<br />
# [[Radiation Lecture 09]]<br />
# [[Radiation Lecture 10]]<br />
# [[Radiation Lecture 11]]<br />
# [[Radiation Lecture 12]]<br />
# [[Radiation Lecture 13]]<br />
# [[Radiation Lecture 14]]<br />
# [[Radiation Lecture 15]]<br />
# [[Radiation Lecture 16]]<br />
# [[Radiation Lecture 17]]<br />
# [[Radiation Lecture 18]]<br />
# [[Radiation Lecture 19]]<br />
# [[Radiation Lecture 20]]<br />
# [[Radiation Lecture 21]]<br />
# [[Radiation Lecture 22]]<br />
# [[Radiation Lecture 23]]<br />
# [[Radiation Lecture 24]]<br />
# [[Radiation Lecture 25]]<br />
# [[Radiation Lecture 26]]</div>AparsonsRadiative Processes in Astrophysics2021-08-26T17:42:09Z<p>Aparsons: /* Topics by Date */</p>
<hr />
<div>An introduction to the basic physics of astronomy and astrophysics at the graduate level. Principles of energy transfer by radiation. Elements of classical and quantum theory of photon emission; bremsstrahlung, synchrotron radiation. Compton scattering, plasma effects, atomic and molecular electromagnetic transitions. With applications to current research into astrophysical phenomena.<br />
<br />
These are a collection of lectures covering topics in an introductory graduate astrophysics course on radiative processes. The subject matter is loosely drawn from [http://adsabs.harvard.edu/abs/1981PEPI...25..432L Radiative Processes in Astrophysics] by Rybicki & Lightman.<br />
<br />
At the end of the semester, each student will develop one new lecture on a subject of their choice to add to this website.<br />
<br />
=== Class Code Repository ===<br />
[http://github.com/AaronParsons/astro207 http://github.com/AaronParsons/astro207]<br />
<br />
=== Syllabus ===<br />
* [https://github.com/AaronParsons/astro207/blob/main/syllabus.docx Syllabus]<br />
* [https://github.com/AaronParsons/astro207/blob/main/constants/constants.pdf Sheet of constants and equations]<br />
<br />
=== Useful External References ===<br />
* Rybicki and Lightman, [http://books.google.com/books?id=eswe2StAspsC&printsec=frontcover&dq=radiative+processes+in+astrophysics&hl=en&sa=X&ei=wkcGT-6HMISTiQKo3IQa&ved=0CDgQ6AEwAA#v=onepage&q=radiative%20processes%20in%20astrophysics&f=false'' '''Radiative Processes in Astrophysics'''] (course reference)<br />
* Mihalas and Mihalas, [http://books.google.com/books?id=f75C_GN9KZwC&printsec=frontcover&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false '''Foundations of Radiation Hydrodynamics''']<br />
* Osterbrock and Ferland, [http://books.google.com/books?id=6GIXMFpET4cC&printsec=frontcover&dq=osterbrock&hl=en&sa=X&ei=OUgGT8-0MuOZiAKOmoUS&ved=0CDEQ6AEwAA#v=onepage&q=osterbrock&f=false '''Astrophysics of Gaseous Nebulae and Active Galactic Nuclei''']<br />
* Shu, '[http://books.google.com/books/about/The_Physics_of_Astrophysics_Radiation.html?id=BxE1AQAAIAAJ, '''The Physics of Astrophysics, Volume I: Radiation''']<br />
* Longair, [http://books.google.com/books?id=KGe3FVbDNk4C&printsec=frontcover&dq=longair+high+energy+astrophysics&hl=en&ei=2m4QT5GgEuTWiALvkdWjDQ&sa=X&oi=book_result&ct=book-thumbnail&resnum=1&ved=0CDQQ6wEwAA#v=onepage&q=longair%20high%20energy%20astrophysics&f=false, '''High Energy Astrophysics''']<br />
* Mihalas, [http://www.nhn.ou.edu/~baron/ast4303/index.html '''Stellar Atmospheres''']<br />
* Rutten, [http://ntc0.lbl.gov/~kasen/references/rutten_stellar_atmospheres.pdf '''Radiative Transfer in Stellar Atmospheres''']<br />
* Eddie Baron's [http://www.nhn.ou.edu/~baron/grk_lectures/index.html GRK Lectures on Radiation Transport]<br />
* Tony Readhead's [http://www.astro.caltech.edu/~ycao/ay121/Ay121/notes.html Notes]<br />
* Feynman's [http://www.feynmanlectures.caltech.edu/II_toc.html Lectures on Physics, Volume II]<br />
<br />
== Topics by Date ==<br />
<br />
====(Aug. 26) Radiative Quantities (RL 1.1-1.3; Mil 1.1-1.3)====<br />
* class mechanics<br />
** syllabus<br />
** references<br />
*** Rybicki & Lightman<br />
*** Astrobaki: learn better by teaching<br />
** tools for figuring stuff out<br />
*** theoretical derivation<br />
*** order-of-magnitude estimation<br />
*** physical intuition (hands-on modeling, analogies)<br />
*** numerical simulation<br />
** programming<br />
*** [[Python Installation and Basic Programming]]<br />
*** [[Revision Control]] (class repository)<br />
*** [[Jupyter Notebooks]] (for visualizations and collaborating)<br />
* Topics<br />
** [[Specific Intensity]] <br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/01_Activity_Sheet.ipynb Activity Sheet 1]<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/01_Activity_Sheet_Answers.ipynb Activity Sheet 1 solutions]<br />
<br />
====(Aug. 31) radiative transport (RL 1.4; Mil 2.1-2.2)====<br />
* Topics<br />
** [[Radiative Transfer Equation]]<br />
** [[Optical Depth]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz02.ipynb Activity Sheet 2]<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz02-ans.ipynb Activity Sheet 2 solutions]<br />
** sliding pennies<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps01.pdf Problem Set 1] assigned<br />
** [https://github.com/AaronParsons/astro207/blob/main/vega_spectrum.dat vega_spectrum.dat]<br />
** [https://github.com/AaronParsons/astro207/blob/main/bessel_V.dat bessel_V.dat]<br />
<br />
==== (Sep. 2) Maxwell's Equations and Plane Waves ====<br />
* Topics<br />
** [[Maxwell Equations]] for Electromagnetic Waves<br />
** [[Electromagnetic Plane Waves]]<br />
** [[Energy Density]] of Electromagnetic Waves<br />
** [[Larmor Formula]]<br />
** [[Fourier Transform]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz03.ipynb Activity Sheet 3]<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz03-ans.ipynb Activity Sheet 3 solutions]<br />
** [https://github.com/AaronParsons/astro207/blob/main/notebooks/Larmor%20Radiation.ipynb Larmor Demo]<br />
** Impedance of free space<br />
<br />
====(Sep. 7) scattering and absorption (RL 1.4, 1.7; Mil 2.1-2.2)====<br />
* Topics:<br />
** [[Basic Scattering]]<br />
** [[Central Limit Theorem]]<br />
** [[Random Walks]]<br />
** [[Degeneracy]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz04.ipynb Activity Sheet 4] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz04.ipyn datahub.berkeley.edu])<br />
** photon diffusion<br />
** high beams in fog<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps02.pdf Problem Set 2] Assigned<br />
<br />
==== (Sep. 9) thermodynamic equilibrium (RL 1.5) ====<br />
* Topics<br />
** [[Black-Body Radiation]] (and Kirchoff's Law)<br />
** [[Boltzmann distribution]]<br />
** [[Maxwellian velocity distribution]]<br />
** [[Local Thermodynamic Equilibrium]] <br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz05.ipynb Activity Sheet 5] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz05.ipyn datahub.berkeley.edu])<br />
** flipping pennies, rolling dice<br />
** types of temperature<br />
<br />
==== (Sep. 14) semi-classical hydrogen ====<br />
* Topics:<br />
** [[Classical Bohr Atom]] <br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz06.ipynb Activity Sheet 6] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz06.ipyn datahub.berkeley.edu])<br />
** rederivation<br />
** Rydberg<br />
** dipoles/quadrupoles<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps03.pdf Problem Set 3] Assigned<br />
<br />
==== (Sep. 16) Einstein coefficients====<br />
* Topics:<br />
** [[Einstein Coefficients]]<br />
** [[Radiative Equilibrium]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz07.ipynb Activity Sheet 7] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz07.ipyn datahub.berkeley.edu])<br />
** estimating Einstein A for Ly-alpha<br />
** effective photon absorption crosssection<br />
<br />
==== (Sep. 21) spectral line broadening====<br />
* Topics<br />
** [[Line Profile Functions]]<br />
** [[Zeeman splitting]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz08.ipynb Activity Sheet 8] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz08.ipyn datahub.berkeley.edu])<br />
** what can you learn from a spectral line<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps04.pdf Problem Set 4] Assigned<br />
<br />
==== (Sep. 23) radiation from accelerating charges (RL 3.3-3.4)====<br />
* Topics<br />
** [[Estimating Atomic Transition Strengths]]<br />
** radiative dipole transitions<br />
** photoexcitation cross-section<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz09.ipynb Activity Sheet 9] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz09.ipyn datahub.berkeley.edu])<br />
** Einstein A for He+<br />
<br />
==== (Sep. 28) molecular lines (RL 11) ====<br />
* Topics<br />
** [[Atomic and Molecular Quantum Numbers]]<br />
** [[Rotational Transitions]]<br />
* Activities<br />
** CO Lecture <br />
* No Problem Set this week<br />
<br />
==== (Sep. 30) rovibrational transitions (RL 11) ====<br />
* Topics<br />
** [[Rovibrational Transitions]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz11.ipynb Activity Sheet 11] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz11.ipyn datahub.berkeley.edu])<br />
** Cooling with CO<br />
<br />
====(Oct. 5) masers ====<br />
* Topics<br />
** [[Masers]]<br />
* Activities<br />
** masers as transistors<br />
** laser pointers<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps05.pdf Problem Set 5] assigned<br />
<br />
==== (Oct. 7) collisional excitations ====<br />
* Topics:<br />
** [[Detailed Balance]]<br />
** [[Collisional Excitations]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz12.ipynb Activity Sheet 12] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz12.ipyn datahub.berkeley.edu])<br />
** more CO molecular clouds<br />
** collisional line-driven cooling<br />
<br />
==== (Oct. 12) free-free emission====<br />
* Topics<br />
** [[Thermal Bremsstrahlung]] (RL 5.1-5.3)<br />
** [[Opacity]]<br />
** [[Kramer's Opacity]]<br />
* Activities<br />
** free-free polarization<br />
** simulating a free-free interaction<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps06.pdf Problem Set 6] assigned<br />
<br />
==== (Oct. 14) charged cross-sections (RL 1.7-1.8; Mil 2.3-2.5)====<br />
* Topics:<br />
** [[Coulomb Focusing]]<br />
** [[Thomson Scattering]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz13.ipynb Activity Sheet 13] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz13.ipyn datahub.berkeley.edu])<br />
** electrons in the IGM<br />
<br />
==== (Oct. 19) bound-free transitions ====<br />
* Topics<br />
** [[Milne Relation]]<br />
** [[Saha Equation]]<br />
* Activities<br />
** stromgren spheres<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps07.pdf Problem Set 7] assigned<br />
<br />
==== (Oct. 21) LTE and non-LTE ====<br />
* Topics<br />
** [[Recombination Coefficients]]<br />
** [[Review of Equilibria]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz14.ipynb Activity Sheet 14] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz14.ipyn datahub.berkeley.edu])<br />
** estimating recombination coefficients<br />
** work out in detail redshift of recombination<br />
<br />
==== (Oct. 26) plasma effects====<br />
* Topics<br />
** [[Plasma Frequency]]<br />
** [[dispersion measure]] (RL 8.1)<br />
** polarization<br />
** [[Faraday rotation]] (RL 8.1-8.2)<br />
** [[Stokes parameters]]<br />
* Activities<br />
** start de-dispersion coding<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps08.pdf Problem Set 8] assigned<br />
** [https://github.com/AaronParsons/astro207/blob/main/pulsar.dat pulsar.dat]<br />
<br />
==== (Oct. 28) compton scattering ====<br />
* Topics<br />
** [[Lorentz transformations]]<br />
** [[Doppler shift]]<br />
** radiation from relativistic charges (RL 4.1, 4.2, 4.8; Grif 10.1)<br />
** [[Compton Scattering]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz15.ipynb Activity Sheet 15] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz15.ipyn datahub.berkeley.edu])<br />
** relativistic intuition, velocity raptor<br />
** CMB coupling via compton<br />
<br />
==== (Nov. 2) Inverse Compton scattering====<br />
* Topics:<br />
** [[Inverse Compton Scattering]]<br />
** [[SZ Effect]] (RL 7.1-7.5)<br />
* Activities<br />
** single scattering versus ensemble scattering<br />
** compton saturation<br />
* No problem set<br />
<br />
==== (Nov. 4) Synchrotron Introduction ====<br />
* Topics:<br />
** [[Introduction to Synchrotron Radiation and Relativistic Beaming]]<br />
<!-- ** [[Synchrotron Frequency]]<br />
** [[Synchrotron Polarization]] --><br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz16.ipynb Activity Sheet 16] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz16.ipyn datahub.berkeley.edu])<br />
** beaming, superluminal motion, monte carlo compton<br />
<br />
==== (Nov. 9) Synchrotron Radiation ====<br />
* Topics<br />
** [[Synchrotron Radiation]]<br />
<!-- ** [[Single Electron Power Spectrum]]<br />
** [[Synchrotron Spectrum]] (RL 6.1-6.8)<br />
** [[Effect of Cooling Time on Synchrotron Spectra]] --><br />
* Activities<br />
** re-deriving synchrotron spectrum<br />
** phenomenological description of synchrotron decay<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps09.pdf Problem Set 9] assigned<br />
<br />
==== (Nov. 11) No Class (Veterans day) ====<br />
<br />
==== (Nov. 16) Synchrotron Self-Interactions ====<br />
* Topics<br />
** [[Synchrotron Self-Interactions]]<br />
<!-- ** [[Synchrotron Self-Compton]] <br />
** [[Compton Catastrophe]] --><br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz17.ipynb Activity Sheet 17] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz17.ipyn datahub.berkeley.edu])<br />
** reading SSC spectra, inferring castrophe<br />
<br />
==== (Nov. 18) dust and grains====<br />
* Topics:<br />
** [[Dust Absorption and Scattering]]<br />
** dust formation/sublimation<br />
** [[Poynting-Robertson Effect]]<br />
* Activities<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps10.pdf Problem Set 10] assigned<br />
<br />
==== (Nov. 23) No Class ====<br />
<br />
==== (Nov. 25) No Class ====<br />
<br />
==== (Dec. 1) radiative diffusion ====<br />
* Topics:<br />
** [[Radiative Diffusion]]<br />
** bolometric radiative equilibrium<br />
** greenhouse effect<br />
* Activities<br />
**<br />
<br />
==== (Dec. 2) Review ====<br />
* Review<br />
<br />
== Misc Topics ==<br />
** [[21cm Transition]]<br />
** [[Wouthuysen Field effect]]<br />
** [[Radiative Transfer Codes]]<br />
** [[Frequency Redistribution in Non-Coherent Scattering]]<br />
** [[Cherenkov Radiation]]<br />
** [[Monte Carlo Methods]]<br />
** [[Numerical Methods for Ordinary Differential Equations]]<br />
<br />
== Legacy Lecture Notes ==<br />
# [[Radiation Lecture 01]]<br />
# [[Radiation Lecture 02]]<br />
# [[Radiation Lecture 03]]<br />
# [[Radiation Lecture 04]]<br />
# [[Radiation Lecture 05]]<br />
# [[Radiation Lecture 06]]<br />
# [[Radiation Lecture 07]]<br />
# [[Radiation Lecture 08]]<br />
# [[Radiation Lecture 09]]<br />
# [[Radiation Lecture 10]]<br />
# [[Radiation Lecture 11]]<br />
# [[Radiation Lecture 12]]<br />
# [[Radiation Lecture 13]]<br />
# [[Radiation Lecture 14]]<br />
# [[Radiation Lecture 15]]<br />
# [[Radiation Lecture 16]]<br />
# [[Radiation Lecture 17]]<br />
# [[Radiation Lecture 18]]<br />
# [[Radiation Lecture 19]]<br />
# [[Radiation Lecture 20]]<br />
# [[Radiation Lecture 21]]<br />
# [[Radiation Lecture 22]]<br />
# [[Radiation Lecture 23]]<br />
# [[Radiation Lecture 24]]<br />
# [[Radiation Lecture 25]]<br />
# [[Radiation Lecture 26]]</div>AparsonsRadiative Processes in Astrophysics2021-08-25T23:55:31Z<p>Aparsons: </p>
<hr />
<div>An introduction to the basic physics of astronomy and astrophysics at the graduate level. Principles of energy transfer by radiation. Elements of classical and quantum theory of photon emission; bremsstrahlung, synchrotron radiation. Compton scattering, plasma effects, atomic and molecular electromagnetic transitions. With applications to current research into astrophysical phenomena.<br />
<br />
These are a collection of lectures covering topics in an introductory graduate astrophysics course on radiative processes. The subject matter is loosely drawn from [http://adsabs.harvard.edu/abs/1981PEPI...25..432L Radiative Processes in Astrophysics] by Rybicki & Lightman.<br />
<br />
At the end of the semester, each student will develop one new lecture on a subject of their choice to add to this website.<br />
<br />
=== Class Code Repository ===<br />
[http://github.com/AaronParsons/astro207 http://github.com/AaronParsons/astro207]<br />
<br />
=== Syllabus ===<br />
* [https://github.com/AaronParsons/astro207/blob/main/syllabus.docx Syllabus]<br />
* [https://github.com/AaronParsons/astro207/blob/main/constants/constants.pdf Sheet of constants and equations]<br />
<br />
=== Useful External References ===<br />
* Rybicki and Lightman, [http://books.google.com/books?id=eswe2StAspsC&printsec=frontcover&dq=radiative+processes+in+astrophysics&hl=en&sa=X&ei=wkcGT-6HMISTiQKo3IQa&ved=0CDgQ6AEwAA#v=onepage&q=radiative%20processes%20in%20astrophysics&f=false'' '''Radiative Processes in Astrophysics'''] (course reference)<br />
* Mihalas and Mihalas, [http://books.google.com/books?id=f75C_GN9KZwC&printsec=frontcover&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false '''Foundations of Radiation Hydrodynamics''']<br />
* Osterbrock and Ferland, [http://books.google.com/books?id=6GIXMFpET4cC&printsec=frontcover&dq=osterbrock&hl=en&sa=X&ei=OUgGT8-0MuOZiAKOmoUS&ved=0CDEQ6AEwAA#v=onepage&q=osterbrock&f=false '''Astrophysics of Gaseous Nebulae and Active Galactic Nuclei''']<br />
* Shu, '[http://books.google.com/books/about/The_Physics_of_Astrophysics_Radiation.html?id=BxE1AQAAIAAJ, '''The Physics of Astrophysics, Volume I: Radiation''']<br />
* Longair, [http://books.google.com/books?id=KGe3FVbDNk4C&printsec=frontcover&dq=longair+high+energy+astrophysics&hl=en&ei=2m4QT5GgEuTWiALvkdWjDQ&sa=X&oi=book_result&ct=book-thumbnail&resnum=1&ved=0CDQQ6wEwAA#v=onepage&q=longair%20high%20energy%20astrophysics&f=false, '''High Energy Astrophysics''']<br />
* Mihalas, [http://www.nhn.ou.edu/~baron/ast4303/index.html '''Stellar Atmospheres''']<br />
* Rutten, [http://ntc0.lbl.gov/~kasen/references/rutten_stellar_atmospheres.pdf '''Radiative Transfer in Stellar Atmospheres''']<br />
* Eddie Baron's [http://www.nhn.ou.edu/~baron/grk_lectures/index.html GRK Lectures on Radiation Transport]<br />
* Tony Readhead's [http://www.astro.caltech.edu/~ycao/ay121/Ay121/notes.html Notes]<br />
* Feynman's [http://www.feynmanlectures.caltech.edu/II_toc.html Lectures on Physics, Volume II]<br />
<br />
== Topics by Date ==<br />
<br />
====(Aug. 26) Radiative Quantities (RL 1.1-1.3; Mil 1.1-1.3)====<br />
* class mechanics<br />
** syllabus<br />
** references<br />
*** Rybicki & Lightman<br />
*** Astrobaki: learn better by teaching<br />
** tools for figuring stuff out<br />
*** theoretical derivation<br />
*** order-of-magnitude estimation<br />
*** physical intuition (hands-on modeling, analogies)<br />
*** numerical simulation<br />
** programming<br />
*** [[Python Installation and Basic Programming]]<br />
*** [[Revision Control]] (class repository)<br />
*** [[Jupyter Notebooks]] (for visualizations and collaborating)<br />
* Topics<br />
** [[Specific Intensity]] <br />
* Activities<br />
** convert photon number density to specific intensity<br />
<br />
====(Aug. 31) radiative transport (RL 1.4; Mil 2.1-2.2)====<br />
* Topics<br />
** [[Radiative Transfer Equation]]<br />
** [[Optical Depth]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz02.ipynb Activity Sheet 2]<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz02-ans.ipynb Activity Sheet 2 solutions]<br />
** sliding pennies<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps01.pdf Problem Set 1] assigned<br />
** [https://github.com/AaronParsons/astro207/blob/main/vega_spectrum.dat vega_spectrum.dat]<br />
** [https://github.com/AaronParsons/astro207/blob/main/bessel_V.dat bessel_V.dat]<br />
<br />
==== (Sep. 2) Maxwell's Equations and Plane Waves ====<br />
* Topics<br />
** [[Maxwell Equations]] for Electromagnetic Waves<br />
** [[Electromagnetic Plane Waves]]<br />
** [[Energy Density]] of Electromagnetic Waves<br />
** [[Larmor Formula]]<br />
** [[Fourier Transform]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz03.ipynb Activity Sheet 3]<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz03-ans.ipynb Activity Sheet 3 solutions]<br />
** [https://github.com/AaronParsons/astro207/blob/main/notebooks/Larmor%20Radiation.ipynb Larmor Demo]<br />
** Impedance of free space<br />
<br />
====(Sep. 7) scattering and absorption (RL 1.4, 1.7; Mil 2.1-2.2)====<br />
* Topics:<br />
** [[Basic Scattering]]<br />
** [[Central Limit Theorem]]<br />
** [[Random Walks]]<br />
** [[Degeneracy]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz04.ipynb Activity Sheet 4] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz04.ipyn datahub.berkeley.edu])<br />
** photon diffusion<br />
** high beams in fog<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps02.pdf Problem Set 2] Assigned<br />
<br />
==== (Sep. 9) thermodynamic equilibrium (RL 1.5) ====<br />
* Topics<br />
** [[Black-Body Radiation]] (and Kirchoff's Law)<br />
** [[Boltzmann distribution]]<br />
** [[Maxwellian velocity distribution]]<br />
** [[Local Thermodynamic Equilibrium]] <br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz05.ipynb Activity Sheet 5] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz05.ipyn datahub.berkeley.edu])<br />
** flipping pennies, rolling dice<br />
** types of temperature<br />
<br />
==== (Sep. 14) semi-classical hydrogen ====<br />
* Topics:<br />
** [[Classical Bohr Atom]] <br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz06.ipynb Activity Sheet 6] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz06.ipyn datahub.berkeley.edu])<br />
** rederivation<br />
** Rydberg<br />
** dipoles/quadrupoles<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps03.pdf Problem Set 3] Assigned<br />
<br />
==== (Sep. 16) Einstein coefficients====<br />
* Topics:<br />
** [[Einstein Coefficients]]<br />
** [[Radiative Equilibrium]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz07.ipynb Activity Sheet 7] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz07.ipyn datahub.berkeley.edu])<br />
** estimating Einstein A for Ly-alpha<br />
** effective photon absorption crosssection<br />
<br />
==== (Sep. 21) spectral line broadening====<br />
* Topics<br />
** [[Line Profile Functions]]<br />
** [[Zeeman splitting]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz08.ipynb Activity Sheet 8] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz08.ipyn datahub.berkeley.edu])<br />
** what can you learn from a spectral line<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps04.pdf Problem Set 4] Assigned<br />
<br />
==== (Sep. 23) radiation from accelerating charges (RL 3.3-3.4)====<br />
* Topics<br />
** [[Estimating Atomic Transition Strengths]]<br />
** radiative dipole transitions<br />
** photoexcitation cross-section<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz09.ipynb Activity Sheet 9] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz09.ipyn datahub.berkeley.edu])<br />
** Einstein A for He+<br />
<br />
==== (Sep. 28) molecular lines (RL 11) ====<br />
* Topics<br />
** [[Atomic and Molecular Quantum Numbers]]<br />
** [[Rotational Transitions]]<br />
* Activities<br />
** CO Lecture <br />
* No Problem Set this week<br />
<br />
==== (Sep. 30) rovibrational transitions (RL 11) ====<br />
* Topics<br />
** [[Rovibrational Transitions]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz11.ipynb Activity Sheet 11] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz11.ipyn datahub.berkeley.edu])<br />
** Cooling with CO<br />
<br />
====(Oct. 5) masers ====<br />
* Topics<br />
** [[Masers]]<br />
* Activities<br />
** masers as transistors<br />
** laser pointers<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps05.pdf Problem Set 5] assigned<br />
<br />
==== (Oct. 7) collisional excitations ====<br />
* Topics:<br />
** [[Detailed Balance]]<br />
** [[Collisional Excitations]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz12.ipynb Activity Sheet 12] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz12.ipyn datahub.berkeley.edu])<br />
** more CO molecular clouds<br />
** collisional line-driven cooling<br />
<br />
==== (Oct. 12) free-free emission====<br />
* Topics<br />
** [[Thermal Bremsstrahlung]] (RL 5.1-5.3)<br />
** [[Opacity]]<br />
** [[Kramer's Opacity]]<br />
* Activities<br />
** free-free polarization<br />
** simulating a free-free interaction<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps06.pdf Problem Set 6] assigned<br />
<br />
==== (Oct. 14) charged cross-sections (RL 1.7-1.8; Mil 2.3-2.5)====<br />
* Topics:<br />
** [[Coulomb Focusing]]<br />
** [[Thomson Scattering]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz13.ipynb Activity Sheet 13] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz13.ipyn datahub.berkeley.edu])<br />
** electrons in the IGM<br />
<br />
==== (Oct. 19) bound-free transitions ====<br />
* Topics<br />
** [[Milne Relation]]<br />
** [[Saha Equation]]<br />
* Activities<br />
** stromgren spheres<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps07.pdf Problem Set 7] assigned<br />
<br />
==== (Oct. 21) LTE and non-LTE ====<br />
* Topics<br />
** [[Recombination Coefficients]]<br />
** [[Review of Equilibria]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz14.ipynb Activity Sheet 14] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz14.ipyn datahub.berkeley.edu])<br />
** estimating recombination coefficients<br />
** work out in detail redshift of recombination<br />
<br />
==== (Oct. 26) plasma effects====<br />
* Topics<br />
** [[Plasma Frequency]]<br />
** [[dispersion measure]] (RL 8.1)<br />
** polarization<br />
** [[Faraday rotation]] (RL 8.1-8.2)<br />
** [[Stokes parameters]]<br />
* Activities<br />
** start de-dispersion coding<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps08.pdf Problem Set 8] assigned<br />
** [https://github.com/AaronParsons/astro207/blob/main/pulsar.dat pulsar.dat]<br />
<br />
==== (Oct. 28) compton scattering ====<br />
* Topics<br />
** [[Lorentz transformations]]<br />
** [[Doppler shift]]<br />
** radiation from relativistic charges (RL 4.1, 4.2, 4.8; Grif 10.1)<br />
** [[Compton Scattering]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz15.ipynb Activity Sheet 15] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz15.ipyn datahub.berkeley.edu])<br />
** relativistic intuition, velocity raptor<br />
** CMB coupling via compton<br />
<br />
==== (Nov. 2) Inverse Compton scattering====<br />
* Topics:<br />
** [[Inverse Compton Scattering]]<br />
** [[SZ Effect]] (RL 7.1-7.5)<br />
* Activities<br />
** single scattering versus ensemble scattering<br />
** compton saturation<br />
* No problem set<br />
<br />
==== (Nov. 4) Synchrotron Introduction ====<br />
* Topics:<br />
** [[Introduction to Synchrotron Radiation and Relativistic Beaming]]<br />
<!-- ** [[Synchrotron Frequency]]<br />
** [[Synchrotron Polarization]] --><br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz16.ipynb Activity Sheet 16] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz16.ipyn datahub.berkeley.edu])<br />
** beaming, superluminal motion, monte carlo compton<br />
<br />
==== (Nov. 9) Synchrotron Radiation ====<br />
* Topics<br />
** [[Synchrotron Radiation]]<br />
<!-- ** [[Single Electron Power Spectrum]]<br />
** [[Synchrotron Spectrum]] (RL 6.1-6.8)<br />
** [[Effect of Cooling Time on Synchrotron Spectra]] --><br />
* Activities<br />
** re-deriving synchrotron spectrum<br />
** phenomenological description of synchrotron decay<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps09.pdf Problem Set 9] assigned<br />
<br />
==== (Nov. 11) No Class (Veterans day) ====<br />
<br />
==== (Nov. 16) Synchrotron Self-Interactions ====<br />
* Topics<br />
** [[Synchrotron Self-Interactions]]<br />
<!-- ** [[Synchrotron Self-Compton]] <br />
** [[Compton Catastrophe]] --><br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2021/Quiz17.ipynb Activity Sheet 17] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2021/Quiz17.ipyn datahub.berkeley.edu])<br />
** reading SSC spectra, inferring castrophe<br />
<br />
==== (Nov. 18) dust and grains====<br />
* Topics:<br />
** [[Dust Absorption and Scattering]]<br />
** dust formation/sublimation<br />
** [[Poynting-Robertson Effect]]<br />
* Activities<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2021/ps10.pdf Problem Set 10] assigned<br />
<br />
==== (Nov. 23) No Class ====<br />
<br />
==== (Nov. 25) No Class ====<br />
<br />
==== (Dec. 1) radiative diffusion ====<br />
* Topics:<br />
** [[Radiative Diffusion]]<br />
** bolometric radiative equilibrium<br />
** greenhouse effect<br />
* Activities<br />
**<br />
<br />
==== (Dec. 2) Review ====<br />
* Review<br />
<br />
== Misc Topics ==<br />
** [[21cm Transition]]<br />
** [[Wouthuysen Field effect]]<br />
** [[Radiative Transfer Codes]]<br />
** [[Frequency Redistribution in Non-Coherent Scattering]]<br />
** [[Cherenkov Radiation]]<br />
** [[Monte Carlo Methods]]<br />
** [[Numerical Methods for Ordinary Differential Equations]]<br />
<br />
== Legacy Lecture Notes ==<br />
# [[Radiation Lecture 01]]<br />
# [[Radiation Lecture 02]]<br />
# [[Radiation Lecture 03]]<br />
# [[Radiation Lecture 04]]<br />
# [[Radiation Lecture 05]]<br />
# [[Radiation Lecture 06]]<br />
# [[Radiation Lecture 07]]<br />
# [[Radiation Lecture 08]]<br />
# [[Radiation Lecture 09]]<br />
# [[Radiation Lecture 10]]<br />
# [[Radiation Lecture 11]]<br />
# [[Radiation Lecture 12]]<br />
# [[Radiation Lecture 13]]<br />
# [[Radiation Lecture 14]]<br />
# [[Radiation Lecture 15]]<br />
# [[Radiation Lecture 16]]<br />
# [[Radiation Lecture 17]]<br />
# [[Radiation Lecture 18]]<br />
# [[Radiation Lecture 19]]<br />
# [[Radiation Lecture 20]]<br />
# [[Radiation Lecture 21]]<br />
# [[Radiation Lecture 22]]<br />
# [[Radiation Lecture 23]]<br />
# [[Radiation Lecture 24]]<br />
# [[Radiation Lecture 25]]<br />
# [[Radiation Lecture 26]]</div>AparsonsRadiative Processes in Astrophysics2021-08-20T20:10:33Z<p>Aparsons: </p>
<hr />
<div>An introduction to the basic physics of astronomy and astrophysics at the graduate level. Principles of energy transfer by radiation. Elements of classical and quantum theory of photon emission; bremsstrahlung, synchrotron radiation. Compton scattering, plasma effects, atomic and molecular electromagnetic transitions. With applications to current research into astrophysical phenomena.<br />
<br />
These are a collection of lectures covering topics in an introductory graduate astrophysics course on radiative processes. The subject matter is loosely drawn from [http://adsabs.harvard.edu/abs/1981PEPI...25..432L Radiative Processes in Astrophysics] by Rybicki & Lightman.<br />
<br />
At the end of the semester, each student will develop one new lecture on a subject of their choice to add to this website.<br />
<br />
=== Class Code Repository ===<br />
[http://github.com/AaronParsons/astro207 http://github.com/AaronParsons/astro207]<br />
<br />
=== Syllabus ===<br />
* [https://github.com/AaronParsons/astro207/blob/main/syllabus.docx Syllabus]<br />
* [https://github.com/AaronParsons/astro207/blob/main/constants/constants.pdf Sheet of constants and equations]<br />
<br />
=== Useful External References ===<br />
* Rybicki and Lightman, [http://books.google.com/books?id=eswe2StAspsC&printsec=frontcover&dq=radiative+processes+in+astrophysics&hl=en&sa=X&ei=wkcGT-6HMISTiQKo3IQa&ved=0CDgQ6AEwAA#v=onepage&q=radiative%20processes%20in%20astrophysics&f=false'' '''Radiative Processes in Astrophysics'''] (course reference)<br />
* Mihalas and Mihalas, [http://books.google.com/books?id=f75C_GN9KZwC&printsec=frontcover&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false '''Foundations of Radiation Hydrodynamics''']<br />
* Osterbrock and Ferland, [http://books.google.com/books?id=6GIXMFpET4cC&printsec=frontcover&dq=osterbrock&hl=en&sa=X&ei=OUgGT8-0MuOZiAKOmoUS&ved=0CDEQ6AEwAA#v=onepage&q=osterbrock&f=false '''Astrophysics of Gaseous Nebulae and Active Galactic Nuclei''']<br />
* Shu, '[http://books.google.com/books/about/The_Physics_of_Astrophysics_Radiation.html?id=BxE1AQAAIAAJ, '''The Physics of Astrophysics, Volume I: Radiation''']<br />
* Longair, [http://books.google.com/books?id=KGe3FVbDNk4C&printsec=frontcover&dq=longair+high+energy+astrophysics&hl=en&ei=2m4QT5GgEuTWiALvkdWjDQ&sa=X&oi=book_result&ct=book-thumbnail&resnum=1&ved=0CDQQ6wEwAA#v=onepage&q=longair%20high%20energy%20astrophysics&f=false, '''High Energy Astrophysics''']<br />
* Mihalas, [http://www.nhn.ou.edu/~baron/ast4303/index.html '''Stellar Atmospheres''']<br />
* Rutten, [http://ntc0.lbl.gov/~kasen/references/rutten_stellar_atmospheres.pdf '''Radiative Transfer in Stellar Atmospheres''']<br />
* Eddie Baron's [http://www.nhn.ou.edu/~baron/grk_lectures/index.html GRK Lectures on Radiation Transport]<br />
* Tony Readhead's [http://www.astro.caltech.edu/~ycao/ay121/Ay121/notes.html Notes]<br />
* Feynman's [http://www.feynmanlectures.caltech.edu/II_toc.html Lectures on Physics, Volume II]<br />
<br />
== Topics by Date ==<br />
<br />
====(Aug. 26) Radiative Quantities (RL 1.1-1.3; Mil 1.1-1.3)====<br />
* class mechanics<br />
** syllabus<br />
** references<br />
*** Rybicki & Lightman<br />
*** Astrobaki: learn better by teaching<br />
** tools for figuring stuff out<br />
*** theoretical derivation<br />
*** order-of-magnitude estimation<br />
*** physical intuition (hands-on modeling, analogies)<br />
*** numerical simulation<br />
** programming<br />
*** [[Python Installation and Basic Programming]]<br />
*** [[Revision Control]] (class repository)<br />
*** [[Jupyter Notebooks]] (for visualizations and collaborating)<br />
* Topics<br />
** [[Specific Intensity]] <br />
* Activities<br />
** convert photon number density to specific intensity<br />
<br />
====(Aug. 31) radiative transport (RL 1.4; Mil 2.1-2.2)====<br />
* Topics<br />
** [[Radiative Transfer Equation]]<br />
** [[Optical Depth]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2020/Quiz02.ipynb Activity Sheet 2]<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2020/Quiz02-ans.ipynb Activity Sheet 2 solutions]<br />
** sliding pennies<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2020/ps01.pdf Problem Set 1] assigned<br />
** [https://github.com/AaronParsons/astro207/blob/main/vega_spectrum.dat vega_spectrum.dat]<br />
** [https://github.com/AaronParsons/astro207/blob/main/bessel_V.dat bessel_V.dat]<br />
<br />
==== (Sep. 2) Maxwell's Equations and Plane Waves ====<br />
* Topics<br />
** [[Maxwell Equations]] for Electromagnetic Waves<br />
** [[Electromagnetic Plane Waves]]<br />
** [[Energy Density]] of Electromagnetic Waves<br />
** [[Larmor Formula]]<br />
** [[Fourier Transform]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2020/Quiz03.ipynb Activity Sheet 3]<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2020/Quiz03-ans.ipynb Activity Sheet 3 solutions]<br />
** [https://github.com/AaronParsons/astro207/blob/main/notebooks/Larmor%20Radiation.ipynb Larmor Demo]<br />
** Impedance of free space<br />
<br />
====(Sep. 7) scattering and absorption (RL 1.4, 1.7; Mil 2.1-2.2)====<br />
* Topics:<br />
** [[Basic Scattering]]<br />
** [[Central Limit Theorem]]<br />
** [[Random Walks]]<br />
** [[Degeneracy]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2020/Quiz04.ipynb Activity Sheet 4] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2020/Quiz04.ipyn datahub.berkeley.edu])<br />
** photon diffusion<br />
** high beams in fog<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2020/ps02.pdf Problem Set 2] Assigned<br />
<br />
==== (Sep. 9) thermodynamic equilibrium (RL 1.5) ====<br />
* Topics<br />
** [[Black-Body Radiation]] (and Kirchoff's Law)<br />
** [[Boltzmann distribution]]<br />
** [[Maxwellian velocity distribution]]<br />
** [[Local Thermodynamic Equilibrium]] <br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2020/Quiz05.ipynb Activity Sheet 5] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2020/Quiz05.ipyn datahub.berkeley.edu])<br />
** flipping pennies, rolling dice<br />
** types of temperature<br />
<br />
==== (Sep. 14) semi-classical hydrogen ====<br />
* Topics:<br />
** [[Classical Bohr Atom]] <br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2020/Quiz06.ipynb Activity Sheet 6] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2020/Quiz06.ipyn datahub.berkeley.edu])<br />
** rederivation<br />
** Rydberg<br />
** dipoles/quadrupoles<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2020/ps03.pdf Problem Set 3] Assigned<br />
<br />
==== (Sep. 16) Einstein coefficients====<br />
* Topics:<br />
** [[Einstein Coefficients]]<br />
** [[Radiative Equilibrium]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2020/Quiz07.ipynb Activity Sheet 7] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2020/Quiz07.ipyn datahub.berkeley.edu])<br />
** estimating Einstein A for Ly-alpha<br />
** effective photon absorption crosssection<br />
<br />
==== (Sep. 21) spectral line broadening====<br />
* Topics<br />
** [[Line Profile Functions]]<br />
** [[Zeeman splitting]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2020/Quiz08.ipynb Activity Sheet 8] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2020/Quiz08.ipyn datahub.berkeley.edu])<br />
** what can you learn from a spectral line<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2020/ps04.pdf Problem Set 4] Assigned<br />
<br />
==== (Sep. 23) radiation from accelerating charges (RL 3.3-3.4)====<br />
* Topics<br />
** [[Estimating Atomic Transition Strengths]]<br />
** radiative dipole transitions<br />
** photoexcitation cross-section<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2020/Quiz09.ipynb Activity Sheet 9] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2020/Quiz09.ipyn datahub.berkeley.edu])<br />
** Einstein A for He+<br />
<br />
==== (Sep. 28) molecular lines (RL 11) ====<br />
* Topics<br />
** [[Atomic and Molecular Quantum Numbers]]<br />
** [[Rotational Transitions]]<br />
* Activities<br />
** CO Lecture <br />
* No Problem Set this week<br />
<br />
==== (Sep. 30) rovibrational transitions (RL 11) ====<br />
* Topics<br />
** [[Rovibrational Transitions]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2020/Quiz11.ipynb Activity Sheet 11] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2020/Quiz11.ipyn datahub.berkeley.edu])<br />
** Cooling with CO<br />
<br />
====(Oct. 5) masers ====<br />
* Topics<br />
** [[Masers]]<br />
* Activities<br />
** masers as transistors<br />
** laser pointers<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2020/ps05.pdf Problem Set 5] assigned<br />
<br />
==== (Oct. 7) collisional excitations ====<br />
* Topics:<br />
** [[Detailed Balance]]<br />
** [[Collisional Excitations]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2020/Quiz12.ipynb Activity Sheet 12] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2020/Quiz12.ipyn datahub.berkeley.edu])<br />
** more CO molecular clouds<br />
** collisional line-driven cooling<br />
<br />
==== (Oct. 12) free-free emission====<br />
* Topics<br />
** [[Thermal Bremsstrahlung]] (RL 5.1-5.3)<br />
** [[Opacity]]<br />
** [[Kramer's Opacity]]<br />
* Activities<br />
** free-free polarization<br />
** simulating a free-free interaction<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2020/ps06.pdf Problem Set 6] assigned<br />
<br />
==== (Oct. 14) charged cross-sections (RL 1.7-1.8; Mil 2.3-2.5)====<br />
* Topics:<br />
** [[Coulomb Focusing]]<br />
** [[Thomson Scattering]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2020/Quiz13.ipynb Activity Sheet 13] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2020/Quiz13.ipyn datahub.berkeley.edu])<br />
** electrons in the IGM<br />
<br />
==== (Oct. 19) bound-free transitions ====<br />
* Topics<br />
** [[Milne Relation]]<br />
** [[Saha Equation]]<br />
* Activities<br />
** stromgren spheres<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2020/ps07.pdf Problem Set 7] assigned<br />
<br />
==== (Oct. 21) LTE and non-LTE ====<br />
* Topics<br />
** [[Recombination Coefficients]]<br />
** [[Review of Equilibria]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2020/Quiz14.ipynb Activity Sheet 14] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2020/Quiz14.ipyn datahub.berkeley.edu])<br />
** estimating recombination coefficients<br />
** work out in detail redshift of recombination<br />
<br />
==== (Oct. 26) plasma effects====<br />
* Topics<br />
** [[Plasma Frequency]]<br />
** [[dispersion measure]] (RL 8.1)<br />
** polarization<br />
** [[Faraday rotation]] (RL 8.1-8.2)<br />
** [[Stokes parameters]]<br />
* Activities<br />
** start de-dispersion coding<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2020/ps08.pdf Problem Set 8] assigned<br />
** [https://github.com/AaronParsons/astro207/blob/main/pulsar.dat pulsar.dat]<br />
<br />
==== (Oct. 28) compton scattering ====<br />
* Topics<br />
** [[Lorentz transformations]]<br />
** [[Doppler shift]]<br />
** radiation from relativistic charges (RL 4.1, 4.2, 4.8; Grif 10.1)<br />
** [[Compton Scattering]]<br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2020/Quiz15.ipynb Activity Sheet 15] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2020/Quiz15.ipyn datahub.berkeley.edu])<br />
** relativistic intuition, velocity raptor<br />
** CMB coupling via compton<br />
<br />
==== (Nov. 2) Inverse Compton scattering====<br />
* Topics:<br />
** [[Inverse Compton Scattering]]<br />
** [[SZ Effect]] (RL 7.1-7.5)<br />
* Activities<br />
** single scattering versus ensemble scattering<br />
** compton saturation<br />
* No problem set<br />
<br />
==== (Nov. 4) Synchrotron Introduction ====<br />
* Topics:<br />
** [[Introduction to Synchrotron Radiation and Relativistic Beaming]]<br />
<!-- ** [[Synchrotron Frequency]]<br />
** [[Synchrotron Polarization]] --><br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2020/Quiz16.ipynb Activity Sheet 16] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2020/Quiz16.ipyn datahub.berkeley.edu])<br />
** beaming, superluminal motion, monte carlo compton<br />
<br />
==== (Nov. 9) Synchrotron Radiation ====<br />
* Topics<br />
** [[Synchrotron Radiation]]<br />
<!-- ** [[Single Electron Power Spectrum]]<br />
** [[Synchrotron Spectrum]] (RL 6.1-6.8)<br />
** [[Effect of Cooling Time on Synchrotron Spectra]] --><br />
* Activities<br />
** re-deriving synchrotron spectrum<br />
** phenomenological description of synchrotron decay<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2020/ps09.pdf Problem Set 9] assigned<br />
<br />
==== (Nov. 11) No Class (Veterans day) ====<br />
<br />
==== (Nov. 16) Synchrotron Self-Interactions ====<br />
* Topics<br />
** [[Synchrotron Self-Interactions]]<br />
<!-- ** [[Synchrotron Self-Compton]] <br />
** [[Compton Catastrophe]] --><br />
* Activities<br />
** [https://github.com/AaronParsons/astro207/blob/main/quiz_2020/Quiz17.ipynb Activity Sheet 17] (on [http://datahub.berkeley.edu/user-redirect/interact?account=AaronParsons&repo=astro207&branch=main&path=quiz_2020/Quiz17.ipyn datahub.berkeley.edu])<br />
** reading SSC spectra, inferring castrophe<br />
<br />
==== (Nov. 18) dust and grains====<br />
* Topics:<br />
** [[Dust Absorption and Scattering]]<br />
** dust formation/sublimation<br />
** [[Poynting-Robertson Effect]]<br />
* Activities<br />
* [https://github.com/AaronParsons/astro207/blob/main/ps_2020/ps10.pdf Problem Set 10] assigned<br />
<br />
==== (Nov. 23) No Class ====<br />
<br />
==== (Nov. 25) No Class ====<br />
<br />
==== (Dec. 1) radiative diffusion ====<br />
* Topics:<br />
** [[Radiative Diffusion]]<br />
** bolometric radiative equilibrium<br />
** greenhouse effect<br />
* Activities<br />
**<br />
<br />
==== (Dec. 2) Review ====<br />
* Review<br />
<br />
== Misc Topics ==<br />
** [[21cm Transition]]<br />
** [[Wouthuysen Field effect]]<br />
** [[Radiative Transfer Codes]]<br />
** [[Frequency Redistribution in Non-Coherent Scattering]]<br />
** [[Cherenkov Radiation]]<br />
** [[Monte Carlo Methods]]<br />
** [[Numerical Methods for Ordinary Differential Equations]]<br />
<br />
== Legacy Lecture Notes ==<br />
# [[Radiation Lecture 01]]<br />
# [[Radiation Lecture 02]]<br />
# [[Radiation Lecture 03]]<br />
# [[Radiation Lecture 04]]<br />
# [[Radiation Lecture 05]]<br />
# [[Radiation Lecture 06]]<br />
# [[Radiation Lecture 07]]<br />
# [[Radiation Lecture 08]]<br />
# [[Radiation Lecture 09]]<br />
# [[Radiation Lecture 10]]<br />
# [[Radiation Lecture 11]]<br />
# [[Radiation Lecture 12]]<br />
# [[Radiation Lecture 13]]<br />
# [[Radiation Lecture 14]]<br />
# [[Radiation Lecture 15]]<br />
# [[Radiation Lecture 16]]<br />
# [[Radiation Lecture 17]]<br />
# [[Radiation Lecture 18]]<br />
# [[Radiation Lecture 19]]<br />
# [[Radiation Lecture 20]]<br />
# [[Radiation Lecture 21]]<br />
# [[Radiation Lecture 22]]<br />
# [[Radiation Lecture 23]]<br />
# [[Radiation Lecture 24]]<br />
# [[Radiation Lecture 25]]<br />
# [[Radiation Lecture 26]]</div>AparsonsFrequency Redistribution in Non-Coherent Scattering2021-08-20T17:55:42Z<p>Aparsons: </p>
<hr />
<div>[[Radiative Processes in Astrophysics|Course Home]]<br />
<br />
===Reference Materials===<br />
*[http://articles.adsabs.harvard.edu/cgi-bin/nph-iarticle_query?1962MNRAS.125...21H&amp;data_type=PDF_HIGH&amp;whole_paper=YES&amp;type=PRINTER&amp;filetype=.pdf "Non-coherent scattering: I. The redistribution function with Doppler broadening (Hummer, 1962)"]<br />
*[http://articles.adsabs.harvard.edu//full/1946MNRAS.106..225Z/0000225.000.html "Non-coherent scattering and the absence of polarization in Fraunhofer lines (Zanstra, 1946)"]<br />
*[http://articles.adsabs.harvard.edu/cgi-bin/nph-iarticle_query?1944ApJ....99....1S&amp;data_type=PDF_HIGH&amp;whole_paper=YES&amp;type=PRINTER&amp;filetype=.pdf "Notes on the Theory of Noncoherent Scattering (Spitzer, 1944)"]<br />
*[http://articles.adsabs.harvard.edu/cgi-bin/nph-iarticle_query?1938MNRAS..98..624W&amp;data_type=PDF_HIGH&amp;whole_paper=YES&amp;type=PRINTER&amp;filetype=.pdf "Noncoherent Formation of Absorption Lines (Woolley, 1938)"]<br />
*[http://articles.adsabs.harvard.edu/cgi-bin/nph-iarticle_query?1959ApJ...129..551F&amp;data_type=PDF_HIGH&amp;whole_paper=YES&amp;type=PRINTER&amp;filetype=.pdf "The Time-Relaxation of Resonance Line Profiles (Field, 1959)"]<br />
*[http://articles.adsabs.harvard.edu/cgi-bin/nph-iarticle_query?1955ApJ...121..418E&amp;data_type=PDF_HIGH&amp;whole_paper=YES&amp;type=PRINTER&amp;filetype=.pdf "Noncoherent Scattering due to Collisions. I. Zanstra's Ratio of Coherent to Uncorrelated Noncoherent Scattering. (Edmonds, 1955)"]<br />
*[http://articles.adsabs.harvard.edu/cgi-bin/nph-iarticle_query?1952PASJ....4..100U&amp;data_type=PDF_HIGH&amp;whole_paper=YES&amp;type=PRINTER&amp;filetype=.pdf "Note on the Zanstra Redistribution in Planetary Nebulae (Unno, 1952)"]<br />
<br />
===Need to Review===<br />
* [[Radiative Transfer Equation]]<br />
* [[Einstein Coefficients]]<br />
* [[Line Profile Functions]]<br />
<br />
<br><br />
<latex><br />
\documentclass[11pt]{article}<br />
\def\inv#1{{1 \over #1}}<br />
\def\ddt{{d \over dt}}<br />
\def\mean#1{\left\langle #1\right\rangle}<br />
\def\sigot{\sigma_{12}}<br />
\def\sigto{\sigma_{21}}<br />
\def\eval#1{\big|_{#1}}<br />
\def\tr{\nabla}<br />
\def\dce{\vec\tr\times\vec E}<br />
\def\dcb{\vec\tr\times\vec B}<br />
\def\wz{\omega_0}<br />
\def\ef{\vec E}<br />
\def\ato{{A_{21}}}<br />
\def\bto{{B_{21}}}<br />
\def\bot{{B_{12}}}<br />
\def\bfield{{\vec B}}<br />
\def\ap{{a^\prime}}<br />
\def\xp{{x^{\prime}}}<br />
\def\yp{{y^{\prime}}}<br />
\def\zp{{z^{\prime}}}<br />
\def\tp{{t^{\prime}}}<br />
\def\upx{{u_x^\prime}}<br />
\def\upy{{u_y^\prime}}<br />
\def\e#1{\cdot10^{#1}}<br />
\def\hf{\frac12}<br />
\usepackage{fullpage}<br />
\usepackage{amsmath}<br />
\usepackage{eufrak}<br />
\begin{document}<br />
<br />
\section*{Introduction}<br />
\hline<br />
[[File:Picture.png|frame|right|Figure 1. A picture of a single non-coherent scattering event. Incident light with frequency between $\nu^{\prime}$ and $\nu + d\nu^{\prime}$ and direction $\hat{n}^{\prime}$ (within an element of solid angle $d\Omega^{\prime}$), is scattered to a different frequency, between $\nu$ and $\nu + d\nu$, and direction $\hat{n}$ (into solid angle $d\Omega$), by an atom.]] When a photon is scattered by an atom, it may undergo a change in frequency. Scattering events in which such {\bf frequency redistribution} occurs are said to be "{\bf non-coherent}." Hummer, Field, Spitzer, Mihalas, Avrett, and others have explored the physical causes for frequency noncoherence in the scattering of light by atoms and the effects of noncoherence arising from both the natural width of atomic levels and the thermal motion of particles in stellar atmospheres. Here we develop a mathematical formalism to generally describe the process of non-coherent scattering. We apply it to four physical cases of noncoherence.<br />
<br />
\section*{Formulation of the Redistribution Functions}<br />
\hline<br />
The process of non-coherent {\bf line} scattering can be described very generally by a redistribution function, $\mathbb{R}$. $\mathbb{R}$ describes scattering due to a single electronic transition -- it does not describe continuum scattering or relativistic scattering. Consider the picture of non-coherent scattering presented in Figure 1. The probability $P(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n})$ that an incident photon with frequency between $\nu^{\prime}$ and $\nu^{\prime} + d\nu^{\prime}$, traveling in direction $\hat{n}^{\prime}$ into an element of solid angle $d\Omega^{\prime}$ would be scattered to a different frequency, between $\nu + d\nu$, in direction $\hat{n}$, into $d\Omega$, is:<br />
<br />
$$<br />
P(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n}) = \mathbb{R}(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n}) \;d\nu\; d\nu^{\prime}\; \frac{d\Omega}{4\pi} \; \frac{d\Omega^{\prime}}{4\pi}<br />
$$<br />
<br />
{\bf This is the definition of a redistribution function.}<br />
<br />
This probability is normalized to unity:<br />
<br />
$$<br />
\int\int\int\int\!\mathbb{R}(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n})\;d\nu \;d\nu^{\prime}\; \frac{d\Omega}{4\pi}\; \frac{d\Omega^{\prime}}{4\pi} = 1<br />
$$<br />
<br />
For convenience, we take all integrals over frequency and /or solid angle to be complete, unless otherwise specified.<br />
<br />
Now, integrating $\mathbb{R}$ over $\nu$ and $\Omega$ reduces $P(\nu ^{\prime}, \hat{n}^{\prime};\nu, \hat{n})$ to $P(\nu^{\prime}, \hat{n}^{\prime})$. This is the normalized probability that the atom absorbs a photon with frequency between $\nu^{\prime}$ and $\nu^{\prime} + d\nu^{\prime}$ traveling in direction $\hat{n}^\prime$ into an element of solid angle $d\Omega^\prime$, and re-emits it at {\it some} frequency in {\it some} direction. This defines the {\bf [[Line Profile Functions]]} of the transition, which could have an angular dependence. For spatially symmetric absorption profiles, this quantity is given by the familiar function, $\phi(\nu^{\prime})$:<br />
<br />
$$<br />
\int\int\!\mathbb{R}(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n})\; d\nu \; \frac{d\Omega}{4\pi} = \phi(\nu^{\prime})<br />
$$<br />
<br />
By the definition of $\mathbb{R}$, <br />
<br />
$$<br />
\int\int\!\phi(\nu^{\prime})\;d\nu^{\prime}\;\frac{d\Omega^{\prime}}{4\pi} = 1.<br />
$$<br />
<br />
The line profile function gives a transition's normalized absorption probability as a function of $\nu^{\prime}$. We can therefore define a transition's frequency-dependent absorption coefficient, $\alpha_{\nu^{\prime}}$, in terms of the line profile function:<br />
<br />
$$<br />
\alpha_{\nu^{\prime}} = \alpha_0\phi(\nu^{\prime})<br />
$$<br />
<br />
where $\alpha_0$ is the line-center absorption coefficient of the transition.<br />
<br />
\section*{Redistribution and the Radiative Transfer Equation}<br />
\hline<br />
[[File:Energy_removed.png|left|frame|{\bf Figure 2.} A monochromatic radiation field with specific intensity $I_{\nu^{\prime},0}(\hat{n}^\prime)$ scattered non-coherently by a single atom. Some light is scattered to a new frequency, $\nu$, in direction $\hat{n}$. The unscattered radiation (that ultimately reaches your telescope) has specific intensity $I_{\nu^{\prime},f}(\hat{n}^\prime)$.]]<br />
How does non-coherent scattering add energy to or remove energy from a beam of radiation? We now consider the effect of a single, idealized non-coherent scatterer on the spectrum of a radiation field, measured along a line of sight. Following Figure 2, define the specific intensity of the field in direction $\hat{n}^{\prime}$ before scattering to be $I_{\nu^{\prime},0}(\hat{n}^\prime)$. Let the detector lie along direction $\hat{n}^\prime$. The energy per volume per time per solid angle per frequency $(\frac{dE}{dt dV d\Omega d\nu})$ removed from the beam is given by $-\alpha_{\nu^\prime} I_{\nu^{\prime}, 0}(\hat{n^\prime})$. This follows explicitly from the definition of the absorption coefficient, $\alpha_{\nu^\prime}$.<br />
<br />
What about light scattered non-coherently {\it into} the beam? To visualize that case, we follow Figure 3, where our detector lies along $\hat{n}$. Now, the energy per volume per time per solid angle per frequency {\bf added} into the incident beam at frequency $\nu$ is related to the {\bf amount of incident radiation at frequency $\nu^\prime$ and direction $\hat{n}^\prime$ scattered into frequency $\nu$ and direction $\hat{n}$}. [[File:Energy_added.png|left|frame|{\bf Figure 3.} A polychromatic, polydirectional radiation field with specific intensity $I_{\nu^{\prime},0}(\hat{n}^\prime)$ scattered into the line of sight of a detector at frequency $\nu$.]] In the formalism of redistribution functions,<br />
<br />
$$ <br />
\frac{dE}{dt dV d\Omega d\nu} \propto \int\int \mathbb{R}(\nu^\prime, \hat{n}^\prime, \nu, \hat{n})I_{\nu^\prime}(\hat{n}^\prime)d\nu^\prime \;\frac{d\Omega^\prime}{4\pi}<br />
$$<br />
where we have convolved the redistribution function and the specific intensity of the radiation field over frequency and solid angle to account for the continuity of the field. <br />
<br />
This defines a "non-coherent scattering emissivity" $$j_\nu^{(s)} \propto \int\int \mathbb{R}(\nu^\prime, \hat{n}^\prime, \nu, \hat{n})I_{\nu^\prime}(\hat{n}^\prime)d\nu^\prime \;\frac{d\Omega^\prime}{4\pi}.$$<br />
<br />
The constant of proportionality is related to the [[Einstein Coefficients|Einstein $A$'s]] (relative likelihoods) of other atomic transitions that may occur when an atom is excited to the level that produces the transition corresponding to $\mathbb{R}$. For example, in the case of Ly-$\beta$ (3 -> 1) scattering, an H atom in the ground state that is excited into the $n =3$ level may either undergo Ly-$\beta$ decay or H-$\alpha$ decay. The relative likelihood of H-$\alpha$ is given by <br />
<br />
$$<br />
\epsilon = \frac{A_{H\alpha}}{A_{Ly-\beta} + A_{H\alpha}} = 0.12<br />
$$<br />
<br />
Therefore the relative likelihood that a transition from the $n=3$ state is Ly-$\beta$ is given by $1 - \epsilon = .88$. Therefore, the non-coherent scattering emissivity is given by<br />
<br />
$$<br />
j_\nu^{(s)} = (1-\epsilon) \int\int \mathbb{R}(\nu^\prime, \hat{n}^\prime, \nu, \hat{n})I_{\nu^\prime}(\hat{n}^\prime)d\nu^\prime \;\frac{d\Omega^\prime}{4\pi}.<br />
$$<br />
<br />
The total emissivity of the medium is therefore the sum of the scattering emissivity and the purely "emissive" (non-scattering) emissivity $(j_\nu^{(e)})$. So the entire [[Radiative Transfer Equation]] for a medium undergoing non-coherent scattering is given by<br />
<br />
$$<br />
\frac{dI_\nu}{ds} = -I_\nu\sum_i\alpha_{\nu,i} + j_\nu^{(e)} + \sum_i\alpha_{0,i}(1-\epsilon)\int\int\mathbb{R}(\nu^\prime, \hat{n}^\prime, \nu, \hat{n})I_{\nu^\prime}(\hat{n}^\prime)d\nu^\prime \;\frac{d\Omega^\prime}{4\pi}.<br />
$$<br />
<br />
where we have summed over all possible upper level destinations, $i$.<br />
<br />
\section*{Functional Forms of The Redistribution Functions I: Two Simple Cases}<br />
We now seek specific functional forms of $\mathbb{R}$. {\bf Often, but not always, we can decompose $\mathbb{R}$ into the product of an angular function $g(\hat{n}^\prime, \hat{n})$, and a frequency dependent function $F(\nu^\prime, \nu)$.} First, we consider two very simple cases that permit this simplification: {\bf coherent scattering $(\nu^\prime = \nu)$}, and {\bf complete redistribution ($(\nu^\prime, \nu)$ completely uncorrelated)}:<br />
<br />
$$<br />
\mathbb{R}(\nu^\prime, \hat{n}^\prime, \nu, \hat{n})= g(\hat{n}^\prime, \hat{n})F(\nu^\prime, \nu)<br />
$$<br />
<br />
Further, we consider two subcases, corresponding to two distinct functional forms of $g(\hat{n}^\prime, \hat{n})$. <br />
\begin{itemize}<br />
*{\bf Isotropic Scattering} (e.g., the scattering of light by slow-moving dust.) In this case, $$g(\hat{n}^\prime, \hat{n}) = 1,$$ since incident radiation is equally likely to be reemitted in any direction.<br />
<br />
*{\bf Dipole Scattering} (e.g., Thomson Scattering.) In this case, $$g(\hat{n}^\prime, \hat{n}) = \frac{3}{4}(1 + \cos^2(\theta)).$$ since light is more likely to be scattered into the dipole field.<br />
\end{itemize}<br />
\subsection*{Case I: Coherent Scattering}<br />
We consider the case of coherent scattering, where the frequency of incident radiation is equal to the frequency of scattered radiation $(\nu^\prime = \nu)$. In this case, $F(\nu^\prime, \nu)$ is given by the Dirac Delta Function, centered on $\nu^\prime$. This is because there is a 100\% probability that incident radiation is reemitted at its original frequency. We assume $g(\hat{n}^\prime, \hat{n})$ corresponds to either of the isotropic or dipole cases. Therefore, we can write down:<br />
<br />
$$<br />
\mathbb{R}(\nu^\prime, \hat{n}^\prime, \nu, \hat{n})= g(\hat{n}^\prime, \hat{n}) \phi(\nu^\prime) \delta(\nu^\prime -\nu).<br />
$$<br />
<br />
The scattering emissivity is therefore given by<br />
<br />
$$<br />
j_\nu^{(s)} = (1-\epsilon) \int\int g(\hat{n}^\prime, \hat{n}) \phi(\nu^\prime) \delta(\nu^\prime -\nu) I_{\nu^\prime}(\hat{n}^\prime) d\nu^\prime \;\frac{d\Omega^\prime}{4\pi}.<br />
$$<br />
<br />
If the scattering is isotropic, then $g(\hat{n}^\prime, \hat{n}) = 1$, and $j_\nu^{(s)}$ becomes<br />
<br />
$$j_\nu^{(s)} = \alpha_\nu(1-\epsilon)J_\nu.$$<br />
\subsection*{Case II: Complete Redistribution}<br />
Complete redistribution occurs when $\nu^\prime$ and $\nu$ are completely uncorrelated. In this case, $\nu$ is determined exclusively by $\phi(\nu)$:<br />
<br />
$$<br />
\mathbb{R}(\nu^\prime, \hat{n}^\prime, \nu, \hat{n})=g(\hat{n}^\prime, \hat{n}) \phi(\nu^\prime)\phi(\nu)<br />
$$ $$<br />
j_\nu^{(s)} = \alpha_0 (1-\epsilon) \int\int g(\hat{n}^\prime, \hat{n}) \phi(\nu^\prime)\phi(\nu) I_{\nu^\prime}(\hat{n}^\prime) d\nu^\prime \;\frac{d\Omega^\prime}{4\pi}.<br />
$$ $$<br />
= \alpha_\nu (1-\epsilon) \int\int g(\hat{n}^\prime, \hat{n}) \phi(\nu^\prime) I_{\nu^\prime}(\hat{n}^\prime) d\nu^\prime \;\frac{d\Omega^\prime}{4\pi}.<br />
$$<br />
<br />
If the scattering is isotropic, $g(\hat{n}^\prime, \hat{n}) = 1$, so<br />
$$<br />
j_\nu^{(s)} = \alpha_\nu (1-\epsilon) \int \phi(\nu^\prime) J_{\nu^\prime} d\nu^\prime. $$<br />
\subsection*{Was that realistic?}<br />
No. In reality, redistribution occurs {\bf in the frame of the atom}. Additionally, the phenomenon of {\bf Doppler redistribution} ensures that laboratory-observed redistribution is only partial. To account for these effects, we henceforth place ourselves into the rest-frame of the atom, making the following changes of variables:<br />
<br />
[[File:Doppler.png|frame|left|Until now, we have been working in the laboratory frame. We transform to the doppler frame, where redistribution occurs in the frame of the atom.]]<br />
<br />
\section*{Non-Coherent Scattering with Doppler Redistribution}<br />
\subsection*{Formalism}<br />
Let $f(\xi^\prime)$ define the absorption profile (line profile) in the atom's frame. We therefore have <br />
<br />
$$<br />
\int \! f(\xi^\prime) \; d\xi^\prime = 1.<br />
$$<br />
<br />
From our earlier discussion of redistribution functions, it must be the case that<br />
<br />
$$<br />
f(\xi^\prime) \; d\xi^\prime\;\frac{d\Omega^\prime}{4\pi}<br />
$$<br />
defines the probability that a photon with frequency between $\xi^\prime$ and $\xi^\prime+ d\xi^\prime$ is absorbed in solid angle $d\Omega^\prime$. Now, let<br />
$$<br />
p(\xi^\prime, \xi)<br />
$$<br />
define the frequency-dependent component of the linearly-separated redistribution function, in the atom's rest-frame. Further, let<br />
$$<br />
g(\hat{n}^\prime, \hat{n})<br />
$$<br />
define the corresponding angular function. Bringing everything together, we have that <br />
$$<br />
p(\xi^\prime, \xi)g(\hat{n}^\prime, \hat{n}) \; d\xi^\prime\;\frac{d\Omega^\prime}{4\pi}<br />
$$<br />
gives the probability that {\it if} a photon is absorbed at $\xi^\prime, \hat{n}^\prime$, it is re-emitted at $\xi, \hat{n}$. Therefore, <br />
$$<br />
f(\xi^\prime)p(\xi^\prime, \xi)\;d\xi^\prime d\xi g(\hat{n}^\prime, \hat{n})\;\frac{d\Omega}{4\pi}\;\frac{d\Omega^\prime}{4\pi} \approx \mathbb{R}<br />
$$ for a single particle with velocity $\vec{v}$.<br />
\section*{Three Physical Cases of Non-Coherent Scattering with Doppler Redistribution}<br />
We now consider three specific cases of non-coherent scattering in the rest-frames of individual atoms. Later, we will generalize our results to entire stellar atmospheres.<br />
\subsection*{Case I: The Infinitely Sharp Atom}<br />
The first case we examine is doppler redistribution in the rest-frame of a simple two-level atom with infinitely sharp (i.e. 0 width) energy states. In this case, there is {\bf no frequency redistribution {\it in the frame of the atom}}. Instead, we have:<br />
$$<br />
f(\xi^\prime) = \delta(\xi^\prime - \nu_0)<br />
$$ $$<br />
p(\xi^\prime, \xi) = \delta(\xi^\prime - \xi)<br />
$$<br />
\subsection*{Case II: Resonance Lines}<br />
Here we treat the case of an atom with a perfectly sharp ground state and a broadened upper state, whose finite lifetime against radiative decay leads to a Lorentzian line profile for the atom, consistent with natural broadening:<br />
$$<br />
f(\xi^\prime) = \frac{1}{\pi}\frac{\Gamma / 4\pi}{(\xi - \nu_0)^2 + (\frac{\Gamma}{4\pi})^2},<br />
$$<br />
where $\Gamma$ is the total radiative decay rate (or "radiative damping width") of the atom, that is,<br />
$$<br />
\Gamma = \sum_{k < i} A_{ik}<br />
$$<br />
We further assume that there are no additional perturbations of the atom while it is in its upper state. Then there will be no reshuffling of electrons among substates of the upper state, and the decay back down to the lower state will produce a photon of exactly the same frequency as the one originally absorbed. Thus we have<br />
$$<br />
p(\xi^\prime, \xi) = \delta(\xi^\prime - \xi).<br />
$$<br />
This case applies to resonance lines in media of such low densities that collisional broadening of the upper state is completely negligible, such as the Ly-$\alpha$ line of Hydrogen in the interstellar medium.<br />
\subsection*{Case III: Complete Redistribution}<br />
The basic physical picture here is of an atom with a perfectly sharp lower state, and a broadened upper state, in a medium where collisions are so frequent that {\it all} excited electrons are randomly reshuffled over the substates of the upper state before emission occurs. The absorption profile is again the Lorentz profile, where $\Gamma$ now represents the full width (radiative plus collisional) of the upper state. In this extreme limit, the frequency of the emitted photon will have {\it no} correlation with the frequency of the absorbed photon; the probability for emission at any particular frequency is then proportional to the number of substates present at that frequency, and hence to the absorption profile itself. When complete redistribution in the atom's frame occurs we thus have$$<br />
p(\xi^\prime, \xi) = f(\xi^\prime)= \frac{1}{\pi}\frac{\Gamma / 4\pi}{(\xi - \nu_0)^2 + (\frac{\Gamma}{4\pi})^2}.<br />
$$<br />
\section*{Solving the Three Cases: Doppler Shift Redistribution in the Laboratory Frame}<br />
In this section, we shall consider the effects of the Doppler shifts introduced by the motion of the scattering atoms relative to the laboratory frame by deriving expressions that describe the full angular and frequency dependence of redistribution in the scattering process.<br />
\subsection*{A Thermal Atmosphere}<br />
Suppose an atom moving with velocity $v < c$, which remains fixed during the scattering process, absorbs a photon ($\nu^\prime, \hat{n}^\prime$) and emits a photon ($\nu, \hat{n}$), as measured in the laboratory frame. We may therefore express the photon frequencies in the atom's frame according to:<br />
$$<br />
\xi^\prime = \nu^\prime - \nu_0(\vec{v} \cdot \hat{n}^\prime)/c<br />
$$<br />
and<br />
$$<br />
\xi = \nu - \nu_0(\vec{v} \cdot \hat{n}) / c.<br />
$$<br />
The redistribution function for this scattering event may be rewritten as<br />
$$<br />
\mathbb{R}_v(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n}) = f(\underbrace{\nu^\prime - \nu_0(\vec{v} \cdot \hat{n}^\prime)/c}_{\xi^\prime})p(\underbrace{\nu^\prime - \nu_0(\vec{v} \cdot \hat{n}^\prime)/c}_{\xi^\prime}, \underbrace{\nu - \nu_0(\vec{v} \cdot \hat{n}) / c}_{\xi})g(\hat{n}^\prime, \hat{n}).<br />
$$<br />
This is the {\it specific} redistribution function for a single species of atoms with speed $\vec{v}$. To find the {\it net} result for the entire population of atoms, we must take the average over the velocity distribution, assumed to be Maxwellian. To perform this average, we make a change of coordinates. <br />
<br />
[[File: Change of basis.png|frame|left|Diagram of the newly adopted coordinate system.]]<br />
<br />
Let $\hat{n}^\prime, \hat{n}$ lie in the $\hat{n}_1, \hat{n}_2$ plane. $\hat{n}_1$ bisects $\hat{n}^\prime, \hat{n}$. Now, <br />
<br />
$$<br />
\hat{n}^\prime = \cos(\frac{\theta}{2})\hat{n}_1 + \sin(\frac{\theta}{2})\hat{n}_2 \equiv \alpha\hat{n}_1 + \beta\hat{n}_2<br />
$$<br />
$$<br />
\hat{n} = \cos(\frac{\theta}{2})\hat{n}_1 - \sin(\frac{\theta}{2}) \hat{n}_2 \equiv \alpha\hat{n}_1 - \beta\hat{n}_2<br />
$$<br />
<br />
Write: <br />
$$<br />
\vec{v} = v_1\hat{n}_1 + v_2\hat{n}_2 + v_3\hat{n}_3<br />
$$<br />
Then<br />
$$<br />
\hat{n}^\prime \cdot \vec{v} = \alpha v_1 + \beta v_2<br />
$$<br />
$$<br />
\hat{n} \cdot \vec{v} = \alpha v_1 - \beta v_2<br />
$$<br />
Introduce a quantity called the reduced velocity, $\vec{u}$. <br />
$$<br />
\vec{u} = \frac{\vec{v}}{v_{th}}<br />
$$<br />
$$<br />
v_{th} = \sqrt{\frac{2kT}{m}}<br />
$$<br />
Call the doppler width $\Delta$. <br />
$$<br />
\Delta \equiv \nu_0 \frac{v_{th}}{c} = \Delta\nu_D<br />
$$<br />
$$<br />
\nu_0^\prime \left(\frac{\hat{n}^\prime\cdot\vec{v}}{c}\right) = \frac{\nu_0}{c}(\alpha v_1 + \beta v_2) = \Delta(\alpha u_1 + \beta u_2)<br />
$$<br />
$$<br />
\nu_0\left(\frac{\hat{n} \cdot\vec{v}}{c}\right) = \Delta(\alpha u_1 - \beta u_2).<br />
$$<br />
Now, the Maxwell-Boltzmann distribution can be re-expressed: <br />
$$<br />
f_{MB}(u_1, u_2, u_3)\;du_1\;du_2\;du_3 = \frac{1}{\pi^{3/2}}e^{-(u_1^2 + u_2^2 + u_3^2)}\;du_1\;du_2\;du_3<br />
$$<br />
$$<br />
\therefore \mathbb{R}(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n}) = \int^\infty_{-\infty}\;du_1\;\int^\infty_{-\infty}\;du_2\;\int^\infty_{-\infty}\;du_3\;f_{MB}(u_1, u_2, u_3)\cdot\mathbb{R}_u(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n}) <br />
$$<br />
$$<br />
\mathbb{R}(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n}) = \int^\infty_{-\infty}\;du_1\;\int^\infty_{-\infty}\;du_2\;\int^\infty_{-\infty}\;du_3\;f_{MB}(u_1, u_2, u_3)f[\nu^\prime - \Delta(\alpha u_1 + \beta u_2)]p[\nu^\prime - \Delta(\alpha u_1 + \beta u_2), \nu - \Delta(\alpha u_1 - \beta u_2)]g(\hat{n}^\prime, \hat{n}).<br />
$$<br />
The $u_3$ integral is trivial by our choice of coordinate system. It is $\sqrt{\pi}$.<br />
<br />
$$<br />
\therefore \mathbb{R}(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n}) = \frac{g(\hat{n}^\prime, \hat{n})}{\pi} \times \int^\infty_{-\infty}\;du_1\;\int^\infty_{-\infty}\;du_2\;e^{-(u_1^2 + u_2^2)} f[\nu^\prime - \Delta(\alpha u_1 + \beta u_2)]p[\nu^\prime - \Delta(\alpha u_1 + \beta u_2), \nu - \Delta(\alpha u_1 - \beta u_2)]g(\hat{n}^\prime, \hat{n}).<br />
$$<br />
<br />
\subsection*{Cases 1 and 2: Coherent Scattering in the Rest Frame of the Atom}<br />
$$<br />
p(\xi^\prime, \xi) = \delta(\xi^\prime - \xi) = \delta(\nu^\prime - \nu - 2\Delta\cdot\beta u_2)<br />
$$<br />
<br />
To do the $u_2$ integral, let $2\Delta\beta u_2 \equiv z$. Then<br />
$$<br />
dz = 2\Delta\beta du_2<br />
$$<br />
$$<br />
\int^{\infty}_{-\infty} e^{-u_2^2}\;du_2 f[\nu^\prime - \Delta(\alpha u_1 + \beta u_2)] \delta(\nu^\prime - \nu - 2\Delta\cdot\beta u_2)<br />
$$<br />
$$<br />
= \frac{1}{2\Delta\beta} \int^{\infty}_{-\infty} \; dz e^{\frac{-z^2}{4\Delta^2\beta^2}}f[\nu^\prime - \Delta\alpha u_1 - \frac{z}{2}] \times \delta(\nu^\prime - \nu - z)<br />
$$<br />
Let $z = \nu^\prime - \nu$. <br />
$$<br />
\frac{1}{2\Delta\beta}e^{\frac{-(\nu^\prime - \nu)}{4\Delta^2\beta^2}}f[\frac{1}{2}(\nu^\prime + \nu) - \Delta\alpha u_1]<br />
$$<br />
So, finally, for coherent scattering:<br />
$$<br />
\mathbb{R}_{coh}(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n}) = \frac{g(\hat{n}^\prime, \hat{n})}{2\pi\Delta\beta}\times e^{\frac{-(\nu^\prime - \nu)}{4\Delta^2\beta^2}}\int^\infty_{-\infty}\;du \;e^{-u^2}f[\frac{1}{2}(\nu^\prime + \nu) - \Delta\alpha u]<br />
$$<br />
<br />
\subsubsection*{Case I: An Atmosphere of Infinitely Sharp Atoms in the Laboratory Frame}<br />
Recall that for Case I, we established that<br />
$$<br />
f(\xi^\prime) = \delta(\xi^\prime - \nu_0)<br />
$$<br />
We therefore seek to evaluate:<br />
$$<br />
\int^\infty_{-\infty}\;du \;e^{-u^2}\delta[\frac{1}{2}(\nu^\prime + \nu) - \Delta\alpha u - \nu_0]<br />
$$<br />
Make the following change of variables:<br />
$$<br />
y \equiv \Delta\alpha u; dy = \Delta\alpha du<br />
$$<br />
Then the above integral becomes:<br />
$$<br />
\frac{1}{\Delta\alpha}\int^\infty_{-\infty}\;dy e^\frac{-y^2}{\Delta^2\alpha^2}\delta[\frac{1}{2}(\nu^\prime + \nu - 2\nu_0) - y]<br />
$$<br />
$$<br />
= \frac{1}{\Delta\alpha} e^\frac{-(\nu^\prime - \nu - 2 \nu_0)^2}{4\Delta^2\alpha^2}<br />
$$<br />
Therefore<br />
$$<br />
\mathbb{R}_I(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n}) = \frac{g(\hat{n}^\prime, \hat{n})}{2\pi\Delta^2\alpha\beta} \times e^\frac{-(\nu^\prime - \nu)^2}{4\Delta^2\beta^2}e^\frac{-(\nu^\prime + \nu - 2\nu_0)^2}{4\Delta^2\alpha^2}<br />
$$<br />
Therefore, although the scattering is perfectly coherent in the frame of the atom, it is non-coherent in the laboratory frame, due to the doppler effect. Now, people often rewrite this result in terms of a new set of variables, $x$ and $x^\prime$, which define a frequency shift relative to the doppler width:<br />
<br />
$$<br />
x = \frac{1}{\Delta}(\nu - \nu_0)<br />
$$<br />
$$<br />
x^\prime = \frac{1}{\Delta}(\nu^\prime - \nu_0)<br />
$$<br />
$$<br />
\mathbb{R}_I(x^/prime, \hat{n}^\prime; x, \hat{n}) = \mathbb{R}_I(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n})\underbrace{\frac{d\nu^\prime}{dx^\prime}\frac{d\nu}{dx}}_{\Delta^2}<br />
$$<br />
$$<br />
\mathbb{R}_I(x^/prime, \hat{n}^\prime; x, \hat{n}) = \frac{g(\hat{n}^\prime, \hat{n})}{\pi\sin(\theta)}e^{-x^2-(x^\prime-x\cos(\theta))^2\csc^2(\theta)}<br />
$$<br />
\subsubsection{Case II: An Atmosphere of Resonance Line Atoms in the Laboratory Frame}<br />
Here we have<br />
$$<br />
f(\xi^\prime) = \frac{1}{\pi}\frac{\Gamma / 4\pi}{(\xi - \nu_0)^2 + (\frac{\Gamma}{4\pi})^2}<br />
$$<br />
Therefore, the integral over the thermal velocities becomes:<br />
$$<br />
\int^\infty_{-\infty}e^{-u^2}\frac{1}{\pi}\frac{\Gamma/4\pi}{[\frac{1}{2}(\nu^\prime + \nu - 2\nu_0) - \Delta\alpha u]^2 + (\frac{\Gamma}{4\pi})^2}<br />
$$<br />
This integrand is similar to the Voigt function, $H(a, \nu)$. Therefore, <br />
$$<br />
R_{II}(x^/prime, \hat{n}^\prime; x, \hat{n}) = \frac{g(\hat{n}^\prime, \hat{n})}{\pi\sin(\theta)}e^{-\frac{1}{2}(x-x^\prime)^2\csc^2(\frac{\theta}{2})}H\left(a\sec(\theta/2), \frac{1}{2}(x+x^\prime)\sin(\theta/2)\right)<br />
$$<br />
where<br />
$$<br />
a \equiv \frac{\Gamma}{4\pi\Delta}<br />
$$<br />
and<br />
$$<br />
H(a, \nu) = \frac{a}{\pi}\int^\infty_{-\infty}\frac{e^{-y^2}dy}{(\nu - y)^2 + a^2}<br />
$$<br />
We leave case III to the concerned reader!<br />
\end{document}<br />
</latex></div>AparsonsRadiative Transfer Codes2021-08-20T17:54:22Z<p>Aparsons: </p>
<hr />
<div>[[Radiative Processes in Astrophysics|Course Home]]<br />
<br />
===Short Topical Videos===<br />
<br />
===Reference Materials===<br />
*[http://www.annualreviews.org/doi/abs/10.1146/annurev-astro-082812-141042 "Three-Dimensional Dust Radiative Transfer"(Steinacker et al. 2013, Annual Review)]<br />
* [http://www.ita.uni-heidelberg.de/~dullemond/lectures/radtrans_2012/index.shtml Radiative Transfer Notes (C.P. Dullemond, Heidelberg)]<br />
*[http://www.staff.science.uu.nl/~rutte101/Astronomy_course.html "Rob Rutten's: Lecture notes on radiative transfer" ]<br />
* [http://www.mpia-hd.mpg.de/homes/dullemon/radtrans/ Radiative Transfer Code for Dusty Disks]<br />
*[http://www.alma-allegro.nl/expertiseareas/science-modelling-tools/45 Radiative Transfer Models]<br />
*[http://www.aanda.org/articles/aa/ref/2009/18/aa11555-08/aa11555-08.html "Benchmark problems for continuum radiative transfer, Pinte et al. 2009" ]<br />
*[http://www.aanda.org/articles/aa/abs/2013/09/aa21600-13/aa21600-13.html "ALMA imaging of the CO snowline of the HD 163296 disk with DCO+, Mathews et al. 2013" ]<br />
<br />
===Need to Review?===<br />
* [[Radiative Transfer Equation]]<br />
* [[Optical Depth]]<br />
<br />
<latex><br />
\documentclass[11pt]{article}<br />
\def\inv#1{{1 \over #1}}<br />
\def\ddt{{d \over dt}}<br />
\def\mean#1{\left\langle {#1}\right\rangle}<br />
\def\sigot{\sigma_{12}}<br />
\def\sigto{\sigma_{21}}<br />
\def\eval#1{\big|_{#1}}<br />
\def\tr{\nabla}<br />
\def\dce{\vec\tr\times\vec E}<br />
\def\dcb{\vec\tr\times\vec B}<br />
\def\wz{\omega_0}<br />
\def\ef{\vec E}<br />
\def\ato{{A_{21}}}<br />
\def\bto{{B_{21}}}<br />
\def\bot{{B_{12}}}<br />
\def\bfield{{\vec B}}<br />
\def\ap{{a^\prime}}<br />
\def\xp{{x^{\prime}}}<br />
\def\yp{{y^{\prime}}}<br />
\def\zp{{z^{\prime}}}<br />
\def\tp{{t^{\prime}}}<br />
\def\upx{{u_x^\prime}}<br />
\def\upy{{u_y^\prime}}<br />
\def\e#1{\cdot10^{#1}}<br />
\def\hf{\frac12}<br />
\def\^{\hat }<br />
\def\.{\dot }<br />
\usepackage{fullpage}<br />
\usepackage{amsmath}<br />
\usepackage{eufrak}<br />
\begin{document}<br />
\subsection*{ Importance of Radiative Transfer }<br />
Radiation has a very prominent role in astrophysics, both as the only observable and also as a dominant mechanism for energy transfer within and out of astrophysical systems. Consequently, its transport through a medium is one of the most fundamental processes that needs to be considered. Analyzing the radiation received from an object provides us with useful information not only about the radiative source itself but also the medium in between and surrounding the object and the observer. The radiative transfer problem is formally defined by the non-steady state radiative transfer equation (See lecture on radiative transport (Th, Sep. 5) for detailed description). <br />
<br />
$$\frac{dI_{\nu}(x,n,t)}{ds} + \frac{dI_{\nu}(x,n,t)}{cdt} = j_{\nu}(n,t) - (\kappa_{\nu,abs}(n,t)+\kappa_{\nu,scat}(n,t))\rho(x,t)I_{\nu}(n,t) +\kappa_{\nu,scat}(n,t)\rho(x,t)\int_{4\pi}\Phi(n,n^/prime,x,\nu)I_{\nu}(x,n^/prime)d\Omega^/prime $$<br />
where s is the distance along the path defined by a position \textit{\textbf{x}} and propagation direction \textit{\textbf{n}} and $\kappa (s,\lambda)$ is the mass extinction coefficient ($\alpha(s,\lambda) = \kappa(s,\lambda)\rho(s)$). $\Phi(n,n^/prime,x,\nu)$ is the scattering phase function which describes the probability that a photon originally propagating in direction \textit{\textbf{n'}} and scattered at position \textbf{x}, will have \textit{\textbf{n}} as its new propagation direction after the scattering event.<br />
<br />
The challenging aspect of radiative transfer is that it is a six-dimensional problem (3 spatial + 2 directions ($\theta$,$\phi$) + frequency) with additional time dependence. Additionally, significant complexity is introduced as a consequence of the ability of radiation to affect the state of the medium which is the source of the radiation itself. Thus, to know the state of the matter, we need to know the radiation field. To know the radiation field, we need to know the photon emission, absorption and scattering rates. However, to estimate these rates, we in turn again need to know the state of the matter. Furthermore, the RT problem is nonlocal in space (photons propagate within the entire domain of interest), direction (scattering and absorption/re-emission can change the direction of photons), and wavelength (absorption at a particular wavelength gets re-emitted at another wavelength). As a consequence of these challenges, radiative transfer in astrophysics is frequently calculated using radiative transfer codes which can also account for 3D geometry and non-linear affects due to dust properties (See Lecture on dust grains).<br />
<br />
<br />
\subsection*{A numerical algorithm for integrating the formal transfer equation}<br />
\textbf{Note : To understand what follows, a basic knowledge of numerical methods is useful. If you are completely new to numerical methods, "Numerical Recipes" by Press, Teukolsky, Vetterling and Flannery is a good reference source.}<br />
<br />
The primary aspects of numerical radiative transfer can be illustrated using a 1D plane parallel atmosphere. In this model, the gas density, gas temperature etc in the atmosphere is assumed to depend only on height (z). Consequently, we only require one directional variable ($\mu = cos(\theta)$), with the steady state [[Radiative Transfer Equation]] (RTE) reducing to the following form (overall 3D problem - spatial + direction + wavelength) -<br />
<br />
$\mu\frac{I_{\nu}(z,\mu)}{dz} = j_{\nu}(z) - \alpha_{\nu}(z)I_{\nu}(z,\mu)$<br />
<br />
The first step in numerical solution techniques is to discretize the solution vector or the physical properties in the RTE. The quantities requiring discretization are the spatial coordinates, the directional coordinates, the wavelengths, and/or the dust properties. Let us divide up 'z' into cells with indices i $=$ 1,2,3,... ,Nz where Nz is the chosen number of grid cells. The cell walls, which separate the cells, also have indices, which we will give half-numbers: i $=$ 1/2, 3/2, 5/2,... ,Nz + 1/2 (See Figure).<br />
<br />
[[File:Plane_parallel_atmosphere.png]]<br />
<br />
The next step in the technique is to choose a numerical integration technique. We will discuss the first and second order versions of the method of Olson and Kunasz (1987, J. Quant. Spectros. Radiat. Transfer 38, 325) - OK87 method - in this example, since it is generally stable and reliable. However, depending on the complexity of the problem, other more suitable techniques may be required to get correct results. <br />
<br />
Next, we need to make an assumption for the functional form of j(z) and $\alpha$(z) between the cell boundaries, depending on the expected physical processes that we expect to dominate the radiation. For instance, one might use the emission and absorption co-efficient for small dust grains high up in the atmosphere. With these chosen functionals, we can then solve the formal transfer equation exactly. We illustrate the first and second order methods here with the higher order methods following the same general approach. <br />
<br />
\subsubsection*{First Order}<br />
The first order version of OK87 method assumes that the emissivity j and extinction coefficient $\alpha$ are constant within each cell, but can be arbitrarily different from one cell to the next. Thus the [[Optical Depth]] in the cell 'i' would be <br />
<br />
$$\delta \tau_{i} = (s_{i+1/2} - s_{i-1/2})\alpha_{i} $$ or <br />
$$\delta \tau_{i} = (z_{i+1/2} - z_{i-1/2})\alpha_{i}/\mu $$ <br />
<br />
Thus the source function S$_{i} = \frac{j_{i}}{\alpha_{i}} $ is constant and the exact solution for RTE is <br />
<br />
$$I_{i+1/2} = \exp^{-\delta \tau_{i}}I_{i-1/2} + S_{i}(1 - \exp^{-\delta \tau_{i}})$$ <br />
<br />
Thus, after choosing a direction $\theta$ (i.e. $\mu$) to calculate I$_{\nu}$(z,$\mu$) measured by an observer, we can integrate systematically from one grid wall to the next. We start at i $=$ 1 and step up for $\mu >0$ whereas we initialize at the top and work our way down for $\mu <0$.<br />
<br />
\subsubsection*{Second Order}<br />
In the second order method, we assume that S and $\alpha$ vary linearly between the cell walls (instead of constant within the cell). For cell i, this implies (for $\mu > 0$)<br />
\begin{eqnarray}<br />
S(z) = \frac{z_{i+1/2}-z}{z_{i+1/2} - z_{i-1/2}}S_{i-1/2} + \frac{z-z_{i-1/2}}{z_{i+1/2} - z_{i-1/2}}S_{i+1/2} \\<br />
\alpha(z) = \frac{z_{i+1/2}-z}{z_{i+1/2} - z_{i-1/2}}\alpha_{i-1/2} + \frac{z-z_{i-1/2}}{z_{i+1/2} - z_{i-1/2}}\alpha_{i+1/2} \\<br />
I_{i+1/2} = e^{-\delta \tau_{i}}I_{i-1/2} + Q_{i} \\<br />
Q_{i} = \frac{1 - (1+\delta \tau_{i})e^{-\delta \tau_{i}}}{\delta \tau_{i}}S_{i-1/2} + \frac{\delta \tau_{i}- 1 + \exp^{-\delta \tau_{i}}}{\delta \tau_{i}}S_{i+1/2}<br />
\end{eqnarray}<br />
<br />
\subsubsection*{Boundary/Initial Conditions}<br />
When $\mu >0$, we have to integrate from z $=$ 0 upward and choose an appropriate boundary condition for I$_{1/2}$ in the first cell. For instance, in the plane atmosphere case we have been discussing here, the Plank black-body function B$_{\nu}(T)$ is a reasonable choice for mid-infrared wavelengths whereas reflected light of the solar spectrum is a more appropriate choice for the optical wavelength regime. Similarly, for $\mu <0$, we have to impose a boundary condition for I$_{Nz+1/2}$. Generally, I$_{Nz+1/2} = 0$ is a reasonable choice for astrophysical scenarios. However, due to irradiation by the Sun, I$_{Nz+1/2} \neq 0$ and it depends on both angles $\theta$ and $\phi$. Since this breaks the rotational symmetry in x-y plane, we have to include another variable in our problem. <br />
<br />
Note that for higher order schemes, we use more values of S(z). For example, in the third order integration scheme for obtaining I_{i+1/2} for $\mu > 0$, we do not only use S_{i-1/2} and S_{i+1/2}, but also S_{i+3/2}. The subgrid model for S(z) is thus a quadratic fit through three values.<br />
<br />
<br />
\subsubsection*{Appropriate Grid Size}<br />
Some general points to consider for the right spatial resolution which both provides accurate results and is numerically efficient - <br />
\begin{itemize}<br />
\item Try to spatially resolve the photosphere of the object with sufficient number of grid points, because it is here where the observed spectrum is formed.<br />
\item Use a stable numerical integration scheme that also works properly when large steps in $\tau$ are taken.<br />
\item For high optical depths use second order/higher integration methods if possible.<br />
\item Regions that are at high optical depth at all wavelengths (i.e at peak of Plank function at that wavelength e.g. Synchrotron self absorption) can be mapped with optically thick grid spacing.<br />
\item Posteriori checks - the intensity function I$_{\nu}$ along a light ray should not make large jumps from one grid cell) to the next<br />
\item Always choosing $\delta \tau <1$ over each grid cell is not required or advised.<br />
\end{itemize}<br />
<br />
\subsubsection*{Higher Dimensional Problems}<br />
For radiative transfer problems with 2-D/3-D spatial dimensions, the basic principles of the numerical integration method can be directly generalized. One important difference between the 1D vs higher dimensional problems is that each light ray passing through the grid would will intersect with the cell walls multiple times and get divided into a number of ray segments. Each of these segment belongs to a cell that is being traversed and the segment length can be very irregular. Thus, proper consideration for the changing $\delta s_{i}$ (the ray segment length in cell i) is required while calculating the intensity integration along a light ray.<br />
<br />
\subsection*{General Radiative Transfer Methods}<br />
The difficult aspect of radiative transfer calculations is that we generally do not know the values of j$_{\nu}$ and $\alpha_{\nu}$ in advance since the radiation field can affect the medium in such a way as to modify j$_{\nu}$ and $\alpha_{\nu}$. Additionally, we cannot separate the problem into individual rays (as we did in the simple example) because a change in extinction/emission coefficients due to a particular ray at a particular location (\textbf{x}) will affect the formal transfer equation for all rays passing through \textbf{x}. Besides this "ray coupling" challenge, we also have to consider the "radiative cell coupling" - emission from a volume element can travel to distant regions - which makes the problem non-local. <br />
<br />
There are primarily three main classes of numerical techniques which can be used to solve such problems - (1) Monte Carlo methods, which simulate the multiple scattering/emission/absorption processes directly, (2)Discrete ordinate methods, which solve the problem by dividing all coordinates, including the angles and the frequency, into discrete grid points or grid cells, and (3) Moment methods, including the diffusion method, which treat the angular and/or frequency domain in terms of its moments. <br />
<br />
\subsubsection*{Monte Carlo Method}<br />
The primary concept behind the Monte Carlo method is to follow the path of a photon from one scattering event to the next, and to use random numbers to decide in which direction the photon will proceed after each scattering event. We must also use a random number to find out where along the present path the next scattering event will take place. By repeating this process for many millions of such photons, we can get a good statistical sample of paths that the photons will follow. Since the optical depths $\tau$ that the photon will travel until the next scattering event is given by the probability distribution --<br />
$$p(\tau) = \exp^{-\tau}$$,<br />
a uniformly distributed random number (w) is drawn between 0 and 1, and $$\tau = -ln(w)$$. Once we have fixed the optical depth where the next scattering event would take place, the light ray travels cell-by-cell until it arrives at the point where the combined optical depth between that point and the location of previous scattering event is equal to the chosen $\tau$. Since the light ray/photon can also get absorbed instead of scattering, we have to calculate the probability that the interaction in a particular cell is a scattering event; it is equal to the dust albedo a=$\kappa_{sca}/\kappa_{ext}$. Using a random number w, the nature of the interaction is easily determined: If w $<$ a, we have a scattering event, otherwise an absorption event. Once the photon is absorbed or it exits from the considered medium, the simulation moves to the next photon. <br />
<br />
It is important to note that when a "photon" is modeled in the Monte Carlo method, it typically represents many photons at once. Thus, we are really considering the trajectories of photon packets, each with a large number of photons. The approximation we make is to assume that all the photons in a single photon packet follow the same path. Thus, instead of considering absolute absorption, a fraction of the photon packet luminosity is absorbed and it is stored in the interaction cell. This absorbed luminosity is used at a later stage to calculate the emission spectrum from the medium in that volume cell thus acting as the source function for another MC cycle.Once, we have a statistical representation of the overall radiation field, we can then use it to predict what an observer would detect based on his orientation and location. Typically, for an observer at infinity one would assign a solid angle around the direction of the observer, and collect all photons that end up in that direction. Since an observer has to collect a large number of photon packets to reduce the noise, Monte Carlo method is very numerically intensive.<br />
<br />
[[File:mc1.png]]<br />
[[File:mc2.png]]<br />
[[File:mc3.png]]<br />
<br />
A related method, which is often used to circumvent this issue is to continuously "peel off" radiation from a photon packet as it passes through the medium, and compute what the observer would see from that photon packet, including the extinction from each of these points to the observer. <br />
Another approach is called the scattering source function approach. In this method, we follow each photon packet as it moves through the cloud. As it does so, we add an appropriate contribution of this photon packet to the scattering emissivity function $j_{\nu}$ of each cell it passes. The<br />
length of the ray segment is taken into account, so that if a photon packet passes right through the middle of a cell, its contribution to that cell will be larger than if it just passes through the edge. Once we have launched all photon packets, the function $j_{\nu}(x)$ is known throughout the medium. We can thus get the final image by integrating the formal transfer equation along a pre-defined set of rays all ending at the observer (like in previous section). Additional variations of MC radiative transfer techniques have been developed to optimize numerical efficiency - See Steinacker et al. 2013 article (link at the top) for a more detailed discussion. <br />
<br />
The Following figures shows the typical procedure of a radiative transfer calculation as well an example from a paper modelling a Proto-planetary Disk (Mathews et al. 2013)<br />
[[File:Flow_Chart1.png]]<br />
[[File:Flow_Chart2.png]]<br />
<br />
\end{document}<br />
</latex></div>AparsonsWouthuysen Field effect2021-08-20T17:53:52Z<p>Aparsons: </p>
<hr />
<div>[[Radiative Processes in Astrophysics|Course Home]]<br />
<br />
===Reference Materials===<br />
* [http://arxiv.org/PS_cache/astro-ph/pdf/0608/0608032v2.pdf Page 32 of Furlanetto et. al, 2009]<br />
* [http://bohr.physics.berkeley.edu/classes/221/1011/221a.html Detailed quantum mechanics lecture notes from UCB Physics 221A (bottom of page)]<br />
* [http://www.astro.sunysb.edu/fwalter/AST341/qn.html A Primer on Quantum Numbers and Spectroscopic Notation (Walter, Stony Brook)]<br />
* [http://www.columbia.edu/~crg2133/Files/CambridgeIA/Chemistry/Orbitals.pdf Orbitals (Guetta, Columbia)]<br />
<br />
===Need to Review===<br />
* [[21cm Transition]]<br />
* [[Einstein Coefficients]]<br />
* [[Classical Bohr Atom]]<br />
* [[Atomic and Molecular Quantum Numbers]]<br />
* [[Collisional Excitations]]<br />
* [[Black-Body Radiation]]<br />
<br />
<latex><br />
\documentclass{article}<br />
\usepackage{graphicx}<br />
\usepackage{amsmath}<br />
\usepackage{fullpage}<br />
\begin{document}<br />
<br />
\section*{The Wouthuysen-Field Effect}<br />
<br />
The Wouthuysen-Field effect is a coupling of the [[21cm Transition|21cm hyperfine<br />
transition]] to Ly-$\alpha$ radiation.<br />
<br />
This is important for possible<br />
high-redshift observations of the 21cm line, during the epoch of<br />
reionization. The 21cm hyperfine transition is forbidden by<br />
normal dipole selection rules, but transitions from one hyperfine<br />
state, up to the $n=2$ state, and back down to the other hyperfine<br />
state are not forbidden. So, if there is sufficient Ly-$\alpha$<br />
radiation to cause this intermediate transition, it will dominate over<br />
the direct (forbidden) hyperfine transition. Cosmologically speaking,<br />
this happens towards the end of<br />
the ``Dark Ages'' as reionization begins, and the WF effect remains<br />
the dominant effect until reionization is complete.<br />
<br />
\subsection*{Fine structure of hydrogen}<br />
<br />
Energy levels in hydrogen atoms are split due to spin orbit interaction<br />
(fine splitting), and the smaller effect of electron-proton spin interaction<br />
(hyperfine splitting). Anti-aligned spins lead to lower energy levels.<br />
The splittings of the lowest energy levels are:<br />
<br />
\begin{figure}<br />
\center{\includegraphics{WFfig1.jpg}}<br />
\caption{Energy level diagram with spectroscopic notation}<br />
\label{all levels}<br />
\end{figure}<br />
<br />
Here we have used spectroscopic notation $n\ _{F}L_{J}$, where $n$<br />
is the principal quantum number, $L=0(S),1(P)$ are the electron orbital<br />
angular momentum. $S_{e}$ ($S_{p}$) shall denote the electron (proton)<br />
spin (not to be confused with the $S$ orbital). Then $J=|L+S_{e}|$<br />
is the electron total angular momentum, and $F=|L+S_{e}+S_{p}|$ is<br />
the hydrogen total angular momentum. Note these are vector sums.<br />
}<br />
<br />
The splitting between the two $1\ S$ levels is of particular interest.<br />
It has energy difference $\nu=1.42GHz$, corresponding to wavelength<br />
$\lambda=21cm$. We also define $T_{*}=E_{21cm}/k_{B}=0.068K$. In<br />
the $21cm$ regime, the [[Black-Body Radiation|Rayleigh-Jeans limit]] holds and we can define<br />
the ``brightness temperature'' <br />
\[<br />
T_{b}\approx I_{\nu}c^{2}/2k_{B}\nu^{2}.<br />
\]<br />
$T_{b}$ only serves to redefine $I_{\nu}$, and should be distinguished<br />
from the ambient temperature of the CMB $T_{\gamma}=2.74(1+z)\mbox{ K}$. <br />
<br />
\subsection*{Cosmological context}<br />
<br />
After recombination $(z\sim1100)$, the photons in the cosmic fluid<br />
no longer has free charges to interact with and thus free stream through<br />
the ``dark ages'' until the Epoch of Reionization, believed to be<br />
around $z\sim 6-9$. Studying the 21cm absorption of neutral hydrogen<br />
can thus potentially probe the universe during the dark ages and epoch<br />
of reionization. The frequency $\nu$ of 21cm undergoes cosmological<br />
redshift and hence the actual observed brightness temperature is <br />
\[<br />
T_{b}=T^\prime_{b}/(1+z).<br />
\]<br />
<br />
<br />
Denoting the lower $1S$ level by 0, the higher by 1, one can define<br />
the ``spin temperature $T_{S}$'' to characterize the relative abundance<br />
of these two states:<br />
\[<br />
\frac{n_{1}}{n_{0}}=\frac{g_{1}}{g_{0}}e^{-h\nu/k_{B}T_{S}}=3\exp(-T_{*}/T_{S})\approx3(1-T_{*}/T_{S}).<br />
\]<br />
During the dark ages till the end of reionization, several processes<br />
control the relative abundances. Among them are direct radiative transitions<br />
([[Einstein Coefficients]]) %<br />
\footnote{Direct transitions are disfavored by selection rules, as we shall<br />
explain later. %<br />
}, [[Collisional Excitations|collisional excitation]] $C_{01}$, $C_{10}$ and the Wouthuysen-Field<br />
(WF) Effect $W_{01}$ and $W_{10}$. The WF effect will be explained<br />
in detail. For now let's just note that the overall statistical balance<br />
gives <br />
\begin{equation}<br />
n_{1}(A_{10}+B_{10}I_{CMB}+C_{10}+W_{10})=n_{0}(B_{01}I_{CMB}+C_{01}+W_{01}),\label{eq:balance}<br />
\end{equation}<br />
where $A_{10}=2.869\times10^{-15}\mbox{s}^{-1}$ and $B$ are the<br />
[[Einstein Coefficients]] of the 21cm transition. Recall that in thermodynamic<br />
equilibrium, we had <br />
\[<br />
B_{01}=\frac{g_{1}}{g_{0}}B_{10}=\frac{3c^{2}}{2h\nu^{3}}A_{10}<br />
\]<br />
In the [[Black-Body Radiation|Rayleigh-Jeans limit]], radiative coefficients satisfy<br />
\begin{equation}<br />
\begin{aligned}B_{01}I_{CMB} & =\frac{3kT_{\gamma}}{h\nu}A_{10}=\frac{3T_{\gamma}}{T_{*}}A_{10},\\<br />
B_{10}I_{CMB} & =\frac{T_{\gamma}}{T_{*}}A_{10},<br />
\end{aligned}<br />
\end{equation}<br />
Here $T_{\gamma}=2.74(1+z)\mbox{ K }$ is the temperature of the CMB. <br />
<br />
Remember that for collisional excitations of the hyperfine transition,<br />
in thermal equilibrium, the gas temperature is coupled directly to the<br />
spin temperature. In other words, collisions are the dominant effect<br />
that sets the hyperfine level population. This means the transition<br />
rates $C_{01}$ and $C_{10}$ are given by:<br />
<br />
\[<br />
\begin{aligned}\frac{C_{01}}{C_{10}} & =\frac{g_{1}}{g_{0}}e^{-T_{*}/T_{K}}\approx3\left(1-\frac{T_{*}}{T_{K}}\right).\end{aligned}<br />
\]<br />
Similarly, WF effect rates are given by the ``color temperature''<br />
$T_{W}$: <br />
\[<br />
\begin{aligned}\frac{W_{01}}{W_{10}} & =\frac{g_{1}}{g_{0}}e^{-T_{*}/T_{W}}\approx3\left(1-\frac{T_{*}}{T_{W}}\right).\end{aligned}<br />
\]<br />
Plugging the above results into the balance equation \eqref{eq:balance},<br />
we have the relation of the temperatures:<br />
\[<br />
\boxed{T_{S}^{-1}=\frac{T_{\gamma}^{-1}+x_{c}T_{K}^{-1}+x_{W}T_{W}^{-1}}{1+x_{c}+x_{W}},}<br />
\]<br />
where <br />
\begin{equation}<br />
\boxed{\begin{aligned}x_{c} & =\frac{C_{10}}{A_{10}}\frac{T_{*}}{T_{\gamma}},\\<br />
x_{W} & =\frac{W_{10}}{A_{10}}\frac{T_{*}}{T_{\gamma}},<br />
\end{aligned}<br />
}\label{eq:coeff}<br />
\end{equation}<br />
represents the relative rates. It remains to determine these coefficients. <br />
<br />
The rest of this article shall concentrate on the WF effect, and in<br />
particular the determination of $x_{W}.$ The WF effect involves absorption<br />
of an Lyman-$\alpha$ photon from the $1_{0}S_{1/2}$ state and subsequent<br />
decay into the $1_{1}S_{1/2}$ state. The CMB temperature during the<br />
dark ages have temperatures $3000K>T_{\gamma}>15K$, and is much smaller<br />
than the Lyman-$\alpha$ transition temperature of $T=13.6eV\sim1.6\times10^{5}\mbox{K}$,<br />
and thus we expect WF effect to be most important during the epoch<br />
of reionization, when the first stars provide the abundance of $\mbox{Ly-}\alpha$<br />
photons. To study the WF effect, we first look at the rules for allowed<br />
transitions. <br />
<br />
\subsection*{Parity and Selection Rules}<br />
Now we need to look at the selection rules for dipole<br />
transitions. First of all, there is the selection rule that $\Delta L<br />
= 0$ is forbidden by parity, a symmetry of electromagnetic interactions, so only transitions between $1S$ and $2P$<br />
will matter. (In other words, nevermind about the $2S$ states we wrote<br />
down above.) This is the selection rule that forbids the 21cm<br />
transition, which is why the WF effect can dominate over the direct<br />
21cm transition so long as enough Ly-$\alpha$ photons are around.<br />
<br />
Rotational symmetry is where the rest of our selection rules come<br />
from. There is a fancy thing in quantum called the Wigner-Eckart<br />
theorem which applies to ``irreducible tensor operators'' in general,<br />
and can generate selection rules for any such operator. The selection<br />
rule goes like this: a transition from $j$ to $j^/prime$ is only allowed if<br />
$j^/prime$ is in the range $|j-k|$ to $j+k$, where $k$ is the ``order'' of<br />
the tensor operator. For dipole transitions, $k = 1$: the dipole<br />
operator is an ``order 1 irreducible tensor operator'', so the rule<br />
becomes $j^/prime = |j-1|, ..., j+1$. (Lowercase $j$ is a totally generic angular<br />
momentum quantum number, not the same as $J$.)<br />
<br />
To put illustrate all of these in simpler language, a photon is a vector $A^{\mu}$ and carries one unit<br />
of angular momentum. This means that a single photon must be circularly<br />
polarized (left or right) %<br />
\footnote{In general, a tensor of rank $k$ carries $k$ units of angular momentum,<br />
and has $2k+1$ possible spin states. Due to the lack of mass of a<br />
photon however, the electromagnetic wave is transverse in all reference<br />
frames (easily seen with Maxwell's equations), and thus only has two<br />
polarization states, with angular momentum (anti-)parallel to the<br />
direction of motion. %<br />
}. Since the vector does not has any spin dependence, it commutes with<br />
the electron spin operator:<br />
\[<br />
[A^{\mu},\ S]=0.<br />
\]<br />
Here $S=|\vec{S}_{e}+\vec{S}_{p}|$ is the vector sum of the electron<br />
and proton spins. <br />
<br />
This implies the first dipole selection rule:<br />
\[<br />
\Delta S=0.<br />
\]<br />
The spin along given directions ($m_{s}$), however, are not ``good''<br />
quantum numbers, and can change. <br />
<br />
To consider orbital angular momentum, recall the parity operator $P$.<br />
It reverses all physical space directions:<br />
\[<br />
P:x_{i}\rightarrow-x_{i}.<br />
\]<br />
If we fix the phase such that $P^{2}=1$, we have parity as a Hermitian<br />
and hence observable:<br />
\[<br />
P^{-1}=P^{\dagger}=P.<br />
\]<br />
Parity thus acts on other operators via conjugation. For example<br />
\[<br />
PA^{\mu}(t,x)P^{-1}=-A^{\mu}(t,-x).<br />
\]<br />
<br />
<br />
More generally, it is clear that quantities such as vector, pseudo-scalar<br />
change sign under parity while a pseudo-vector (such as angular momentum<br />
or magnetic field) or a true scalar do not change sign. For example,<br />
parity commutes with spin $[P,S]=0$, while it anti-commutes with<br />
momentum $\{P,p\}=0$. This means that while a spin state is a good<br />
quantum number when paired with parity, a momentum state is not. <br />
<br />
So how do states in a hydrogen atom behave under parity? To answer<br />
this question recall that such a state is proportional to the spherical<br />
harmonics:<br />
\[<br />
|nlm\rangle\propto R_{lm}(r)Y_{l}^{m}(\Omega)\propto R_{lm}(r)P_{l}^{m}(\cos\theta)e^{im\phi}.<br />
\]<br />
Under parity, $\phi\rightarrow\pi+\phi$, $\theta\rightarrow\pi-\theta$,<br />
and since $P_{l}^{m}(-x)=(-1)^{l-m}P_{l}^{m}(x),$ we have <br />
\[<br />
P(|nlm\rangle)=(-1)^{l}|nlm\rangle.<br />
\]<br />
The parity of a state $|nlm\rangle$ does not depend on $m$, as expected<br />
since an intrinsic property such as parity should not depend on the<br />
orientation of the system. <br />
<br />
Thus the matrix element of the vector can be written as <br />
\[<br />
\begin{aligned}M & =\langle n^/prime l^/prime m^/prime|A^{\mu}|nlm\rangle,\\<br />
& =\langle n^/prime l^/prime m^/prime|P^{\dagger}PA^{\mu}P^{\dagger}P|nlm\rangle,\\<br />
& =(-1)^{l-l^/prime+1}\langle n^/prime l^/prime m^/prime|A^{\mu}|nlm\rangle.<br />
\end{aligned}<br />
\]<br />
Since a matrix element is a scalar and has even parity, we see that<br />
the end state must have different parity from the initial state. In<br />
other words, $l^/prime-l$ must be odd!<br />
<br />
Furthermore, since the photon carries only one unit of angular momentum,<br />
any angular momentum change must be of order unity or less:<br />
\[<br />
|\Delta L|,|\Delta F|,|\Delta J|\le1.<br />
\]<br />
Thus we have the rule <br />
\[<br />
\Delta l=\pm1.<br />
\]<br />
<br />
<br />
To see this more explicitly, one can also write out the full expression<br />
\[<br />
|nlm\rangle=R_{lm}(r)P_{l}^{m}(\cos\theta)e^{im\phi}\frac{1}{\sqrt{2\pi}}.<br />
\]<br />
Since a dipole interaction, along a direction called $z$ has the<br />
form <br />
\[<br />
\vec{d}=E\vec{z}=Er\cos\theta\hat{z},<br />
\]<br />
The matrix element can be written as <br />
\[<br />
\begin{aligned}\langle n^/prime l^/prime m^/prime|d|nlm\rangle & \propto\int_{0}^{\pi}P_{l^/prime}^{m^/prime}P_{l}^{m}\cos\theta\sin\theta d\theta\times\frac{1}{2\pi}\int_{0}^{2\pi}e^{i(m-m^/prime)\phi}d\phi.\end{aligned}<br />
\]<br />
From properties of associated Legendre polynomials, we can decompose<br />
\[<br />
P_{l}^{m}(\cos\theta)\cos\theta=bP_{l+1}^{m}+cP_{l-1}^{m},<br />
\]<br />
for some constants $b$ and $c$. And since they also satisfy the<br />
orthogonality rules<br />
\[<br />
\int_{-1}^{1}P_{l^/prime}^{m}(x)P_{l}^{m}(x)dx=\frac{2(l+m)!}{(2l+1)(l-m)!}\delta_{l^/prime l},<br />
\]<br />
the above matrix element vanishes unless<br />
\[<br />
\begin{cases}<br />
m^/prime & =m,\\<br />
l^/prime & =l\pm1.<br />
\end{cases}<br />
\]<br />
In particular, the angular momentum along the dipole direction is<br />
unchanged. This is expected since the spin of the photon is pointed<br />
perpendicular to the field (a transverse wave). <br />
<br />
A difference between $l$ and $L$ is in place when there are more<br />
than one electron in the atom. We have seen that a single electron<br />
contributes a factor of $(-1)^{l}$ when acted on by parity. In the<br />
multi-electron case, this generalizes to<br />
\[<br />
P(|l_{1}l_{2}...\rangle)=(-1)^{\sum l_{i}}|l_{1}l_{2}...\rangle.<br />
\]<br />
Since in general the total orbital angular momentum $L\ne\sum l_{i}$,<br />
two states with the same $L$ can have different parity, and so one<br />
cannot conclude that $\Delta L=0$ is not allowed. One can conclude,<br />
however, that $(L=0)\rightarrow(L=0)$ transitions are not allowed.<br />
This is because the $S$ orbital has complete spherical symmetry,<br />
a symmetry broken by the vector photon, and thus an $S$ orbital cannot<br />
absorb a photon and stay an $S$ orbital. Similarly, considering L-S<br />
coupling, we have corresponding selection rules of forbidden $(J=0)\rightarrow(J=0)$<br />
or $(F=0)\rightarrow(F=0)$ transitions. Physically, these last two<br />
rules amounts to the combined effect of angular momentum conservation,<br />
and the first rule, that $\Delta S=0.$ For example, the transition<br />
from $1_{1}S_{1/2}$ to $2_{1}P_{1/2}$ is allowed, even though $\Delta F=0$,<br />
because in this transition the photon brought $\Delta L=1$, electron<br />
flips its spin to keep $\Delta J=0$, and proton also flips its spin,<br />
to preserve $\Delta S=0$ and $\Delta F=0$, in the process $m_{F}$<br />
is flipped. The transition $1_{0}S_{1/2}$ to $2_{0}P_{1/2}$ on the<br />
other hand, is forbidden, because as $\Delta L=1$, the two conditions<br />
$\Delta S=0$ and $\Delta F=0$ cannot be simultaneously satisfied. <br />
<br />
In summary, we have the following selection rules for dipole transitions<br />
in a neutral hydrogen atom<br />
\[<br />
\begin{cases}<br />
\Delta S & =0,\\<br />
\Delta L & =\pm1,\\<br />
\Delta J & =0,\pm1,\mbox{(except 0 to 0),}\\<br />
\Delta F & =0,\pm1,\mbox{(except 0 to 0). }<br />
\end{cases}<br />
\]<br />
<br />
<br />
\subsection*{The WF effect}<br />
<br />
<br />
\subsubsection*{Coupling coefficient}<br />
We would like to find the coupling coefficient $x_W$ defined at the end of the Cosmological Context subsection. <br />
The allowed transitions between the lowest levels are shown in Fig.<br />
2. The transitions relevant to the WF effect are traced with solid<br />
lines. Since we have denoted the $1S$ states by 0 and 1, we shall<br />
by convenience denote the 2$P$ states by 2,3,4,5, in order of increasing<br />
energy. <br />
\begin{figure}<br />
\center{\includegraphics{WFfig2.jpg}}<br />
\caption{Energy level diagram with allowed transitions}<br />
\label{all transitions}<br />
\end{figure}<br />
<br />
<br />
\begin{figure}<br />
\center{\includegraphics{WFfig3a.jpg}}<br />
\caption{Energy level diagram of WF effect}<br />
\label{wf transitions}<br />
\end{figure}<br />
<br />
<br />
Evidently, the (de-)excitation rate due to WF effect is given by:<br />
\begin{equation}<br />
\begin{aligned}W_{01} & =B_{03}J_{03}\frac{A_{31}}{A_{31}+A_{30}}+B_{04}J_{04}\frac{A_{41}}{A_{41}+A_{40}},\\<br />
& =\frac{3T_{\gamma}^{03}}{T_{*}^{03}}\frac{A_{30}A_{31}}{A_{31}+A_{30}}+\frac{3T_{\gamma}^{04}}{T_{*}^{04}}\frac{A_{40}A_{41}}{A_{41}+A_{40}},\\<br />
W_{10} & =B_{13}J_{13}\frac{A_{30}}{A_{31}+A_{30}}+B_{14}J_{14}\frac{A_{40}}{A_{41}+A_{40}},\\<br />
& =\frac{T_{\gamma}^{13}}{T_{*}^{13}}\frac{A_{30}A_{31}}{A_{31}+A_{30}}+\frac{T_{\gamma}^{14}}{T_{*}^{14}}\frac{A_{40}A_{41}}{A_{41}+A_{40}}.<br />
\end{aligned}<br />
\label{eq:W01}<br />
\end{equation}<br />
In the second and fourth lines I have used the relation from above:<br />
\begin{equation}<br />
\begin{aligned}B_{01}I_{CMB} & =\frac{3kT_{\gamma}}{h\nu}A_{10}=\frac{3T_{\gamma}}{T_{*}}A_{10},\\<br />
B_{10}I_{CMB} & =\frac{T_{\gamma}}{T_{*}}A_{10},<br />
\end{aligned}<br />
\end{equation} <br />
<br />
We would like to relate this rate to the total Ly$\alpha$ scattering<br />
rate<br />
\[<br />
P_{\alpha}=4\pi\chi_{\alpha}\int d\nu J_{\nu}\phi_{\alpha}(\nu),<br />
\]<br />
where $\sigma_{\nu}=\chi_{\nu}\phi_{\alpha}$ is the absorption cross<br />
section and $\chi_{\alpha}=f_{\alpha}\frac{\pi e^{2}}{m_{e}c^{2}}$,<br />
with $f_{\alpha}=0.4162$ the oscillator strength. The line $\phi_{\alpha}$<br />
can be assumed to be a Voigt profile. Thermal broadening leads to<br />
Doppler width<br />
\[<br />
\Delta\nu_{D}=\sqrt{\frac{2k_{B}T_{K}}{m_{H}c^{2}}}\nu_{\alpha},<br />
\]<br />
where $\nu_{\alpha}=2.47\times10^{15}\mbox{Hz}$ is the Lyman $\alpha$<br />
line center frequency. <br />
<br />
Since the dipole operator commutes with spin, the transition of $|nJFm_{F}\rangle$<br />
to $|n^/prime J^/prime F^/prime m^/prime_{F}\rangle$ is independent of $F$ and $m_{F}$. This<br />
means that the emission intensity of transition from $|nJF\rangle$,<br />
summed over all $m_{F}$, to $|n^/prime J^/prime\rangle$, summed over $m^/prime_{F}$<br />
and $F^/prime$, is the intensity of transition from a particular $|nJFm_{F}\rangle$,<br />
times $2F+1$, the degeneracy of the initial state. This is called<br />
the ``sum rule'' of the transition. <br />
<br />
The sum rules, together with the selected transitions in Fig. 2, immediately<br />
lead to<br />
<br />
\begin{equation}<br />
\begin{aligned}\frac{I_{51}}{I_{41}+I_{40}}=\frac{5}{3},\ & \frac{I_{41}+I_{40}}{I_{31}+I_{30}}=1,\ & \frac{I_{21}}{I_{31}+I_{30}}=\frac{1}{3},\\<br />
\frac{I_{40}}{I_{41}+I_{51}}=\frac{1}{3},\ & \frac{I_{30}}{I_{21}+I_{31}}=\frac{1}{3}.<br />
\end{aligned}<br />
\label{eq:int}<br />
\end{equation}<br />
The second line follow from the transition into excited states. <br />
<br />
Next we shall neglect radiative transfer effect and make the assumption<br />
that background intensities and temperatures are constant across all<br />
the hyperfine lines, and are given by the CMB values. Under this assumption<br />
\[<br />
P_{\alpha}=n_{(n=1)}B_{Ly\alpha}=\frac{3T_{\gamma}}{T_{*}}A_{Ly\alpha}.<br />
\]<br />
Let $I_{tot}=I_{51}+I_{40}+I_{41}+I_{31}+I_{30}+I_{21}$ be the total<br />
intensity of de-excitation. Then from the relations on $I$ above we get <br />
\[<br />
\begin{aligned}I_{30}=I_{41} & =\frac{1}{12}I_{tot},\\<br />
I_{31}=I_{40} & =\frac{1}{6}I_{tot}.<br />
\end{aligned}<br />
\]<br />
Furthermore, the intensities are related to the Einstein coefficients<br />
by <br />
\[<br />
\frac{I_{ki}}{I_{\alpha}}=\frac{g_{k}}{g_{tot}}\frac{A_{kj}}{A_{\alpha}},<br />
\]<br />
where $g_{k}=2F_{k}+1$ and $g_{tot}=1+3+3+5=12$ is the total degeneracy<br />
of $n=2$ level. <br />
<br />
Thus we have<br />
\[<br />
\begin{aligned}A_{30} & =A_{41}=A_{\alpha}/3,\\<br />
A_{31} & =A_{40}=2A_{\alpha}/3.<br />
\end{aligned}<br />
\]<br />
Thus finally $P_{10}=4P_{\alpha}/27$ and the coupling coefficient becomes <br />
\[<br />
\boxed{x_{W}=\frac{4P_{\alpha}}{27A_{10}}\frac{T_{*}}{T_{\gamma}}}.<br />
\]<br />
<br />
<br />
<br />
\subsubsection*{Color temperature and corrections}<br />
<br />
The effect of Ly$\alpha$ absorption on spin temperature also depends<br />
on the color temperature $T_{W}$. For an environment that's optically<br />
thick, such as the high-redshift IGM, we may take <br />
\[<br />
T_{W}=T_{K}.<br />
\]<br />
One commonly considered correction is due to energy loss in spin-exchange<br />
collisions. In these collisions, the electron spins of the two colliding<br />
hydrogen atoms exchange, while the total spin remains unchanged. This<br />
correction to the color temperature is worked out in for example \cite{key-1},<br />
section 2.3.3. We shall here just quote the result:<br />
\begin{equation}<br />
\boxed{T_{W}=T_{K}\left(\frac{1+T_{se}/T_{K}}{1+T_{se}/T_{S}}\right),}\label{eq:colort}<br />
\end{equation}<br />
where the spin exchange temperature <br />
\[<br />
T_{se}=\frac{2T_{K}\nu_{se}^{2}}{9\Delta\nu_{D}^{2}}\sim0.40\mbox{K}.<br />
\]<br />
To use Eq. \eqref{eq:colort}, the spin temperature must be determined<br />
iteratively. The iteration is shown to converge quickly. <br />
<br />
Another commonly considered correction are radiative transfer effects.<br />
Previously we assumed that the background intensity is constant and<br />
given by the CMB intensity. The Ly$\alpha$ absorption would decrease<br />
the background intensity and hence the estimated scattering rate.<br />
The effect is more important for lower kinetic temperature. This leads<br />
to a correction to the WF effect coupling coefficient $S_{\alpha}$<br />
such that <br />
\[<br />
x_{W}=S_{\alpha}\frac{J_{\alpha}}{J_{\nu}^{c}},<br />
\]<br />
where <br />
\[<br />
J_{\nu}^{c}=1.165\times10^{-10}\left(\frac{1+z}{20}\right)\mbox{cm}^{-2}\mbox{s}^{-1}\mbox{Hz}^{-1}\mbox{sr}^{-1}.<br />
\]<br />
<br />
<br />
Neglecting spin exchange, the suppression factor is given by <br />
\[<br />
S_{\alpha}\sim\exp\left[-0.803T_{K}^{-2/3}(10^{-6}\tau_{GP})^{1/3}\right],<br />
\]<br />
where the Gunn-Peterson optical depth can be written for overdensity<br />
$\delta$ as roughly: <br />
<br />
\[<br />
\tau_{GP}=7\times10^{5}\left(\frac{\Omega_{b}h_{100}}{0.03}\right)\left(\frac{\Omega_{m}}{0.25}\right)^{-1/2}\left(\frac{1+z}{10}\right)(1+\delta).<br />
\]<br />
<br />
\end{document}<br />
</latex></div>AparsonsPoynting-Robertson Effect2021-08-20T17:50:23Z<p>Aparsons: </p>
<hr />
<div>[[Radiative Processes in Astrophysics|Course Home]]<br />
<br />
===Short Topical Videos===<br />
<br />
<br />
===Reference Material===<br />
* [https://en.wikipedia.org/wiki/Poynting%E2%80%93Robertson_effect Poynting-Robertson Effect (Wikipedia)]<br />
* [https://link.springer.com/book/10.1007/978-3-642-56428-4 Interplanetary Dust (Grun et al.) - Section on Orbital Evolution]<br />
<br />
===Need to Review?===<br />
* [[Radiative Transfer Equation]]<br />
* [[Radiative Equilibrium]]<br />
* [[Dust Absorption and Scattering]]<br />
<br />
<br />
<latex><br />
\documentclass[11pt]{article}<br />
\def\inv#1{{1 \over #1}}<br />
\def\ddt{{d \over dt}}<br />
\def\mean#1{\left\langle #1\right\rangle}<br />
\def\sigot{\sigma_{12}}<br />
\def\sigto{\sigma_{21}}<br />
\def\eval#1{\big|_{#1}}<br />
\def\tr{\nabla}<br />
\def\dce{\vec\tr\times\vec E}<br />
\def\dcb{\vec\tr\times\vec B}<br />
\def\wz{\omega_0}<br />
\def\ef{\vec E}<br />
\def\ato{{A_{21}}}<br />
\def\bto{{B_{21}}}<br />
\def\bot{{B_{12}}}<br />
\def\bfield{{\vec B}}<br />
\def\ap{{a^\prime}}<br />
\def\xp{{x^{\prime}}}<br />
\def\yp{{y^{\prime}}}<br />
\def\zp{{z^{\prime}}}<br />
\def\tp{{t^{\prime}}}<br />
\def\upx{{u_x^\prime}}<br />
\def\upy{{u_y^\prime}}<br />
\def\e#1{\cdot10^{#1}}<br />
\def\eikrwt{e^{i(\vec k\vec r-wt)}}<br />
<br />
\usepackage{fullpage}<br />
\usepackage{amsmath}<br />
\usepackage{eufrak}<br />
\usepackage{graphicx}<br />
\begin{document}<br />
\def\lya{Ly\alpha}<br />
<br />
\section{What is Poynting-Robertson Drag?}<br />
<br />
<br />
Dust grains orbiting a central star are affected by both the gravitational force, as well as photons emitted from the star. <br />
<br />
The gravitational force is given simply by:<br />
<br />
\begin{equation}<br />
\vec{F}_g = -\frac{GMm}{r^2}\hat{r} <br />
\end{equation}<br />
<br />
\noindent where $G$ is the gravitational constant, $M$ is the mass of the star, $m$ is the dust grain's mass, $r$ is the distance from the dust grain to the star, and $\hat{r}$ is the radial direction from the star. This force alone would cause the dust to orbit the star on a circular, Keplerian orbit. <br />
<br />
Photons emitted from the star will be absorbed by the dust grain and then re-emitted. While the re-emission of energy will be isotropic in the grain's frame of reference (assuming the grain is spherical and made of the a homogeneous material), it will not be isotropic in the Sun's frame due to the relative velocity of the grain compared to the star. This will give rise to a non-radial 'drag' force, called Poynting-Robertson drag, which will result in the slow spiral of the grain in towards the star, where it will eventually be destroyed by dust sublimation or sputtering, or collide to form much smaller grains which are then launched out of the solar system on hyperbolic orbits (since, for smaller grains, the radiation pressure will be much larger than the graviational force). <br />
<br />
\section{P-R Drag Derivation}<br />
<br />
Note that this derivation is non-relativistic, and so is not strictly accurate, but gives a good picture of how and why P-R drag arises. For a more accurate (and complex) derivation and discussion see, e.g. Klacka 1992. <br />
<br />
First, consider the radiation pressure force on the dust grain. Let $S$ be the energy flux [erg cm$^{-2}$ s$^{-1}$] at the location of a stationary dust grain a distance $r$ away from the star. If the particle has any component of its velocity in the direction from which the photons are streaming, then the flux of photons impacting the grain must be adjusted due to the Doppler shift as:<br />
<br />
\begin{equation}<br />
S^\prime = S\left(1 - \frac{\vec{v}\cdot\hat{S}}{c}\right)<br />
\end{equation}<br />
<br />
\noindent where $\vec{v}$ is the grain velocity as measured in the frame of the star and $\hat{S}$ is the direction from which the photons are streaming, also in the frame of the star. <br />
<br />
The absorbed energy flux is therefore $S^\prime\sigma_\textrm{dust}$, where $\sigma_\textrm{dust}$ is the absorption cross section of the dust grain to the incoming photons, which can be reasonably taken to be the grain's geometrical cross-section. The force due to radiation pressure is therefore:<br />
<br />
\begin{equation}<br />
\vec{F}_r = \frac{S^/prime\sigma_\textrm{dust}}{c}\hat{S}<br />
\end{equation}<br />
<br />
However, we still need to consider the effect of the particle re-radiating the energy. As mentioned, we assume that this re-radiation will be isotropic in the grain's frame, meaning it will be non-isotropic in the star's frame. Via $E=mc^2$, the energy radiated in the grain's frame is equivalent to a mass loss rate of $S^/prime\sigma_\textrm{dust}/c^2$, which, in the star's frame, gives a momentum flux of $-(S^/prime\sigma_\textrm{dust}/c^2)\vec{v}$, which effectively creates a drag on the particle. Thus, the total force on a perfectly absorbing particle due to radiation is:<br />
<br />
\begin{equation}<br />
\vec{F} = \frac{S^/prime\sigma_\textrm{dust}}{c}\hat{S} - \frac{S^/prime\sigma_\textrm{dust}}{c^2}\vec{v}<br />
\end{equation}<br />
<br />
Rewriting this and keeping only factors to order $v/c$ (since the dust velocity will be much less than the speed of light), we have:<br />
<br />
\begin{equation}<br />
\vec{F} = \frac{S\sigma_\textrm{dust}}{c}\left(\left(1 - \frac{\vec{v}\cdot\hat{S}}{c}\right)\hat{S} - \frac{\vec{v}}{c}\right)<br />
\end{equation}<br />
<br />
\section{Sample Model: Dust affected by PR drag}<br />
<br />
Simplifying to a 2D system, and using the solar luminosity and mass, we can plot the distance of a grain of dust to the Sun as a function of time. For a 10$\mu$m dust grain with density 2.5g/cm$^3$, the distance as a function of time is plotted in the figure below. Notice that the dust moves from close to the radius of Earth to within the radius of mercury on the timescale of several thousand years. For larger dust grains, the timescale can increase up to hundreds of thousands of years. <br />
<br />
\begin{figure}<br />
\centering<br />
\includegraphics[width = 5in]{PR_drag.png}<br />
\caption{Distance from the sun for a dust grain acted on by PR drag as a function of time.}<br />
\end{figure}<br />
<br />
\end{document}<br />
</latex></div>AparsonsNumerical Methods for Ordinary Differential Equations2021-08-20T17:44:45Z<p>Aparsons: </p>
<hr />
<div>===Short Topical Videos===<br />
* [https://www.youtube.com/watch?v=ORvDlbanMJ8 Euler Method for ODEs (LearnChemE)]<br />
* [https://www.youtube.com/watch?v=kUcc8vAgoQ0 Runge-Kutta Method Introduction (LearnChemE)]<br />
<br />
===Reference Materials===<br />
* [https://en.wikipedia.org/wiki/Euler_method Euler Method (Wikipedia)]<br />
* [https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods Runge-Kutta Methods (Wikipedia)]<br />
<br />
===Need to Review?===<br />
* [https://casper.ssl.berkeley.edu/astrobaki/index.php/Python_Installation_and_Basic_Programming Python Installation and Basic Programming]<br />
<br />
<latex><br />
\documentclass[11pt]{article}<br />
\def\inv#1{{1 \over #1}}<br />
\def\ddt{{d \over dt}}<br />
\def\mean#1{\left\langle {#1}\right\rangle}<br />
\def\sigot{\sigma_{12}}<br />
\def\sigto{\sigma_{21}}<br />
\def\eval#1{\big|_{#1}}<br />
\def\tr{\nabla}<br />
\def\dce{\vec\tr\times\vec E}<br />
\def\dcb{\vec\tr\times\vec B}<br />
\def\wz{\omega_0}<br />
\def\ef{\vec E}<br />
\def\ato{{A_{21}}}<br />
\def\bto{{B_{21}}}<br />
\def\bot{{B_{12}}}<br />
\def\bfield{{\vec B}}<br />
\def\ap{{a^\prime}}<br />
\def\xp{{x^{\prime}}}<br />
\def\yp{{y^{\prime}}}<br />
\def\zp{{z^{\prime}}}<br />
\def\tp{{t^{\prime}}}<br />
\def\upx{{u_x^\prime}}<br />
\def\upy{{u_y^\prime}}<br />
\def\e#1{\cdot10^{#1}}<br />
\def\hf{\frac12}<br />
\def\^{\hat }<br />
\def\.{\dot }<br />
\usepackage{fullpage}<br />
\usepackage{amsmath}<br />
\usepackage{eufrak}<br />
<br />
\begin{document}<br />
\section{ Numerical Integration Methods }<br />
<br />
Numerical integration is used to solve ODEs that cannot be solved analytically, generally through discretization of the ODE. Since the conception of the modern computer, numerical integration methods have become an essential tool in the physical sciences and beyond. Here we will describe two of many such methods, along with some sample code.<br />
<br />
\subsection*{ The Euler Method }<br />
<br />
The Euler Method is the simplest numerical integration method, and is most likely the only one you will need to use in C207. Here, we'll walk through how it works and show some examples of how to implement it. Imagine you have some ODE:<br />
<br />
$$\frac{dy}{dx} = f(x,y)$$<br />
<br />
with some initial condition $y(x_0) = y_0$. Now, let's say we want to determine the value of $y_1$ at some new value of $x_1$ that is close to $x_0$. We can estimate this by rearranging the ODE above into the following form:<br />
<br />
$$\frac{y_{1} - y_{0}}{x_{1} - x_{0}} = f(x_0,y_0)$$<br />
<br />
which we can write as:<br />
<br />
$$y_{1} = y_{0} + (x_{1} - x_{0}) f(x_0,y_0) = y_{0} + h f(x_0,y_0)$$<br />
<br />
where $(x_{1} - x_{0}) = h$ is called the "step size.'' We can generalize this equation with the following recursive relation:<br />
<br />
$$ y_{i+1} = y_{i} + h f(x_{i},y_{i}) $$<br />
<br />
where the step size is typically set as some constant value. As we will see, smaller step sizes produce more accurate integration results. More precisely, the error is on the order of $O(h)$ (i.e., reducing $h$ by a factor of two makes the Euler method twice as accurate).<br />
<br />
\\[12pt]<br />
<br />
$\textbf{Example \, 1:}$<br />
<br />
Now that we have a simple integration scheme, let's see how we'd execute this in python. Say our ODE is:<br />
<br />
$$\frac{dy}{dx} = y$$<br />
<br />
and our initial condition is $y(0) = 1$. We can solve this analytically, but let's see what we get using the Euler method for different values of $h$.<br />
<br />
\begin{verbatim}<br />
<br />
. import numpy as np<br />
. import matplotlib.pyplot as plt<br />
.<br />
. # plot analytic solution<br />
. plt.figure(figsize=(10,4))<br />
. x_analytic = np.linspace(0,5,100) <br />
. y_analytic = np.exp(x_analytic)<br />
. plt.plot(x_analytic, y_analytic, 'k--', label='analytic solution')<br />
.<br />
. # define initial condition and values of h that will be used <br />
. x0 = 0<br />
. y0 = 1<br />
. h_values = np.array([0.1,0.5,1.0])<br />
.<br />
. for h in h_values:<br />
. # define arrays that can be used to record x and y<br />
. x = np.zeros([100])<br />
. x[0] = x0<br />
. y = np.zeros([100])<br />
. y[0] = y0<br />
. # execute integration for current value of h<br />
. for i in range(1, len(y)):<br />
. x[i] = x[i-1] + h<br />
. dydx = y[i-1]<br />
. y[i] = y[i-1] + h*dydx<br />
. # plot curve for current value of h<br />
. plt.plot(np.trim_zeros(x, 'b'), np.trim_zeros(y, 'b'), label='h = '+str(h))<br />
.<br />
. # remainder of plotting routine<br />
. plt.xlabel('x', fontsize=12)<br />
. plt.ylabel('y', fontsize=12)<br />
. plt.xlim([0,7])<br />
. plt.ylim([0,100])<br />
. plt.legend(loc=2, fontsize=12)<br />
. plt.tight_layout()<br />
. plt.show()<br />
<br />
\end{verbatim}<br />
<br />
\begin{center}<br />
[[File:Numerical_Euler1.png]]<br />
\end{center}<br />
<br />
As we can see, the curve obtained using the Euler method converges to the analytic solution as $h \rightarrow 0$. Therefore, you must be careful to use a value of $h$ small enough to produce realistic results when performing numerical integrations. <br />
<br />
\\[12pt]<br />
<br />
$\textbf{Example \, 2:}$<br />
<br />
Since this is an astrophysics course, we will conclude this section with a more relevant example. Let's calculate the trajectory of a non-relativistic electron in the presence of a magnetic field (for relativistic electrons, see: [https://casper.ssl.berkeley.edu/astrobaki/index.php/Synchrotron_Radiation Synchrotron Radiation]). Assume the electron begins at the origin and has an initial velocity of $\vec{v} = (\mathrm{1e5}, 0, \mathrm{1e5}) \, \mathrm{cm/s}$. Also assume a magnetic field with a strength of 1e-4 Gauss that points along the x-axis, or $\vec{B} = (\mathrm{1e-4}, 0, 0) \, \mathrm{Gauss}$. In this case, we need to apply Euler's method twice within each iteration of the integration. First, we calculate the new position of the electron given its instantaneous velocity: <br />
<br />
$$\vec{x}_{i+1} = \vec{x}_{i} + h \vec{v}_{i}$$<br />
<br />
and then we calculate the new velocity of the electron given its instantaneous acceleration:<br />
<br />
$$\vec{v}_{i+1} = \vec{v}_{i} + h \vec{a}_{i} = \vec{v}_{i} + h \frac{e}{m_e} \left( \frac{\vec{v}_{i}}{c} \times \vec{B} \right) .$$<br />
<br />
In our code, we will use a step size of 1e-6 seconds and integrate for a total of 0.1 seconds.<br />
<br />
\begin{verbatim}<br />
<br />
. import numpy as np<br />
. import matplotlib.pyplot as plt<br />
. from mpl_toolkits import mplot3d<br />
.<br />
. # constants<br />
. c = 3e10 # cm/s<br />
. m = 1e-27 # g<br />
. e = 5e-10 # esu<br />
. h = 1e-6 # s<br />
.<br />
. # magnetic field vector (Gauss)<br />
. Bx, By, Bz = 1e-4, 0, 0 <br />
. B = np.array([Bx, By, Bz])<br />
.<br />
. # velocity vector (cm/s)<br />
. vx0, vy0, vz0 = 1e5, 0, 1e5 <br />
. v = np.array([vx0, vy0, vz0])<br />
.<br />
. # position vector and trajectory arrays<br />
. x, y, z = np.zeros(100000), np.zeros(100000), np.zeros(100000)<br />
. r = np.array([0.0, 0.0, 0.0])<br />
.<br />
. # integration<br />
. for i in range(1, len(x)):<br />
. # calculate next position given current velocity<br />
. r += h*v<br />
. x[i], y[i], z[i] = r[0], r[1], r[2]<br />
. # calculate next velocity given current acceleration<br />
. a = (e/m) * np.cross(v/c, B)<br />
. v += h*a<br />
.<br />
. # plotting routine<br />
. fig = plt.figure(figsize=(10,4))<br />
. ax = plt.axes(projection='3d')<br />
. ax.plot3D(x, y, z, 'black')<br />
. ax.set_xlabel('x (cm)', fontsize=12, labelpad=10)<br />
. ax.set_ylabel('y (cm)', fontsize=12, labelpad=10)<br />
. ax.set_zlabel('z (cm)', fontsize=12, labelpad=10)<br />
. plt.tight_layout()<br />
. plt.show()<br />
<br />
\end{verbatim}<br />
<br />
\begin{center}<br />
[[File:Cyc_Euler.png]]<br />
\end{center}<br />
<br />
<br />
\subsection*{ The Runge-Kutta Method }<br />
<br />
Runge-Kutta (RK) methods are a family of iterative techniques used to solve ODEs numerically. Explicit RK methods stem from the equation:<br />
<br />
$$y_{i+1} = y_{i} + h \sum_{n=1}^{s} b_{n} k_{n}$$<br />
<br />
where:<br />
<br />
$$ k_{1} = f(x_{i}, y_{i}), $$<br />
$$ k_{2} = f(x_{i} + c_2 h, y_{i} + h(a_{21} k_1)), $$<br />
$$ k_{3} = f(x_{i} + c_3 h, y_{i} + h(a_{31} k_1 + a_{32} k_2)), $$<br />
$$ \vdots $$<br />
$$ k_{s} = f(x_{i} + c_s h, y_{i} + h(a_{s1} k_1 + a_{s2} k_2 + \ldots + a_{s,s-1} k_{s-1})) $$<br />
<br />
and where the values of $s$, $a_{n,m}$, $b_n$, and $c_n$ vary based on the specific method being used.<br />
<br />
One variation of this equation is the first-order Euler method, for which we set $s = 1$ and $b_1 = 1$. Another popular variation is the fourth-order classical Runge-Kutta method, also known as RK4. The equations for RK4 are the following:<br />
<br />
$$ y_{i+1} = y_{i} + \frac{1}{6}(k_1 + k_2 + k_3 + k_4), $$<br />
$$ x_{i+1} = x_{i} + h $$<br />
<br />
where:<br />
<br />
$$ k_{1} = h f(x_{i}, y_{i}), $$<br />
$$ k_{2} = h f(x_{i} + h/2, y_{i} + k_1/2), $$<br />
$$ k_{3} = h f(x_{i} + h/2, y_{i} + k_2/2), $$<br />
$$ k_{4} = h f(x_{i} + h, y_{i} + k_3). $$<br />
<br />
Each of these $k_{n}$ terms looks at the change in $y$ at different places in the $(x,y)$ space and calculates $y_{i+1}$ accordingly. The benefit of using RK4 over the Euler method is that it is much more accurate for larger step sizes. Specifically, the error is on the order of $O(h^4)$. This means that decreasing the step size by a factor of two makes the integration sixteen times more accurate. This advantage would come into play when running a long simulation that requires step sizes too small for the Euler method to complete it in a reasonable time frame. You won't need to use RK4 for C207, but it may be useful in your research down the line.<br />
<br />
\end{document}<br />
<br />
</latex></div>AparsonsMonte Carlo Methods2021-08-20T17:44:25Z<p>Aparsons: </p>
<hr />
<div>===Short Topical Videos===<br />
* [https://www.youtube.com/watch?v=M9hjdX97Z3s Monte Carlo Random Sampling (iman)]<br />
<br />
===Reference Materials===<br />
* [https://library.lanl.gov/cgi-bin/getfile?00326866.pdf The Beginning of the Monte Carlo Method (N. Metropolis, Los Alamos Science)]<br />
* [https://en.wikipedia.org/wiki/Monte_Carlo_method Monte Carlo Method (Wikipedia)]<br />
* [https://en.wikipedia.org/wiki/Markov_chain_Monte_Carlo Markov Chain Monte Carlo (Wikipedia)]<br />
<br />
==== Overview ====<br />
* [[Random Sampling]]<br />
* [[Basic Monte Carlo Simulation]]<br />
* [[Markov Chain Monte Carlo]]<br />
<br />
==== Applications ====<br />
* [[Radiative Transfer Codes]]<br />
<br />
<latex><br />
<br />
\documentclass[12pt]{article}<br />
<br />
\usepackage{amsmath}<br />
\usepackage{amssymb}<br />
<br />
\begin{document}<br />
<br />
\section{Monte Carlo Methods}<br />
<br />
Modern Monte Carlo methods arose in the late 1940s out of nuclear weapons projects at Los Alamos <br />
National Laboratory. While statistical sampling methods had been in use for quite some time before <br />
these projects began, the prohibitive length of the calculations limited their use in modeling <br />
physical systems. That changed with the development of the ENIAC, the world's first programmable <br />
electronic computer. In the ENIAC, Polish-American scientist Stanislaw Ulam saw an opportunity to <br />
revive the use of statistical sampling in mathematics and the physical sciences. His insights led <br />
to the development of the modern version of the Markov Chain Monte Carlo method. Along with John <br />
von Neumann, Ulam put his method to the test in modeling neutron diffusion through fissionable <br />
materials, and its subsequent role in the Manhattan Project cemented its importance in the world of <br />
scientific computing.<br />
<br />
Monte Carlo methods produce numerical results through repeated random sampling -- essentially a <br />
large number of virtual die rolls. It is natural then that the name ``Monte Carlo" was inspired <br />
by Monaco's Monte Carlo Casino, a complex frequented by Ulam's uncle. The name was suggested by<br />
Nicholas Metropolis, who was a colleague of Ulam and von Neumann at Los Alamos. Monte Carlo <br />
methods have been applied to a variety of problems in scientific simulation, including those <br />
involving radiation transport. Here we discuss some of the components of Monte Carlo <br />
simulations, and provide a basic introduction to Monte Carlo radiation transport.<br />
<br />
\subsection*{ Monte Carlo Sampling }<br />
<br />
Monte Carlo (MC) sampling is generally used when one wants to simulate a population of a continuous random variable that is described by some known probability distribution. Sure, there exist python packages that make this easy (see: [https://docs.scipy.org/doc/numpy/reference/routines.random.html Random Sampling with Numpy]). But what if you are dealing with a probability distribution that isn't supported by a python package, or if you aren't using python altogether? Because of situations like this, it is useful to know how to do this sampling manually.<br />
<br />
To do MC sampling manually, you must first compute the cumulative distribution corresponding to your probability distribution. The cumulative distribution function of a continuous random variable $X$ is given by:<br />
<br />
$$ F_X(x) = A \int_{-\infty}^x f_X(t) dt $$<br />
<br />
where $f_X(t)$ is the probability density function and $A$ is a normalization factor. It is necessary to normalize the probability density function because we want the maximum value of $F_X(x)$ (i.e., the sum of the probabilities of all possible outcomes) to be 1. Once you determine $A$ for your $f_X(t)$, you can rearrange the equation to solve for $x$. Last, you can simulate a population of $X$ by randomly drawing values of $F_X(x)$ between 0 to 1. Let's walk through a few examples to clarify.<br />
<br />
\\[12pt]<br />
<br />
$\textbf{Example \, 1:}$<br />
<br />
First, we will imagine a scenario where our continuous random variable is uniformly distributed between 0 and 100. In this case, the unnormalized probability density function is simply:<br />
<br />
$$ f(t) = 1 .$$<br />
<br />
Solving for the normalization factor $A$, we get:<br />
<br />
$$ A = \frac{1}{\int_{0}^{100} f(t) dt} = \frac{1}{100} .$$<br />
<br />
Last, we can solve for $x$ using the equation above:<br />
<br />
$$ F(x) = \frac{1}{100} \int_{0}^x f(t) dt = \frac{x}{100} \rightarrow x = 100 \, F(x) .$$<br />
<br />
By randomly selecting multiple values of $F(x)$ between 0 and 1, we will obtain a population distributed in a uniformly between 0 and 100, just like the parent probability distribution.<br />
<br />
\begin{verbatim}<br />
<br />
. import numpy as np<br />
. import matplotlib.pyplot as plt<br />
.<br />
. # PDF and CDF<br />
. x_dist = np.linspace(0,100,int(1e4))<br />
. f_dist = np.full_like(x_dist, 1)<br />
. F_dist = np.cumsum(f_dist)<br />
. F_dist /= max(F_dist)<br />
.<br />
. # sampling procedure<br />
. def sample(F):<br />
. x = 100*F<br />
. return x<br />
.<br />
. N = int(1e4)<br />
. F_samples = np.random.rand(N)<br />
. x_samples = sample(F_samples)<br />
.<br />
. # plotting routine<br />
. plt.figure(figsize=(15,4))<br />
. ax1, ax2, ax3 = plt.subplot(131), plt.subplot(132), plt.subplot(133)<br />
. ax1.plot(x_dist, f_dist)<br />
. ax1.set_xlabel('t', fontsize=12)<br />
. ax1.set_ylabel('f(t)', fontsize=12)<br />
. ax2.plot(x_dist, F_dist)<br />
. ax2.set_xlabel('x', fontsize=12)<br />
. ax2.set_ylabel('F(x)', fontsize=12)<br />
. ax3.hist(x_samples, bins=np.linspace(0,100,25), edgecolor='black')<br />
. ax3.set_xlabel('x', fontsize=12)<br />
. ax3.set_ylabel('frequency', fontsize=12)<br />
. plt.tight_layout()<br />
. plt.show()<br />
<br />
\end{verbatim}<br />
<br />
\begin{center}<br />
[[File:MC1.png]]<br />
\end{center}<br />
<br />
The plot on the left shows the (uniform) probability distribution. The plot in the center shows the cumulative distribution. The histogram on the right shows the population simulated with our sampling procedure for 1e4 samples.<br />
<br />
\\[12pt]<br />
<br />
$\textbf{Example \, 2:}$<br />
<br />
Next, let's do a more physical example. Say you want to simulate a cloud of hydrogen atoms by sampling their velocities. If we assume the atoms are collisional, we can say that the probability density function of their velocities is Maxwellian:<br />
<br />
$$ f(v) = v^2 e^{-\frac{m v^2}{2 k T}} .$$<br />
<br />
The normalization factor is thus:<br />
<br />
$$ A = \frac{1}{\int_{0}^{\infty} f(v) dv} = \frac{(\frac{m}{k T})^{3/2}}{(\pi/2)^{1/2}} .$$<br />
<br />
And so our sampling equation is:<br />
<br />
$$ \int_{0}^{x} f(v) dv = \frac{(\pi/2)^{1/2}}{(\frac{m}{k T})^{3/2}} \, F(x) .$$<br />
<br />
We cannot solve for $x$ directly here, but we can use some coding tricks to complete the sampling procedure.<br />
<br />
\begin{verbatim}<br />
<br />
. import numpy as np<br />
. import matplotlib.pyplot as plt<br />
. from scipy.special import erf<br />
.<br />
. # constants<br />
. m = 1e-24 # g<br />
. k = 1e-16 # erg/K<br />
. T = 1e2 # K<br />
.<br />
. # PDF and CDF<br />
. v_dist = np.linspace(0,int(5e5),int(5e5))<br />
. f_dist = v_dist**2 * np.exp(-(m*v_dist**2)/(2*k*T))<br />
. F_dist = np.cumsum(f_dist)<br />
. F_dist /= max(F_dist)<br />
.<br />
. # sampling prodecure<br />
. # calculate LHS of the equation for many possible values of x, then select the x that gives LHS = RHS<br />
. LHS = (np.pi/2)**0.5 * (k*T/m)**1.5 * erf(v_dist * (m/(2*k*T))**0.5) - (k*T*v_dist/m)*np.exp(-(m*v_dist**2)/(2*k*T))<br />
. def sample(F):<br />
. RHS = F * (np.pi/2)**0.5 * (m/(k*T))**(-1.5)<br />
. idx = np.argmin(abs(LHS-RHS))<br />
. x = v_dist[idx]<br />
. return x<br />
.<br />
. N = int(1e4)<br />
. F_samples = np.random.rand(N)<br />
. x_samples = np.zeros_like(F_samples)<br />
. for i in range(len(F_samples)):<br />
. x_samples[i] = sample(F_samples[i])<br />
.<br />
. # plotting routine<br />
. plt.figure(figsize=(15,4))<br />
. ax1, ax2, ax3 = plt.subplot(131), plt.subplot(132), plt.subplot(133)<br />
. ax1.plot(v_dist, f_dist)<br />
. ax1.set_xlabel('v (cm/s)', fontsize=12)<br />
. ax1.set_ylabel('f(v)', fontsize=12)<br />
. ax2.plot(v_dist, F_dist)<br />
. ax2.set_xlabel('x (cm/s)', fontsize=12)<br />
. ax2.set_ylabel('F(x)', fontsize=12)<br />
. ax3.hist(x_samples, bins=np.linspace(0,5e5,25), edgecolor='black')<br />
. ax3.set_xlabel('x (cm/s)', fontsize=12)<br />
. ax3.set_ylabel('frequency', fontsize=12)<br />
. plt.tight_layout()<br />
. plt.show()<br />
<br />
\end{verbatim}<br />
<br />
\begin{center}<br />
[[File:MC2.png]]<br />
\end{center}<br />
<br />
The plot on the left shows the (Maxwellian) probability distribution. The plot in the center shows the cumulative distribution. The histogram on the right shows the population simulated with our sampling procedure for 1e4 samples.<br />
<br />
\subsection*{ Markov Chain Monte Carlo }<br />
<br />
Markov Chain Monte Carlo (MCMC) algorithms are used to obtain random samples from probability distributions for which random sampling is difficult (e.g., high-dimensional distributions). Briefly, MCMCs work by placing "walkers'' into the parameter space. With each iteration, these walkers take a random step such that the sampled distribution of each parameter converges to the proposed distribution for that parameter. One common application of MCMCs is parameter estimation, which can be done by considering the mean and variance of each parameter's sample distribution after convergence is achieved. You will not need to use MCMC for C207, but it may come in handy in the future.<br />
<br />
If you wish to learn more about how to implement MCMCs in python, check out [https://docs.pymc.io/ PyMC3] and [http://dfm.io/emcee/current/ emcee].<br />
<br />
\end{document}<br />
<br />
</latex></div>AparsonsFrequency Redistribution in Non-Coherent Scattering2021-08-20T17:44:23Z<p>Aparsons: </p>
<hr />
<div>[[Radiative Processes in Astrophysics|Course Home]]<br />
<br />
===Reference Materials===<br />
*[http://articles.adsabs.harvard.edu/cgi-bin/nph-iarticle_query?1962MNRAS.125...21H&amp;data_type=PDF_HIGH&amp;whole_paper=YES&amp;type=PRINTER&amp;filetype=.pdf "Non-coherent scattering: I. The redistribution function with Doppler broadening (Hummer, 1962)"]<br />
*[http://articles.adsabs.harvard.edu//full/1946MNRAS.106..225Z/0000225.000.html "Non-coherent scattering and the absence of polarization in Fraunhofer lines (Zanstra, 1946)"]<br />
*[http://articles.adsabs.harvard.edu/cgi-bin/nph-iarticle_query?1944ApJ....99....1S&amp;data_type=PDF_HIGH&amp;whole_paper=YES&amp;type=PRINTER&amp;filetype=.pdf "Notes on the Theory of Noncoherent Scattering (Spitzer, 1944)"]<br />
*[http://articles.adsabs.harvard.edu/cgi-bin/nph-iarticle_query?1938MNRAS..98..624W&amp;data_type=PDF_HIGH&amp;whole_paper=YES&amp;type=PRINTER&amp;filetype=.pdf "Noncoherent Formation of Absorption Lines (Woolley, 1938)"]<br />
*[http://articles.adsabs.harvard.edu/cgi-bin/nph-iarticle_query?1959ApJ...129..551F&amp;data_type=PDF_HIGH&amp;whole_paper=YES&amp;type=PRINTER&amp;filetype=.pdf "The Time-Relaxation of Resonance Line Profiles (Field, 1959)"]<br />
*[http://articles.adsabs.harvard.edu/cgi-bin/nph-iarticle_query?1955ApJ...121..418E&amp;data_type=PDF_HIGH&amp;whole_paper=YES&amp;type=PRINTER&amp;filetype=.pdf "Noncoherent Scattering due to Collisions. I. Zanstra's Ratio of Coherent to Uncorrelated Noncoherent Scattering. (Edmonds, 1955)"]<br />
*[http://articles.adsabs.harvard.edu/cgi-bin/nph-iarticle_query?1952PASJ....4..100U&amp;data_type=PDF_HIGH&amp;whole_paper=YES&amp;type=PRINTER&amp;filetype=.pdf "Note on the Zanstra Redistribution in Planetary Nebulae (Unno, 1952)"]<br />
<br />
===Need to Review===<br />
* [[Radiative Transfer Equation]]<br />
* [[Einstein Coefficients]]<br />
* [[Line Profile Functions]]<br />
<br />
<br><br />
<latex><br />
\documentclass[11pt]{article}<br />
\def\inv#1{{1 \over #1}}<br />
\def\ddt{{d \over dt}}<br />
\def\mean#1{\left\langle #1\right\rangle}<br />
\def\sigot{\sigma_{12}}<br />
\def\sigto{\sigma_{21}}<br />
\def\eval#1{\big|_{#1}}<br />
\def\tr{\nabla}<br />
\def\dce{\vec\tr\times\vec E}<br />
\def\dcb{\vec\tr\times\vec B}<br />
\def\wz{\omega_0}<br />
\def\ef{\vec E}<br />
\def\ato{{A_{21}}}<br />
\def\bto{{B_{21}}}<br />
\def\bot{{B_{12}}}<br />
\def\bfield{{\vec B}}<br />
\def\ap{{a^\prime}}<br />
\def\xp{{x^{\prime}}}<br />
\def\yp{{y^{\prime}}}<br />
\def\zp{{z^{\prime}}}<br />
\def\tp{{t^{\prime}}}<br />
\def\upx{{u_x^\prime}}<br />
\def\upy{{u_y^\prime}}<br />
\def\e#1{\cdot10^{#1}}<br />
\def\hf{\frac12}<br />
\usepackage{fullpage}<br />
\usepackage{amsmath}<br />
\usepackage{eufrak}<br />
\begin{document}<br />
<br />
\section*{Introduction}<br />
\hline<br />
[[File:Picture.png|frame|right|Figure 1. A picture of a single non-coherent scattering event. Incident light with frequency between $\nu^{\prime}$ and $\nu + d\nu^{\prime}$ and direction $\hat{n}^{\prime}$ (within an element of solid angle $d\Omega^{\prime}$), is scattered to a different frequency, between $\nu$ and $\nu + d\nu$, and direction $\hat{n}$ (into solid angle $d\Omega$), by an atom.]] When a photon is scattered by an atom, it may undergo a change in frequency. Scattering events in which such {\bf frequency redistribution} occurs are said to be "{\bf non-coherent}." Hummer, Field, Spitzer, Mihalas, Avrett, and others have explored the physical causes for frequency noncoherence in the scattering of light by atoms and the effects of noncoherence arising from both the natural width of atomic levels and the thermal motion of particles in stellar atmospheres. Here we develop a mathematical formalism to generally describe the process of non-coherent scattering. We apply it to four physical cases of noncoherence.<br />
<br />
\section*{Formulation of the Redistribution Functions}<br />
\hline<br />
The process of non-coherent {\bf line} scattering can be described very generally by a redistribution function, $\mathbb{R}$. $\mathbb{R}$ describes scattering due to a single electronic transition -- it does not describe continuum scattering or relativistic scattering. Consider the picture of non-coherent scattering presented in Figure 1. The probability $P(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n})$ that an incident photon with frequency between $\nu^{\prime}$ and $\nu^{\prime} + d\nu^{\prime}$, traveling in direction $\hat{n}^{\prime}$ into an element of solid angle $d\Omega^{\prime}$ would be scattered to a different frequency, between $\nu + d\nu$, in direction $\hat{n}$, into $d\Omega$, is:<br />
<br />
$$<br />
P(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n}) = \mathbb{R}(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n}) \;d\nu\; d\nu^{\prime}\; \frac{d\Omega}{4\pi} \; \frac{d\Omega^{\prime}}{4\pi}<br />
$$<br />
<br />
{\bf This is the definition of a redistribution function.}<br />
<br />
This probability is normalized to unity:<br />
<br />
$$<br />
\int\int\int\int\!\mathbb{R}(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n})\;d\nu \;d\nu^{\prime}\; \frac{d\Omega}{4\pi}\; \frac{d\Omega^{\prime}}{4\pi} = 1<br />
$$<br />
<br />
For convenience, we take all integrals over frequency and /or solid angle to be complete, unless otherwise specified.<br />
<br />
Now, integrating $\mathbb{R}$ over $\nu$ and $\Omega$ reduces $P(\nu ^{\prime}, \hat{n}^{\prime};\nu, \hat{n})$ to $P(\nu^{\prime}, \hat{n}^{\prime})$. This is the normalized probability that the atom absorbs a photon with frequency between $\nu^{\prime}$ and $\nu^{\prime} + d\nu^{\prime}$ traveling in direction $\hat{n}^\prime$ into an element of solid angle $d\Omega^\prime$, and re-emits it at {\it some} frequency in {\it some} direction. This defines the {\bf [[Line Profile Functions]]} of the transition, which could have an angular dependence. For spatially symmetric absorption profiles, this quantity is given by the familiar function, $\phi(\nu^{\prime})$:<br />
<br />
$$<br />
\int\int\!\mathbb{R}(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n})\; d\nu \; \frac{d\Omega}{4\pi} = \phi(\nu^{\prime})<br />
$$<br />
<br />
By the definition of $\mathbb{R}$, <br />
<br />
$$<br />
\int\int\!\phi(\nu^{\prime})\;d\nu^{\prime}\;\frac{d\Omega^{\prime}}{4\pi} = 1.<br />
$$<br />
<br />
The line profile function gives a transition's normalized absorption probability as a function of $\nu^{\prime}$. We can therefore define a transition's frequency-dependent absorption coefficient, $\alpha_{\nu^{\prime}}$, in terms of the line profile function:<br />
<br />
$$<br />
\alpha_{\nu^{\prime}} = \alpha_0\phi(\nu^{\prime})<br />
$$<br />
<br />
where $\alpha_0$ is the line-center absorption coefficient of the transition.<br />
<br />
\section*{Redistribution and the Radiative Transfer Equation}<br />
\hline<br />
[[File:Energy_removed.png|left|frame|{\bf Figure 2.} A monochromatic radiation field with specific intensity $I_{\nu^{\prime},0}(\hat{n}^\prime)$ scattered non-coherently by a single atom. Some light is scattered to a new frequency, $\nu$, in direction $\hat{n}$. The unscattered radiation (that ultimately reaches your telescope) has specific intensity $I_{\nu^{\prime},f}(\hat{n}^\prime)$.]]<br />
How does non-coherent scattering add energy to or remove energy from a beam of radiation? We now consider the effect of a single, idealized non-coherent scatterer on the spectrum of a radiation field, measured along a line of sight. Following Figure 2, define the specific intensity of the field in direction $\hat{n}^{\prime}$ before scattering to be $I_{\nu^{\prime},0}(\hat{n}^\prime)$. Let the detector lie along direction $\hat{n}^\prime$. The energy per volume per time per solid angle per frequency $(\frac{dE}{dt dV d\Omega d\nu})$ removed from the beam is given by $-\alpha_{\nu^\prime} I_{\nu^{\prime}, 0}(\hat{n^\prime})$. This follows explicitly from the definition of the absorption coefficient, $\alpha_{\nu^\prime}$.<br />
<br />
What about light scattered non-coherently {\it into} the beam? To visualize that case, we follow Figure 3, where our detector lies along $\hat{n}$. Now, the energy per volume per time per solid angle per frequency {\bf added} into the incident beam at frequency $\nu$ is related to the {\bf amount of incident radiation at frequency $\nu^\prime$ and direction $\hat{n}^\prime$ scattered into frequency $\nu$ and direction $\hat{n}$}. [[File:Energy_added.png|left|frame|{\bf Figure 3.} A polychromatic, polydirectional radiation field with specific intensity $I_{\nu^{\prime},0}(\hat{n}^\prime)$ scattered into the line of sight of a detector at frequency $\nu$.]] In the formalism of redistribution functions,<br />
<br />
$$ <br />
\frac{dE}{dt dV d\Omega d\nu} \propto \int\int \mathbb{R}(\nu^\prime, \hat{n}^\prime, \nu, \hat{n})I_{\nu^\prime}(\hat{n}^\prime)d\nu^\prime \;\frac{d\Omega^\prime}{4\pi}<br />
$$<br />
where we have convolved the redistribution function and the specific intensity of the radiation field over frequency and solid angle to account for the continuity of the field. <br />
<br />
This defines a "non-coherent scattering emissivity" $$j_\nu^{(s)} \propto \int\int \mathbb{R}(\nu^\prime, \hat{n}^\prime, \nu, \hat{n})I_{\nu^\prime}(\hat{n}^\prime)d\nu^\prime \;\frac{d\Omega^\prime}{4\pi}.$$<br />
<br />
The constant of proportionality is related to the [[Einstein Coefficients|Einstein $A$'s]] (relative likelihoods) of other atomic transitions that may occur when an atom is excited to the level that produces the transition corresponding to $\mathbb{R}$. For example, in the case of Ly-$\beta$ (3 -> 1) scattering, an H atom in the ground state that is excited into the $n =3$ level may either undergo Ly-$\beta$ decay or H-$\alpha$ decay. The relative likelihood of H-$\alpha$ is given by <br />
<br />
$$<br />
\epsilon = \frac{A_{H\alpha}}{A_{Ly-\beta} + A_{H\alpha}} = 0.12<br />
$$<br />
<br />
Therefore the relative likelihood that a transition from the $n=3$ state is Ly-$\beta$ is given by $1 - \epsilon = .88$. Therefore, the non-coherent scattering emissivity is given by<br />
<br />
$$<br />
j_\nu^{(s)} = (1-\epsilon) \int\int \mathbb{R}(\nu^\prime, \hat{n}^\prime, \nu, \hat{n})I_{\nu^\prime}(\hat{n}^\prime)d\nu^\prime \;\frac{d\Omega^\prime}{4\pi}.<br />
$$<br />
<br />
The total emissivity of the medium is therefore the sum of the scattering emissivity and the purely "emissive" (non-scattering) emissivity $(j_\nu^{(e)})$. So the entire [[Radiative Transfer Equation]] for a medium undergoing non-coherent scattering is given by<br />
<br />
$$<br />
\frac{dI_\nu}{ds} = -I_\nu\sum_i\alpha_{\nu,i} + j_\nu^{(e)} + \sum_i\alpha_{0,i}(1-\epsilon)\int\int\mathbb{R}(\nu^\prime, \hat{n}^\prime, \nu, \hat{n})I_{\nu^\prime}(\hat{n}^\prime)d\nu^\prime \;\frac{d\Omega^\prime}{4\pi}.<br />
$$<br />
<br />
where we have summed over all possible upper level destinations, $i$.<br />
<br />
\section*{Functional Forms of The Redistribution Functions I: Two Simple Cases}<br />
We now seek specific functional forms of $\mathbb{R}$. {\bf Often, but not always, we can decompose $\mathbb{R}$ into the product of an angular function $g(\hat{n}^\prime, \hat{n})$, and a frequency dependent function $F(\nu^\prime, \nu)$.} First, we consider two very simple cases that permit this simplification: {\bf coherent scattering $(\nu^\prime = \nu)$}, and {\bf complete redistribution ($(\nu^\prime, \nu)$ completely uncorrelated)}:<br />
<br />
$$<br />
\mathbb{R}(\nu^\prime, \hat{n}^\prime, \nu, \hat{n})= g(\hat{n}^\prime, \hat{n})F(\nu^\prime, \nu)<br />
$$<br />
<br />
Further, we consider two subcases, corresponding to two distinct functional forms of $g(\hat{n}^\prime, \hat{n})$. <br />
\begin{itemize}<br />
*{\bf Isotropic Scattering} (e.g., the scattering of light by slow-moving dust.) In this case, $$g(\hat{n}^\prime, \hat{n}) = 1,$$ since incident radiation is equally likely to be reemitted in any direction.<br />
<br />
*{\bf Dipole Scattering} (e.g., Thomson Scattering.) In this case, $$g(\hat{n}^\prime, \hat{n}) = \frac{3}{4}(1 + \cos^2(\theta)).$$ since light is more likely to be scattered into the dipole field.<br />
\end{itemize}<br />
\subsection*{Case I: Coherent Scattering}<br />
We consider the case of coherent scattering, where the frequency of incident radiation is equal to the frequency of scattered radiation $(\nu^\prime = \nu)$. In this case, $F(\nu^\prime, \nu)$ is given by the Dirac Delta Function, centered on $\nu^\prime$. This is because there is a 100\% probability that incident radiation is reemitted at its original frequency. We assume $g(\hat{n}^\prime, \hat{n})$ corresponds to either of the isotropic or dipole cases. Therefore, we can write down:<br />
<br />
$$<br />
\mathbb{R}(\nu^\prime, \hat{n}^\prime, \nu, \hat{n})= g(\hat{n}^\prime, \hat{n}) \phi(\nu^\prime) \delta(\nu^\prime -\nu).<br />
$$<br />
<br />
The scattering emissivity is therefore given by<br />
<br />
$$<br />
j_\nu^{(s)} = (1-\epsilon) \int\int g(\hat{n}^\prime, \hat{n}) \phi(\nu^\prime) \delta(\nu^\prime -\nu) I_{\nu^\prime}(\hat{n}^\prime) d\nu^\prime \;\frac{d\Omega^\prime}{4\pi}.<br />
$$<br />
<br />
If the scattering is isotropic, then $g(\hat{n}^\prime, \hat{n}) = 1$, and $j_\nu^{(s)}$ becomes<br />
<br />
$$j_\nu^{(s)} = \alpha_\nu(1-\epsilon)J_\nu.$$<br />
\subsection*{Case II: Complete Redistribution}<br />
Complete redistribution occurs when $\nu^\prime$ and $\nu$ are completely uncorrelated. In this case, $\nu$ is determined exclusively by $\phi(\nu)$:<br />
<br />
$$<br />
\mathbb{R}(\nu^\prime, \hat{n}^\prime, \nu, \hat{n})=g(\hat{n}^\prime, \hat{n}) \phi(\nu^\prime)\phi(\nu)<br />
$$ $$<br />
j_\nu^{(s)} = \alpha_0 (1-\epsilon) \int\int g(\hat{n}^\prime, \hat{n}) \phi(\nu^\prime)\phi(\nu) I_{\nu^\prime}(\hat{n}^\prime) d\nu^\prime \;\frac{d\Omega^\prime}{4\pi}.<br />
$$ $$<br />
= \alpha_\nu (1-\epsilon) \int\int g(\hat{n}^\prime, \hat{n}) \phi(\nu^\prime) I_{\nu^\prime}(\hat{n}^\prime) d\nu^\prime \;\frac{d\Omega^\prime}{4\pi}.<br />
$$<br />
<br />
If the scattering is isotropic, $g(\hat{n}^\prime, \hat{n}) = 1$, so<br />
$$<br />
j_\nu^{(s)} = \alpha_\nu (1-\epsilon) \int \phi(\nu^\prime) J_{\nu^\prime} d\nu^\prime. $$<br />
\subsection*{Was that realistic?}<br />
No. In reality, redistribution occurs {\bf in the frame of the atom}. Additionally, the phenomenon of {\bf Doppler redistribution} ensures that laboratory-observed redistribution is only partial. To account for these effects, we henceforth place ourselves into the rest-frame of the atom, making the following changes of variables:<br />
<br />
[[File:Doppler.png|frame|left|Until now, we have been working in the laboratory frame. We transform to the doppler frame, where redistribution occurs in the frame of the atom.]]<br />
<br />
\section*{Non-Coherent Scattering with Doppler Redistribution}<br />
\subsection*{Formalism}<br />
Let $f(\xi^\prime)$ define the absorption profile (line profile) in the atom's frame. We therefore have <br />
<br />
$$<br />
\int \! f(\xi^\prime) \; d\xi^\prime = 1.<br />
$$<br />
<br />
From our earlier discussion of redistribution functions, it must be the case that<br />
<br />
$$<br />
f(\xi^\prime) \; d\xi^\prime\;\frac{d\Omega^\prime}{4\pi}<br />
$$<br />
defines the probability that a photon with frequency between $\xi^\prime$ and $\xi^\prime+ d\xi^\prime$ is absorbed in solid angle $d\Omega^\prime$. Now, let<br />
$$<br />
p(\xi^\prime, \xi)<br />
$$<br />
define the frequency-dependent component of the linearly-separated redistribution function, in the atom's rest-frame. Further, let<br />
$$<br />
g(\hat{n}^\prime, \hat{n})<br />
$$<br />
define the corresponding angular function. Bringing everything together, we have that <br />
$$<br />
p(\xi^\prime, \xi)g(\hat{n}^\prime, \hat{n}) \; d\xi^\prime\;\frac{d\Omega^\prime}{4\pi}<br />
$$<br />
gives the probability that {\it if} a photon is absorbed at $\xi^\prime, \hat{n}^\prime$, it is re-emitted at $\xi, \hat{n}$. Therefore, <br />
$$<br />
f(\xi^\prime)p(\xi^\prime, \xi)\;d\xi^\prime d\xi g(\hat{n}^\prime, \hat{n})\;\frac{d\Omega}{4\pi}\;\frac{d\Omega^\prime}{4\pi} \approx \mathbb{R}<br />
$$ for a single particle with velocity $\vec{v}$.<br />
\section*{Three Physical Cases of Non-Coherent Scattering with Doppler Redistribution}<br />
We now consider three specific cases of non-coherent scattering in the rest-frames of individual atoms. Later, we will generalize our results to entire stellar atmospheres.<br />
\subsection*{Case I: The Infinitely Sharp Atom}<br />
The first case we examine is doppler redistribution in the rest-frame of a simple two-level atom with infinitely sharp (i.e. 0 width) energy states. In this case, there is {\bf no frequency redistribution {\it in the frame of the atom}}. Instead, we have:<br />
$$<br />
f(\xi^\prime) = \delta(\xi^\prime - \nu_0)<br />
$$ $$<br />
p(\xi^\prime, \xi) = \delta(\xi^\prime - \xi)<br />
$$<br />
\subsection*{Case II: Resonance Lines}<br />
Here we treat the case of an atom with a perfectly sharp ground state and a broadened upper state, whose finite lifetime against radiative decay leads to a Lorentzian line profile for the atom, consistent with natural broadening:<br />
$$<br />
f(\xi^\prime) = \frac{1}{\pi}\frac{\Gamma / 4\pi}{(\xi - \nu_0)^2 + (\frac{\Gamma}{4\pi})^2},<br />
$$<br />
where $\Gamma$ is the total radiative decay rate (or "radiative damping width") of the atom, that is,<br />
$$<br />
\Gamma = \sum_{k < i} A_{ik}<br />
$$<br />
We further assume that there are no additional perturbations of the atom while it is in its upper state. Then there will be no reshuffling of electrons among substates of the upper state, and the decay back down to the lower state will produce a photon of exactly the same frequency as the one originally absorbed. Thus we have<br />
$$<br />
p(\xi^\prime, \xi) = \delta(\xi^\prime - \xi).<br />
$$<br />
This case applies to resonance lines in media of such low densities that collisional broadening of the upper state is completely negligible, such as the Ly-$\alpha$ line of Hydrogen in the interstellar medium.<br />
\subsection*{Case III: Complete Redistribution}<br />
The basic physical picture here is of an atom with a perfectly sharp lower state, and a broadened upper state, in a medium where collisions are so frequent that {\it all} excited electrons are randomly reshuffled over the substates of the upper state before emission occurs. The absorption profile is again the Lorentz profile, where $\Gamma$ now represents the full width (radiative plus collisional) of the upper state. In this extreme limit, the frequency of the emitted photon will have {\it no} correlation with the frequency of the absorbed photon; the probability for emission at any particular frequency is then proportional to the number of substates present at that frequency, and hence to the absorption profile itself. When complete redistribution in the atom's frame occurs we thus have$$<br />
p(\xi^\prime, \xi) = f(\xi^\prime)= \frac{1}{\pi}\frac{\Gamma / 4\pi}{(\xi - \nu_0)^2 + (\frac{\Gamma}{4\pi})^2}.<br />
$$<br />
\section*{Solving the Three Cases: Doppler Shift Redistribution in the Laboratory Frame}<br />
In this section, we shall consider the effects of the Doppler shifts introduced by the motion of the scattering atoms relative to the laboratory frame by deriving expressions that describe the full angular and frequency dependence of redistribution in the scattering process.<br />
\subsection*{A Thermal Atmosphere}<br />
Suppose an atom moving with velocity $v < c$, which remains fixed during the scattering process, absorbs a photon ($\nu^\prime, \hat{n}^\prime$) and emits a photon ($\nu, \hat{n}$), as measured in the laboratory frame. We may therefore express the photon frequencies in the atom's frame according to:<br />
$$<br />
\xi^\prime = \nu^\prime - \nu_0(\vec{v} \cdot \hat{n}^\prime)/c<br />
$$<br />
and<br />
$$<br />
\xi = \nu - \nu_0(\vec{v} \cdot \hat{n}) / c.<br />
$$<br />
The redistribution function for this scattering event may be rewritten as<br />
$$<br />
\mathbb{R}_v(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n}) = f(\underbrace{\nu^\prime - \nu_0(\vec{v} \cdot \hat{n}^\prime)/c}_{\xi^\prime})p(\underbrace{\nu^\prime - \nu_0(\vec{v} \cdot \hat{n}^\prime)/c}_{\xi^\prime}, \underbrace{\nu - \nu_0(\vec{v} \cdot \hat{n}) / c}_{\xi})g(\hat{n}^\prime, \hat{n}).<br />
$$<br />
This is the {\it specific} redistribution function for a single species of atoms with speed $\vec{v}$. To find the {\it net} result for the entire population of atoms, we must take the average over the velocity distribution, assumed to be Maxwellian. To perform this average, we make a change of coordinates. <br />
<br />
[[File: Change of basis.png|frame|left|Diagram of the newly adopted coordinate system.]]<br />
<br />
Let $\hat{n}^\prime, \hat{n}$ lie in the $\hat{n}_1, \hat{n}_2$ plane. $\hat{n}_1$ bisects $\hat{n}^\prime, \hat{n}$. Now, <br />
<br />
$$<br />
\hat{n}^\prime = \cos(\frac{\theta}{2})\hat{n}_1 + \sin(\frac{\theta}{2})\hat{n}_2 \equiv \alpha\hat{n}_1 + \beta\hat{n}_2<br />
$$<br />
$$<br />
\hat{n} = \cos(\frac{\theta}{2})\hat{n}_1 - \sin(\frac{\theta}{2}) \hat{n}_2 \equiv \alpha\hat{n}_1 - \beta\hat{n}_2<br />
$$<br />
<br />
Write: <br />
$$<br />
\vec{v} = v_1\hat{n}_1 + v_2\hat{n}_2 + v_3\hat{n}_3<br />
$$<br />
Then<br />
$$<br />
\hat{n}^\prime \cdot \vec{v} = \alpha v_1 + \beta v_2<br />
$$<br />
$$<br />
\hat{n} \cdot \vec{v} = \alpha v_1 - \beta v_2<br />
$$<br />
Introduce a quantity called the reduced velocity, $\vec{u}$. <br />
$$<br />
\vec{u} = \frac{\vec{v}}{v_{th}}<br />
$$<br />
$$<br />
v_{th} = \sqrt{\frac{2kT}{m}}<br />
$$<br />
Call the doppler width $\Delta$. <br />
$$<br />
\Delta \equiv \nu_0 \frac{v_{th}}{c} = \Delta\nu_D<br />
$$<br />
$$<br />
\nu_0^\prime \left(\frac{\hat{n}^\prime\cdot\vec{v}}{c}\right) = \frac{\nu_0}{c}(\alpha v_1 + \beta v_2) = \Delta(\alpha u_1 + \beta u_2)<br />
$$<br />
$$<br />
\nu_0\left(\frac{\hat{n} \cdot\vec{v}}{c}\right) = \Delta(\alpha u_1 - \beta u_2).<br />
$$<br />
Now, the Maxwell-Boltzmann distribution can be re-expressed: <br />
$$<br />
f_{MB}(u_1, u_2, u_3)\;du_1\;du_2\;du_3 = \frac{1}{\pi^{3/2}}e^{-(u_1^2 + u_2^2 + u_3^2)}\;du_1\;du_2\;du_3<br />
$$<br />
$$<br />
\therefore \mathbb{R}(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n}) = \int^\infty_{-\infty}\;du_1\;\int^\infty_{-\infty}\;du_2\;\int^\infty_{-\infty}\;du_3\;f_{MB}(u_1, u_2, u_3)\cdot\mathbb{R}_u(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n}) <br />
$$<br />
$$<br />
\mathbb{R}(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n}) = \int^\infty_{-\infty}\;du_1\;\int^\infty_{-\infty}\;du_2\;\int^\infty_{-\infty}\;du_3\;f_{MB}(u_1, u_2, u_3)f[\nu^\prime - \Delta(\alpha u_1 + \beta u_2)]p[\nu^\prime - \Delta(\alpha u_1 + \beta u_2), \nu - \Delta(\alpha u_1 - \beta u_2)]g(\hat{n}^\prime, \hat{n}).<br />
$$<br />
The $u_3$ integral is trivial by our choice of coordinate system. It is $\sqrt{\pi}$.<br />
<br />
$$<br />
\therefore \mathbb{R}(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n}) = \frac{g(\hat{n}^\prime, \hat{n})}{\pi} \times \int^\infty_{-\infty}\;du_1\;\int^\infty_{-\infty}\;du_2\;e^{-(u_1^2 + u_2^2)} f[\nu^\prime - \Delta(\alpha u_1 + \beta u_2)]p[\nu^\prime - \Delta(\alpha u_1 + \beta u_2), \nu - \Delta(\alpha u_1 - \beta u_2)]g(\hat{n}^\prime, \hat{n}).<br />
$$<br />
<br />
\subsection*{Cases 1 and 2: Coherent Scattering in the Rest Frame of the Atom}<br />
$$<br />
p(\xi^\prime, \xi) = \delta(\xi^\prime - \xi) = \delta(\nu^\prime - \nu - 2\Delta\cdot\beta u_2)<br />
$$<br />
<br />
To do the $u_2$ integral, let $2\Delta\beta u_2 \equiv z$. Then<br />
$$<br />
dz = 2\Delta\beta du_2<br />
$$<br />
$$<br />
\int^{\infty}_{-\infty} e^{-u_2^2}\;du_2 f[\nu^\prime - \Delta(\alpha u_1 + \beta u_2)] \delta(\nu^\prime - \nu - 2\Delta\cdot\beta u_2)<br />
$$<br />
$$<br />
= \frac{1}{2\Delta\beta} \int^{\infty}_{-\infty} \; dz e^{\frac{-z^2}{4\Delta^2\beta^2}}f[\nu^\prime - \Delta\alpha u_1 - \frac{z}{2}] \times \delta(\nu^\prime - \nu - z)<br />
$$<br />
Let $z = \nu^\prime - \nu$. <br />
$$<br />
\frac{1}{2\Delta\beta}e^{\frac{-(\nu^\prime - \nu)}{4\Delta^2\beta^2}}f[\frac{1}{2}(\nu^\prime + \nu) - \Delta\alpha u_1]<br />
$$<br />
So, finally, for coherent scattering:<br />
$$<br />
\mathbb{R}_{coh}(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n}) = \frac{g(\hat{n}^\prime, \hat{n})}{2\pi\Delta\beta}\times e^{\frac{-(\nu^\prime - \nu)}{4\Delta^2\beta^2}}\int^\infty_{-\infty}\;du \;e^{-u^2}f[\frac{1}{2}(\nu^\prime + \nu) - \Delta\alpha u]<br />
$$<br />
<br />
\subsubsection*{Case I: An Atmosphere of Infinitely Sharp Atoms in the Laboratory Frame}<br />
Recall that for Case I, we established that<br />
$$<br />
f(\xi^\prime) = \delta(\xi^\prime - \nu_0)<br />
$$<br />
We therefore seek to evaluate:<br />
$$<br />
\int^\infty_{-\infty}\;du \;e^{-u^2}\delta[\frac{1}{2}(\nu^\prime + \nu) - \Delta\alpha u - \nu_0]<br />
$$<br />
Make the following change of variables:<br />
$$<br />
y \equiv \Delta\alpha u; dy = \Delta\alpha du<br />
$$<br />
Then the above integral becomes:<br />
$$<br />
\frac{1}{\Delta\alpha}\int^\infty_{-\infty}\;dy e^\frac{-y^2}{\Delta^2\alpha^2}\delta[\frac{1}{2}(\nu^\prime + \nu - 2\nu_0) - y]<br />
$$<br />
$$<br />
= \frac{1}{\Delta\alpha} e^\frac{-(\nu^\prime - \nu - 2 \nu_0)^2}{4\Delta^2\alpha^2}<br />
$$<br />
Therefore<br />
$$<br />
\mathbb{R}_I(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n}) = \frac{g(\hat{n}^\prime, \hat{n})}{2\pi\Delta^2\alpha\beta} \times e^\frac{-(\nu^\prime - \nu)^2}{4\Delta^2\beta^2}e^\frac{-(\nu^\prime + \nu - 2\nu_0)^2}{4\Delta^2\alpha^2}<br />
$$<br />
Therefore, although the scattering is perfectly coherent in the frame of the atom, it is non-coherent in the laboratory frame, due to the doppler effect. Now, people often rewrite this result in terms of a new set of variables, $x$ and $x^\prime$, which define a frequency shift relative to the doppler width:<br />
<br />
$$<br />
x = \frac{1}{\Delta}(\nu - \nu_0)<br />
$$<br />
$$<br />
x^\prime = \frac{1}{\Delta}(\nu^\prime - \nu_0)<br />
$$<br />
$$<br />
\mathbb{R}_I(x', \hat{n}^\prime; x, \hat{n}) = \mathbb{R}_I(\nu^{\prime}, \hat{n}^{\prime};\nu, \hat{n})\underbrace{\frac{d\nu^\prime}{dx^\prime}\frac{d\nu}{dx}}_{\Delta^2}<br />
$$<br />
$$<br />
\mathbb{R}_I(x', \hat{n}^\prime; x, \hat{n}) = \frac{g(\hat{n}^\prime, \hat{n})}{\pi\sin(\theta)}e^{-x^2-(x^\prime-x\cos(\theta))^2\csc^2(\theta)}<br />
$$<br />
\subsubsection{Case II: An Atmosphere of Resonance Line Atoms in the Laboratory Frame}<br />
Here we have<br />
$$<br />
f(\xi^\prime) = \frac{1}{\pi}\frac{\Gamma / 4\pi}{(\xi - \nu_0)^2 + (\frac{\Gamma}{4\pi})^2}<br />
$$<br />
Therefore, the integral over the thermal velocities becomes:<br />
$$<br />
\int^\infty_{-\infty}e^{-u^2}\frac{1}{\pi}\frac{\Gamma/4\pi}{[\frac{1}{2}(\nu^\prime + \nu - 2\nu_0) - \Delta\alpha u]^2 + (\frac{\Gamma}{4\pi})^2}<br />
$$<br />
This integrand is similar to the Voigt function, $H(a, \nu)$. Therefore, <br />
$$<br />
R_{II}(x', \hat{n}^\prime; x, \hat{n}) = \frac{g(\hat{n}^\prime, \hat{n})}{\pi\sin(\theta)}e^{-\frac{1}{2}(x-x^\prime)^2\csc^2(\frac{\theta}{2})}H\left(a\sec(\theta/2), \frac{1}{2}(x+x^\prime)\sin(\theta/2)\right)<br />
$$<br />
where<br />
$$<br />
a \equiv \frac{\Gamma}{4\pi\Delta}<br />
$$<br />
and<br />
$$<br />
H(a, \nu) = \frac{a}{\pi}\int^\infty_{-\infty}\frac{e^{-y^2}dy}{(\nu - y)^2 + a^2}<br />
$$<br />
We leave case III to the concerned reader!<br />
\end{document}<br />
</latex></div>AparsonsCherenkov Radiation2021-08-20T17:44:18Z<p>Aparsons: </p>
<hr />
<div>[[Radiative Processes in Astrophysics|Course Home]]<br />
<br />
===Reference Material===<br />
<br />
* [https://en.wikipedia.org/wiki/Cherenkov_radiation Wikipedia Article on Cherenkov Radiation]<br />
* [https://en.wikipedia.org/wiki/Frank–Tamm_formula Wikipedia Article on Frank-Tamm Formula]<br />
* [http://www-astro.physics.ox.ac.uk/~garret/teaching/hea-2016-lec10.pdf Slides on Cherenkov Radiation in the context of cosmic rays (Garret Cotter, Oxford)]<br />
<br />
<br />
<br><br />
<latex><br />
\documentclass[11pt]{article}<br />
\usepackage{fullpage}<br />
\usepackage{amsmath,amssymb}<br />
\usepackage{graphicx}<br />
\usepackage{float}<br />
\usepackage{eufrak}<br />
\usepackage[english]{babel}<br />
\begin{document}<br />
<br />
\section*{Introduction}<br />
While Einstein's Theory of Special Relativity prevents particles from moving faster than $c$, the speed of light in a vacuum, it does allow particles to move faster than light in media with refractive index $n >1$. That's because light itself propagates at speed $c/n < c$.<br />
\newline <br />
<br />
This has some interesting physical consequences. A charged particle moving through a medium will generally interact with its environment and this process will emit radiation. Now suppose that this particle happens to move through the medium at a speed faster than $c/n$. What happens is the electromagnetic equivalent of the sonic boom and is known as Cherenkov Radiation. \newline<br />
<br />
\section*{Geometry of Cherenkov Radiation}<br />
[[File:Cherenkov_diagram.png|600px|thumb|right|Because the circular wavefronts propagate slower than the particle, radiation is confined to a cone behind the moving particle.]]<br />
<br />
Dealing with relativistic charges in the proximity of molecules and atoms is a complex problem. But we can still make some powerful predictions about the geometry of emitted radiation with classical physics. \newline<br />
The picture we should have in mind is shown on the right. The diagram shows wavefronts produced by a superluminal particle. Because these wavefronts propagate slower than the particle itself, the radiation will always be confined to a cone behind the particle, as is shown in the diagram. Note that inside the cone wavefronts cross, leading to constructive interference. \newline<br />
<br />
The radiation will move outward perpendicular to the walls of the cone, at an angle $\theta$ relative to the particle. This angle is fixed by the cone's geometry and can be found by comparing the distance traveled by the wavefronts and particle. From the right triangle shown in the diagram we see that<br />
$$\cos(\theta) = \frac{AB}{AC} = \frac{\frac{c}{n} \cdot \Delta t }{v \cdot \Delta t}= \frac{1}{\beta n} \ , $$<br />
$$\Rightarrow \theta = \cos^{-1} (\frac{1}{\beta n}) \ ,$$<br />
where $\beta$ is the relativistic parameter defined as $\beta = \frac{v}{c}$. We would like $\frac{1}{\beta n} <1$.<br />
As a result, for Cherenkov Radiation the particle's speed must be in the range<br />
$$\frac{c}{n} < v < c \ .$$ <br />
<br />
<br />
The direction of propagation $\theta$ increases with increasing refractive index and speed. \newline<br />
For ultrarelativistic particles with $\beta \approx 1$, $\theta \approx \cos^{-1}(\frac{1}{n})$. For water with $n =1.33$ this yields $\theta_{water} \approx 41^{\circ}$. For air with n = 1.0003 we get $\theta_{air} \approx 1^{\circ}$, so Cherenkov Radiation propagates almost parallel to the charged particle. <br />
<br />
<br />
\section*{Cherenkov Spectrum}<br />
The amount of energy emitted in a frequency range $d\omega$ per unit distance traveled by a particle of charge $Ze$ is given by the Frank-Tamm formula:<br />
$$\frac{dE}{dx}= \frac{Z^2e^2}{c^2} (1-\frac{1}{\beta^2 n(\omega)^2}) )\ \Theta(v-\frac{c}{n(\omega)}) \ \omega \ d\omega \ , $$<br />
where $\Theta(x)$ is the Heaviside step function:<br />
<br />
<br />
<br />
$$\Theta(x) = \begin{cases} 0 & x<0 \\<br />
1 & x > 0 \end{cases} $$<br />
<br />
Note that we have included a frequency dependence in the refractive index. <br />
By using the chain rule $\frac{dE}{dx} = \frac{dE}{dt}\frac{dt}{dx}$, this can be converted into a formula for power:<br />
$$\frac{dP}{d\omega} = \frac{Z^2e^2 v}{c^2} (1-\frac{1}{\beta^2 n(\omega)^2}) \ \Theta(v-\frac{c}{n(\omega)}) \ \omega \ .$$<br />
If we ignore the dependence on $\omega$ in $n(\omega)$, we see that $\frac{dP}{d\omega} \propto \omega $ . So the Frank-Tamm formula tells us that more energy is emitted at higher frequencies. This is why Cherenkov radiation typically has a blueish color. The frequency dependence in $n(\omega)$ is especially important at high energies and prevents the total power from diverging.<br />
\section*{Astrophysical Applications}<br />
Cherenkov Radiation detectors can be used for measuring energy spectra of cosmic rays and gamma rays. As they hit Earth's upper atmosphere, cosmic rays produce showers of charged particles. The relativistically moving particles created in this cascade emit Cherenkov Radiation at a small angle ($\approx 1^{\circ}$) to their direction of motion. Measurements of Cherenkov flashes reaching the ground can be used to gain information about the energy and direction of propagation of the original cosmic/gamma ray. \newline<br />
<br />
Cherenkov detectors are also a very important class of neutrino detectors. Water based Cherenkov detectors recorded flashes of radiation due to neutrinos coming from SN 1987A hours before the first photons from SN 1987A arrived.<br />
<br />
\end{document}<br />
<br />
</latex></div>AparsonsRadiative Transfer Codes2021-08-20T17:43:52Z<p>Aparsons: </p>
<hr />
<div>[[Radiative Processes in Astrophysics|Course Home]]<br />
<br />
===Short Topical Videos===<br />
<br />
===Reference Materials===<br />
*[http://www.annualreviews.org/doi/abs/10.1146/annurev-astro-082812-141042 "Three-Dimensional Dust Radiative Transfer"(Steinacker et al. 2013, Annual Review)]<br />
* [http://www.ita.uni-heidelberg.de/~dullemond/lectures/radtrans_2012/index.shtml Radiative Transfer Notes (C.P. Dullemond, Heidelberg)]<br />
*[http://www.staff.science.uu.nl/~rutte101/Astronomy_course.html "Rob Rutten's: Lecture notes on radiative transfer" ]<br />
* [http://www.mpia-hd.mpg.de/homes/dullemon/radtrans/ Radiative Transfer Code for Dusty Disks]<br />
*[http://www.alma-allegro.nl/expertiseareas/science-modelling-tools/45 Radiative Transfer Models]<br />
*[http://www.aanda.org/articles/aa/ref/2009/18/aa11555-08/aa11555-08.html "Benchmark problems for continuum radiative transfer, Pinte et al. 2009" ]<br />
*[http://www.aanda.org/articles/aa/abs/2013/09/aa21600-13/aa21600-13.html "ALMA imaging of the CO snowline of the HD 163296 disk with DCO+, Mathews et al. 2013" ]<br />
<br />
===Need to Review?===<br />
* [[Radiative Transfer Equation]]<br />
* [[Optical Depth]]<br />
<br />
<latex><br />
\documentclass[11pt]{article}<br />
\def\inv#1{{1 \over #1}}<br />
\def\ddt{{d \over dt}}<br />
\def\mean#1{\left\langle {#1}\right\rangle}<br />
\def\sigot{\sigma_{12}}<br />
\def\sigto{\sigma_{21}}<br />
\def\eval#1{\big|_{#1}}<br />
\def\tr{\nabla}<br />
\def\dce{\vec\tr\times\vec E}<br />
\def\dcb{\vec\tr\times\vec B}<br />
\def\wz{\omega_0}<br />
\def\ef{\vec E}<br />
\def\ato{{A_{21}}}<br />
\def\bto{{B_{21}}}<br />
\def\bot{{B_{12}}}<br />
\def\bfield{{\vec B}}<br />
\def\ap{{a^\prime}}<br />
\def\xp{{x^{\prime}}}<br />
\def\yp{{y^{\prime}}}<br />
\def\zp{{z^{\prime}}}<br />
\def\tp{{t^{\prime}}}<br />
\def\upx{{u_x^\prime}}<br />
\def\upy{{u_y^\prime}}<br />
\def\e#1{\cdot10^{#1}}<br />
\def\hf{\frac12}<br />
\def\^{\hat }<br />
\def\.{\dot }<br />
\usepackage{fullpage}<br />
\usepackage{amsmath}<br />
\usepackage{eufrak}<br />
\begin{document}<br />
\subsection*{ Importance of Radiative Transfer }<br />
Radiation has a very prominent role in astrophysics, both as the only observable and also as a dominant mechanism for energy transfer within and out of astrophysical systems. Consequently, its transport through a medium is one of the most fundamental processes that needs to be considered. Analyzing the radiation received from an object provides us with useful information not only about the radiative source itself but also the medium in between and surrounding the object and the observer. The radiative transfer problem is formally defined by the non-steady state radiative transfer equation (See lecture on radiative transport (Th, Sep. 5) for detailed description). <br />
<br />
$$\frac{dI_{\nu}(x,n,t)}{ds} + \frac{dI_{\nu}(x,n,t)}{cdt} = j_{\nu}(n,t) - (\kappa_{\nu,abs}(n,t)+\kappa_{\nu,scat}(n,t))\rho(x,t)I_{\nu}(n,t) +\kappa_{\nu,scat}(n,t)\rho(x,t)\int_{4\pi}\Phi(n,n',x,\nu)I_{\nu}(x,n')d\Omega' $$<br />
where s is the distance along the path defined by a position \textit{\textbf{x}} and propagation direction \textit{\textbf{n}} and $\kappa (s,\lambda)$ is the mass extinction coefficient ($\alpha(s,\lambda) = \kappa(s,\lambda)\rho(s)$). $\Phi(n,n',x,\nu)$ is the scattering phase function which describes the probability that a photon originally propagating in direction \textit{\textbf{n'}} and scattered at position \textbf{x}, will have \textit{\textbf{n}} as its new propagation direction after the scattering event.<br />
<br />
The challenging aspect of radiative transfer is that it is a six-dimensional problem (3 spatial + 2 directions ($\theta$,$\phi$) + frequency) with additional time dependence. Additionally, significant complexity is introduced as a consequence of the ability of radiation to affect the state of the medium which is the source of the radiation itself. Thus, to know the state of the matter, we need to know the radiation field. To know the radiation field, we need to know the photon emission, absorption and scattering rates. However, to estimate these rates, we in turn again need to know the state of the matter. Furthermore, the RT problem is nonlocal in space (photons propagate within the entire domain of interest), direction (scattering and absorption/re-emission can change the direction of photons), and wavelength (absorption at a particular wavelength gets re-emitted at another wavelength). As a consequence of these challenges, radiative transfer in astrophysics is frequently calculated using radiative transfer codes which can also account for 3D geometry and non-linear affects due to dust properties (See Lecture on dust grains).<br />
<br />
<br />
\subsection*{A numerical algorithm for integrating the formal transfer equation}<br />
\textbf{Note : To understand what follows, a basic knowledge of numerical methods is useful. If you are completely new to numerical methods, "Numerical Recipes" by Press, Teukolsky, Vetterling and Flannery is a good reference source.}<br />
<br />
The primary aspects of numerical radiative transfer can be illustrated using a 1D plane parallel atmosphere. In this model, the gas density, gas temperature etc in the atmosphere is assumed to depend only on height (z). Consequently, we only require one directional variable ($\mu = cos(\theta)$), with the steady state [[Radiative Transfer Equation]] (RTE) reducing to the following form (overall 3D problem - spatial + direction + wavelength) -<br />
<br />
$\mu\frac{I_{\nu}(z,\mu)}{dz} = j_{\nu}(z) - \alpha_{\nu}(z)I_{\nu}(z,\mu)$<br />
<br />
The first step in numerical solution techniques is to discretize the solution vector or the physical properties in the RTE. The quantities requiring discretization are the spatial coordinates, the directional coordinates, the wavelengths, and/or the dust properties. Let us divide up 'z' into cells with indices i $=$ 1,2,3,... ,Nz where Nz is the chosen number of grid cells. The cell walls, which separate the cells, also have indices, which we will give half-numbers: i $=$ 1/2, 3/2, 5/2,... ,Nz + 1/2 (See Figure).<br />
<br />
[[File:Plane_parallel_atmosphere.png]]<br />
<br />
The next step in the technique is to choose a numerical integration technique. We will discuss the first and second order versions of the method of Olson and Kunasz (1987, J. Quant. Spectros. Radiat. Transfer 38, 325) - OK87 method - in this example, since it is generally stable and reliable. However, depending on the complexity of the problem, other more suitable techniques may be required to get correct results. <br />
<br />
Next, we need to make an assumption for the functional form of j(z) and $\alpha$(z) between the cell boundaries, depending on the expected physical processes that we expect to dominate the radiation. For instance, one might use the emission and absorption co-efficient for small dust grains high up in the atmosphere. With these chosen functionals, we can then solve the formal transfer equation exactly. We illustrate the first and second order methods here with the higher order methods following the same general approach. <br />
<br />
\subsubsection*{First Order}<br />
The first order version of OK87 method assumes that the emissivity j and extinction coefficient $\alpha$ are constant within each cell, but can be arbitrarily different from one cell to the next. Thus the [[Optical Depth]] in the cell 'i' would be <br />
<br />
$$\delta \tau_{i} = (s_{i+1/2} - s_{i-1/2})\alpha_{i} $$ or <br />
$$\delta \tau_{i} = (z_{i+1/2} - z_{i-1/2})\alpha_{i}/\mu $$ <br />
<br />
Thus the source function S$_{i} = \frac{j_{i}}{\alpha_{i}} $ is constant and the exact solution for RTE is <br />
<br />
$$I_{i+1/2} = \exp^{-\delta \tau_{i}}I_{i-1/2} + S_{i}(1 - \exp^{-\delta \tau_{i}})$$ <br />
<br />
Thus, after choosing a direction $\theta$ (i.e. $\mu$) to calculate I$_{\nu}$(z,$\mu$) measured by an observer, we can integrate systematically from one grid wall to the next. We start at i $=$ 1 and step up for $\mu >0$ whereas we initialize at the top and work our way down for $\mu <0$.<br />
<br />
\subsubsection*{Second Order}<br />
In the second order method, we assume that S and $\alpha$ vary linearly between the cell walls (instead of constant within the cell). For cell i, this implies (for $\mu > 0$)<br />
\begin{eqnarray}<br />
S(z) = \frac{z_{i+1/2}-z}{z_{i+1/2} - z_{i-1/2}}S_{i-1/2} + \frac{z-z_{i-1/2}}{z_{i+1/2} - z_{i-1/2}}S_{i+1/2} \\<br />
\alpha(z) = \frac{z_{i+1/2}-z}{z_{i+1/2} - z_{i-1/2}}\alpha_{i-1/2} + \frac{z-z_{i-1/2}}{z_{i+1/2} - z_{i-1/2}}\alpha_{i+1/2} \\<br />
I_{i+1/2} = e^{-\delta \tau_{i}}I_{i-1/2} + Q_{i} \\<br />
Q_{i} = \frac{1 - (1+\delta \tau_{i})e^{-\delta \tau_{i}}}{\delta \tau_{i}}S_{i-1/2} + \frac{\delta \tau_{i}- 1 + \exp^{-\delta \tau_{i}}}{\delta \tau_{i}}S_{i+1/2}<br />
\end{eqnarray}<br />
<br />
\subsubsection*{Boundary/Initial Conditions}<br />
When $\mu >0$, we have to integrate from z $=$ 0 upward and choose an appropriate boundary condition for I$_{1/2}$ in the first cell. For instance, in the plane atmosphere case we have been discussing here, the Plank black-body function B$_{\nu}(T)$ is a reasonable choice for mid-infrared wavelengths whereas reflected light of the solar spectrum is a more appropriate choice for the optical wavelength regime. Similarly, for $\mu <0$, we have to impose a boundary condition for I$_{Nz+1/2}$. Generally, I$_{Nz+1/2} = 0$ is a reasonable choice for astrophysical scenarios. However, due to irradiation by the Sun, I$_{Nz+1/2} \neq 0$ and it depends on both angles $\theta$ and $\phi$. Since this breaks the rotational symmetry in x-y plane, we have to include another variable in our problem. <br />
<br />
Note that for higher order schemes, we use more values of S(z). For example, in the third order integration scheme for obtaining I_{i+1/2} for $\mu > 0$, we do not only use S_{i-1/2} and S_{i+1/2}, but also S_{i+3/2}. The subgrid model for S(z) is thus a quadratic fit through three values.<br />
<br />
<br />
\subsubsection*{Appropriate Grid Size}<br />
Some general points to consider for the right spatial resolution which both provides accurate results and is numerically efficient - <br />
\begin{itemize}<br />
\item Try to spatially resolve the photosphere of the object with sufficient number of grid points, because it is here where the observed spectrum is formed.<br />
\item Use a stable numerical integration scheme that also works properly when large steps in $\tau$ are taken.<br />
\item For high optical depths use second order/higher integration methods if possible.<br />
\item Regions that are at high optical depth at all wavelengths (i.e at peak of Plank function at that wavelength e.g. Synchrotron self absorption) can be mapped with optically thick grid spacing.<br />
\item Posteriori checks - the intensity function I$_{\nu}$ along a light ray should not make large jumps from one grid cell) to the next<br />
\item Always choosing $\delta \tau <1$ over each grid cell is not required or advised.<br />
\end{itemize}<br />
<br />
\subsubsection*{Higher Dimensional Problems}<br />
For radiative transfer problems with 2-D/3-D spatial dimensions, the basic principles of the numerical integration method can be directly generalized. One important difference between the 1D vs higher dimensional problems is that each light ray passing through the grid would will intersect with the cell walls multiple times and get divided into a number of ray segments. Each of these segment belongs to a cell that is being traversed and the segment length can be very irregular. Thus, proper consideration for the changing $\delta s_{i}$ (the ray segment length in cell i) is required while calculating the intensity integration along a light ray.<br />
<br />
\subsection*{General Radiative Transfer Methods}<br />
The difficult aspect of radiative transfer calculations is that we generally do not know the values of j$_{\nu}$ and $\alpha_{\nu}$ in advance since the radiation field can affect the medium in such a way as to modify j$_{\nu}$ and $\alpha_{\nu}$. Additionally, we cannot separate the problem into individual rays (as we did in the simple example) because a change in extinction/emission coefficients due to a particular ray at a particular location (\textbf{x}) will affect the formal transfer equation for all rays passing through \textbf{x}. Besides this "ray coupling" challenge, we also have to consider the "radiative cell coupling" - emission from a volume element can travel to distant regions - which makes the problem non-local. <br />
<br />
There are primarily three main classes of numerical techniques which can be used to solve such problems - (1) Monte Carlo methods, which simulate the multiple scattering/emission/absorption processes directly, (2)Discrete ordinate methods, which solve the problem by dividing all coordinates, including the angles and the frequency, into discrete grid points or grid cells, and (3) Moment methods, including the diffusion method, which treat the angular and/or frequency domain in terms of its moments. <br />
<br />
\subsubsection*{Monte Carlo Method}<br />
The primary concept behind the Monte Carlo method is to follow the path of a photon from one scattering event to the next, and to use random numbers to decide in which direction the photon will proceed after each scattering event. We must also use a random number to find out where along the present path the next scattering event will take place. By repeating this process for many millions of such photons, we can get a good statistical sample of paths that the photons will follow. Since the optical depths $\tau$ that the photon will travel until the next scattering event is given by the probability distribution --<br />
$$p(\tau) = \exp^{-\tau}$$,<br />
a uniformly distributed random number (w) is drawn between 0 and 1, and $$\tau = -ln(w)$$. Once we have fixed the optical depth where the next scattering event would take place, the light ray travels cell-by-cell until it arrives at the point where the combined optical depth between that point and the location of previous scattering event is equal to the chosen $\tau$. Since the light ray/photon can also get absorbed instead of scattering, we have to calculate the probability that the interaction in a particular cell is a scattering event; it is equal to the dust albedo a=$\kappa_{sca}/\kappa_{ext}$. Using a random number w, the nature of the interaction is easily determined: If w $<$ a, we have a scattering event, otherwise an absorption event. Once the photon is absorbed or it exits from the considered medium, the simulation moves to the next photon. <br />
<br />
It is important to note that when a "photon" is modeled in the Monte Carlo method, it typically represents many photons at once. Thus, we are really considering the trajectories of photon packets, each with a large number of photons. The approximation we make is to assume that all the photons in a single photon packet follow the same path. Thus, instead of considering absolute absorption, a fraction of the photon packet luminosity is absorbed and it is stored in the interaction cell. This absorbed luminosity is used at a later stage to calculate the emission spectrum from the medium in that volume cell thus acting as the source function for another MC cycle.Once, we have a statistical representation of the overall radiation field, we can then use it to predict what an observer would detect based on his orientation and location. Typically, for an observer at infinity one would assign a solid angle around the direction of the observer, and collect all photons that end up in that direction. Since an observer has to collect a large number of photon packets to reduce the noise, Monte Carlo method is very numerically intensive.<br />
<br />
[[File:mc1.png]]<br />
[[File:mc2.png]]<br />
[[File:mc3.png]]<br />
<br />
A related method, which is often used to circumvent this issue is to continuously "peel off" radiation from a photon packet as it passes through the medium, and compute what the observer would see from that photon packet, including the extinction from each of these points to the observer. <br />
Another approach is called the scattering source function approach. In this method, we follow each photon packet as it moves through the cloud. As it does so, we add an appropriate contribution of this photon packet to the scattering emissivity function $j_{\nu}$ of each cell it passes. The<br />
length of the ray segment is taken into account, so that if a photon packet passes right through the middle of a cell, its contribution to that cell will be larger than if it just passes through the edge. Once we have launched all photon packets, the function $j_{\nu}(x)$ is known throughout the medium. We can thus get the final image by integrating the formal transfer equation along a pre-defined set of rays all ending at the observer (like in previous section). Additional variations of MC radiative transfer techniques have been developed to optimize numerical efficiency - See Steinacker et al. 2013 article (link at the top) for a more detailed discussion. <br />
<br />
The Following figures shows the typical procedure of a radiative transfer calculation as well an example from a paper modelling a Proto-planetary Disk (Mathews et al. 2013)<br />
[[File:Flow_Chart1.png]]<br />
[[File:Flow_Chart2.png]]<br />
<br />
\end{document}<br />
</latex></div>AparsonsWouthuysen Field effect2021-08-20T17:43:51Z<p>Aparsons: </p>
<hr />
<div>[[Radiative Processes in Astrophysics|Course Home]]<br />
<br />
===Reference Materials===<br />
* [http://arxiv.org/PS_cache/astro-ph/pdf/0608/0608032v2.pdf Page 32 of Furlanetto et. al, 2009]<br />
* [http://bohr.physics.berkeley.edu/classes/221/1011/221a.html Detailed quantum mechanics lecture notes from UCB Physics 221A (bottom of page)]<br />
* [http://www.astro.sunysb.edu/fwalter/AST341/qn.html A Primer on Quantum Numbers and Spectroscopic Notation (Walter, Stony Brook)]<br />
* [http://www.columbia.edu/~crg2133/Files/CambridgeIA/Chemistry/Orbitals.pdf Orbitals (Guetta, Columbia)]<br />
<br />
===Need to Review===<br />
* [[21cm Transition]]<br />
* [[Einstein Coefficients]]<br />
* [[Classical Bohr Atom]]<br />
* [[Atomic and Molecular Quantum Numbers]]<br />
* [[Collisional Excitations]]<br />
* [[Black-Body Radiation]]<br />
<br />
<latex><br />
\documentclass{article}<br />
\usepackage{graphicx}<br />
\usepackage{amsmath}<br />
\usepackage{fullpage}<br />
\begin{document}<br />
<br />
\section*{The Wouthuysen-Field Effect}<br />
<br />
The Wouthuysen-Field effect is a coupling of the [[21cm Transition|21cm hyperfine<br />
transition]] to Ly-$\alpha$ radiation.<br />
<br />
This is important for possible<br />
high-redshift observations of the 21cm line, during the epoch of<br />
reionization. The 21cm hyperfine transition is forbidden by<br />
normal dipole selection rules, but transitions from one hyperfine<br />
state, up to the $n=2$ state, and back down to the other hyperfine<br />
state are not forbidden. So, if there is sufficient Ly-$\alpha$<br />
radiation to cause this intermediate transition, it will dominate over<br />
the direct (forbidden) hyperfine transition. Cosmologically speaking,<br />
this happens towards the end of<br />
the ``Dark Ages'' as reionization begins, and the WF effect remains<br />
the dominant effect until reionization is complete.<br />
<br />
\subsection*{Fine structure of hydrogen}<br />
<br />
Energy levels in hydrogen atoms are split due to spin orbit interaction<br />
(fine splitting), and the smaller effect of electron-proton spin interaction<br />
(hyperfine splitting). Anti-aligned spins lead to lower energy levels.<br />
The splittings of the lowest energy levels are:<br />
<br />
\begin{figure}<br />
\center{\includegraphics{WFfig1.jpg}}<br />
\caption{Energy level diagram with spectroscopic notation}<br />
\label{all levels}<br />
\end{figure}<br />
<br />
Here we have used spectroscopic notation $n\ _{F}L_{J}$, where $n$<br />
is the principal quantum number, $L=0(S),1(P)$ are the electron orbital<br />
angular momentum. $S_{e}$ ($S_{p}$) shall denote the electron (proton)<br />
spin (not to be confused with the $S$ orbital). Then $J=|L+S_{e}|$<br />
is the electron total angular momentum, and $F=|L+S_{e}+S_{p}|$ is<br />
the hydrogen total angular momentum. Note these are vector sums.<br />
}<br />
<br />
The splitting between the two $1\ S$ levels is of particular interest.<br />
It has energy difference $\nu=1.42GHz$, corresponding to wavelength<br />
$\lambda=21cm$. We also define $T_{*}=E_{21cm}/k_{B}=0.068K$. In<br />
the $21cm$ regime, the [[Black-Body Radiation|Rayleigh-Jeans limit]] holds and we can define<br />
the ``brightness temperature'' <br />
\[<br />
T_{b}\approx I_{\nu}c^{2}/2k_{B}\nu^{2}.<br />
\]<br />
$T_{b}$ only serves to redefine $I_{\nu}$, and should be distinguished<br />
from the ambient temperature of the CMB $T_{\gamma}=2.74(1+z)\mbox{ K}$. <br />
<br />
\subsection*{Cosmological context}<br />
<br />
After recombination $(z\sim1100)$, the photons in the cosmic fluid<br />
no longer has free charges to interact with and thus free stream through<br />
the ``dark ages'' until the Epoch of Reionization, believed to be<br />
around $z\sim 6-9$. Studying the 21cm absorption of neutral hydrogen<br />
can thus potentially probe the universe during the dark ages and epoch<br />
of reionization. The frequency $\nu$ of 21cm undergoes cosmological<br />
redshift and hence the actual observed brightness temperature is <br />
\[<br />
T_{b}=T^\prime_{b}/(1+z).<br />
\]<br />
<br />
<br />
Denoting the lower $1S$ level by 0, the higher by 1, one can define<br />
the ``spin temperature $T_{S}$'' to characterize the relative abundance<br />
of these two states:<br />
\[<br />
\frac{n_{1}}{n_{0}}=\frac{g_{1}}{g_{0}}e^{-h\nu/k_{B}T_{S}}=3\exp(-T_{*}/T_{S})\approx3(1-T_{*}/T_{S}).<br />
\]<br />
During the dark ages till the end of reionization, several processes<br />
control the relative abundances. Among them are direct radiative transitions<br />
([[Einstein Coefficients]]) %<br />
\footnote{Direct transitions are disfavored by selection rules, as we shall<br />
explain later. %<br />
}, [[Collisional Excitations|collisional excitation]] $C_{01}$, $C_{10}$ and the Wouthuysen-Field<br />
(WF) Effect $W_{01}$ and $W_{10}$. The WF effect will be explained<br />
in detail. For now let's just note that the overall statistical balance<br />
gives <br />
\begin{equation}<br />
n_{1}(A_{10}+B_{10}I_{CMB}+C_{10}+W_{10})=n_{0}(B_{01}I_{CMB}+C_{01}+W_{01}),\label{eq:balance}<br />
\end{equation}<br />
where $A_{10}=2.869\times10^{-15}\mbox{s}^{-1}$ and $B$ are the<br />
[[Einstein Coefficients]] of the 21cm transition. Recall that in thermodynamic<br />
equilibrium, we had <br />
\[<br />
B_{01}=\frac{g_{1}}{g_{0}}B_{10}=\frac{3c^{2}}{2h\nu^{3}}A_{10}<br />
\]<br />
In the [[Black-Body Radiation|Rayleigh-Jeans limit]], radiative coefficients satisfy<br />
\begin{equation}<br />
\begin{aligned}B_{01}I_{CMB} & =\frac{3kT_{\gamma}}{h\nu}A_{10}=\frac{3T_{\gamma}}{T_{*}}A_{10},\\<br />
B_{10}I_{CMB} & =\frac{T_{\gamma}}{T_{*}}A_{10},<br />
\end{aligned}<br />
\end{equation}<br />
Here $T_{\gamma}=2.74(1+z)\mbox{ K }$ is the temperature of the CMB. <br />
<br />
Remember that for collisional excitations of the hyperfine transition,<br />
in thermal equilibrium, the gas temperature is coupled directly to the<br />
spin temperature. In other words, collisions are the dominant effect<br />
that sets the hyperfine level population. This means the transition<br />
rates $C_{01}$ and $C_{10}$ are given by:<br />
<br />
\[<br />
\begin{aligned}\frac{C_{01}}{C_{10}} & =\frac{g_{1}}{g_{0}}e^{-T_{*}/T_{K}}\approx3\left(1-\frac{T_{*}}{T_{K}}\right).\end{aligned}<br />
\]<br />
Similarly, WF effect rates are given by the ``color temperature''<br />
$T_{W}$: <br />
\[<br />
\begin{aligned}\frac{W_{01}}{W_{10}} & =\frac{g_{1}}{g_{0}}e^{-T_{*}/T_{W}}\approx3\left(1-\frac{T_{*}}{T_{W}}\right).\end{aligned}<br />
\]<br />
Plugging the above results into the balance equation \eqref{eq:balance},<br />
we have the relation of the temperatures:<br />
\[<br />
\boxed{T_{S}^{-1}=\frac{T_{\gamma}^{-1}+x_{c}T_{K}^{-1}+x_{W}T_{W}^{-1}}{1+x_{c}+x_{W}},}<br />
\]<br />
where <br />
\begin{equation}<br />
\boxed{\begin{aligned}x_{c} & =\frac{C_{10}}{A_{10}}\frac{T_{*}}{T_{\gamma}},\\<br />
x_{W} & =\frac{W_{10}}{A_{10}}\frac{T_{*}}{T_{\gamma}},<br />
\end{aligned}<br />
}\label{eq:coeff}<br />
\end{equation}<br />
represents the relative rates. It remains to determine these coefficients. <br />
<br />
The rest of this article shall concentrate on the WF effect, and in<br />
particular the determination of $x_{W}.$ The WF effect involves absorption<br />
of an Lyman-$\alpha$ photon from the $1_{0}S_{1/2}$ state and subsequent<br />
decay into the $1_{1}S_{1/2}$ state. The CMB temperature during the<br />
dark ages have temperatures $3000K>T_{\gamma}>15K$, and is much smaller<br />
than the Lyman-$\alpha$ transition temperature of $T=13.6eV\sim1.6\times10^{5}\mbox{K}$,<br />
and thus we expect WF effect to be most important during the epoch<br />
of reionization, when the first stars provide the abundance of $\mbox{Ly-}\alpha$<br />
photons. To study the WF effect, we first look at the rules for allowed<br />
transitions. <br />
<br />
\subsection*{Parity and Selection Rules}<br />
Now we need to look at the selection rules for dipole<br />
transitions. First of all, there is the selection rule that $\Delta L<br />
= 0$ is forbidden by parity, a symmetry of electromagnetic interactions, so only transitions between $1S$ and $2P$<br />
will matter. (In other words, nevermind about the $2S$ states we wrote<br />
down above.) This is the selection rule that forbids the 21cm<br />
transition, which is why the WF effect can dominate over the direct<br />
21cm transition so long as enough Ly-$\alpha$ photons are around.<br />
<br />
Rotational symmetry is where the rest of our selection rules come<br />
from. There is a fancy thing in quantum called the Wigner-Eckart<br />
theorem which applies to ``irreducible tensor operators'' in general,<br />
and can generate selection rules for any such operator. The selection<br />
rule goes like this: a transition from $j$ to $j'$ is only allowed if<br />
$j'$ is in the range $|j-k|$ to $j+k$, where $k$ is the ``order'' of<br />
the tensor operator. For dipole transitions, $k = 1$: the dipole<br />
operator is an ``order 1 irreducible tensor operator'', so the rule<br />
becomes $j' = |j-1|, ..., j+1$. (Lowercase $j$ is a totally generic angular<br />
momentum quantum number, not the same as $J$.)<br />
<br />
To put illustrate all of these in simpler language, a photon is a vector $A^{\mu}$ and carries one unit<br />
of angular momentum. This means that a single photon must be circularly<br />
polarized (left or right) %<br />
\footnote{In general, a tensor of rank $k$ carries $k$ units of angular momentum,<br />
and has $2k+1$ possible spin states. Due to the lack of mass of a<br />
photon however, the electromagnetic wave is transverse in all reference<br />
frames (easily seen with Maxwell's equations), and thus only has two<br />
polarization states, with angular momentum (anti-)parallel to the<br />
direction of motion. %<br />
}. Since the vector does not has any spin dependence, it commutes with<br />
the electron spin operator:<br />
\[<br />
[A^{\mu},\ S]=0.<br />
\]<br />
Here $S=|\vec{S}_{e}+\vec{S}_{p}|$ is the vector sum of the electron<br />
and proton spins. <br />
<br />
This implies the first dipole selection rule:<br />
\[<br />
\Delta S=0.<br />
\]<br />
The spin along given directions ($m_{s}$), however, are not ``good''<br />
quantum numbers, and can change. <br />
<br />
To consider orbital angular momentum, recall the parity operator $P$.<br />
It reverses all physical space directions:<br />
\[<br />
P:x_{i}\rightarrow-x_{i}.<br />
\]<br />
If we fix the phase such that $P^{2}=1$, we have parity as a Hermitian<br />
and hence observable:<br />
\[<br />
P^{-1}=P^{\dagger}=P.<br />
\]<br />
Parity thus acts on other operators via conjugation. For example<br />
\[<br />
PA^{\mu}(t,x)P^{-1}=-A^{\mu}(t,-x).<br />
\]<br />
<br />
<br />
More generally, it is clear that quantities such as vector, pseudo-scalar<br />
change sign under parity while a pseudo-vector (such as angular momentum<br />
or magnetic field) or a true scalar do not change sign. For example,<br />
parity commutes with spin $[P,S]=0$, while it anti-commutes with<br />
momentum $\{P,p\}=0$. This means that while a spin state is a good<br />
quantum number when paired with parity, a momentum state is not. <br />
<br />
So how do states in a hydrogen atom behave under parity? To answer<br />
this question recall that such a state is proportional to the spherical<br />
harmonics:<br />
\[<br />
|nlm\rangle\propto R_{lm}(r)Y_{l}^{m}(\Omega)\propto R_{lm}(r)P_{l}^{m}(\cos\theta)e^{im\phi}.<br />
\]<br />
Under parity, $\phi\rightarrow\pi+\phi$, $\theta\rightarrow\pi-\theta$,<br />
and since $P_{l}^{m}(-x)=(-1)^{l-m}P_{l}^{m}(x),$ we have <br />
\[<br />
P(|nlm\rangle)=(-1)^{l}|nlm\rangle.<br />
\]<br />
The parity of a state $|nlm\rangle$ does not depend on $m$, as expected<br />
since an intrinsic property such as parity should not depend on the<br />
orientation of the system. <br />
<br />
Thus the matrix element of the vector can be written as <br />
\[<br />
\begin{aligned}M & =\langle n'l'm'|A^{\mu}|nlm\rangle,\\<br />
& =\langle n'l'm'|P^{\dagger}PA^{\mu}P^{\dagger}P|nlm\rangle,\\<br />
& =(-1)^{l-l'+1}\langle n'l'm'|A^{\mu}|nlm\rangle.<br />
\end{aligned}<br />
\]<br />
Since a matrix element is a scalar and has even parity, we see that<br />
the end state must have different parity from the initial state. In<br />
other words, $l'-l$ must be odd!<br />
<br />
Furthermore, since the photon carries only one unit of angular momentum,<br />
any angular momentum change must be of order unity or less:<br />
\[<br />
|\Delta L|,|\Delta F|,|\Delta J|\le1.<br />
\]<br />
Thus we have the rule <br />
\[<br />
\Delta l=\pm1.<br />
\]<br />
<br />
<br />
To see this more explicitly, one can also write out the full expression<br />
\[<br />
|nlm\rangle=R_{lm}(r)P_{l}^{m}(\cos\theta)e^{im\phi}\frac{1}{\sqrt{2\pi}}.<br />
\]<br />
Since a dipole interaction, along a direction called $z$ has the<br />
form <br />
\[<br />
\vec{d}=E\vec{z}=Er\cos\theta\hat{z},<br />
\]<br />
The matrix element can be written as <br />
\[<br />
\begin{aligned}\langle n'l'm'|d|nlm\rangle & \propto\int_{0}^{\pi}P_{l'}^{m'}P_{l}^{m}\cos\theta\sin\theta d\theta\times\frac{1}{2\pi}\int_{0}^{2\pi}e^{i(m-m')\phi}d\phi.\end{aligned}<br />
\]<br />
From properties of associated Legendre polynomials, we can decompose<br />
\[<br />
P_{l}^{m}(\cos\theta)\cos\theta=bP_{l+1}^{m}+cP_{l-1}^{m},<br />
\]<br />
for some constants $b$ and $c$. And since they also satisfy the<br />
orthogonality rules<br />
\[<br />
\int_{-1}^{1}P_{l'}^{m}(x)P_{l}^{m}(x)dx=\frac{2(l+m)!}{(2l+1)(l-m)!}\delta_{l'l},<br />
\]<br />
the above matrix element vanishes unless<br />
\[<br />
\begin{cases}<br />
m' & =m,\\<br />
l' & =l\pm1.<br />
\end{cases}<br />
\]<br />
In particular, the angular momentum along the dipole direction is<br />
unchanged. This is expected since the spin of the photon is pointed<br />
perpendicular to the field (a transverse wave). <br />
<br />
A difference between $l$ and $L$ is in place when there are more<br />
than one electron in the atom. We have seen that a single electron<br />
contributes a factor of $(-1)^{l}$ when acted on by parity. In the<br />
multi-electron case, this generalizes to<br />
\[<br />
P(|l_{1}l_{2}...\rangle)=(-1)^{\sum l_{i}}|l_{1}l_{2}...\rangle.<br />
\]<br />
Since in general the total orbital angular momentum $L\ne\sum l_{i}$,<br />
two states with the same $L$ can have different parity, and so one<br />
cannot conclude that $\Delta L=0$ is not allowed. One can conclude,<br />
however, that $(L=0)\rightarrow(L=0)$ transitions are not allowed.<br />
This is because the $S$ orbital has complete spherical symmetry,<br />
a symmetry broken by the vector photon, and thus an $S$ orbital cannot<br />
absorb a photon and stay an $S$ orbital. Similarly, considering L-S<br />
coupling, we have corresponding selection rules of forbidden $(J=0)\rightarrow(J=0)$<br />
or $(F=0)\rightarrow(F=0)$ transitions. Physically, these last two<br />
rules amounts to the combined effect of angular momentum conservation,<br />
and the first rule, that $\Delta S=0.$ For example, the transition<br />
from $1_{1}S_{1/2}$ to $2_{1}P_{1/2}$ is allowed, even though $\Delta F=0$,<br />
because in this transition the photon brought $\Delta L=1$, electron<br />
flips its spin to keep $\Delta J=0$, and proton also flips its spin,<br />
to preserve $\Delta S=0$ and $\Delta F=0$, in the process $m_{F}$<br />
is flipped. The transition $1_{0}S_{1/2}$ to $2_{0}P_{1/2}$ on the<br />
other hand, is forbidden, because as $\Delta L=1$, the two conditions<br />
$\Delta S=0$ and $\Delta F=0$ cannot be simultaneously satisfied. <br />
<br />
In summary, we have the following selection rules for dipole transitions<br />
in a neutral hydrogen atom<br />
\[<br />
\begin{cases}<br />
\Delta S & =0,\\<br />
\Delta L & =\pm1,\\<br />
\Delta J & =0,\pm1,\mbox{(except 0 to 0),}\\<br />
\Delta F & =0,\pm1,\mbox{(except 0 to 0). }<br />
\end{cases}<br />
\]<br />
<br />
<br />
\subsection*{The WF effect}<br />
<br />
<br />
\subsubsection*{Coupling coefficient}<br />
We would like to find the coupling coefficient $x_W$ defined at the end of the Cosmological Context subsection. <br />
The allowed transitions between the lowest levels are shown in Fig.<br />
2. The transitions relevant to the WF effect are traced with solid<br />
lines. Since we have denoted the $1S$ states by 0 and 1, we shall<br />
by convenience denote the 2$P$ states by 2,3,4,5, in order of increasing<br />
energy. <br />
\begin{figure}<br />
\center{\includegraphics{WFfig2.jpg}}<br />
\caption{Energy level diagram with allowed transitions}<br />
\label{all transitions}<br />
\end{figure}<br />
<br />
<br />
\begin{figure}<br />
\center{\includegraphics{WFfig3a.jpg}}<br />
\caption{Energy level diagram of WF effect}<br />
\label{wf transitions}<br />
\end{figure}<br />
<br />
<br />
Evidently, the (de-)excitation rate due to WF effect is given by:<br />
\begin{equation}<br />
\begin{aligned}W_{01} & =B_{03}J_{03}\frac{A_{31}}{A_{31}+A_{30}}+B_{04}J_{04}\frac{A_{41}}{A_{41}+A_{40}},\\<br />
& =\frac{3T_{\gamma}^{03}}{T_{*}^{03}}\frac{A_{30}A_{31}}{A_{31}+A_{30}}+\frac{3T_{\gamma}^{04}}{T_{*}^{04}}\frac{A_{40}A_{41}}{A_{41}+A_{40}},\\<br />
W_{10} & =B_{13}J_{13}\frac{A_{30}}{A_{31}+A_{30}}+B_{14}J_{14}\frac{A_{40}}{A_{41}+A_{40}},\\<br />
& =\frac{T_{\gamma}^{13}}{T_{*}^{13}}\frac{A_{30}A_{31}}{A_{31}+A_{30}}+\frac{T_{\gamma}^{14}}{T_{*}^{14}}\frac{A_{40}A_{41}}{A_{41}+A_{40}}.<br />
\end{aligned}<br />
\label{eq:W01}<br />
\end{equation}<br />
In the second and fourth lines I have used the relation from above:<br />
\begin{equation}<br />
\begin{aligned}B_{01}I_{CMB} & =\frac{3kT_{\gamma}}{h\nu}A_{10}=\frac{3T_{\gamma}}{T_{*}}A_{10},\\<br />
B_{10}I_{CMB} & =\frac{T_{\gamma}}{T_{*}}A_{10},<br />
\end{aligned}<br />
\end{equation} <br />
<br />
We would like to relate this rate to the total Ly$\alpha$ scattering<br />
rate<br />
\[<br />
P_{\alpha}=4\pi\chi_{\alpha}\int d\nu J_{\nu}\phi_{\alpha}(\nu),<br />
\]<br />
where $\sigma_{\nu}=\chi_{\nu}\phi_{\alpha}$ is the absorption cross<br />
section and $\chi_{\alpha}=f_{\alpha}\frac{\pi e^{2}}{m_{e}c^{2}}$,<br />
with $f_{\alpha}=0.4162$ the oscillator strength. The line $\phi_{\alpha}$<br />
can be assumed to be a Voigt profile. Thermal broadening leads to<br />
Doppler width<br />
\[<br />
\Delta\nu_{D}=\sqrt{\frac{2k_{B}T_{K}}{m_{H}c^{2}}}\nu_{\alpha},<br />
\]<br />
where $\nu_{\alpha}=2.47\times10^{15}\mbox{Hz}$ is the Lyman $\alpha$<br />
line center frequency. <br />
<br />
Since the dipole operator commutes with spin, the transition of $|nJFm_{F}\rangle$<br />
to $|n'J'F'm'_{F}\rangle$ is independent of $F$ and $m_{F}$. This<br />
means that the emission intensity of transition from $|nJF\rangle$,<br />
summed over all $m_{F}$, to $|n'J'\rangle$, summed over $m'_{F}$<br />
and $F'$, is the intensity of transition from a particular $|nJFm_{F}\rangle$,<br />
times $2F+1$, the degeneracy of the initial state. This is called<br />
the ``sum rule'' of the transition. <br />
<br />
The sum rules, together with the selected transitions in Fig. 2, immediately<br />
lead to<br />
<br />
\begin{equation}<br />
\begin{aligned}\frac{I_{51}}{I_{41}+I_{40}}=\frac{5}{3},\ & \frac{I_{41}+I_{40}}{I_{31}+I_{30}}=1,\ & \frac{I_{21}}{I_{31}+I_{30}}=\frac{1}{3},\\<br />
\frac{I_{40}}{I_{41}+I_{51}}=\frac{1}{3},\ & \frac{I_{30}}{I_{21}+I_{31}}=\frac{1}{3}.<br />
\end{aligned}<br />
\label{eq:int}<br />
\end{equation}<br />
The second line follow from the transition into excited states. <br />
<br />
Next we shall neglect radiative transfer effect and make the assumption<br />
that background intensities and temperatures are constant across all<br />
the hyperfine lines, and are given by the CMB values. Under this assumption<br />
\[<br />
P_{\alpha}=n_{(n=1)}B_{Ly\alpha}=\frac{3T_{\gamma}}{T_{*}}A_{Ly\alpha}.<br />
\]<br />
Let $I_{tot}=I_{51}+I_{40}+I_{41}+I_{31}+I_{30}+I_{21}$ be the total<br />
intensity of de-excitation. Then from the relations on $I$ above we get <br />
\[<br />
\begin{aligned}I_{30}=I_{41} & =\frac{1}{12}I_{tot},\\<br />
I_{31}=I_{40} & =\frac{1}{6}I_{tot}.<br />
\end{aligned}<br />
\]<br />
Furthermore, the intensities are related to the Einstein coefficients<br />
by <br />
\[<br />
\frac{I_{ki}}{I_{\alpha}}=\frac{g_{k}}{g_{tot}}\frac{A_{kj}}{A_{\alpha}},<br />
\]<br />
where $g_{k}=2F_{k}+1$ and $g_{tot}=1+3+3+5=12$ is the total degeneracy<br />
of $n=2$ level. <br />
<br />
Thus we have<br />
\[<br />
\begin{aligned}A_{30} & =A_{41}=A_{\alpha}/3,\\<br />
A_{31} & =A_{40}=2A_{\alpha}/3.<br />
\end{aligned}<br />
\]<br />
Thus finally $P_{10}=4P_{\alpha}/27$ and the coupling coefficient becomes <br />
\[<br />
\boxed{x_{W}=\frac{4P_{\alpha}}{27A_{10}}\frac{T_{*}}{T_{\gamma}}}.<br />
\]<br />
<br />
<br />
<br />
\subsubsection*{Color temperature and corrections}<br />
<br />
The effect of Ly$\alpha$ absorption on spin temperature also depends<br />
on the color temperature $T_{W}$. For an environment that's optically<br />
thick, such as the high-redshift IGM, we may take <br />
\[<br />
T_{W}=T_{K}.<br />
\]<br />
One commonly considered correction is due to energy loss in spin-exchange<br />
collisions. In these collisions, the electron spins of the two colliding<br />
hydrogen atoms exchange, while the total spin remains unchanged. This<br />
correction to the color temperature is worked out in for example \cite{key-1},<br />
section 2.3.3. We shall here just quote the result:<br />
\begin{equation}<br />
\boxed{T_{W}=T_{K}\left(\frac{1+T_{se}/T_{K}}{1+T_{se}/T_{S}}\right),}\label{eq:colort}<br />
\end{equation}<br />
where the spin exchange temperature <br />
\[<br />
T_{se}=\frac{2T_{K}\nu_{se}^{2}}{9\Delta\nu_{D}^{2}}\sim0.40\mbox{K}.<br />
\]<br />
To use Eq. \eqref{eq:colort}, the spin temperature must be determined<br />
iteratively. The iteration is shown to converge quickly. <br />
<br />
Another commonly considered correction are radiative transfer effects.<br />
Previously we assumed that the background intensity is constant and<br />
given by the CMB intensity. The Ly$\alpha$ absorption would decrease<br />
the background intensity and hence the estimated scattering rate.<br />
The effect is more important for lower kinetic temperature. This leads<br />
to a correction to the WF effect coupling coefficient $S_{\alpha}$<br />
such that <br />
\[<br />
x_{W}=S_{\alpha}\frac{J_{\alpha}}{J_{\nu}^{c}},<br />
\]<br />
where <br />
\[<br />
J_{\nu}^{c}=1.165\times10^{-10}\left(\frac{1+z}{20}\right)\mbox{cm}^{-2}\mbox{s}^{-1}\mbox{Hz}^{-1}\mbox{sr}^{-1}.<br />
\]<br />
<br />
<br />
Neglecting spin exchange, the suppression factor is given by <br />
\[<br />
S_{\alpha}\sim\exp\left[-0.803T_{K}^{-2/3}(10^{-6}\tau_{GP})^{1/3}\right],<br />
\]<br />
where the Gunn-Peterson optical depth can be written for overdensity<br />
$\delta$ as roughly: <br />
<br />
\[<br />
\tau_{GP}=7\times10^{5}\left(\frac{\Omega_{b}h_{100}}{0.03}\right)\left(\frac{\Omega_{m}}{0.25}\right)^{-1/2}\left(\frac{1+z}{10}\right)(1+\delta).<br />
\]<br />
<br />
\end{document}<br />
</latex></div>AparsonsRadiative Diffusion2021-08-20T17:43:18Z<p>Aparsons: </p>
<hr />
<div>[[Radiative Processes in Astrophysics|Course Home]]<br />
<br />
===Short Topical Videos===<br />
<br />
===Reference Materials===<br />
* [http://www.astro.wisc.edu/~townsend/resource/teaching/astro-310-F08/23-rad-diffusion.pdf Radiative Diffusion (Townsend, UW Madison)]<br />
* [http://www.astro.uni-bonn.de/~nlanger/siu_web/ssescript/new/chapter4-5.pdf Energy Transport in Stellar Interiors Ch. 4.2]<br />
<br />
===Need to Review?===<br />
* [[Radiative Transfer Equation]]<br />
* [[Optical Depth]]<br />
* [[Black-Body Radiation]]<br />
* [[Local Thermodynamic Equilibrium]]<br />
<br />
<latex><br />
\documentclass[11pt]{article}<br />
\def\inv#1{{1 \over #1}}<br />
\def\ddt{{d \over dt}}<br />
\def\mean#1{\left\langle {#1}\right\rangle}<br />
\def\sigot{\sigma_{12}}<br />
\def\sigto{\sigma_{21}}<br />
\def\eval#1{\big|_{#1}}<br />
\def\tr{\nabla}<br />
\def\dce{\vec\tr\times\vec E}<br />
\def\dcb{\vec\tr\times\vec B}<br />
\def\wz{\omega_0}<br />
\def\ef{\vec E}<br />
\def\ato{{A_{21}}}<br />
\def\bto{{B_{21}}}<br />
\def\bot{{B_{12}}}<br />
\def\bfield{{\vec B}}<br />
\def\ap{{a^\prime}}<br />
\def\xp{{x^{\prime}}}<br />
\def\yp{{y^{\prime}}}<br />
\def\zp{{z^{\prime}}}<br />
\def\tp{{t^{\prime}}}<br />
\def\upx{{u_x^\prime}}<br />
\def\upy{{u_y^\prime}}<br />
\def\e#1{\cdot10^{#1}}<br />
\def\hf{\frac12}<br />
\def\^{\hat }<br />
\def\.{\dot }<br />
\def\ddtau#1{{d#1\over d\tau_\nu}}<br />
<br />
\usepackage{fullpage}<br />
\usepackage{amsmath}<br />
\usepackage{eufrak}<br />
\begin{document}<br />
<br />
\subsection*{ Bolometric Radiative Equilibrium}<br />
<br />
%\iffalse<br />
%Here we wish to calculate the radiative transfer equation in the context of plane parallel atmospheres. In order to do that, we will be measuring from the surface up, where $\mu %= cos \theta$ is defined relative to the vertical upward direction. Therefore, we begin with the equation of radiative transfer,<br />
%\begin{align}<br />
%\mu \frac{dI_{\nu}}{d \tau} = I_{\nu} - S_{\nu}<br />
%\end{align}<br />
In this approximation we assume a grey atmosphere, meaning that opacity is frequency independent. Therefore, we integrate the [[Radiative Transfer Equation]] over frequency,<br />
\begin{align}<br />
\mu \frac{dI}{d \tau} = I - S<br />
\end{align}<br />
Now we use the Eddington Approximation to solve. First, we integrate the equation of radiative transfer over all angles (4$\pi$ steradian),<br />
\begin{align}<br />
\frac{d}{d \tau} \int_{-1}^{1} \int_{0}^{2 \pi} I \mu d \phi d \mu = \int_{-1}^{1} \int_{0}^{2 \pi} I d \phi d \mu - \int_{-1}^{1} \int_{0}^{2 \pi} S d \phi d \mu<br />
\end{align}<br />
The integral on the left is by definition the second moment of intensity, the flux. Additionally the first integral on the right hand side is the intensity integrated over all solid angles, the mean intensity. Additionally, the source function, S, is angle independent. Therefore,<br />
\begin{align}<br />
\frac{dF}{d \tau} = 4 \pi J - 4 \pi S<br />
\end{align}<br />
In this approximation we assume the flux is constant through the atmosphere, yielding,<br />
\begin{align}<br />
0 = 4 \pi J - 4 \pi S<br />
\end{align}<br />
\begin{align}<br />
J = S<br />
\end{align}<br />
To find the next important relation, we multiply the radiative transfer equation by $\mu$ and once again integrate over all solid angles.<br />
\begin{align}<br />
\frac{d}{d \tau} \int_{-1}^{1} \int_{0}^{2 \pi} I \mu^2 d \phi d \mu = \int_{-1}^{1} \int_{0}^{2 \pi} I \mu d \phi d \mu - \int_{-1}^{1} \int_{0}^{2 \pi} S \mu d \phi d \mu<br />
\end{align}<br />
For the first integral on the right hand side, we know by definition that this is the flux. For the second integral on the right hand side, because S is independent of angle,<br />
\begin{align}<br />
\int_{-1}^{1} \int_{0}^{2 \pi} S \mu d \phi d \mu = 0<br />
\end{align}<br />
For the integral on the left hand side, we use the diffusion approximation that the intensity within the atmosphere is about isotropic and can therefore be taken out of the integral as the mean intensity.<br />
\begin{align}<br />
\frac{d}{d \tau} \int_{-1}^{1} \int_{0}^{2 \pi} I \mu^2 d \phi d \mu = \frac{dJ}{d \tau} \int_{-1}^{1} \int_{0}^{2 \pi} \mu^2 d \phi d \mu = \frac{4 \pi}{3} \frac{dJ}{d \tau}<br />
\end{align}<br />
Therefore, plugging these results back into Equation 7,<br />
\begin{align}<br />
\frac{4 \pi}{3} \frac{dJ}{d \tau} = F<br />
\end{align}<br />
Using the prior result that $J = S$, <br />
\begin{align}<br />
F = \frac{4 \pi}{3} \frac{dS}{d \tau}<br />
\end{align}<br />
We can solve this simple equation,<br />
\begin{align}<br />
\int dS= \int\frac{3}{4 \pi} F d \tau <br />
\end{align}<br />
\begin{align}<br />
S = \frac{3}{4 \pi} F \tau + K<br />
\end{align}<br />
where K is a constant.<br />
<br />
At the upper boundary of the atmosphere where $\tau = 0$, we assume that there is no incident radiation from beyond the boundary. Therefore, at this location, J = I/2. From our previous result that J = S, we know that $S= \frac{I}{2}$. We also know $F = I/ \pi$, so at the outer boundary,<br />
\begin{align}<br />
S = \frac{F}{2 \pi}<br />
\end{align}<br />
Plugging in for $\tau = 0$ to Equation 13,<br />
\begin{align}<br />
S = 0 + K= \frac{F}{2 \pi}<br />
\end{align}<br />
\begin{align}<br />
K = \frac{F}{2 \pi}<br />
\end{align}<br />
<br />
Plugging in to our equation for S,<br />
\begin{align}<br />
S = \frac{3}{4 \pi} F \tau + \frac{F}{2 \pi}<br />
\end{align}<br />
Therefore,<br />
\begin{align}<br />
S = \frac{F}{\pi} \left( \frac{3}{4}\tau + \frac{1}{2} \right)<br />
\end{align}<br />
Here, if we assume that we are in [[Local Thermodynamic Equilibrium]] (LTE), we can assume the source function is a [[Black-Body Radiation|blackbody]],<br />
\begin{align}<br />
S = \int_{0}^{\infty} B_{\nu} d\nu = \frac{\sigma T^4}{\pi}<br />
\end{align}<br />
Additionally, under the assumption that all energy is carried in radiation, we know the integrated flux is,<br />
\begin{align}<br />
F = \sigma T_{e}^4<br />
\end{align}<br />
where $T_e$ is the effective temperature.<br />
<br />
Therefore, plugging into our equation for S,<br />
\begin{align}<br />
\frac{\sigma T^4}{\pi} = \frac{\sigma T_e^4}{\pi} ( \frac{3}{4}\tau + \frac{1}{2} )<br />
\end{align}<br />
<br />
\begin{align}<br />
T^4 = T_e^4 ( \frac{3}{4}\tau + \frac{1}{2} )<br />
\end{align}<br />
%\fi<br />
\iffalse<br />
Let's start again with our equation:<br />
$$\mu\ddtau{I_\nu}=I_\nu-B_\nu$$<br />
We can rewrite this in terms of atmospheric height $z$ (recall that as<br />
$z\to\infty$, $\tau\to0$, so:<br />
$$\mu{dI_\nu\over\rho\kappa_\nu dz}=-I_\nu+B_\nu$$<br />
Then the first moment of this equation is:<br />
$${\mu\over\rho}{d\over dz}\int{{I_\nu\over\kappa_\nu}d\nu}=-I+B$$<br />
where $I\equiv\int{I_\nu d\nu}$ and $B\equiv\int{B_\nu d\nu}$. Now we'll make<br />
the (dubious) approximation that $\kappa_\nu=\kappa$ does not depend on<br />
frequency (``Grey atmosphere''). This gives us:<br />
$${\mu\over\rho\kappa}{dI\over dz}=-I+B=-{dI\over d\tau}$$<br />
Now we make the assumption of Bolometric Radiative Equilibrium, so that:<br />
$${4\pi\over3}{dB\over d\tau}=F=constant$$<br />
Recall that $B=\int{B_\nu d\nu}={\sigma T^4\over\pi}$, so BRE is telling us:<br />
$${4\pi\over3}\ddtau{}\left({\sigma T^4\over\pi}\right)=F$$<br />
Or rewriting this:<br />
$$\boxed{\sigma T^4=\sigma T_b^4+{3F\over 4}\tau}$$<br />
At infinite altitude, $J\equiv\int{J_\nu d\nu}=B$, so using that:<br />
$$\begin{aligned}J&=I^-+{F\over2\pi}\\ <br />
&=I^+-{F\over2\pi}\\ \end{aligned}$$<br />
we have:<br />
$$J=B=\underbrace{I^-\eval{altitude}}_{0}+{F\over2\pi}$$<br />
Therefore:<br />
$$F=2\pi B\eval{altitude}=2\pi{\sigma T_0^4\over\pi}=2\sigma T_0^4$$<br />
Thus, our BRE equation gives us:<br />
$$\boxed{\sigma T^4=\sigma T_e^4\left(1\over2+{3\over4}\tau\right)}$$<br />
<br />
<br />
<br />
Saying $F=2\sigma T_0^4\equiv\sigma T_e^4$, where $T_e$ is an ``effective<br />
temperature'', then:<br />
$$T_0=\inv{\sqrt[4]{2}}T_e$$<br />
\fi<br />
This is apparently a classical result. Let's do an example by calculating<br />
the effective temperature of the Earth. $F\eval{earth}$ is given by:<br />
$$4\pi R_\oplus^2F=(1-\tilde\omega_{eff}){L_\odot\over4\pi d^2}\pi R^2$$<br />
$\tilde\omega_{eff}$ is a measure of how much of the sun's energy we get. We'll<br />
say that, since it's cloudy about a third of the time, $\tilde\omega_{eff}\sim0.3$.<br />
Plugging in the numbers, we find that $T_e=258K$, so $T_0=217K$. This is<br />
indeed about the mid-latitude temperature of air in the troposphere. Now<br />
temperature scales with optical depth by:<br />
$$\begin{aligned}T^4(\tau)&=T_e^4\left({1\over2}+{3\over4}\tau\right)\\ <br />
T&=T_e\tau^{1\over4}\\ \end{aligned}$$<br />
This is an expression of the greenhouse effect.<br />
<br />
\subsection*{ Radiative Diffusion}<br />
<br />
Recall that we had, using Bolometric Radiative Equilibrium, an equation which<br />
described the greenhouse effect:<br />
$$\sigma T^4=\sigma T_e^4\left[{1\over2}+{3\over4}\tau\right]$$<br />
Now we want to talk about the effects of the diffusion of photons. For this,<br />
we have the general diffusion equation:<br />
$$F=-D\nabla n$$<br />
For photons, $F$ is the energy flux, $D$ is $\lambda_{mfp}\cdot c$, <br />
and $n\sim{\sigma\over c}T^4$ is the number density of photons. Then:<br />
$$F\sim\underbrace{\lambda_{mfp}\over L}_{1\over\tau}c{\sigma\over c}T^4<br />
\sim{\sigma T^4\over\tau}$$<br />
Recall that $F\equiv\sigma T_e^4$, so:<br />
$$T^4\sim T_e^4\tau$$<br />
This says that as we go deeper into the atmosphere, the temperature increases,<br />
but slowly (as the fourth root). <br />
<br />
<br />
<br />
\section{Radiative Transfer Equation with Scattering}<br />
To start, we will adjust the [[Radiative Transfer Equation]] with a few approximations and substitutions for scattering. To begin we have,<br />
\begin{align}<br />
\frac{dI}{d \tau} = -I + S<br />
\end{align}<br />
where S is the source function.<br />
Here, because we have an absorption cross sections ($\sigma_{abs}$) and a scattering cross section ($\sigma_{scat}$), we can define the [[Optical Depth]]<br />
\begin{align}<br />
d\tau = n(\sigma_{abs} + \sigma_{scat}) ds<br />
\end{align}<br />
where n is the number density of particles in the medium. <br />
Plugging in Equation 2 to Equation 1, and simplifying,<br />
\begin{align}<br />
\frac{dI}{ds} = Sn\sigma_{scat} + Sn \sigma_{abs} -In(\sigma_{abs} + \sigma_{scat})<br />
\end{align}<br />
Assuming isotropic scattering, the source function for scattering will be the mean intensity (averaged over all solid angles).<br />
Therefore,<br />
\begin{align}<br />
\frac{dI}{ds} = Jn\sigma_{scat} + Sn \sigma_{abs} -In(\sigma_{abs} + \sigma_{scat})<br />
\end{align}<br />
Now, we wish to define the albedo, a coefficient of reflection, as<br />
\begin{align}<br />
a = \frac{\sigma_{scat}}{\sigma_{scat} + \sigma_{abs}}<br />
\end{align}<br />
Dividing Equation 4 by $n(\sigma_{scat} + \sigma_{abs})$ on both sides and substituting in a,<br />
\begin{align}<br />
\frac{dI}{d \tau} = Ja + (1-a)S - I<br />
\end{align}<br />
Now, we will move onto the two-stream approximation. Here we wish to approximate a plane parallel atmosphere where the radiation field propagates in only two directions. In this approximation z and $\tau$ are measured down from the top. For this set-up,<br />
\begin{align}<br />
ds = -\frac{dz}{cos \theta}<br />
\end{align}<br />
Here, $cos \theta = \mu$. Therefore, we can write the radiative transfer equation,<br />
\begin{align}<br />
\mu \frac{dI}{d\tau} = -Ja - (1-a)S + I<br />
\end{align}<br />
Here we are examining the common case where the source function from emission, S, is a blackbody, B,<br />
\begin{align}<br />
\mu \frac{dI}{d\tau} = -Ja - (1-a)B + I<br />
\end{align}<br />
<br />
<br />
\section{Two-Stream Approximation, Only Scattering}<br />
The Two Stream Approximation (part of Eddington's Approximations) is when the radiative transfer equation is approximated so that radiation only propagates in two directions. In this approximation we assume isotropic scattering.<br />
We will do this derivation in two different ways- first with the approximation that only scattering is occuring, and second, we will include scattering and emission processes. The scattering only approximation simplifies the derivation and allows for a good first understanding of the math and approximations involved.<br />
<br />
[[File:twostream2.png|thumb|500px|center|Two Stream Approximation]]<br />
%twostream2.png<br />
Because we are considering only scattering processes, we can simplify the radiative transfer equation derived above,<br />
\begin{align}<br />
\frac{dI}{d \tau} = I - aJ<br />
\end{align}<br />
Therefore, since we are approximating the scattering to be in only two directions ($\mu = \pm 1$), we can write two different radiative transfer equations that each must be satisfied (one for each direction), the upward intensity,<br />
\begin{align}<br />
\frac{dI_+}{d \tau} = I_+ - aJ<br />
\end{align}<br />
and the downward intensity,<br />
\begin{align}<br />
\frac{dI_-}{d \tau} = -I_- + aJ<br />
\end{align}<br />
We also define the mean intensity as,<br />
\begin{align}<br />
J = \frac{1}{2}(I_{+} + I_{-})<br />
\end{align}<br />
and the flux,<br />
\begin{align}<br />
H =\frac{1}{2 }(I_{+} - I_{-})<br />
\end{align}<br />
We begin by summing the [[Radiative Transfer Equation]],<br />
\begin{align}<br />
\frac{dI_+}{d \tau} + \frac{dI_-}{d \tau} = 2 \frac{dJ}{d \tau} = 2H<br />
\end{align}<br />
Thus,<br />
\begin{align}<br />
H = \frac{dJ}{d \tau}<br />
\end{align}<br />
Next, we subtract the equations for $I_-$ and $I_+$,<br />
\begin{align}<br />
\frac{dI_+}{d \tau} - \frac{dI_-}{d \tau} \Rightarrow 2 \frac{dH}{d \tau} = 2J - 2aJ<br />
\end{align}<br />
Thus,<br />
\begin{align}<br />
\frac{dH}{d \tau} = J(1-a)<br />
\end{align}<br />
We can find get an equation only in terms of J,<br />
\begin{align}<br />
\frac{d^2J}{d \tau^2} = \frac{dH}{d \tau} = J(1-a)<br />
\end{align}<br />
This is a simple differential equation with solution,<br />
\begin{align}<br />
J = K_1 e^{\sqrt{1-a}\tau} + K_2 \ e^{-\sqrt{1-a}\tau}<br />
\end{align}<br />
where $K_1$ and $K_2$ are constants that we can solve using boundary conditions. First, we know that the mean intensity is concentrated in the atmosphere, so $K_1$ = 0.<br />
For the other boundary condition, we know that at the top surface of the atmosphere, $\tau$ = 0 and the only intensity will be from the downward incident light.<br />
\begin{align}<br />
I_-(0) = I_0 = J(0) - H(0)<br />
\end{align}<br />
First, we can find H,<br />
\begin{align}<br />
H = - K_2\sqrt{1-a}\ e^{-\sqrt{1-a}\tau}<br />
\end{align}<br />
Thus, solving the above boundary condition,<br />
\begin{align}<br />
I_0 = K_2 + \sqrt{1-a} K_2<br />
\end{align}<br />
Therefore,<br />
\begin{align}<br />
K_2 = \frac{I_0}{1 + \sqrt{1-a}}<br />
\end{align}<br />
Thus,<br />
\begin{align}<br />
J = \frac{I_0}{1 + \sqrt{1-a}} e^{-\sqrt{1-a}\tau}<br />
\end{align}<br />
And we can find H,<br />
\begin{align}<br />
H = \frac{dJ}{d \tau} = \frac{-I_0 \sqrt{1-a}}{1 + \sqrt{1-a}} e^{-\sqrt{1-a}\tau}<br />
\end{align}<br />
Additionally, we can find each component of the intensity $I_-$ and $I_+$,<br />
\begin{align}<br />
I_+ = J + H = I_0 \frac{1 - \sqrt{1-a}}{1 + \sqrt{1-a}}e^{-\sqrt{1-a}\tau}<br />
\end{align}<br />
\begin{align}<br />
I_- = J - H = I_0e^{-\sqrt{1-a}\tau}<br />
\end{align}<br />
Now we have found an expression for each component of the intensity. Additionally, because the flux, H, is negative, we have a net flux downwards into the atmosphere.<br />
\section{Two-Stream Approximation, Scattering and Emission/Absorption Processes}<br />
<br />
Now we can undergo a similar derivation, this time including absorption and emission processes. The angles that the intensity propagate need not be $\mu = \pm 1$. Different texts chose different angles. <br />
Now I will assume that the radiation field is approximated by two angles, $\mu = 1/\sqrt{3}, -1/ \sqrt{3}$, the former being the outward intensity ($I_{+}$) and the latter being the inward intensity($I_{-}$). These are the angles chosen in Rybicki and Lightman. Therefore, we define<br />
\begin{align}<br />
J = \frac{1}{2}(I_{+} + I_{-})<br />
\end{align}<br />
and a flux, H, as<br />
\begin{align}<br />
H = \frac{1}{2 \sqrt{3}}(I_{+} - I_{-})<br />
\end{align}<br />
<br />
<br />
Each stream must independently satisfy the [[Radiative Transfer Equation]]. Therefore,<br />
\begin{align}<br />
\frac{dI_{+}}{d\tau} = -\sqrt{3}aJ - \sqrt{3}(1-a)B + \sqrt{3}I_{+}<br />
\end{align}<br />
\begin{align}<br />
\frac{dI_{-}}{d\tau} = \sqrt{3}aJ + \sqrt{3}(1-a)B - \sqrt{3}I_{-}<br />
\end{align}<br />
Adding the equations,<br />
\begin{align}<br />
\frac{dI_{+}}{d\tau} + \frac{dI_{-}}{d\tau} = \sqrt{3}(I_{+} - I_{-})<br />
\end{align}<br />
The left hand side of this equation equals $2 \frac{dJ}{d \tau}$ while the right hand side equals 6H. Therefore,<br />
\begin{align}<br />
2 \frac{dJ}{d \tau} = 6H<br />
\end{align}<br />
\begin{align}<br />
H = \frac{1}{3} \frac{dJ}{d \tau}<br />
\end{align}<br />
Now, we will subtract equations 12 and 13 CHECK,<br />
\begin{align}<br />
\frac{dI_{+}}{d\tau} - \frac{dI_{-}}{d\tau} = \sqrt{3}(I_{+} +I_{-}) - 2 \sqrt{3}(1-a)B - 2 \sqrt{3} aJ<br />
\end{align}<br />
Subbing in J,<br />
\begin{align}<br />
\frac{dI_{+}}{d\tau} - \frac{dI_{-}}{d\tau} = 2 \sqrt{3}J - 2 \sqrt{3}(1-a)B - 2 \sqrt{3} aJ<br />
\end{align}<br />
The left hand side equals $2 \sqrt{3} \frac{dH}{d \tau} $,<br />
\begin{align}<br />
2 \sqrt{3} \frac{dH}{d \tau}= 2 \sqrt{3}J - 2 \sqrt{3}(1-a)B - 2 \sqrt{3} aJ<br />
\end{align}<br />
\begin{align}<br />
\frac{dH}{d \tau}= J - (1-a)B - aJ<br />
\end{align}<br />
\begin{align}<br />
\frac{dH}{d \tau}= (1-a)J - (1-a)B <br />
\end{align}<br />
Now, substituting in equation 16,<br />
\begin{align}<br />
\frac{d^2J}{d \tau^2} = 3(1-a)J - 3(1-a)B<br />
\end{align}<br />
If we take B to be constant, the solution to this differential equation is,<br />
\begin{align}<br />
J = K_1 e^{\sqrt{3(1-a)} \tau} + K_2 e^{-\sqrt{3(1-a)}\tau} +B<br />
\end{align}<br />
We want the solution to be well enclosed in the atmosphere, therefore we must get rid of the positive exponential solution by setting $K_1 = 0$.<br />
\begin{align}<br />
J =K_2 e^{-\sqrt{3(1-a)}\tau} +B<br />
\end{align}<br />
In order to solve for $K_2$, <br />
\begin{align}<br />
\frac{dJ}{d \tau} = -K_2 \sqrt{3(1-a)}e^{-\sqrt{3(1-a)}\tau} = 3H<br />
\end{align}<br />
Solving for H,<br />
\begin{align}<br />
H = -\frac{K_2}{3} \sqrt{3(1-a)}e^{-\sqrt{3(1-a)}\tau}<br />
\end{align}<br />
Now we impose the boundary condition that at the surface of the atmosphere, where $\tau = 0$, $I_{-} = 0$ because there are no incident rays. From equations 10 and 11, we can solve for the intensity in the downward direction,<br />
\begin{align}<br />
I_{-}(0) = J(0) - \sqrt{3} H(0) = 0 <br />
\end{align}<br />
\begin{align}<br />
J(0) = \sqrt{3}H(0)<br />
\end{align}<br />
\begin{align}<br />
K_2 + B = -\frac{\sqrt{3}K_2}{3} \sqrt{3(1-a)}<br />
\end{align}<br />
\begin{align}<br />
K_2 + B = -K_2 \sqrt{(1-a)}<br />
\end{align}<br />
\begin{align}<br />
K_{2} = \frac{-B}{1 + \sqrt{1-a}}<br />
\end{align}<br />
Therefore, plugging this into the mean intensity,<br />
\begin{align}<br />
J = B - \frac{B}{1 + \sqrt{1-a}}e^{-\sqrt{3(1-a)}\tau}<br />
\end{align}<br />
To find H,<br />
\begin{align}<br />
H = \frac{1}{3}\frac{dJ}{d \tau} = \frac{\sqrt{3(1-a)}B}{3(1 + \sqrt{1-a})} e^{-\sqrt{3(1-a)}\tau}<br />
\end{align}<br />
Now we wish to calculate the intensity in the outward direction, $I_{+}$, <br />
\begin{align}<br />
I_+ = J + \sqrt{3}H= B - Be^{-\sqrt{3(1-a)}\tau}\frac{1-\sqrt{1-a}}{1 + \sqrt{1-a}}<br />
\end{align}<br />
\begin{align}<br />
I_- = J - \sqrt{3}H = B - Be^{-\sqrt{3(1-a)}\tau}<br />
\end{align}<br />
From this result, we can see that, far into the atmosphere at a high optical depth, J approaches B, the source function. Additionally, at a high optical depth, H = 0. This is due to the fact that we assumed B is constant, meaning there can be no net flux.<br />
<br />
\end{document}<br />
</latex></div>Aparsons