132
RESEARCH EXPERIENCES FOR UNDERGRADUATES SITE PROGRAM AT THE NATIONAL SOLAR OBSERVATORY FINAL ANNUAL REPORT NSO is operated by the Association of Universities for Research in Astronomy under cooperative agreement with the National Science Foundation & RESEARCH EXPERIENCES FOR TEACHERS NSO 2013 REU, RET & Summer Research Assistantship (SRA) Program Participants Left to right: Daniel Cohen (REU), Darryl Seligman (REU), Stacey Sueoka (Graduate Akamai SRA), Mark Miyazaki (Undergraduate REU/Akamai SRA), Natalie Foster (REU), Tyler Sinotte (REU), Tyler Behm (Grad SRA), Pia Denzmore (RET), Alexander Pevtsov (Grad SRA), Cedric Ramesh (Grad SRA), Christopher Moore (Grad SRA)

RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

Embed Size (px)

Citation preview

Page 1: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

RESEARCH EXPERIENCES FOR UNDERGRADUATES

SITE PROGRAM

AT THE NATIONAL SOLAR OBSERVATORY

FINAL ANNUAL REPORT

NSO is operated by the Association of Universities for Research in Astronomy under cooperative agreement with the National Science Foundation

& RESEARCH EXPERIENCES FOR TEACHERS

NSO 2013 REU, RET & Summer Research Assistantship (SRA) Program Participants Left to right: Daniel Cohen (REU), Darryl Seligman (REU), Stacey Sueoka (Graduate Akamai SRA), Mark Miyazaki

(Undergraduate REU/Akamai SRA), Natalie Foster (REU), Tyler Sinotte (REU), Tyler Behm (Grad SRA), Pia Denzmore (RET), Alexander Pevtsov (Grad SRA), Cedric Ramesh (Grad SRA), Christopher Moore (Grad SRA)

Page 2: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

This page intentionally left blank.

Page 3: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

i NSO REU Annual Program Report 2013

TABLE OF CONTENTS

Project Summary – 2013 NSO REU Site Program ............................................................... 1 

Participants     ............................................................................................................................. 1 

2013 Program Activities ........................................................................................................... 2 

Research Projects ....................................................................................................................... 2 

Scientific Lectures and Field Trips ........................................................................................ 4 

 

APPENDIX II – NSO REU Student Reports........................................................................7      

Daniel Cohen, ʺUnderstanding Measurements Returned by the Helioseismic and     Magnetic Imager (HMI)ʺ ................................................................................................................. 8

Natalie Foster, “Network Development for the Adaptive Optics System on the  

      Advanced Technology Solar Telescope” ............................................................................................ 32 

Mark Miyazaki, “Novel Ways of Extracting Metadata from Digitized Solar Images” ................ 61 

Elora Salway, “Precision Spectro‐Polarimetry at the Coudé Focus: Calibration of       ProMag Data”.................................................................................................................................. 67   Darryl Seligman, “A Comparison between Photospheric Magnetic and Current    Helicities and Subsurface Kinetic Helicity during 2007‐2012” ....................................................... 91 

Tyler Sinotte, “A Search for Flare‐Related Changes in Stokes V Asymmetries in     NOAA 11429” .................................................................................................................................. 98 

 APPENDIX III – NSO RET Teacher Reports ................................................................... 110  

Pia Denzmore, “Radiative Properties of Solar Faculae in Three‐Dimensional   MHD Simulations” ........................................................................................................................ 111 

 

APPENDIX IV – NSO REU Program Evaluation ............................................................ 122  

Page 4: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

ii NSO REU Annual Program Report 2013

This page intentionally left blank.

Page 5: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

1 NSO REU Annual Program Report 2013

Project Summary 

The  National  Science  Foundation  (NSF)  Research  Experiences  for  Undergraduates  (REU) Program is designed to encourage US colleges and university undergraduate students to pursue careers  in  science and engineering.   REU  site programs,  funded  through  the NSF Division of Astronomy, make it possible for undergraduates to take part in independent research activities with  professional  scientists  and  engineers  at major  research  institutions,  usually  during  the summer months.  The  National  Solar  Observatory  (NSO)  has  participated  in  the  NSF  REU Program  since  inception  of  the  program  in  1986,  and  our  tradition  of  contributing  to  the continued success of  the program has been rewarding.   Several of our past REU and summer research  assistants  are  leaders  in  astronomy  and  astrophysics  organizations  in  the  US  and abroad.  The 2013 NSO REU Program provided an opportunity  for  six US undergraduate  students  to participate  in astronomical and related research activities at  the NSO sites  in Tucson, Arizona and Sacramento Peak in Sunspot, New Mexico. Three students were in residence at Sacramento Peak and three students were  in Tucson.   The undergraduates’ experiences were enhanced by the presence of six NSO‐supported graduate students—one  through a  joint collaboration with the University of Hawaiʻi Akamai Initiative Program, two through a joint collaboration with the University of Colorado, Boulder, and  three  from New Mexico State University.   Additionally, one Research Experience for Teachers (RET) participant was in residence at Sacramento Peak.   The  success  of  the NSO  REU/RET  Program  can  be  attributed  to  dedicated mentors  and  an atmosphere  conducive  to  research  education where  students  interact with  each  other, with researchers,  engineers  and  visiting  scientists,  and  with  similar  students  drawn  from  other programs such as the NSO Summer Research Assistantship (SRA) Program and PhD students drawn from other US and foreign universities. 

Participants 

Recruitment The six undergraduate students  (two women and  four men) were selected  from a  total of 102 applicants.  Students were recruited for the 2013 program primarily through the NSO REU Web site  (http://eo.nso.edu/reu).  Additionally,  flyers  were  distributed  to  astronomy,  physics, engineering, mathematics, and natural science departments  throughout  the United States and Puerto  Rico.  In  an  effort  to  attract  students  from  underrepresented  areas,  our mailing  list includes:  colleges  from  the Historically Black College List generated by  the NSF and a  list of American  Indian Science and Engineering Society Affiliates.   Scientific program  coordinators for  each  NSO  site  were  designated  to  oversee  the  selection  of  REU  project  advisors  and students.  Staff members  interested  in  participating  in  the REU  program  developed  research projects, which were reviewed for scientific merit and quality of student involvement.    Proposals that involved two or more students collaborating on a project as part of a team were encouraged. 

Page 6: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

2 NSO REU Annual Program Report 2013

  A list of the REU students, their college/university affiliations, and the NSO staff designated as research advisors follows:  Student Advisor(s) College/University NSO Site

Daniel Cohen Serena Criscuoli University of California, Berkeley Sunspot Natalie Foster Christopher Richards University of Florida Sunspot Mark Miyazaki Igor Suarez Sola & Niles Oien University of Hawaiʻi, Hilo Tucson Elora Salway J. Lewis Fox Brigham Young University Sunspot Darryl Seligman Gordon Petrie University of Pennsylvania Tucson Tyler Sinotte Brian Harker University of Wisconsin, Madison Tucson

2013 Program Activities  Research Projects

The  summer  2013 REU  students  at NSO  spent  an  average  of  10 weeks working  as  full‐time research  assistants. They were  involved  in  a wide  variety  of  research projects,  the  results  of which are described  in  their  reports  in Appendix  I.    In addition  to work on  their  individual projects, the Tucson students were given opportunities to observe at Kitt Peak at the McMath‐Pierce solar telescope and collaborated  in designing observational programs carried out at the KPNO  2.1‐m  telescope. The  Sac Peak  students participated  in  observational programs  at  the Dunn  Solar  Telescope  and  the  Evans  Solar  Facility.  Towards  the  end  of  the  program,  each student presented a seminar on his or her research project and discussed  the results with  the staff.  The seminar is in a format similar to an AAS meeting, providing students with experience in  presenting  research  results  in  a  professional  scientific  setting.  The  informal  discussion following  each  presentation  is  designed  to  give  the  students  positive  feedback  and encouragement  to  continue  pursuing  research. A  brief  description  of  each  student’s  project follows, and copies of their respective final reports are provided in Appendix I. 

Daniel Cohen (University of California, Berkeley) investigated uncertainties of Solar Dynamics Observatory Helioseismic and Magnetic Imager (SDO/HMI) measurements of properties of the Fe I 617.3 nm line.  He analyzed long‐term (years) variations of HMI measurements and found that  these  are  largely  affected  by  instrumental  degradation,  in  particular  variations  of  the entrance window  transparency and drift of  the  transmission profiles of  the  filters. On shorter temporal scales (days), measurements are affected by uncertainties that are caused by the HMI‐algorithm, which cannot compensate  for  the center‐to‐limb variation of  the Fe  I  line shape as well as for line‐shape changes induced by intense magnetic fields. In order to better characterize uncertainties  introduced by  the HMI‐algorithm, he also developed an  IDL code  to  reproduce HMI  measurements  and  applied  it  to  synthetic  spectra  obtained  from  one‐dimensional atmosphere models, describing various  types of magnetic and quiet  features observed on  the solar  disk.  He  found  that  uncertainties  of  Fe  I  617.3  nm  line‐shape  parameters  are  largely dependent on the intensity of the magnetic field and on the line of sight, as errors up to 50% or larger are found for sunspots and features close to the limb.   Daniel will present the results of 

Page 7: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

3 NSO REU Annual Program Report 2013

his project at the June 2014 American Astronomical Society (AAS) Solar Physics Division (SPD) Meeting in Boston.  Dr. Serena Criscuoli was Danielʹs advisor. 

Natalie Foster (University of Florida, Astrophysics/Computer Science) worked on client/server network  programming,  the  foundation  of  modern  communication  between  computers  and scientific  instruments.  The  construction  of  the  new  Advanced  Technology  Solar  Telescope (ATST) requires a swift network connection between a microcontroller and the adaptive optics (AO) system to optimize wavefront correction.  User Datagram Protocol (UDP) provides a fast transmission  of  datagram  packets  across  an  Ethernet  connection  between  the  high‐order adaptive  optics  system,  the  server,  and  the  client microcontroller, which  is  interfaced  via  a ribbon cable to the M5 tip/tilt Multi‐Channel Piezo Controller System. The source code for both the  server and  the  client programs was written  in C and  the  server  runs on both Linux and Microsoft Windows.   The  client program was written using MPLAB  IDE  v8.84 provided  by Microchip in conjunction with the microcontroller used in this project. The Ethernet connection using UDP is fully functional, quick, simple, and works cross‐platform.  Natalie’s project report describes the network code she developed for the server and client and the testing results.  Her  advisor was ATST Sr. Systems Engineer Christopher ʺKitʺ Richards.  Mark Miyazaki  (University  of Hawaiʻi, Hilo) worked with  a  long‐term  archive  of  recently digitized full‐disk H‐alpha images that were taken at the Sacramento Peak Hilltop Dome over a nearly 50‐year period.   The original  images were on photographic plates; the digitized  images are  indexed  by  tape  reel  number  with  no  date/time  information.    The  date  and  time  are embedded  in the  image with no connection between reel number and date.   Given the tens of thousands of  images  to organize, extracting date/time  information manually  is not an option.  Mark’s project,  therefore,  involved developing a method  for automating  the extraction of  the image metadata.    Initially,  canned  software  solutions were  tried,  in particular OCR  software, with a level of success but still with a significant amount of manual intervention.  Mark worked with advisors  Igor Suarez Sola and Niles Oien on developing  their own  software  tailored  to specificities  of  the  H‐alpha  images.    The  software  was  developed  using  Python  image manipulation libraries, with very encouraging results.  Elora  Salway  (Brigham  Young  University)  worked  with  the  Prominence  Magnetometer (ProMag)  instrument  at  the  Evans  Solar  Facility  (ESF)  16ʺ  coronagraph.   The  goal  of  this program  is  to understand  the physical processes  that  lead  to prominence  eruptions  through routine measurement of prominence properties via simultaneous full‐Stokes spectropolarimetry of  the  He  I  5876  (D3)  and  10830  lines.   Elora  was  trained  in  observing  with  ProMag  and independently took and analyzed her own data; she also analyzed previous ProMag calibration data.   She used existing ProMag calibration analysis software and participated  in  its ongoing development with her  advisor Dr. Lewis Fox  and ProMag  instrument PI Dr. Roberto Casini (HAO).   She  successfully  reduced  six months  (January‐June)  of  ProMag  calibration  data  to characterize  the  daily  and  seasonal  drift  of  instrumental  polarization  at  the  ESF,  while discovering, and fixing or mitigating, several system bugs.  These results were presented at the American Astronomical Society (AAS) Solar Physics Division (SPD) meeting in Bozeman in July 2013 by Dr. Fox.  Elora also  took  the  first ProMag observations of post‐flare  loops above  the limb, which we believe to be the first simultaneous, co‐spatial observations in D3 and 10830 in 

Page 8: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

4 NSO REU Annual Program Report 2013

such  loops.  With such data,  it  is possible  to answer  long‐standing  scientific questions on  the nature of the line broadening mechanism in post‐flare loops.  Darryl Seligman  (University of Pennsylvania), with advisor Dr. Gordon Petrie, compared  the average photospheric current helicity Hc, photospheric  twist parameter α  (a well‐known proxy  for  the  full  relative magnetic helicity), and  subsurface kinetic helicity Kh  for 128 active regions observed between 2006‐2012.  He used 1436 Hinode photospheric vector magnetograms and  subsurface  fluid  velocity  data  from  GONG  Dopplergrams.  He  found  a  significant hemispheric bias in all three parameters. The Kh parameter was preferentially positive/negative in  the southern/northern hemisphere.   The Hc and  parameters had  the same bias  for strong fields |{B}|>1000 G). He examined  the  temporal variability of each parameter  for each active region  and  identified  a  significant  subset  of  regions  whose  three  helicity  parameters  all exhibited clear  increasing or decreasing trends. The temporal profiles of these regions had the same  bias:  positive/negative  helicity  in  the  northern/southern  hemisphere.  The  results  are consistent with Longcope et al.ʹs Sigma effect.  Darryl presented the results of his project at the 223rd Meeting of the American Astronomical Society (AAS) in January 2014 in Washington, DC.  Tyler  Sinotte  (University  of Wisconsin, Madison) worked with  advisor Dr. Brian Harker  on analyzing one hour of data  (at 3‐minute cadence)  taken during  the course of an M7.9  flare  in NOAA 11429 to search for signatures of changing Stokes profiles which could be attributed to the occurrence of the flare.  Specifically, they were looking for flare‐related changes in both the amplitude  and  area  asymmetry  parameters  derived  from  observed  Stokes  V  circular polarization profiles, which could represent changes in both the gradient of the magnetic field or  plasma  velocity  in  the  spectral  line  formation  region.   Tyler  developed  co‐alignment  and geometrical correction procedures as well as automated Stokes V fitting procedures to calculate these asymmetry parameters. However, they were unable to identify any coherent flare‐related changes  in Stokes V asymmetries, although  large  changes  in  the asymmetries were observed around  the  active  region  PIL;  this  is  likely  due  to weak  Stokes V  signal  in  this  region  and residual (uncorrected) seeing effects.  A markedly linear correlation between the asymmetries of both  the  Fe  I  6301  and  6302  lines  further  supported  the  lack  of  systematic  changes  in  field strength  and/or  velocity  over  the  line‐formation  region  as  a  consequence  of  the  flare.  Tyler presented the results of his project at the January 2014 Meeting of the American Astronomical Society (AAS) in Washington, DC.   Scientific Lectures and Field Trips 

In addition  to  their work on projects, students at both sites were exposed  to a broad range of research topics through a series of  informal talks by scientific, engineering and technical staff, seminars by visiting astronomers  (both  solar and non‐solar), and  through  reports by  the  site staff  on  their  ongoing  projects.  The  students  also  participated  in  field  trips  to  nearby observatories and non‐NSO facilities.  Along with the students in the concurrent REU program at  the National Optical Astronomy Observatory  (NOAO),  the  Tucson  students  and  teacher traveled  to  Sunspot  on  a  four‐day  field  trip  to  visit  the  National  Radio  Astronomy Observatory’s Very Large Array (NRAO/VLA) and the NSO facilities at Sac Peak.  Likewise, the 

Page 9: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

5 NSO REU Annual Program Report 2013

Sac Peak students and teachers traveled to Tucson to visit the NSO, NOAO and University of Arizona Mirror Lab facilities and the NRAO/VLA in Socorro.    The topics of the 2013 REU informal talks follow and are listed by site.  

NSO/Tucson Talks 

Table 1. Informal Staff Talks in Tucson June 6 Dr. Katy Garmany (NOAO) Kitt Peak and the Tohono O'odham Nation: A Brief History June 7 Dr. David Silva (NOAO Director) The National Optical Astronomy Observatory June 13 Dr. Frank Hill (NSO) Space Weather June 18 Mr. Thomas Lowe (NSO) An Introduction to CCD Astronomy June 20 Dr. Timothy Beers (NOAO) The Stellar Metallicity Distribution Function of the Galactic Halo

from SDSS Photometry June 25 Dr. Yancy Shirley (U. Arizona, Steward

Observatory) Future Solar Systems: Finding the Initial Phase of Star an Planet Formation

June 27 Dr. Lori Allen (NOAO) Star Formation in the Milky Way: What Infrared Space Telescopes Are Revealing about Star and Planet Formation

July 18 Dr. Richard Shaw (NOAO) Planetary Nebulae: What We Learn from Them July 30 Dr. Daniel Marrone (U. Arizona, Steward

Observatory) Applying For and Getting into Graduate School

August 1 Dr. Matt Penn (NSO) Advances in Helioseismology: The Sun, Inside and Out NSO/Sacramento Peak Talks

Table 2. Informal Staff Talks at Sacramento Peak

June 28 Mr. Tyler Behm (University of Colorado, Boulder)

Solar Differential Rotation in Calcium II K Line Spectra Supported with Spectroheliogram Analysis

July 1 Dr. Edward Cliver (Air Force Research Laboratory)

The 1859 Space Weather Event Revisited: Limits of Extreme Activity

July 1 Dr. Christian Beck (NSO) A Basic Introduction to Polarimetry

July 1 Mr. Mark Klaene (Apache Point Observatory)

Tour of the 3.5 m Telescope and the Sloan Digital Sky Survey 2.5 m Telescope

July 19 Mr. Phil Wiborg (Air Force Research Laboratory)

The Alamogordo & Sacramento Mountain Railway Standard Gauge Railroad Built to Narrow Gauge Standards

August 8 Mr. Cedric "Eric" Ramesh (New Mexico State University)

Temporal Variations of the Fe I 630.1 and 630.2 nm Lines in the Quiet Sun

August 8 Ms. Stacey Sueoka (University of Hawaiʻi, Manoa)

Implementation of the NSO Laboratory Spectro-Polarimeter

Page 10: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

6 NSO REU Annual Program Report 2013

This page intentionally left blank.

Page 11: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

7 NSO REU Annual Program Report 2013

APPENDIX I

REU Student Reports

Page 12: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

8 NSO REU Annual Program Report 2013

National Science Foundation

Research Experience for Undergraduates Summer 2013 Report

Understanding Measurements Returned by the Helioseismic and Magnetic Imager (HMI)

Daniel Cohen1,2

Advisor: Dr. Serena Criscuoli1 1National Solar Observatory / Sacramento Peak, 3010 Coronal Loop, Sunspot, NM 88349

2Department of Astrophysics, University of California Berkeley, Berkeley, CA 94704

1 Abstract The Helioseismic and Magnetic Imager (HMI) aboard the Solar Dynamics Observatory (SDO) observes the Sun at the FeI 6173 Å line and returns full disk maps of line-of-sight (LOS) observables including the magnetic field flux, FeI line width, line depth, and continuum intensity. To properly interpret such data it is important to understand any issues with the HMI and the pipeline that produces these observables. At this aim, HMI data were analyzed at both daily intervals for a span of 3 years at disk center in the quiet Sun and hourly intervals for a span of 200 hours around an active region. Systematic effects attributed to issues with instrument adjustments and re-calibrations, variations in the transmission filters and the orbital velocities of the SDO were found while the actual physical evolutions of such observables were difficult to determine. Velocities and magnetic flux measurements are less affected, as the aforementioned effects are partially compensated for by the HMI algorithm; the other observables are instead affected by larger uncertainties. In order to model these uncertainties, the HMI pipeline was tested with synthetic spectra generated through various 1D atmosphere models with the RH code. It was found that HMI estimates of line width, line depth, and continuum intensity are highly dependent on the shape of the line, and therefore highly dependent on the line-of-sight angle and the magnetic field associated to the model. The best estimates are found for Quiet regions at disk center, for which the relative differences between theoretical and HMI algorithm values are 6-8% for line width, 10-15% for line depth, and 0.1-0.2% for continuum intensity. In general, the relative difference between theoretical values and HMI estimates increases toward the limb and with the increase of the field; the HMI algorithm seems to fail in regions with fields larger than ~ 2000 G. 2 Introduction The FeI 6173 Å line is a very magnetically sensitive spectral line that forms near the photosphere of the Sun. Its properties, such as full-width at half max (FWHM), line core intensity, and equivalent width may be used to disentangle magnetic effects from other physical effects such as temperature and to ultimately glean information concerning the magnetically driven global and local processes in the Sun [12]. The Helioseismic and Magnetic Imager (HMI) is one of a suite of instruments aboard the Solar Dynamics Observatory (SDO), which was

Page 13: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

9 NSO REU Annual Program Report 2013

launched on February 11, 2010. It observes the full solar disk nearly continuously at the 6173 Å line, with the main purpose of studying oscillations and magnetic fields at the solar surface [1]. Sampling the iron line at 6 wavelength positions, line-of-sight (LOS) observables are produced every 45s and calculated using 12 filtergrams. The HMI pipeline includes a module HMI_observables, which currently uses the MDI-like algorithm to combine the information from the filtergrams and return the LOS FeI line observables such as the continuum intensity, the line width (the FWHM), and the line depth. This algorithm assumes a Gaussian line profile and calculates Fourier coefficients assuming delta function transmission profiles of the 6 filters [2]. The primary purpose of this project was to analyze such observables (line width, line depth, continuum intensity, and magnetic field) returned by the HMI pipeline, identify and attempt to quantify any systematic or instrumental effects, and ultimately assess the accuracy and uncertainties in such observables compared to the theoretical properties of the spectral line. The paper is organized as follows: Section 3 contains a description of collection and use of HMI data along with synthetic spectral data used for analysis, details of methods used for analyzing HMI data over the long and short term along with methods of how the MDI-like algorithm and HMI pipeline was reproduced and tested in Section 4, results stemming from such methods in Section 5, and major conclusions in Section 6. 3 Observations and Data The HMI uses filters to sample the FeI 6173 Å line at 6 different wavelength positions. The 6 transmission filter profiles on a given date in May 2010 along with the synthetic iron line for a quiet Sun model are shown in Figure 1 (the transmission profiles and line profile are normalized as to be plotted together). 12 filtergrams are produced as the line is sampled in both left-circular and right-circular polarization states. Dopplergrams, magnetograms, continuum maps, FeI line width and line depth maps are then produced from the filtergram information using the MDI-like algorithm (see Section 4) [1,3]. The observables we analyzed were the line width, line depth, continuum intensity, and LOS magnetic field. Full disk maps of these observables were obtained through the Joint Science Operations Center (JSOC). JSOC not only provides methods to download and analyze such data but also presents the user with information on the pipeline and definitions of observables returned [5].

For long-term variations we used data from JSOC taken at daily intervals, spanning three years from May 2010 to May 2013 and each with a cadence of 720 seconds. For each day there were thus four corresponding .fits files representing full disk maps of the four observables. A number of days of data were missing due to the HMI being offline or other such factors but a total of 4360 images for each observable spanning the three years were obtained. To look at short term variations in the observables a separate data set was acquired from JSOC consisting of full disk images of 720s cadences taken at hourly intervals from July 30, 2010 at 11:58 UT to August 7, 2010 at 18:58 UT, spanning a total of 200 hours. Thus 200 images for each observable were obtained.

In order to test the HMI observables pipeline and the MDI-like algorithm, synthetic spectra were generated using the one-dimensional version, RHF1D, of Uitenbrock’s implementation of the Rybicki and Hummer’s (RH) radiative transfer code. The code solves radiative transfer in Non-LTE based on the Multi-Level Accelerated Lambda formalism presented by Rybicky and Hummer, and RHF1D assumes a one-dimensional plane parallel

Page 14: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

10 NSO REU Annual Program Report 2013

atmosphere [6]. Inputs to the code include files containing the chosen atmospheric / magnetic field model and the populations of atoms and molecules. In this project the code was used to simulate the FeI 6173 Å line in a variety of quiet Sun, facular, and sunspot models at 8 different points in µ (varying from 0 to 1), the line-of-sight angle. Table 1 displays the whole suite of models used in the simulation; they include quiet Sun and facula models from Fontenla and sunspot models from Maltby along with Kurucz [7,8,9]. These synthetic iron lines were used to test the accuracy of the MDI-like algorithm once it was re-constructed, as described in Section 4.

Model Description B [Gauss] FAL-A quiet Sun FAL-C quiet Sun FAL-E faint network FAL-P facula 1000

Kur_5500 sunspot 1100 Kur_5250 sunspot 1700 Kur_4750 sunspot 2250 Kur_4500 sunspot 2500 Kur_4250 sunspot 3000 Kur_4000 sunspot 3500 Kur_3750 sunspot 4000 Maltby L sunspot 2000 Maltby L sunspot 2500 Maltby L sunspot 3000 Maltby M sunspot 2500 Maltby M sunspot 3000 Maltby M sunspot 3500 Maltby E sunspot 3000 Maltby E sunspot 3500 Maltby E sunspot 4000

4 Methodology

Figure 1: The 6 HMI transmission filter profiles. The thicker line is a synthetic Fe I 6173 Å line generated from a Quiet Sun model.

Table 1: One-dimensional atmospheric models used as inputs to synthesize the FeI line. Fontenla models are denoted FAL-X where X represents the specific model identification. Kurucz models are denoted Kur_XXXX where XXXX is effective tem-perature in K. Note for the FAL-A, FAL-C, and FAL-E models there was no input B file.

Page 15: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

11 NSO REU Annual Program Report 2013

There were essentially three main steps involved in this project: analyzing long-term HMI observables data using the quiet Sun at disk center, analyzing short-term variations in HMI observables data using an active region, and re-constructing and testing the HMI pipeline for observable calculations using synthetic data generated using the RH code [6].

4.1 Observables over long-term The original purpose of this project was to examine how the long-term variations of FeI line properties observed in quiet Sun regions. It is expected that certain line properties correlate with magnetic field and others with physical properties like temperature, allowing one to disentangle magnetic effects from others [12]. It was expected that this goal would likely be unachievable due to systematic effects of the HMI instrument and the SDO [4]. Thus we turned our attention to independently identifying and explaining such errors. As stated in Section 3, HMI maps of the LOS observables that spanned four years (May 2010 to May 2013) were acquired at daily intervals. For each image a 500x500 pixel box was selected around disk center to remove any line-of-sight effect (the pixel position of disk center is given in the header of the HMI .fits images). To isolate the quiet Sun and mask out any faculae or active regions, magnetogram images were used to create a mask and remove all pixels with a magnetic field above B=100 G (a standard value for the quiet Sun) in the line width, line depth, and continuum maps corresponding to the same exposure. Average values of each observable over the masked field in each image were calculated and plotted versus time. Corresponding temporal plots of the mean-field LOS observables (over the 3 years) are shown in Figure 2. Note the numerous discontinuities in the FeI line depth, continuum, and line width plots and clear periodicities in the line width plot. Such effects are further explained in Section 5.1.

4.2 Observables over short-term After noting clear and significant systematic effects in HMI observables maps over the long-term at disk center, we wanted to investigate whether systematic effects were negligible at shorter temporal scales (a few days), thus allowing study of the evolution of the magnetic field. Analysis similar to that performed in Liu et al. (2012) was performed; an active region AR11092 was tracked across the solar disk and corresponding observables were calculated. As noted in Section 3, 200 HMI maps of each observable were acquired at hourly intervals between July 30, 2010 and August 7, 2010 (such coverage allowed for the full tracking of the active region across the disk). To track the active region in each subsequent image, a magnetic centroid technique was employed. With the pixel position of the centroid in each subsequent image, the heliocentric viewing angle µ = cos θ could be calculated as:

µ = 1−r

RS

2

,

where r is the distance between the centroid of the active region and disk center in pixels, and RS is the radius of the solar disk in pixels.

We isolated quiet Sun, facula, and sunspot regions in a 500x500 pixel box centered around the AR centroid to calculate the mean value of the observables in each region. To isolate each region, the following magnetogram masks were created within the 500x500 box: quiet Sun

Page 16: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

12 NSO REU Annual Program Report 2013

corresponded to pixels with B < 100 G, facula regions corresponded to pixels with 100 G ≤ B < 1000G, and sunspot regions corresponded to pixels with B ≥ 1000G. Note here that B in each box within each subsequent magnetogram image had been corrected for by µ prior to creating the masks, as B = BLOS / µ, where BLOS is the line-of-sight magnetic field (the values of the magnetic field present in the magnetograms). Mean values for line width, line depth, continuum, and magnetic flux were all calculated over each subsequent box for each region (quiet Sun, facula, and sunspot) as AR11092 moved across the solar disk. The line width, line depth, and continuum intensity are all plotted (versus time) in Figure 4. The magnetic field over the 200 hours is plotted in Figure 5. Note that correcting for µ in the magnetic field flux seemed to have overcompensated for the LOS effect, which could be due to other factors affecting the center-to-limb variation of the magnetic field. This trend as well as periodicities seen in the strong magnetic field region are further explained in Section 5.2.

4.3 Testing the HMI algorithm In order to determine uncertainties and inaccuracies associated with the Fe I line width, line depth, and continuum intensity returned by the HMI, the HMI observables pipeline was examined in detail. The HMI pipeline includes a module HMI_observables that combines information from the 12 filtergrams described in Section 3. The current algorithm employed is called the MDI-like algorithm, and is fully explained in Couvidat (2011) and Couvidat et al. (2012). The MDI-like algorithm is dependent on assuming that the FeI 6173 Å Gaussian line profile:

I λ( ) = Ic − Id exp −(λ − λ0)2

σ 2

,

where Ic is the continuum intensity, Id is the line depth, λ0 is the line center, and σ related to the line width as follows:

FWHM = 2 ln(2)σ [2,3]. We reproduced the MDI-like algorithm to be tested with a variety of 1D models

producing synthetic FeI lines using the RH radiative transfer code. Similar analysis was performed with SOHO MDI images in Criscuoli et al. (2011). The RH code returns a grid of wavelengths, with a corresponding array of intensities for chosen values of µ. Thus we had models of the theoretical Fe I line. The other input into our MDI-like algorithm was the HMI filter profiles. The profiles were measured on a given day in May 2010 (the filters do tend drift with time but for the purpose of the project we required only the profiles at one given time) and kindly provided by Sebastian Couvidat of the HMI team. Thus the two main inputs into the algorithm were the synthetic spectrum and the filter profiles. Note that with the synthetic spectra we did not distinguish between polarization states, so only a total of 6 “filtergrams” were produced. The profiles with an example of a quiet Sun model iron line are shown in Figure 1.

The MDI-like algorithm begins by computing the first and second Fourier coefficients - a1, b1, a2, and b2 - using the intensities returned through each of the 6 filters Ij as in Couvidat (2011), Equations (10) through (13). Note that this calculation of the Fourier coefficients assumes a delta transmission profile, which by Figure 1 is clearly incorrect (this could lead to many of the inaccuracies described in Section 5). In our case the filter intensities were not measured but

Page 17: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

13 NSO REU Annual Program Report 2013

calculated as the integral of the product of the synthetic iron line with each of the 6 filter profiles. Note that this required interpolation of the spectrum over the wavelength positions of the filter profiles. Once the Fourier coefficients were calculated, σ and Id could be calculated and Ic could be re-constructed as in Couvidat (2011), Equations (9), (8), and (16):

σ =T

π 6ln

a12 + b1

2

a22 + b2

2

,

Id =T

2σ πa1

2 + b12 exp

π 2σ2

T 2

,

Ic =16

I j + Id exp −(λ j − λ0)2

σ 2

j =0

5

∑ .

Here T is 6 times the nominal wavelength separation between filters: T = 412.8 mÅ. As explained in Couvidat (2011) and Couvidat et al. (2012) the actual implementation of the algorithm is different than as in above. The sigma returned by the equation above is multiplied by a factor of K1=5/6 as the original equation tended to overestimate the line width by ~20%. Similarly the line depth returned by the equation above is multiplied by a factor K2=6/5 as the original equation tended to underestimate the line depth by ~33%. These corrective factors were included in our implementation of the MDI-like algorithm. Another difference in the actual implementation from the equations above is that line depth and continuum intensity do not use the σ returned by the equation above due to it giving spurious values at high magnetic fields (further shown in Section 5.3). Rather a standard sigma is used as the input for Id and Ic and is derived as follows: a HMI map of σ returned by the equation above, on a day with very little magnetic activity, is chosen and a 5th order polynomial is fitted by azimuthally averaging to obtain σ as a function of µ. Thus one obtains standard sigmas at given values of line-of-sight angle. In our implementation of the MDI-like algorithm, a line width map on September 10, 2010 (a day with 0 active regions present on the solar disk) was chosen and a 5th order polynomial was fit to azimuthal averages. The azimuthal averages and 5th order fit versus µ are shown in Figure 7. Thus at the value of µ corresponding to a synthetic spectrum there was a standard sigma that was used as an input for Id and Ic. A number of models, listed in Table 1, were used to simulate the synthetic FeI line. Observables σ, Id, and Ic were calculated using our implementation of the HMI pipeline and MDI-like algorithm described above. We then compared values returned by this algorithm to values returned by a separate procedure, which returns the theoretical line depth, full-width at half-max, and near-by continuum intensity. Since with high magnetic field and varying line-of-sight angle the shape of the iron line can show core reversal and numerous dips, we had to define the line width as follows: FWHM is the full wavelength span at half of the separation between the continuum intensity and the minimum intensity across the line profile (thus it was the largest dip that was used to calculate the line width). Line depth was defined following the HMI definition: the difference between the “true” continuum intensity and the intensity at the line core (in our simulated case - the case of no Doppler shift - at 6173.3433 Å) [1]. Theoretical continuum intensity was calculated by averaging intensities 0.5Å to 1.0Å to the left of the line and to the right of the line (well outside the line and into the continuum). Relative differences

Page 18: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

14 NSO REU Annual Program Report 2013

between the HMI pipeline observables and theoretical observables values could then be analyzed, as in Section 5.3. Along with relative differences between HMI pipeline-calculated observables and real-valued observables, relative errors between HMI observables due to simulated Doppler velocities were calculated for each model at each value of µ. The synthetic iron line was shifted simulating Doppler shifts ranging from [-4,4] km/s sampled every 500 m/s. Note that [-4,4] km/s was chosen as a range because the SDO orbital velocity is known to be in the range of [-3.2,3.2] km/s relative to the Sun (varying from local dawn to dusk), and we wanted to slightly expand on this range to account for plasma velocity or other factors to Doppler shift. Note that the relative Doppler errors as described and plotted in Section 5.3 are defined as follows: at each Doppler shift a relative difference between the observable value at such shift and the value at rest was calculated, it was then the maximum of the absolute value of these differences that was divided by the value at rest to achieve a sort of maximum absolute relative difference in the HMI observable due to Doppler shifts between [-4,4] km/s. In this way a sort of constraint could be placed on an observable returned by the HMI pipeline in the common case of Doppler shifts. 5 Results and Analysis Within the three portions of this project, described in Sections 4.1, 4.2, and 4.3, we examined systematic and instrumental effects on HMI observables (magnetic field, FeI line width, line depth, and continuum intensity) in both the short and long term, as well as the accuracy of the MDI-like pipeline given synthetic FeI 6173 Å lines produced by 1D atmospheric models and the RH radiative transfer code.

5.1 Long-term systematic effects

As discussed in Section 4.1, HMI data of the magnetic field, FeI line width, line depth, and continuum intensity were analyzed for the quiet Sun and at disk center over a span of three years at daily intervals. Each observable is plotted versus time (in reduced Julian day format) in Figure 2. Continuum intensity and line depth here are normalized to their respective maximums. There is a clear long-term decrease in the continuum intensity by approximately 13% and in the line depth of approximately 17%. It turns out that this is solely a systematic effect; it is most likely due to the front window of HMI becoming more opaque with time due to solar UV’s reacting with the glass along with a slow degradation of the CCD cameras with time (according to Sebastian Couvidat, see footnote 3). We also note a long-term decrease of several mÅ of the line width. This trend can be attributed to drift of the HMI filters in wavelength position over time (thus affecting the line profile seen by the filters and essentially creating an artificial Doppler shift). A number of discontinuities in the FeI line width, line depth, and continuum intensity plots are also noticeable. The arrows on these plots designate a re-tuning of the 6 filters to correct their long-term drift over wavelength (causing the decrease in line width over time); these re-tunings occurred on December 12, 2010, July 13, 2011, January 1, 2012, and March 14, 2013. Unfortunately it is clear that the re-tuning was not very sufficient in significantly reducing effects of this drift. Other discontinuities can also be attributed to instrument adjustments and re-calibrations. The couple of “jumps” seen in the intensity

Page 19: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

15 NSO REU Annual Program Report 2013

(continuum and line depth) plots may be attributed to increases in the exposure time to attempt to mitigate the effect of the increasing opaqueness of the front window / degradation of the CCD’s. The line width data in Figure 2 not only shows a decrease over time with filter drift and discontinuities with filter re-tuning, but also exhibits some clear periodicities. It had been suspected that these periodicities were due to the SDO’s orbital velocity Doppler-shifting the FeI 6173 Å line from the Sun. Fortunately the observer radial velocity for each HMI image is saved in the .fits header. Figure 3 shows the observer radial velocity versus time for images corresponding to all dates used in the observables analysis (all images from May 2010 to May 2013), along with the power spectrum of radial velocity. Plotted at the bottom of Figure 3 is the power spectrum of the line width (as plotted in Figure 3, with a second-order polynomial fit removed to isolate the periodicities). Two clear periodicities are seen - one of about ~360 days or a year, and the other of about ~180 days or half a year. The power spectrum of the line width shows the same periodicities as those seen in that of the observer radial velocity. Thus we deduced that such periodicities in the line width are solely due to the velocity of the SDO as it moves around the Sun. Note that the plot of the magnetic field in Figure 2 shows no such periodicities, as the Dopplergrams and magnetograms are indeed corrected for the SDO orbital velocity effects (OBS_VR), while the other observables are not [2].

A method to rid the data of these systematic effects has not been developed yet, as they are difficult to quantify. Thus, currently one is seemingly unable to analyze spectral variations on the quiet Sun over the long-term, using HMI observables data. Our results here are consistent with the same systematic errors and trends found in previous studies [4].

5.2 Short-term systematic effects

To examine if systematic effects were seen in HMI observables on short term scales and investigate whether this could prevent studies of AR evolutions, an active region AR11092 was tracked and observables around the region corresponding to quiet Sun, faculae, and sunspot regions were analyzed versus time as described in Section 4.2. Figure 4 shows the FeI continuum intensity, line depth, and line width across the 200 hours of images analyzed. Here continuum intensity and line depth data for all regions are normalized by the value of the continuum intensity IC for the quiet Sun at µ=1 (disk center). Note that both line depth and continuum intensity seem to decrease with stronger magnetic field (from quiet to sunspot regions), while line width tends to increase. These trends are expected as sunspot regions are cooler which produces a less intense continuum. Furthermore the Zeeman splitting in sunspot regions is much larger than in quiet/ facula regions, which effectively increases the observed line width and decreases the line depth (essentially causing the line to become shallower and wider). The quiet Sun and facula intensities also decrease towards the limb (the beginning and end of the data set), while the line width for all regions increases. This is also an expected effect, as the FeI line profile tends to get wider and shallower with the increase of the line-of-sight angle. There is, however, a clear periodicity in the line width that seems to be most pronounced in sunspot region. This is a systematic effect again due to the motion of the SDO, as explained further below. Figure 5 shows the LOS magnetic field for each region (quiet Sun, facula, and sunspot) over the 200 images. The solid lines represent the B field corrected for its LOS, or as explained in

Page 20: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

16 NSO REU Annual Program Report 2013

Section 4.2, B = BLOS/µ, while the dashed line simply represents BLOS, the line-of-sight magnetic field originally present in the magnetograms. Note that the line-of-sight correction seems to be most effective in the facular region, but in the quiet Sun and less so in the sunspot regions, the magnetic field values increase towards the limb. With a simple LOS correction we would expect the magnetic fields to overall have no further dependence on µ, however there is some clear dependence on center-to-limb distance in B for the quiet Sun and sunspot regions. We suspect this to be due to the fact that the calculation of the magnetic field in the MDI-like algorithm depends on the Doppler velocity, and the Doppler velocity is in turn dependent on the Fourier coefficients of the FeI line – making the value of the magnetic field dependent on the line profile. Fourier coefficients and thus Doppler velocities are not corrected for the line profile changing with µ, so the effect of µ on the FeI line profile might be responsible for increasing the value of B at the limbs. The Doppler velocity and thus magnetic field that are returned by the MDI-like algorithm are partially corrected for the SDO’s velocity, which is why there is no periodicity present in the long-term magnetic field plot in Figure 2. However, there are clear periodicities present in the sunspot line width and magnetic field in Figures 4 & 5. To analyze such periodicities we took the power spectrum of the sunspot magnetic field (as in the bottom plot in Figure 5, with a 5th order polynomial fit removed). The power spectrum is shown in Figure 6. Two primary periodicities were found, one of ~24 hours and one of ~12 hours. The same periodicities were found in Liu et al. (2012), and as in the paper they may be attributed to Zeeman splitting and solar rotation causing the FeI line profile to be moved away from its well-determined calibration curve. In other words, the Doppler velocity and magnetic field returned by the MDI-like algorithm are not fully corrected for the SDO’s orbital velocity in certain instances where the calibration curve fails [10]. While on the short-term HMI observables can be used to extract some physical properties, there were still systematic effects making analysis of such data difficult. An unexpected center-to-limb variation in the magnetic field even after the LOS correction was observed and attributed to the dependence of the MDI-like algorithm on the shape of the FeI line profile, but further investigation is needed. Furthermore, periodicities caused by the orbital velocity of the SDO were present in both magnetic field and line width plots, suggesting that a more robust correction for such effect may be in need of development and that the HMI pipeline may be improved in that respect.

5.3 Accuracy and issues with the MDI-like algorithm To fully understand the calculation of the line-of-sight observables returned by the HMI, we reproduced the MDI-like algorithm and tested it on a variety of Fe I 6173 Å lines synthesized as described in Section 4.3. We then compared the line depth, line width, and continuum intensity calculated from the MDI-like algorithm and corresponding real values (as defined in Section 4.3). In the following we define as relative difference the quantity: (OBSTRUE – OBSHMI) / OBSTRUE, where OBSTRUE stands for the actual value of the observable and OBSHMI stands for the value of the observable calculated through the MDI-like algorithm. We calculated the maximum relative errors in each observable due to Doppler shifts in the range [-4,4] km/s (as compared to respective values at rest). Since we found that the results are strongly dependent on the amount

Page 21: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

17 NSO REU Annual Program Report 2013

of magnetic flux associated to the model, in the following we present results obtained for quiet, network, and faculae (B ≤ 1000 G) along with sunspots (B > 1000 G) in different sections 5.3.1 Low magnetic field models Plotted in Figure 8 are the relative differences for the line width, line depth, and continuum intensity versus µ for the Fontenla models represented in Table 1. Relative differences obtained from FAL-A, FAL-C, and FAL-E are similar in magnitude and smaller with respect to relative differences obtained from FAL-P; this is because the FeI line profile in each model is similar, close to that of a Gaussian. The HMI pipeline on these three models overestimate the line width by 5-10% for varying µ, while the line depth calculated from the HMI pipeline for these three models is overestimates by 10-30%, with higher relative differences resulting at lower µ (towards the limb). Continuum intensity calculated from the HMI pipeline seems to be quite accurate, within 1% overestimation for all µ and close to 0.1% for µ=1. The observables returned by the HMI pipeline for the FAL-P model (denoted in Figure 8 by open triangles), which represents a facula region with a vertical magnetic field of 1000G, are noticeably less accurate. Line width is actually underestimated by 15-20%, line depth overestimated by 20-60%, and continuum intensity underestimated by 0.5-2% (continuum intensity seems to be consistently accurate as returned by the HMI pipeline). The flip in sign (from the FAL-A, FAL-C, and FAL-E models) in the relative difference is due to Zeeman splitting in the FeI line profile, which induces wider, shallower profiles than the Gaussian profile observed by the MDI-like algorithm. Additionally HMI values of observables for the FAL-P model seemingly become more accurate towards the limb, as µ goes to 0 (opposite of the trend seen in the three previous models). This is likely due to the fact that the Zeeman splitting is not as predominant towards the limb, thus the line shape appears to be more like a Gaussian (though it is still far from a true Gaussian). The effects observed in the FAL-P model, with a magnetic field of 1000G, are increased drastically with higher B, as described below (Section 5.3.2). Using the FAL models, the HMI algorithm seems most accurate for Quiet regions at disk center, with relative differences in line width of 6-8%, 10-15% for line depth, and 0.1-0.2% for continuum intensity.

Relative differences for each HMI observable in each Fontenla model at disk center due to simulated Doppler velocities are plotted in Figure 9. The asymmetry seen in these plots (around v = 0 m/s) is due to the asymmetry of the transmission filter profiles. Figure 10 shows relative differences for the different points in line-of-sight angle. Note that these differences are defined as in Section 4.3; they give a sort of maximum absolute relative difference of a given HMI observable due to Doppler velocities in the range [-4,4] km/s. Thus Figure 10 essentially gives a constraint to how much a given HMI observable may vary due to a Doppler velocity in the range [-4,4] km/s. The FAL-P or facula model shows that the line width can vary up to 15% at µ =1 and down to 5% at lower µ, with the line depth varying from 5-6% increasing from µ=1 to µ=0, and the continuum intensity varying from 3% at µ=1 and down to 1% at lower µ. For the FAL-A, FAL-C, and FAL-E models corresponding to lower magnetic field regions, relative difference in line width due to Doppler velocities range from 5-15% increasing from µ =1 to 0, line depth varying from around 6-8% across all µ, and continuum intensity varying from around 1-3% (decreasing as µ goes to 0). No clear dependence of relative difference due to Doppler velocities on the value of magnetic field was concluded from these models.

Page 22: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

18 NSO REU Annual Program Report 2013

5.3.2 High magnetic field models Along with the Fontenla models for the Quiet Sun, faint network and facula regions, Kurucz and Maltby models for sunspot regions were used to test the HMI pipeline [7,8,9]. As before, relative differences were found between the theoretical observables values and those calculated by the MDI-like algorithm. These differences are plotted for all seven Kurucz models in Figure 11. The relative differences between theoretical and HMI-calculated observables for all nine Maltby plots are shown in Figure 12. For models with magnetic field above ~2000G, the MDI-like algorithm runs into a major problem in calculation of the line width: the sum of squares of second Fourier coefficients is greater than the sum of the squares of the first Fourier coefficients, or a12 + b12 < a22 + b22 , which in turn makes the natural log in the line width’s calculation negative thus the term in the square root is negative and the line width ends up not being a real number. In the line width relative differences in Figures 11 & 12, a double horizontal line marks that any point above this line was subject to this effect (the line width not being a real number). This effect was more common across all µ values for models with higher magnetic fields, thus higher Zeeman splitting. In fact overall it was deduced that with increasing magnetic field strength came an increase in relative difference between theoretical and HMI pipeline-calculated observables (less accuracy). Line widths that were not undefined ranged from around 20% relative difference at disk center for the 1100 G Kurucz model to close to 100% with models that included magnetic fields of up to 4000 G.

Similarly, in plots reflecting results for the line depth in Figures 11 & 12, symbols lying above the doubled line denote relative differences larger than 100%. Note that this effect only occurred at disk center (µ = 1). This was due to the shape of the line – since we used 1D models with no Doppler shifts the synthetic FeI line was always completely symmetric about 6173.34 Å. Furthermore at µ = 1 Zeeman splitting was so prevalent that the intensity at line center was in fact very close to the continuum intensity (recall that the HMI defines the line depth as difference between the continuum intensity and line core intensity). Thus the theoretical value of line depth was very small, while the MDI-like algorithm still expected a Gaussian and thus produced a much larger value for line depth, creating relative differences between the two greater than 100%. For all Kurucz and Maltby models, the HMI-calculated continuum intensity seems to remain fairly robust – relative differences range from around 0.3% for the 1100 G Kurucz model to close to 20% for higher magnetic field values. As with line width, line depth and continuum intensity returned by the HMI pipeline seem to become less accurate as magnetic field strength increases. It was found that errors due to Doppler shifting the line were also much greater with higher magnetic field, likely also because of the erratic shapes of the FeI lines due to high Zeeman splitting.

It is concluded that as magnetic field strength increases, the HMI pipeline becomes much less accurate, and begins failing for magnetic field values above around 2000G. This is likely due to the MDI-like algorithm expecting a Gaussian line profile while in regions of high magnetic field this becomes a bad assumption due to high Zeeman splitting. Another issue with the HMI algorithm causing inaccuracies is that it assumes a delta function transmission filter profile in calculation of the Fourier coefficients, which by Figure 1 is clearly untrue. Note that we only tested the HMI pipeline with one-dimensional model atmospheres – it might be useful to test the algorithm with 3D models as future work.

Page 23: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

19 NSO REU Annual Program Report 2013

6 Conclusions This project aimed at analyzing line-of-sight observables including magnetic field, FeI line width, line depth, and continuum intensity, returned by the HMI, and identifying any systematic or instrumentation effects present in the data as well as evaluating the accuracy of the HMI observables pipeline (the MDI-like algorithm) by testing it with synthetic FeI lines. In data taken at daily intervals from May 2010 to May 2013, and analyzed in the quiet Sun at disk center, long-term systematic effects were discovered such as: a decrease in continuum intensity and line depth of about 13% and 17%, respectively due to increasing opaqueness of the front window (and possible degradation of the CCD’s), a decrease in line width of about 3 mÅ due to the 6 transmission filters drifting over wavelength, and periodicities in the line width of a year and a half a year due to the SDO’s orbital velocity. The magnetic field flux did no show any periodicities because the HMI pipeline includes a partial correction procedure for the SDO’s orbital velocity in the calculation of Doppler velocity and magnetic field. Also present in the line width, line depth, and continuum data over the three years were various jumps or discontinuities which were due to re-tuning of the filters (to adjust for the filter drift), increasing exposure time (to deal with the decreasing trend of line depth and continuum intensity), and number of other instrument adjustments and re-calibrations. Because of the variety of systematic / instrumentation issues, no information on the actual physical evolution of the FeI observables in the Quiet Sun could be determined. HMI data was also analyzed at hourly intervals for a span of 200 hours to track an active region AR11092 and analyze evolution of observables in quiet Sun (B < 100G), facula (100G ≤ B < 1000G), and sunspot (B ≥ 1000G) areas around the active region. 24-hour and 12-hour periodicities, most prevalent in the line width and magnetic field plots for the sunspot region, were found and again attributed to the orbital velocity of the SDO. Thus although the magnetic fields are partially corrected for the periodicities, on shorter time scales and in regions of high Zeeman splitting or solar rotation the line profile can move away from the well determined calibration curve used to correct for the SDO’s orbital velocity and create periodicities in the magnetic field strength. An additional unexpected trend was an increased magnetic field strength towards the limbs (as µ goes to 0) after the line-of-sight correction, B = BLOS / µ. This trend was attributed to the MDI-like algorithm’s calculation of the magnetic field, which includes Doppler velocity as an input, which is in turn dependent on the Fourier coefficients of the filtered line profile – thus making the magnetic field have an additional dependence on the line-of-sight as the line shape can vary significantly with µ. Further work is required to properly identify the true cause of this effect. The HMI pipeline to calculate the observables, which employs the MDI-like algorithm, was tested with a variety of 1D model atmospheres with varying magnetic field strengths. It was found that the accuracy of results provided by the algorithm is highly dependent on the shape of the FeI line profile, thus dependent on magnetic field strength and line-of-sight angle µ. Values for line width, line depth, and continuum intensity were calculated using the HMI algorithm and compared to the theoretical values. The HMI pipeline was most accurate with the quiet Sun models at disk center, with line width percent differences between 6-8%, line depth between 10-15%, and continuum intensity betwees 0.1-0.2%. With higher magnetic fields, HMI observables become less accurate. In fact for magnetic fields above about 2000 G, because of the

Page 24: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

20 NSO REU Annual Program Report 2013

Zeeman splitting in the FeI line, the line width returned may not be a real number (this routes back to the values of the Fourier coefficients), and values that are returned may reach up to 100% difference from the theoretical values for magnetic fields between 3000-4000G. Furthermore line depth in models with magnetic field above 1000G at disk center (µ.=1) returned by the HMI algorithm was often above 100% difference from the theoretical value due to line core intensity being very close to the value of the continuum. Continuum intensity returned by the HMI algorithm seemed to be fairly accurate throughout all models, ranging from 0.1% for Quiet Sun models at disk center to around 20% for models with magnetic fields of 4000G. In general the observables returned by the HMI pipeline were found to be less accurate as magnetic field strength increases and towards the limb. Overall, it was found that the HMI is affected by a number of systematic errors and issues which are due in part to the instrumentation, and in part to the method (MDI-like algorithm) with which observables are estimated. Although Doppler velocity and magnetic field returned by the HMI observables pipeline are partially corrected for these effects (such as the orbital velocity of the SDO), there are still issues in short-term data, and the FeI line width, line depth, and continuum are not corrected at all for such issues. We evaluated the uncertainties in the HMI pipeline in calculating the line width, line depth, and continuum by testing it with various 1D atmosphere models with varying magnetic field. It was concluded that the observables produced by the HMI algorithm are highly dependent on magnetic field and line-of-sight angle, which explains some of the non-physical effects seen in HMI data. To correct for these effects, look up tables should be that are dependent on the magnetic field and line-of-sight angle should be included in the HMI pipeline; this project served as a preliminary to such look-up tables. Further work to evaluate the accuracy of HMI observables may be to test the pipeline with synthetic iron lines generated from 3D model atmospheres and with some asymmetry in the line. This project suggested that the HMI pipeline might be vastly improved by employing an algorithm that does not assume a Gaussian line profile, as such perhaps a new algorithm should be implemented. With an accurate pipeline, proper physical evolution of such observables can be analyzed much more easily and used to glean information on the magnetic processes of the Sun. 7 Acknowledgements This work was supported by the National Science Foundation (NSF) and the Association of Universities for Research in Astronomy (AURA). This work is carried out through the National Solar Observatory's Research Experiences for Undergraduate (REU) site program, which is co-funded by the Department of Defense in partnership with the National Science Foundation REU Program. Thanks to Dr. Serena Criscuoli for supervision with this project and constant help through the whole summer.

Page 25: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

21 NSO REU Annual Program Report 2013

8 References [1] Helioseismic and Magnetic Imager, http://hmi.stanford.edu/.

[2] Couvidat, Sebastian and the HMI team, “Calculation of Observables from HMI Data”, (2011).

[3] Couvidat, Sébastien, et al. “Line-of-Sight Observables Algorithms for the Helioseismic and Magnetic Imager (HMI) Instrument Tested with Interferometric Bidimensional Spectrometer (IBIS) Observations.” Solar Physics 278.1 (2012): 217-240.

[4] Farris, Laurel, “Monitoring the Quiest Sun Using Spectral Line Parameters of FeI at 617.3 nm,” National Science Foundation Research Experience for Undergraduates Report, (Summer 2012).

[5] Joint Science Operations Center (JSOC), http://jsoc.stanford.edu/

[6] Uitenbroek, H. "Multilevel radiative transfer with partial frequency redistribution." The Astrophysical Journal 557.1 (2001): 389.

[7] Fontenla, Juan, et al. "Calculation of solar irradiances. I. Synthesis of the solar spectrum." The Astrophysical Journal 518.1 (1999): 480.

[8] Maltby, P., et al. "New sunspot umbral model and its variation with the solar cycle." Astrophys. J.;(United States) 306 (1986). [9] Grids of ATLAS9 model atmospheres and ATLAS9 fluxes, http://wwwuser.oat.ts.astro.it/castelli/grids.html

[10] Liu, Y., et al. "Comparison of Line-of-Sight Magnetograms Taken by the Solar Dynamics Observatory/Helioseismic and Magnetic Imager and Solar and Heliospheric Observatory/Michelson Doppler Imager." Solar Physics 279.1 (2012): 295-316.

[11] Criscuoli, S., et al. "Line shape effects on intensity measurements of solar features: Brightness correction to SoHO MDI continuum images." The Astrophysical Journal 728.2 (2011): 92. [12] Criscuoli, Serena, et al. "Effects of unresolved magnetic field on Fe I 617.3 and 630.2 nm line shapes." The Astrophysical Journal 763.2 (2013): 144.

Page 26: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

22 NSO REU Annual Program Report 2013

Figure 2: HMI line-of-sight observables in the quiet Sun at disk center over a span of 4 years. Various systematic effects may be identified, including a overall decrease in continuum intensity and line depth due to increasing opaqueness of the front window of the HMI, a decrease in line width caused by filter drift, and various jumps caused by instrument re-calibrations and adjustments. The arrows indicate points at which the HMI filters were re-tuned.

Page 27: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

23 NSO REU Annual Program Report 2013

Figure 3: Top – observer radial velocity of the SDO over three years. Middle – Power spectrum of the observer radial velocity in the top plot. Two periodicities, one of ~360 days and one of ~180 days are noted. Bottom – power spectrum of the line width plot in Figure 3. The same periodicities are noted as in the observer radial velocity. Thus the SDO’s orbit is the cause of the periodicities seen in the line width.

Page 28: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

24 NSO REU Annual Program Report 2013

Figure 4: Observables around an AR11092 tracked for 200 hours at hourly intervals. Average observables were calculated for three regions, quiet Sun (dashed line), facula (dashed-dotted line), and sunspot regions (solid line). Continuum intensity and line depth plots are normalized by the value of continuum intensity for the Quiet Sun at disk center.

Page 29: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

25 NSO REU Annual Program Report 2013

Figure 5: Line-of-sight magnetic field in quiet Sun (top), facula (middle), and sunspot (bottom) regions around AR11092. The solid lines are magnetic fields that have been corrected for line-of-sight angle while dashed lines are uncorrected.

Page 30: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

26 NSO REU Annual Program Report 2013

Figure 6: Power spectrum of the sunspot region magnetic field as plotted in Figure 5. Clear 24-hour and 6-hour periodicities result from the SDO’s orbital velocity.

Figure 7: Line width map of azimuthally averaged sigmas used for input for line depth and continuum intensity in the HMI algorithm.

Page 31: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

27 NSO REU Annual Program Report 2013

Figure 8: Relative differences between theoretical and HMI algorithm-calculated observable values for the Fontenla (1999) models: FAL-A (open circle), FAL-C (open square), FAL-E (X), and FAL-P (open triangle).

Page 32: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

28 NSO REU Annual Program Report 2013

Figure 9: Relative differences for observables calculated with HMI algorithm between Doppler shifted line and line at rest, for the Fe I line generated by the Fontenla models at µ = 1. The FAL-A (solid line), FAL-C (long dashed line), and FAL-E (dash – dot) line are group very close together for each observable while the FAL-P (dash – three dots) facular model differs quite substantially. Note the asymmetry on each side of v = 0 m/s, due to the asymmetry of the transmission filter profiles.Error! Bookmark not defined.

Page 33: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

29 NSO REU Annual Program Report 2013

Figure 10: Relative differences between HMI observables at rest and at Doppler shifts corresponding to velocities between [-4,4] km/s, for the Fontenla. Symbols are same as in Figure 9.

Page 34: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

30 NSO REU Annual Program Report 2013

Figure 11: Relative differences between theoretical and HMI algorithm-calculated observable values for the Kurucz [9] sunspot models: Kur_5500 – open circle, Kur_5250 – open upward triangle, Kur_4750 – open diamond, Kur_4500 – open square, Kur_4250 – star, Kur_4000 – ‘X’, Kur_3750 – open downward triangle.

Page 35: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

31 NSO REU Annual Program Report 2013

Figure 12: Relative differences between theoretical and HMI algorithm-calculated observable values for the Maltby [8] sunspot models: Maltby L 2000G – open circle, Maltby L 2500G – open upward triangle, Maltby L 3000G – open diamond, Maltby M 2500G – open square, Maltby M 3000G – open downward triangle, Maltby M 3500G – ‘X’, Maltby E 3000G – star, Maltby E 3500G – open right-facing triangle, and Maltby E 4000G – open left-facing triangle.

Page 36: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

32 NSO REU Annual Program Report 2013

National Science Foundation Research Experience for Undergraduates

Summer 2013 Report

Network Development for the Adaptive Optics System on the Advanced Technology Solar Telescope

Natalie Foster

(University of Florida)

National Solar Observatory at Sacramento Peak Advisor: Christopher "Kit" Richards

Abstract

Client/server network programming is the foundation of all modern communication between computers and scientific instruments. The construction of the new Advanced Technology Solar Telescope requires a swift network connection between a microcontroller and the adaptive optics system to optimize wavefront correction. UDP (User Datagram Protocol) provides a fast transmission of datagram packets across an Ethernet connection between the high-order adaptive optics system, the server, and the client microcontroller, which is interfaced via a ribbon cable to the M5 tip tilt Multi-Channel Piezo Controller System. The source code for both the server and the client programs was written in C and the server runs on both Linux and Microsoft Windows. The client program was written using MPLAB IDE v8.84 provided by Microchip in conjunction with the microcontroller used in this project. The Ethernet connection using UDP is fully functional, quick, simple, and works cross-platform. This paper describes the network code developed for the server and client and the testing results.

1. The Advanced Technology Solar Telescope 1.1 Overview - The future of solar astronomy lies with the Advanced Technology Solar

Telescope (ATST) which is currently under construction on the Hawaiian island of Maui on Haleakala with completion projected in 2017. It will surpass the power of the Dunn Telescope located on Sacramento Peak in New Mexico as the premiere solar telescope of the world. Its aim will be to “understand what causes solar eruptions and provide the knowledge necessary to develop space weather forecasting” (McMullin, from the ATST website), which affects our communications here on Earth. Funding for ATST is provided by the National Science Foundation and the American Recovery and Investment Act.

Page 37: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

33 NSO REU Annual Program Report 2013

1.2 Graphical depiction of ATST - A schematic cutaway image of ATST can be found

below in Figure 1.2. The portion of the telescope pertaining to my project is located in the cabinets underneath the Telescope Level and also those under the Coudé Level. Respectively, they contain the M5 Piezo Controller System and the wavefront correction system, connected by Ethernet cable.

Figure 1.2

1.3 Adaptive Optics - The Earth’s atmosphere can cause problems for observing in

astronomy because of its effect on light traveling through it. Distortion can be caused in images similar to that of peering into a pool with gently moving water. To correct for this distortion in images due to the Earth’s atmosphere, adaptive optics systems are used in telescopes. 1.3.1 The adaptive optics system that will be present on the ATST will detect this

atmospheric distortion in about 1500 different areas across the aperture of the telescope. A lenslet for each of these areas focuses on a small field of view on the surface of the sun, creating a composite of 1500 images on a camera that runs at 2000 frames per second. Subsequent frames are compared to the

Page 38: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

34 NSO REU Annual Program Report 2013

initial images in how they shift relative to one another and motion is detected in this manner. This done using a 2-dimensional cross-correlation. The degree of shift is transferred to the actuators that shape the deformable mirror, which is for high spatial frequency corrections. The average of all the shifts is a measure of the overall motion of the telescope image and is used to drive a tip tilt mirror.

Figure 1.4

1.4 Light Path - The path that light takes through the telescope and related instruments are pictured below. The M5 assembly is where the Piezo Controller System will be located in order to maneuver a tip tilt mirror. 1.4.1 The high-order wavefront sensor camera located on the coudé focuses with

its small field of view on a surface object of the Sun, such as a sunspot. The image of the centered sunspot is saved and stored into the FPGA’s (field programmable gate array). This image is compared to subsequent images that are received 2000 times per second using 2-dimensional cross-correlation, giving an array of values for each image. As a change in position of a maximum value in the image array is detected, the tip tilt mirror corrects for any difference in these values and re-centers the image.

Page 39: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

35 NSO REU Annual Program Report 2013

1.4.2 The deformable mirror corrects for smaller changes in the image that are

more difficult to detect. The uncorrected light is bounced off the tip tilt mirror and onto the deformable mirror, which then approaches the beam splitter, sending part of the light to the lenslet array (pictured on the bottom left side of Figure 1.4.1.). There are a similar number of lenslets on the array as there are actuators on the deformable mirror. The deformable mirror uses one image to correct other images in relation to, in comparison to the tip tilt mirror. It corrects for a bad point spread function in subsequent images captured as they come in.

1.4.3 Error will always be present in these corrective measures, but minimization is sufficient for now. The difference between the tip tilt and deformable mirrors is the degree of correction based upon the number of actuators corresponding to each. The tip tilt mirror carries out macro-scale adjustments with only three actuators, and the deformable mirror makes changes to smaller differences, using 1600 actuators.

Figure 1.4.1

2. Network Software Development of PIC32MX795F512L Microcontroller

Project 2.1 Objective – To create a UDP (User Datagram Protocol) Ethernet connection between

a PC/Unix machine (server) and the PIC32MX795F512L Microchip microcontroller (client), which then commands the Physik Instrumente Piezo Controller System to position the tip tilt mirror.

Page 40: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

36 NSO REU Annual Program Report 2013

2.2 In simple terms – Generally, the way this system will work is by connecting the three

main components which are the server program running independently of the microcontroller, the PIC microcontroller with the client program running within it, and the piezo controller (Figure 2.2b) which manages the tip tilt mirror (Figure 2.2c) via several wires to the actuators. The parts are connected in the particular order in which each component was named in the previous sentence. They can only have contact with the components adjacent to each part. For example, the server can communicate directly with the microcontroller, but not with the piezo controller.

Server running on computer

Client running on

Piezo

Tip tilt mirror

Ethernet connection

Ribbon tape

Figure 2.2a

Multiple wires to actuators

Page 41: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

37 NSO REU Annual Program Report 2013

Figure 2.2b The piezo controller connected to the microcontroller through the ribbon cable.

Figure 2.2c The tip tilt mirror pictured in the lab.

2.3 Overall procedure –

2.3.1 Before my work here at the National Solar Observatory began, I learned basic sockets programming to prepare for my project. This included using Microsoft Visual C++ to organize my code and Cygwin terminal to run it. I learned using the WinSock 2.0 API that was available from Microsoft’s website.

Page 42: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

38 NSO REU Annual Program Report 2013

2.3.2 The Microchip microcontroller uses the MPLAB IDE v8.84 with its own C compiler to program code into its memory. First, an Ethernet connection needed to be established through the use of a demo program found on the Microchip website [include link to it]. The Ethernet connection runs at about 100 MHz. Once this was secured, the client (microcontroller side) network programming was initialized using MPLAB IDE. The same Ethernet demo was used as a template for this client program, to avoid losing time by starting from scratch. Additions were made that were specific to the project, such as the connection algorithm, as well as removing routines that weren’t needed.

2.3.3 The server program was written in a simple text editor called Notepad++ and runs on either Windows or Linux (although it is a little speedier on the latter). It uses the same sockets principles that are present in the client program, but it does not implement the complex background processes that are necessary in the microcontroller, such as I/O processes and the configuration of the LEDs and other hardware components. This program works by opening a specified port on the computer and listening for a client to make initial contact with. It then provides the services requested by the client in compliance with what it was programmed to do itself.

2.3.4 Once the datagrams were sent successfully between the client and the server through UDP, an oscilloscope was used to determine the time differences between changes in voltage on different pins of the microcontroller. The microcontroller has two sets of 60 pins (in columns called j10 and j11), each of which correspond to a different function. The interval of time between blinks from the LED (indicating sent or received packets) was measured with probes on corresponding pins. A labeled picture of the microcontroller can be found below in Figure 2.3.4.

Page 43: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

39 NSO REU Annual Program Report 2013

 

Figure 2.3.4 

2.3.5 The piezo controller was then connected to the system consisting of the microcontroller, the PC from which the server was running, and the oscilloscope. Code written previously by my advisor, Kit Richards, was appended to the client code which would establish a connection with the piezo controller. The voltage was measured through the pins connected to the ribbon cable and the connection was verified through this method. Notice that some of the pins in the j10 and j11 rows are connected to the ribbon cable pins by a purple wire. This is to connect the specific functions of the piezo controller that are present in the client code.  

2.4 Network communication in more detail – Once the UDP communication system is connected to the adaptive optics system on ATST, the client will always be running, repeatedly attempting to contact the server. When the server has sensed that the client would like some data (position coordinates), the requested data is first sent to the microcontroller, which occurs 500 microseconds after the initial contact. Then, the microcontroller forwards this information to the piezo controller attached to the tip tilt mirror, which adjusts the positioning of it through motion of the actuators on the back of the mirror. The piezo controller consequently sends the client a current reading of the new position, which is then sent to the server. Now the client waits again for data from the server and the process repeats until both the client and server are shut off. Figure 2.4 shows the connections between parts of the system. 

Oscilloscope probes

Ribbon cable and pins to piezo controller

Two rows of pins (j10 and j11)

Ethernet connection

Blinking LEDs

Page 44: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

40 NSO REU Annual Program Report 2013

 

Figure 2.4 

2.5 What I’ve learned – During my ten weeks at the National Solar Observatory in 

Sunspot, I’ve gained a wide variety of knowledge ranging from adaptive optics systems to sockets programming. 2.5.1 Software: I’ve added to my software development background by learning 

network programming on a small scale. Computers normally communicate either by TCP/IP or UDP, which are like set rules that both the server and client computers must follow. In my project, I only used UDP, which sends data in packets. This particular protocol is quick but not always reliable since there is no status response from the computer receiving the data to the computer who sent it. Sockets are very useful in network programming because they are the connection between the computers using UDP, or any other protocol. I’ve also expanded on my C programming skills in the sense of using preprocessors and logical reasoning in the while loop and message‐sending algorithm. 

2.5.2 Hardware: Before this summer, I had spent no more than 5 hours of my life working with circuit boards or any other kind of computer hardware. The I/O Expansion Kit that attaches to the Ethernet Starter Kit (composing the microcontroller) contains pins that correspond to different functions of the board, such as the LEDs and communication functions with the piezo controller (send and receive). An oscilloscope is used to measure the voltage on minute scales through each of the pins, and it proved useful in the debugging process of my project. I was not only able to reduce latency by analyzing the graphs output by the oscilloscope, but also determine whether the functions in the programs were executing in the correct order and for the correct number of times. 

Client (MicrocontrollerServer Piezo Controller

“I’m here!”

“Move to (x,y)”

“Server says go to

(x,y)” “My current position is

(x’,y’)” “Piezo’s current

position is (x’,y’)”

Page 45: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

41 NSO REU Annual Program Report 2013

 2.5.3 Astronomy applications: Instrumentation and adaptive optics are an essential 

part of astronomy. The clear images of the sun that we have today are possible thanks to the massive amounts of work and effort put into correcting for the turbulence of the atmosphere that distorts its true image. The adaptive optics system that will be placed on ATST uses a tip tilt mirror for global image motion corrections and a deformable mirror for more detailed corrections. The entire adaptive optics process is explained in more detail in Section 1.3.  

2.6 Discussion of results – Conclusions can be drawn from what the oscilloscope showed, the output on the terminal, and also from WinDump.  2.6.1 The following figures show a snapshot of what the oscilloscope displayed 

while running both the server and the client programs. In further figures, the piezo controller was also connected to the system. 

      Figure 2.6.1 Figure 2.6.1 shows the basic function of the client program. From top to bottom, the yellow probe was connected to pin on the microcontroller corresponding to an LED that blinks on or off each time a message was received. Since the server program was written to send only ten messages to the client, we can see the results on the oscilloscope were consistent with this. The pink probe corresponds to an LED that turns on when the main while loop is reached, which is a one‐time deal. The green probe was connected to a pin that corresponds to an LED that blinks on or off each iteration of the main while loop containing the sending and receiving functions. One can note that this occurs a lot more frequently than a successful receive. Initially, it takes several tries to make first contact with the server. The reason for the appearance of slow received messages is because of a 500 microsecond delay implemented in the server program’s send function. This was done to allow 

Page 46: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

42 NSO REU Annual Program Report 2013

the server enough time to receive the client’s requests and send out data to it in an orderly fashion. The objective was to eliminate overlapping. The ATST adaptive optics system sends new values to the tip tilt mirror every 500 microseconds, on average. 

2.6.2

Figure 2.6.2 

Figure 2.6.2 shows a more “close‐up” depiction of the blinking LEDs corresponding to the receiving function (yellow probe) and the while loop iterations (green probe). For this particular screenshot, the scale has been increased for the purpose of showing more detail in the time difference of the while loop. Notice that the time it takes to send a datagram from the client increases nearly by a factor of two as it receives one from the server. This is due to multiple functions being executed simultaneously and taking up more of the computer’s memory resources. 

2.6.3   

 

Figure 2.6.3

Page 47: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

43 NSO REU Annual Program Report 2013

 Figure 2.6.3 depicts the changes in voltage when the probes are connected to the pins connected to the ribbon cable that route to the piezo controller. From this screenshot, the pink probe is connected to a strobe, which tells the piezo controller that data is available. The yellow probe is a “ready” response from piezo to acknowledge that is has received data. The green probe is connected to a read/write pin, which at high voltage indicates that the microcontroller would like to read data from the piezo controller.  Notice that the yellow probe is triggered shortly after the pink probe, except in one case, which is the third appearance of a yellow trigger. This is due to a load instruction that is not being monitored by the probes, which would make it hidden to one observing the oscilloscope. 

2.6.4

Figure 2.6.4 Figure 2.6.4 shows the same scenario as Figure 2.6.3, except a probe was added to monitor the voltage changes in the LED that corresponds to iterations of the while loop. It takes noticeably longer to go through one iteration of the while loop, which is about 500 microseconds on average. The time interval between the strobe and a ready response from the piezo run at around 1.5 microseconds.

2.6.5 

  

                                                                                                    Figure 2.6.5  

Page 48: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

44 NSO REU Annual Program Report 2013

 A WinDump output like the above in Figure 2.6.5 is typical of a functioning client/server application. WinDump is a program that monitors the traffic over a network similar to TCPDump (for Linux). It does this for any type of protocol. The IP address 146.5.8.30 is that of the client attempting to contact the server, whose IP address is 146.5.8.20. Once the client makes initial contact (in the first two lines), the server can send the requested datagrams through port 12345, which is also open on the client side. Computers each have tens of thousands of ports through which different connections can be made for different purposes. For example, email has its own designated port number.  In this case, the server has sent ten datagrams, each of size 41 bytes to the client microcontroller. WinDump was an incredibly useful tool in the debugging process because it easily provided simple information that would be otherwise difficult to obtain. It eliminated the need to hunt deep into the memory storage of the computer to find where the datagrams were going and if they arrived in correct sequence. This is another method to obtain the timing between messages. From this example, we can see that this time difference is on average 180 microseconds (the first string of numbers is a timestamp). This is before implementing the 500 microsecond delay and also before eliminating unnecessary functions and routines.  

3. Conclusion From the start a simple client/server chat application, the development of this three‐way network communication has come a long way. The UDP connection is a fully functional one between server and client programs running on a computer and a microcontroller, respectively. The server can be run from either Linux or Windows as long as the IP address of the server is adjusted accordingly in the client program. For a simple datagram transfer, the entire process of sending one packet until the piezo controller receives a command, takes on average 50 microseconds. This encompasses the transfer of data to the piezo controller from the microcontroller as well. That process is also fully functional. The timing and accuracy can be verified using the oscilloscope graph and WinDump output.    

Page 49: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

45 NSO REU Annual Program Report 2013

 

4. Appendix 4.1 Server source code 

//server.c #include <sys/types.h> #include <stdlib.h> #include <unistd.h> #include <sys/socket.h> #include <netinet/in.h> #include <string.h> #include <netdb.h> #include <stdio.h> #include <time.h> int main(int argc, char **argv) { unsigned short port_number = 12345; char servaddr[] = "146.5.8.20"; int client_length; int bytes_received; int bytes_sent; struct sockaddr_in server; struct sockaddr_in client; short recvbuf[4]; struct hostent *hp; char host_name[256]; short x, y = 0; unsigned short packetCounter = 0; unsigned short controlRegister = 0; unsigned short statusRegister = 0; //opening a server socket int sock = socket(AF_INET, SOCK_DGRAM, 0); if(sock < 0) { printf("Error opening socket\n"); exit(0); } //clear out the server struct memset((void *)&server, '\0', sizeof(struct sockaddr_in)); //setting specific server values server.sin_family = AF_INET; server.sin_port = htons(port_number); //getting host information gethostname(host_name, sizeof(host_name)); hp = gethostbyname(host_name); //check for null pointer if(hp == NULL) { printf("could not get host name\n"); exit(0); } //converting string to in_addr_t //SUPER USEFUL function inet_aton(servaddr, &server.sin_addr); //bind address to socket if(bind(sock, (struct sockaddr*)&server, sizeof(struct sockaddr_in)) == -1) printf("could not bind name to socket\n");

Page 50: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

46 NSO REU Annual Program Report 2013

//counter for number of datagrams received from client int i = 0; //send some packets of data while(i < 5) { client_length = (int)sizeof(struct sockaddr_in); //receive bytes from client bytes_received = recvfrom(sock, recvbuf, 8, 0, (struct sockaddr *)&client, &client_length); if(bytes_received < 0) printf("Could not receive datagram\n"); else if(bytes_received == 0) printf("no bytes were received"); //if some data was received from the client else{ //set the position values of x, y, number of packets, and status //from the data received x = recvbuf[0]; y = recvbuf[1]; packetCounter = recvbuf[2]; statusRegister = recvbuf[3]; printf("datagram %d was received from client\n", i); //on every seventh packet, add two to the packet counter if((packetCounter != 0) && (packetCounter % 7 == 0)) packetCounter = packetCounter + 2; else packetCounter++; //check iteration with mod operator if((packetCounter != 0) && (packetCounter % 5 == 0)) controlRegister = 1; else controlRegister = 0; //just for checking if packets are being transmitted correctly //between client and server x++; y--; //reset buffer for sending short sbuffer[4] = {x, y, packetCounter, controlRegister}; //wait 500 microseconds to send int u = usleep(500); //send the new sbuffer with updated information bytes_sent = sendto(sock, sbuffer, sizeof(sbuffer) + 1, 0, (struct sockaddr *)&client, client_length); //sending error if(bytes_sent < 0) { printf("error sending datagram\n"); exit(0); }

Page 51: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

47 NSO REU Annual Program Report 2013

//increment for the next iteration of the loop //print out both the values received and those sent else { printf("message %d was received with data: x = %d, y = %d, " "packetCounter = %d, statusRegister = %d\n", i, recvbuf[0], recvbuf[1], recvbuf[2], recvbuf[3]); printf("message %d was sent with data: x = %d, y = %d, " "packetCounter = %d, controlRegister = %d\n", i, sbuffer[0], sbuffer[1], sbuffer[2], sbuffer[3]); i++; } } } //final message to be displayed indicating server success printf("all packets have been sent\n"); exit(1); }

4.2 Client source code //MainDemo.c /********************************************************************* * Main Application Entry Point and TCP/IP Stack Demo * Module for Microchip TCP/IP Stack * -Demonstrates how to call and use the Microchip TCP/IP stack * -Reference: AN833 * ********************************************************************* * FileName: MainDemo.c * Dependencies: TCPIP.h * Processor: PIC18, PIC24F, PIC24H, dsPIC30F, dsPIC33F, PIC32 * Compiler: Microchip C32 v1.05 or higher * Microchip C30 v3.12 or higher * Microchip C18 v3.30 or higher * HI-TECH PICC-18 PRO 9.63PL2 or higher * Company: Microchip Technology, Inc. * * Software License Agreement * * Copyright (C) 2002-2010 Microchip Technology Inc. All rights * reserved. * * Microchip licenses to you the right to use, modify, copy, and * distribute: * (i) the Software when embedded on a Microchip microcontroller or * digital signal controller product ("Device") which is * integrated into Licensee's product; or * (ii) ONLY the Software driver source files ENC28J60.c, ENC28J60.h, * ENCX24J600.c and ENCX24J600.h ported to a non-Microchip device * used in conjunction with a Microchip ethernet controller for * the sole purpose of interfacing with the ethernet controller. * * You should refer to the license agreement accompanying this * Software for additional information regarding your rights and * obligations. * * THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT

Page 52: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

48 NSO REU Annual Program Report 2013

* LIMITATION, ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL * MICROCHIP BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF * PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY OR SERVICES, ANY CLAIMS * BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE * THEREOF), ANY CLAIMS FOR INDEMNITY OR CONTRIBUTION, OR OTHER * SIMILAR COSTS, WHETHER ASSERTED ON THE BASIS OF CONTRACT, TORT * (INCLUDING NEGLIGENCE), BREACH OF WARRANTY, OR OTHERWISE. * * Author Date Comment *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Nilesh Rajbharti 4/19/01 Original (Rev. 1.0) * Nilesh Rajbharti 2/09/02 Cleanup * Nilesh Rajbharti 5/22/02 Rev 2.0 (See version.log for detail) * Nilesh Rajbharti 7/9/02 Rev 2.1 (See version.log for detail) * Nilesh Rajbharti 4/7/03 Rev 2.11.01 (See version log for detail) * Howard Schlunder 10/1/04 Beta Rev 0.9 (See version log for detail) * Howard Schlunder 10/8/04 Beta Rev 0.9.1 Announce support added * Howard Schlunder 11/29/04 Beta Rev 0.9.2 (See version log for detail) * Howard Schlunder 2/10/05 Rev 2.5.0 * Howard Schlunder 1/5/06 Rev 3.00 * Howard Schlunder 1/18/06 Rev 3.01 ENC28J60 fixes to TCP, * UDP and ENC28J60 files * Howard Schlunder 3/01/06 Rev. 3.16 including 16-bit micro support * Howard Schlunder 4/12/06 Rev. 3.50 added LCD for Explorer 16 * Howard Schlunder 6/19/06 Rev. 3.60 finished dsPIC30F support, added PICDEM.net 2 support * Howard Schlunder 8/02/06 Rev. 3.75 added beta DNS, NBNS, and HTTP client (GenericTCPClient.c) services * Howard Schlunder 12/28/06 Rev. 4.00RC added SMTP, Telnet, substantially modified TCP layer * Howard Schlunder 04/09/07 Rev. 4.02 added TCPPerformanceTest, UDPPerformanceTest, Reboot and fixed some bugs * Howard Schlunder xx/xx/07 Rev. 4.03 * HSchlunder & EWood 08/27/07 Rev. 4.11 * HSchlunder & EWood 10/08/07 Rev. 4.13 * HSchlunder & EWood 11/06/07 Rev. 4.16 * HSchlunder & EWood 11/08/07 Rev. 4.17 * HSchlunder & EWood 11/12/07 Rev. 4.18 * HSchlunder & EWood 02/11/08 Rev. 4.19 * HSchlunder & EWood 04/26/08 Rev. 4.50 Moved most code to other files for clarity * KHesky 07/07/08 Added ZG2100-specific support * HSchlunder & EWood 07/24/08 Rev. 4.51 * Howard Schlunder 11/10/08 Rev. 4.55 * Howard Schlunder 04/14/09 Rev. 5.00 * Howard Schlunder 07/10/09 Rev. 5.10 * Howard Schlunder 11/18/09 Rev. 5.20 * Howard Schlunder 04/28/10 Rev. 5.25 ----Additions and modifications were made by Natalie Foster during the summer of 2013 under the NSO REU program------ ********************************************************************/ /* * This macro uniquely defines this file as the main entry point. * There should only be one such definition in the entire project, * and this file must define the AppConfig variable as described below. */

Page 53: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

49 NSO REU Annual Program Report 2013

#define THIS_IS_STACK_APPLICATION // Include all headers for any enabled TCPIP Stack functions #include "TCPIP Stack/TCPIP.h" #include "TCPIP Stack/UDP.h" #include "BerkeleyAPI.h" // Include functions specific to this stack application #include "MainDemo.h" // Declare AppConfig structure and some other supporting stack variables APP_CONFIG AppConfig; BYTE AN0String[8]; #include <sys/types.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <plib.h> // Private helper functions. // These may or may not be present in all applications. //keep just in case static void InitAppConfig(void); static void InitializeBoard(void); static void ProcessIO(void); // //from kitmain.c // // Configuration Bit settings // SYSCLK = 80 MHz (8MHz Crystal/ FPLLIDIV * FPLLMUL / FPLLODIV) // PBCLK = 10 MHz // Primary Osc w/PLL (XT+,HS+,EC+PLL) // WDT OFF // Other options are don't care // defines for the digital output ports, messy because of fragmented Starter Kit design. #define RW_A0_D11_D14_D15_PORT IOPORT_A #define D11_D14_D15_BITMASK 0xc8 #define RWBIT BIT_9 #define A0BIT BIT_10 #define OT_RY_ST_LD_PORT IOPORT_C #define RYBIT BIT_1 #define OTBIT BIT_2 #define STBIT BIT_3 #define LDBIT BIT_4 #define T0_T1_T2_PORT IOPORT_D #define TOBIT BIT_0 #define T1BIT BIT_1 #define T2BIT BIT_2 #define D0_to_D7_PORT IOPORT_E #define D0_to_D7_BITMASK 0xff #define A1_A2_A3_D8_D9_D10_D12_D13_PORT IOPORT_F #define D8_D9_D10_D12_D13_BITMASK 0x37 #define A1BIT BIT_8 #define A2BIT BIT_12 #define A3BIT BIT_13 unsigned short TOrdyreadT = 0;

Page 54: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

50 NSO REU Annual Program Report 2013

unsigned short TOrdyreadF = 0; unsigned short TOrdywriteT = 0; unsigned short TOrdywriteF = 0; unsigned short TOrdyloadT = 0; unsigned short TOrdyloadF = 0; unsigned short intcntr; // counter inc by timer interrupt, dec by background //NEW ADDITIONS //variables that go between the server and client //for the position of tip tilt mirror short* inx, iny; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // subroutine to wait for RDY signal TRUE (low) // call with RYBIT or 0, timeout count, pointer to error counter // returns a 0 for good, -1 for bad int RDYwaitT(short* errorCtr) { // int TOcount = 10; int TOcount = 0; while (PORTReadBits(OT_RY_ST_LD_PORT, RYBIT) != 0) // wait for 0 { if (TOcount-- <= 0) { (*errorCtr)++; return(-1); // timed out } } return(0); // good return } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // subroutine to wait for RDY signal FALSE (high) // call with RYBIT or 0, timeout count, pointer to error counter // returns a 0 for good, -1 for bad int RDYwaitF(short* errorCtr) { int TOcount = 10; while (!PORTReadBits(OT_RY_ST_LD_PORT, RYBIT)) // wait for RYBIT high { if (TOcount-- <= 0) { (*errorCtr)++; return(-1); // timed out } } return(0); // good return } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // subroutine to set data bits to inputs, read data bits from PI PIO // address 0 and 1 into indirect pointer, and set data bits to outputs. void readPIO() { // set data port bits to inputs PORTSetPinsDigitalIn(D0_to_D7_PORT, D0_to_D7_BITMASK); PORTSetPinsDigitalIn(A1_A2_A3_D8_D9_D10_D12_D13_PORT, D8_D9_D10_D12_D13_BITMASK); PORTSetPinsDigitalIn(RW_A0_D11_D14_D15_PORT, D11_D14_D15_BITMASK); PORTSetBits(RW_A0_D11_D14_D15_PORT,RWBIT); // set to read PORTClearBits(RW_A0_D11_D14_D15_PORT,A0BIT); // set addr0 to 0 PORTClearBits(OT_RY_ST_LD_PORT, STBIT); // set STROBE low true

Page 55: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

51 NSO REU Annual Program Report 2013

RDYwaitT(&TOrdyreadT); // wait for ready true //*xyinpointer++ = // read data (((PORTRead(A1_A2_A3_D8_D9_D10_D12_D13_PORT) & D8_D9_D10_D12_D13_BITMASK) | (PORTRead(RW_A0_D11_D14_D15_PORT) & D11_D14_D15_BITMASK)) << 8 ) | (PORTRead(D0_to_D7_PORT) & D0_to_D7_BITMASK); PORTSetBits(OT_RY_ST_LD_PORT, STBIT); // set STROBE bit high false RDYwaitF(&TOrdyreadF); // wait for ready false PORTSetBits(RW_A0_D11_D14_D15_PORT,A0BIT); // set addr0 to 1 PORTClearBits(OT_RY_ST_LD_PORT, STBIT); // set STROBE low true RDYwaitT(&TOrdyreadT); // wait for ready true //*xyinpointer++ = // read data (((PORTRead(A1_A2_A3_D8_D9_D10_D12_D13_PORT) & D8_D9_D10_D12_D13_BITMASK) | (PORTRead(RW_A0_D11_D14_D15_PORT) & D11_D14_D15_BITMASK)) << 8 ) | (PORTRead(D0_to_D7_PORT) & D0_to_D7_BITMASK); PORTSetBits(OT_RY_ST_LD_PORT, STBIT); // set STROBE false RDYwaitF(&TOrdyreadF); // wait for ready false PORTClearBits(RW_A0_D11_D14_D15_PORT,RWBIT); // set to write // set data port bits to outputs PORTSetPinsDigitalOut(D0_to_D7_PORT, D0_to_D7_BITMASK); PORTSetPinsDigitalOut(A1_A2_A3_D8_D9_D10_D12_D13_PORT, D8_D9_D10_D12_D13_BITMASK); PORTSetPinsDigitalOut(RW_A0_D11_D14_D15_PORT, D11_D14_D15_BITMASK); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // subroutine to output an x and y value to PI PIO interface void writePIO(unsigned short x, unsigned short y) { unsigned short xhigh,yhigh; // output 16bit x value // output low 8 bits PORTSetBits(D0_to_D7_PORT,x & D0_to_D7_BITMASK); PORTClearBits(D0_to_D7_PORT,~x & D0_to_D7_BITMASK); xhigh = x >> 8; // high bits are on port low bits // output some high 8 bits PORTSetBits(A1_A2_A3_D8_D9_D10_D12_D13_PORT,xhigh & D8_D9_D10_D12_D13_BITMASK); PORTClearBits(A1_A2_A3_D8_D9_D10_D12_D13_PORT,~xhigh & D8_D9_D10_D12_D13_BITMASK); // output rest of the high 8 bits and set address even PORTSetBits(RW_A0_D11_D14_D15_PORT,xhigh & D11_D14_D15_BITMASK); PORTClearBits(RW_A0_D11_D14_D15_PORT,~xhigh & D11_D14_D15_BITMASK | A0BIT); PORTClearBits(OT_RY_ST_LD_PORT, STBIT); // set STROBE true (low) RDYwaitT(&TOrdywriteT); // wait for ready true PORTSetBits(OT_RY_ST_LD_PORT, STBIT); // set STROBE false (high) RDYwaitF(&TOrdywriteF); // wait for ready false // output 16bit y value // output low 8 bits PORTSetBits(D0_to_D7_PORT,y & D0_to_D7_BITMASK); PORTClearBits(D0_to_D7_PORT,~y & D0_to_D7_BITMASK);

Page 56: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

52 NSO REU Annual Program Report 2013

yhigh = y >> 8; // high bits are on port low bits // output some high 8 bits PORTSetBits(A1_A2_A3_D8_D9_D10_D12_D13_PORT,yhigh & D8_D9_D10_D12_D13_BITMASK); PORTClearBits(A1_A2_A3_D8_D9_D10_D12_D13_PORT,~yhigh & D8_D9_D10_D12_D13_BITMASK); // output rest of the high 8 bits and set address odd PORTSetBits(RW_A0_D11_D14_D15_PORT,yhigh & D11_D14_D15_BITMASK | A0BIT); PORTClearBits(RW_A0_D11_D14_D15_PORT,~yhigh & D11_D14_D15_BITMASK); PORTClearBits(OT_RY_ST_LD_PORT, STBIT); // set STROBE true (low) RDYwaitT(&TOrdywriteT); // wait for ready true PORTSetBits(OT_RY_ST_LD_PORT, STBIT); // set STROBE false (high) RDYwaitF(&TOrdywriteF); // wait for ready false // toggle LOAD bit PORTClearBits(OT_RY_ST_LD_PORT, LDBIT); //LOAD true RDYwaitT(&TOrdyloadT); // wait for ready true PORTSetBits(OT_RY_ST_LD_PORT, LDBIT); //LOAD false RDYwaitF(&TOrdyloadF); // wait for ready false } int main(void) { // Initialize application specific hardware InitializeBoard(); InitAppConfig(); TickInit(); // Initialize core stack layers (MAC, ARP, TCP, UDP) and // application modules (HTTP, SNMP, etc.) StackInit(); unsigned short port_number = 12345; int server_length; struct sockaddr_in server; struct sockaddr_in client; //values for IP addresses //tedious, but is the easiest way it will work char b1 = 146; char b2 = 5; char b3 = 8; char b4 = 30; char b5 = 20; //status packet info short x, y = 0; unsigned short packetCounter = 0; unsigned short lastPacketCounter = 0; unsigned short statusRegister = 0; //outgoing position variables to M5 short outx, outy; // enable test I/O pins and blink T0BIT - J11, 19 PORTSetPinsDigitalOut(T0_T1_T2_PORT, TOBIT | T1BIT | T2BIT); PORTSetBits(T0_T1_T2_PORT, TOBIT); PORTClearBits(T0_T1_T2_PORT, TOBIT); // set up digital I/O ports for PI PIO interface PORTSetBits(OT_RY_ST_LD_PORT, STBIT | LDBIT); // strobe and load high

Page 57: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

53 NSO REU Annual Program Report 2013

PORTSetPinsDigitalOut(OT_RY_ST_LD_PORT, STBIT | LDBIT); PORTSetPinsDigitalIn(OT_RY_ST_LD_PORT, OTBIT | RYBIT); PORTClearBits(RW_A0_D11_D14_D15_PORT, RWBIT | A0BIT); // set to write, x = addr 2, y = addr 3 PORTSetPinsDigitalOut(RW_A0_D11_D14_D15_PORT, RWBIT | A0BIT | D11_D14_D15_BITMASK); PORTSetPinsDigitalOut(D0_to_D7_PORT, D0_to_D7_BITMASK); PORTSetPinsDigitalOut(A1_A2_A3_D8_D9_D10_D12_D13_PORT, A1BIT | A2BIT | A3BIT | D8_D9_D10_D12_D13_BITMASK); PORTClearBits(A1_A2_A3_D8_D9_D10_D12_D13_PORT, A2BIT | A3BIT); // x = addr 2, y = addr 3 PORTSetBits(A1_A2_A3_D8_D9_D10_D12_D13_PORT, A1BIT); // x = addr 2, y = addr 3 //initialize send to -1 (error code) //initialize the receive buffer for storage from server input //initialize timeout in iterations int send = -1; short recvbuf[4]; int timeout = 100000; //initialization packet to server short cbuffer[4] = {0,0,0,0}; //setting inital values of x and y inx = 2; iny = 4; //initialize BSD sockets BerkeleySocketInit(); SOCKET s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); //clearing out the server struct memset((void *)&server, '\0', sizeof(struct sockaddr_in)); //setting server parameters server.sin_family = AF_INET; server.sin_port = port_number; //setting server address server.sin_addr.S_un.S_un_b.s_b1 = b1; server.sin_addr.S_un.S_un_b.s_b2 = b2; server.sin_addr.S_un.S_un_b.s_b3 = b3; server.sin_addr.S_un.S_un_b.s_b4 = b5; //clearing out client struct memset((void*)&client, '\0', sizeof(struct sockaddr_in)); //setting client parameters client.sin_family = AF_INET; client.sin_port = port_number; //setting client address client.sin_addr.S_un.S_un_b.s_b1 = b1; client.sin_addr.S_un.S_un_b.s_b2 = b2; client.sin_addr.S_un.S_un_b.s_b3 = b3; client.sin_addr.S_un.S_un_b.s_b4 = b4; //not sure if these are 100% necessary, but we'll keep them just in case int bin = bind(s, (struct sockaddr*)&client, sizeof(struct sockaddr_in)); int con = connect(s, (struct sockaddr*)&server, sizeof(struct sockaddr_in));

Page 58: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

54 NSO REU Annual Program Report 2013

server_length = sizeof(struct sockaddr_in); //first send attempt; initial contact with server while(send == -1) { StackTask(); cbuffer[0] = inx; cbuffer[1] = iny; cbuffer[3] = 2; send = sendto(s, (const char *)cbuffer, 8, 0, (struct sockaddr *)&server, server_length); } //when send finally works, start receiving //communicate with M5 while(1) { //red led (LED0_IO) sometimes comes on briefly at the beginning of program //for not apparent reason. Please ignore //keep this one StackTask(); // This tasks invokes each of the core stack application tasks //removing it saves about 50 microseconds //StackApplications(); //turn the green LED on and off with each iteration of while loop if(LED2_IO == 0) { LED2_IO = 1; } else if(LED2_IO == 1) LED2_IO = 0; //receive from server int recv = recvfrom(s, (char *)&recvbuf, 8, 0, (struct sockaddr*)&server, &server_length); //if receive is successful // if(recv > 0) { //when input comes in from server //write information to M5 // PORTClearBits(T0_T1_T2_PORT, TOBIT); writePIO(outx,outy); // output x,y values to PI PIO //PORTSetBits(T0_T1_T2_PORT, TOBIT); readPIO(); // read x,y positions from PI PIO //reset the timeout timeout = 100000; //if there was a missed or dropped packet, //set status register to indicate this if(recvbuf[2] != (lastPacketCounter + 1)) statusRegister++; //extract information that server is sending inx = recvbuf[0]; iny = recvbuf[1];

Page 59: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

55 NSO REU Annual Program Report 2013

packetCounter = recvbuf[2]; //echo what the server has sent the client //modify statusRegister depending on delta(packetCounter) cbuffer[0] = recvbuf[0]; cbuffer[1] = recvbuf[1]; cbuffer[2] = recvbuf[2]; cbuffer[3] = statusRegister; //reseting values for next iteration send = -1; recv = 0; statusRegister = 0; //blink the yellow LED when a message has been received if(LED1_IO == 0) LED1_IO = 1; else if(LED1_IO == 1) LED1_IO = 0; //update the lastpacketcounter to be the one currently extracted //so on next iteration, we can check with this particular counter lastPacketCounter = packetCounter; //try sending another packet in return after one has been received while(send == -1) { StackTask(); send = sendto(s, (const char *)cbuffer, 8, 0, (struct sockaddr *)&server, server_length); } } //if nothing was received this iteration, decrement timeout else timeout--; //if the timeout has been reached, //try sending the message again if(timeout < 0 ) { if(LED0_IO == 0) { LED0_IO = 1; } else if(LED0_IO == 1) LED0_IO = 0; send = -1; timeout = 100000; while(send == -1) { StackTask(); cbuffer[3] = 2; send = sendto(s, (const char *)cbuffer, 8, 0, (struct sockaddr *)&server, server_length); } } } ProcessIO(); }

Page 60: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

56 NSO REU Annual Program Report 2013

// Processes A/D data from the potentiometer static void ProcessIO(void) { #if defined(__C30__) || defined(__C32__) // Convert potentiometer result into ASCII string uitoa((WORD)ADC1BUF0, AN0String); #else // AN0 should already be set up as an analog input ADCON0bits.GO = 1; // Wait until A/D conversion is done while(ADCON0bits.GO); //if you find this you deserve a cookie :) // AD converter errata work around (ex: PIC18F87J10 A2) #if !defined(__18F87J50) && !defined(_18F87J50) && !defined(__18F87J11) && !defined(_18F87J11) PRODL = ADCON2; ADCON2 |= 0x7; // Select Frc mode by setting ADCS0/ADCS1/ADCS2 ADCON2 = PRODL; #endif // Convert 10-bit value into ASCII string uitoa(*((WORD*)(&ADRESL)), AN0String); #endif } static void InitializeBoard(void) { // LEDs LED0_TRIS = 0; LED1_TRIS = 0; LED2_TRIS = 0; LED3_TRIS = 0; LED4_TRIS = 0; LED5_TRIS = 0; LED6_TRIS = 0; #if !defined(EXPLORER_16) // Pin multiplexed with a button on EXPLORER_16 LED7_TRIS = 0; #endif LED_PUT(0x00); #if defined(__18CXX) // Enable 4x/5x/96MHz PLL on PIC18F87J10, PIC18F97J60, PIC18F87J50, etc. OSCTUNE = 0x40; // Set up analog features of PORTA // PICDEM.net 2 board has POT on AN2, Temp Sensor on AN3 #if defined(PICDEMNET2) ADCON0 = 0x09; // ADON, Channel 2 ADCON1 = 0x0B; // Vdd/Vss is +/-REF, AN0, AN1, AN2, AN3 are analog #elif defined(PICDEMZ) ADCON0 = 0x81; // ADON, Channel 0, Fosc/32 ADCON1 = 0x0F; // Vdd/Vss is +/-REF, AN0, AN1, AN2, AN3 are all digital #elif defined(__18F87J11) || defined(_18F87J11) || defined(__18F87J50) || defined(_18F87J50) ADCON0 = 0x01; // ADON, Channel 0, Vdd/Vss is +/-REF WDTCONbits.ADSHR = 1; ANCON0 = 0xFC; // AN0 (POT) and AN1 (temp sensor) are anlog ANCON1 = 0xFF; WDTCONbits.ADSHR = 0; #else

Page 61: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

57 NSO REU Annual Program Report 2013

ADCON0 = 0x01; // ADON, Channel 0 ADCON1 = 0x0E; // Vdd/Vss is +/-REF, AN0 is analog #endif ADCON2 = 0xBE; // Right justify, 20TAD ACQ time, Fosc/64 (~21.0kHz) // Enable internal PORTB pull-ups INTCON2bits.RBPU = 0; // Configure USART TXSTA = 0x20; RCSTA = 0x90; // See if we can use the high baud rate setting #if ((GetPeripheralClock()+2*BAUD_RATE)/BAUD_RATE/4 - 1) <= 255 SPBRG = (GetPeripheralClock()+2*BAUD_RATE)/BAUD_RATE/4 - 1; TXSTAbits.BRGH = 1; #else // Use the low baud rate setting SPBRG = (GetPeripheralClock()+8*BAUD_RATE)/BAUD_RATE/16 - 1; #endif // Enable Interrupts RCONbits.IPEN = 1; // Enable interrupt priorities INTCONbits.GIEH = 1; INTCONbits.GIEL = 1; // Do a calibration A/D conversion #if defined(__18F87J10) || defined(__18F86J15) || defined(__18F86J10) || defined(__18F85J15) || defined(__18F85J10) || defined(__18F67J10) || defined(__18F66J15) || defined(__18F66J10) || defined(__18F65J15) || defined(__18F65J10) || defined(__18F97J60) || defined(__18F96J65) || defined(__18F96J60) || defined(__18F87J60) || defined(__18F86J65) || defined(__18F86J60) || defined(__18F67J60) || defined(__18F66J65) || defined(__18F66J60) || \ defined(_18F87J10) || defined(_18F86J15) || defined(_18F86J10) || defined(_18F85J15) || defined(_18F85J10) || defined(_18F67J10) || defined(_18F66J15) || defined(_18F66J10) || defined(_18F65J15) || defined(_18F65J10) || defined(_18F97J60) || defined(_18F96J65) || defined(_18F96J60) || defined(_18F87J60) || defined(_18F86J65) || defined(_18F86J60) || defined(_18F67J60) || defined(_18F66J65) || defined(_18F66J60) ADCON0bits.ADCAL = 1; ADCON0bits.GO = 1; while(ADCON0bits.GO); ADCON0bits.ADCAL = 0; #elif defined(__18F87J11) || defined(__18F86J16) || defined(__18F86J11) || defined(__18F67J11) || defined(__18F66J16) || defined(__18F66J11) || \ defined(_18F87J11) || defined(_18F86J16) || defined(_18F86J11) || defined(_18F67J11) || defined(_18F66J16) || defined(_18F66J11) || \ defined(__18F87J50) || defined(__18F86J55) || defined(__18F86J50) || defined(__18F67J50) || defined(__18F66J55) || defined(__18F66J50) || \ defined(_18F87J50) || defined(_18F86J55) || defined(_18F86J50) || defined(_18F67J50) || defined(_18F66J55) || defined(_18F66J50) ADCON1bits.ADCAL = 1; ADCON0bits.GO = 1; while(ADCON0bits.GO); ADCON1bits.ADCAL = 0; #endif #else // 16-bit C30 and and 32-bit C32 #if defined(__PIC32MX__) {

Page 62: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

58 NSO REU Annual Program Report 2013

// Enable multi-vectored interrupts INTEnableSystemMultiVectoredInt(); // Enable optimal performance SYSTEMConfigPerformance(GetSystemClock()); mOSCSetPBDIV(OSC_PB_DIV_1); // Use 1:1 CPU Core:Peripheral clocks // Disable JTAG port so we get our I/O pins back, but first // wait 50ms so if you want to reprogram the part with // JTAG, you'll still have a tiny window before JTAG goes away. // The PIC32 Starter Kit debuggers use JTAG and therefore must not // disable JTAG. DelayMs(50); #if !defined(__MPLAB_DEBUGGER_PIC32MXSK) && !defined(__MPLAB_DEBUGGER_FS2) DDPCONbits.JTAGEN = 0; #endif LED_PUT(0x00); // Turn the LEDs off CNPUESET = 0x00098000; // Turn on weak pull ups on CN15, CN16, CN19 (RD5, RD7, RD13), which is connected to buttons on PIC32 Starter Kit boards } #endif #if defined(__dsPIC33F__) || defined(__PIC24H__) // Crank up the core frequency PLLFBD = 38; // Multiply by 40 for 160MHz VCO output (8MHz XT oscillator) CLKDIV = 0x0000; // FRC: divide by 2, PLLPOST: divide by 2, PLLPRE: divide by 2 // Port I/O AD1PCFGHbits.PCFG23 = 1; // Make RA7 (BUTTON1) a digital input AD1PCFGHbits.PCFG20 = 1; // Make RA12 (INT1) a digital input for MRF24WB0M PICtail Plus interrupt // ADC AD1CHS0 = 0; // Input to AN0 (potentiometer) AD1PCFGLbits.PCFG5 = 0; // Disable digital input on AN5 (potentiometer) AD1PCFGLbits.PCFG4 = 0; // Disable digital input on AN4 (TC1047A temp sensor) #else //defined(__PIC24F__) || defined(__PIC32MX__) #if defined(__PIC24F__) CLKDIVbits.RCDIV = 0; // Set 1:1 8MHz FRC postscalar #endif // ADC #if defined(__PIC24FJ256DA210__) || defined(__PIC24FJ256GB210__) // Disable analog on all pins ANSA = 0x0000; ANSB = 0x0000; ANSC = 0x0000; ANSD = 0x0000; ANSE = 0x0000; ANSF = 0x0000; ANSG = 0x0000; #else AD1CHS = 0; // Input to AN0 (potentiometer) AD1PCFGbits.PCFG4 = 0; // Disable digital input on AN4 (TC1047A temp sensor)

Page 63: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

59 NSO REU Annual Program Report 2013

#if defined(__32MX460F512L__) || defined(__32MX795F512L__) // PIC32MX460F512L and PIC32MX795F512L PIMs has different pinout to accomodate USB module AD1PCFGbits.PCFG2 = 0; // Disable digital input on AN2 (potentiometer) #else AD1PCFGbits.PCFG5 = 0; // Disable digital input on AN5 (potentiometer) #endif #endif #endif // ADC AD1CON1 = 0x84E4; // Turn on, auto sample start, auto-convert, 12 bit mode (on parts with a 12bit A/D) AD1CON2 = 0x0404; // AVdd, AVss, int every 2 conversions, MUXA only, scan AD1CON3 = 0x1003; // 16 Tad auto-sample, Tad = 3*Tcy #if defined(__32MX460F512L__) || defined(__32MX795F512L__) // PIC32MX460F512L and PIC32MX795F512L PIMs has different pinout to accomodate USB module AD1CSSL = 1<<2; // Scan pot #else AD1CSSL = 1<<5; // Scan pot #endif // UART #if defined(STACK_USE_UART) UARTTX_TRIS = 0; UARTRX_TRIS = 1; UMODE = 0x8000; // Set UARTEN. Note: this must be done before setting UTXEN #if defined(__C30__) USTA = 0x0400; // UTXEN set #define CLOSEST_UBRG_VALUE ((GetPeripheralClock()+8ul*BAUD_RATE)/16/BAUD_RATE-1) #define BAUD_ACTUAL (GetPeripheralClock()/16/(CLOSEST_UBRG_VALUE+1)) #else //defined(__C32__) USTA = 0x00001400; // RXEN set, TXEN set #define CLOSEST_UBRG_VALUE ((GetPeripheralClock()+8ul*BAUD_RATE)/16/BAUD_RATE-1) #define BAUD_ACTUAL (GetPeripheralClock()/16/(CLOSEST_UBRG_VALUE+1)) #endif #define BAUD_ERROR ((BAUD_ACTUAL > BAUD_RATE) ? BAUD_ACTUAL-BAUD_RATE : BAUD_RATE-BAUD_ACTUAL) #define BAUD_ERROR_PRECENT ((BAUD_ERROR*100+BAUD_RATE/2)/BAUD_RATE) #if (BAUD_ERROR_PRECENT > 3) #warning UART frequency error is worse than 3% #elif (BAUD_ERROR_PRECENT > 2) #warning UART frequency error is worse than 2% #endif UBRG = CLOSEST_UBRG_VALUE; #endif #endif }

Page 64: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

60 NSO REU Annual Program Report 2013

static ROM BYTE SerializedMACAddress[6] = {MY_DEFAULT_MAC_BYTE1, MY_DEFAULT_MAC_BYTE2, MY_DEFAULT_MAC_BYTE3, MY_DEFAULT_MAC_BYTE4, MY_DEFAULT_MAC_BYTE5, MY_DEFAULT_MAC_BYTE6}; //#pragma romdata static void InitAppConfig(void) { AppConfig.Flags.bIsDHCPEnabled = TRUE; AppConfig.Flags.bInConfigMode = TRUE; memcpypgm2ram((void*)&AppConfig.MyMACAddr, (ROM void*)SerializedMACAddress, sizeof(AppConfig.MyMACAddr)); // { // _prog_addressT MACAddressAddress; // MACAddressAddress.next = 0x157F8; // _memcpy_p2d24((char*)&AppConfig.MyMACAddr, MACAddressAddress, sizeof(AppConfig.MyMACAddr)); // } AppConfig.MyIPAddr.Val = MY_DEFAULT_IP_ADDR_BYTE1 | MY_DEFAULT_IP_ADDR_BYTE2<<8ul | MY_DEFAULT_IP_ADDR_BYTE3<<16ul | MY_DEFAULT_IP_ADDR_BYTE4<<24ul; AppConfig.DefaultIPAddr.Val = AppConfig.MyIPAddr.Val; AppConfig.MyMask.Val = MY_DEFAULT_MASK_BYTE1 | MY_DEFAULT_MASK_BYTE2<<8ul | MY_DEFAULT_MASK_BYTE3<<16ul | MY_DEFAULT_MASK_BYTE4<<24ul; AppConfig.DefaultMask.Val = AppConfig.MyMask.Val; AppConfig.MyGateway.Val = MY_DEFAULT_GATE_BYTE1 | MY_DEFAULT_GATE_BYTE2<<8ul | MY_DEFAULT_GATE_BYTE3<<16ul | MY_DEFAULT_GATE_BYTE4<<24ul; AppConfig.PrimaryDNSServer.Val = MY_DEFAULT_PRIMARY_DNS_BYTE1 | MY_DEFAULT_PRIMARY_DNS_BYTE2<<8ul | MY_DEFAULT_PRIMARY_DNS_BYTE3<<16ul | MY_DEFAULT_PRIMARY_DNS_BYTE4<<24ul; AppConfig.SecondaryDNSServer.Val = MY_DEFAULT_SECONDARY_DNS_BYTE1 | MY_DEFAULT_SECONDARY_DNS_BYTE2<<8ul | MY_DEFAULT_SECONDARY_DNS_BYTE3<<16ul | MY_DEFAULT_SECONDARY_DNS_BYTE4<<24ul; // Load the default NetBIOS Host Name memcpypgm2ram(AppConfig.NetBIOSName, (ROM void*)MY_DEFAULT_HOST_NAME, 16); FormatNetBIOSName(AppConfig.NetBIOSName); }

Acknowledgments  

 I am incredibly grateful for the guidance of Kit Richards, my advisor, throughout my learning process and for allowing me the enormous opportunity to study and work here at Sunspot this summer. I am fully convinced I had the best all‐around advisor on the mountain.  I’d like to give my infinite thanks to everyone in Sunspot for making me feel at home and welcoming me with open arms to the community. Most importantly, to the other summer students: Elora Salway, Danny Cohen, Eric Ramesh, Pia Denzmore, Tyler Behm, Stacey Sueoka, Alex Pevtsov, and Chris Moore, for the laughs, memories, and inspiration.  This work was supported by the National Science Foundation (NSF) and the Association of Universities for Research in Astronomy (AURA). This work is carried out through the National Solar Observatory’s Research Experiences for Undergraduates (REU) site program, which is co‐funded by the Department of Defense in partnership with the National Science Foundation REU Program. 

Page 65: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

61 NSO REU Annual Program Report 2013

National Science Foundation

Research Experience for Undergraduates Summer 2013 Report

Novel Ways of Extracting Metadata from Digitized  

Solar Images  

Mark Miyazaki 

(University of Hawaiʻi, Hilo)  

National Solar Observatory, Tucson Advisor:  Igor Suarez Sola & Niles Oien 

  

Abstract H‐Alpha full disk images of the Sun were collected at Sacramento Peak, NM. These images were then stored in reels of film. On each frame there are timestamps that have been manually placed as part of the observation process. Recently, the reels of film had been digitized into a .fts file format. The film data were then organized and named by reel and frame number, which led to our approach to use some programming languages to extract those dates and times and then use them as templates to correlate the original frames against; hopefully this will efficiently and accurately process all of the images to extract the dates and times to rename the files, which will be then stored in a new database.  1.   Introduction Photographic  data  of  the  Sun were  collected  from  Sacramento  Peak  (Sac  Peak), NM many decades ago and  stored  in  reels of  film. Before  images were  recently digitized,  the dates and times were manually placed on each frame as part of the observation process. The reels of film had been recently digitized and stored as a FITS (Flexible Image Transport System) digital file format, which is useful for storage, transmission, and processing of scientific metadata into the Virtual  Storage Observatory  (VSO),  a  software  system  that  links  together  shared  archives  of solar data.  In  the process of organizing  these  reels of  film according  to  their  timestamps, we have first been randomly picking out  images from various reels and observing them using an image application called SAOImage DS9, so that we can observe different types of changes and positions  of  the  timestamps, while  at  the  same  time  recording  our  findings  that we  thought could be useful information.   The  problem  we  have  faced  on  our  project  of  digitizing  the  Sac  Peak  H‐alpha  timestamp metadata is that astronomers and/or engineers who want to access those data would not know the date and time of each file without visually looking at the frame.  

Page 66: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

62 NSO REU Annual Program Report 2013

 Our action  is  to  find a way  to generate  clean  templates of  the dates and  times  that has been extracted  from  original  frames, use  those  templates  to  correlate  against,  and  to  run multiple scripts  hoping  to  efficiently  process  every  frame  to  where  we  expect  it  will  automatically rename the files according to the timestamp that is on the respective frame. This project is very interesting, because  there are different  types of  theories and methods we have come up with, but when we test the scripts and put them into practice, they do not quite work out the way we thought they would; it is basically a trial and error situation. In this report I will explain a brief history  of  H‐alpha  film  digitizing,  methods,  results  from  our  methods,  and  a  discussion regarding my  results.  2.  History H‐alpha full disk images were taken at Sacramento Peak beginning about mid‐1951. From 1963, the data were taken with a 6‐inch telescope mounted on a 10‐feet spar in Grain Bin Dome. Grain Bin Dome was the first telescope building at Sac Peak, and it is based on a modified grain bin that was purchased from a Sears catalog in 1950.  In  1963,  the  telescope  was  moved  to  Hilltop  Dome.  The  same  6‐inch  telescope  was  used throughout the entire project. H‐alpha images were taken automatically at a cadence of 1 minute throughout  the  observing day. Every  third  image was  taken with  a  longer  exposure  to  show prominences at the limb. At the end of 2002, H‐alpha images from the flare patrol telescope were replaced by US Air Force’s ISOON (Improved Solar Optical Observing Network) telescope.  

 Figure 1: A sample of an H‐alpha digitized full disk image 

 

3.  Methods 3.1. Initial Ideas  

Igor Suarez’s initial idea not only to get the metadata out of the image but also to use it as an excuse  to  explore  the  capabilities  of  the  Python modules  in  dealing with  data  and  images. Python  is  free  and  it’s  powerful.  Also  because  it  is  a  scripting  language;  it  is  suitable  for prototyping.  

Page 67: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

63 NSO REU Annual Program Report 2013

 Igor  Suarez’s  first  idea was  to  use OCR  (Optical  Character  Recognition)  software;  however Niles Oien did research on a few packages and found out that they performed very poorly on our  type of data. Then  it occurred  to  Igor Suarez  that since we had  just a very  limited set of characters, that consist mostly in numbers and didn’t change in shape or size, we could get or make templates out of them and do plain correlation. (by plain correlation I mean subtracting the image you want to analyze by a set of templates, then one with the minimum value should be the match).  

3.2.  Timestamp Observation 

During  our  observation  process  of  obtaining  some  ideas  on  how  to  approach ways  to digitize  the  timestamps, we  observed  that  the  date  had  been  typed,  cut,  and manually placed on the mid right corner of each frame. Usually the dates are generally located at the same spot, but at times when the day changes, the date shifts and sometimes is positioned at  a  slight  angle. On  the other hand,  for  the  time,  it  appears  that  the observers used  an analog clock, which was photographed during the observation process. We noticed that in the beginning and ending of every reel there is no image of the sun ‐we assume when the reel runs out of film, the solar flare telescope continues to automatically takes shots of the Sun, while at the same time the observers are trying to switch to a new reel; in that case we have  many  unwanted  frames.  Most  of  the  times  the  frames  are  underexposed  or overexposed;  ‐however,  even  in  that  case  the human  eye  still  can visually  recognize  the letters and numbers. As  for  the script,  it does not digitally see  the same  thing because of noise  coming  from  the background. The  script  simply metaphorically  sees  true and  false values  from each pixels and  lines going up and down along  the x axis depending on  the value of the color which ranges from 0‐4000, in which 4000 being pure white.  

3.3.  Generating the Templates 

After observing thousands of frames in random reels, Niles Oien had an idea of extracting out templates  from  all  the dates  and  times  that  look  generally  respectable  and  to make  a  folder named templates to store them in. This process took a while to search for the desired templates, because  there were many  frames  that were over/underexposed,  so  the  timestamps would be hard for the script to recognize. When I manually selected the timestamps we wanted to insert into  our  templates  folder,  I  used  the  Python  programming  extractDateTime.py  that  Oien created,  which  is  written  in  the  template  folder  named  day_23.template  as  defined  in  the command.   The  UNIX  terminal  command  to  extract  this  template  is  written  as extractDateTime.py nso_0247_05002.fts, which seen in figure 2, is what you will see when you execute the extractDateTime.py program. Hovering your mouse on the bottom left or top right of your desired date or time, displayed at the bottom right of figure 2, will give you values from your x and y axis as a cropping method for your template.  The  command  to  use  is  extraxtDateTime.py  nso_0247_05002.fts  89  24  205  65  time day_23.template, which will appear as shown in figure 3. The 89 and 24 are the x and y values for the bottom left location for the desired template, while the 205 and 65 are the values for the top right. After I had gathered all of the templates that we wanted into the templates folder, 

Page 68: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

64 NSO REU Annual Program Report 2013

 

 Figure 2: The figure above shows an analog clock that had been photographed during the observation process and on 

the bottom where the date had been typed and manually placed on the frame.  

 

  

Figure 3: extractDateTime.py will make the template appear as shown.  

Oien  tested 3 Python  script  (Runner, Runner2, and Runner3)  that he also  created. The  script ‘Runner’ runs the correlations to extract the data times to a file, which generally should be left to run overnight. The output file is ‘reel262.times’. Runner2 is the one that gets interactive; run it without a  skip  file.  It will write a  script  called “checkReel262.sh”;  run  that  script and  then manually  edit  the  skip  file  and  then  re‐run  it with  that  script  file. Oien  called  the  skip  file “skip262.dat”;  it  lists  dates  that  the  camera  did  not  run.  Basically, what Runner2  does  is  to associate dates to the times; it reads the file reel262.times (times, but no dates) and writes the file times_262.dat (dates and times). Runner 3 reads times_262.data and generates the timestamped data.  After testing and generating the timestamp data, I went into the folder ‘nilesTest’, where the generated reels were, and made observations on random frames to see if the timestamps on the frames were relative to the renamed frames. All the frames that I checked were relatively on spot within  less than a minute. However, although these scripts worked, not all of the frames were  correlated,  because,  as  you  can  see  in  figure  3,  there  were  too  many  noises  in  the background  of  the  number  23, which  in  the  human  eye  it  is  visually  and  clearly  readable; 

Page 69: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

65 NSO REU Annual Program Report 2013

however, when  the  script  reads  this  template,  it  reads  the  color  values  in  the pixel  that  the template displays for the script.   Niles Oien applied the template idea to the time part and in order to gain speed implemented the correlation in C++. Niles doesn’t read the date though, but he can get the time. He checks when the time changes day, for instance when the time goes up and then notices sudden down, that marks a new day. He doesn’t know  if that day  is contiguous or not, so  it needs manual  inter‐vention, also  the  time correlation  fails  from  time  to  time. That’s why we are  trying  to analyze the data a little bit further to see if we can extract date and time in a more automatic way.   3.4.   Cleaning Templates From Noises  In order  to  accomplish  this,  Igor  Suarez used python  and  in particular  a  few very powerful python modules that make image manipulation a lot easier. I.e. Numpy, pyfits, scipy. Numpy is a matrix/array manipulator. A  two dimensional  image  can  be  easily  loaded  in  a  2D  numpy array and be manipulated in a vectorial/algebraic way. (e.g. arithmetic manipulation is applied to the array as an element, the programmer doesn’t have to worry about individual elements.) Lets say the image has been loaded into the numpy array “cube”, To flip the image we simply do:  

cube.transpose() 

To invert it: cube[:,::‐1] 

 To flip and invert: 

cube.transpose()[:,::‐1]  To do  this  in  Java, C, or C++ would have  taken  several programming hours.  (This  is a good example of using python  for  image prototyping, you  can  implement  a  lot very quickly,  that doesn’t mean that it’ll run efficiently and fast through but at least you can get an idea of what you are up against).  Igor Suarez first script tried to find an anchor position in the image. This is a  place in the image where from to count a number of pixels and find the digits of the time and date. This was an important  task,  template  correlation wouldn’t work well  if  the  image you  correlate with  it  is shifted or slanted.   

4.  Results Currently the project is still going on but Igor Suarez has made a lot of progress. What is left to be done  is  to put  together  the various components,  i.e. Put  in one program  the  traversing  the directory structure, the extracting the header tool and applying the template correlation logic.      

Page 70: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

66 NSO REU Annual Program Report 2013

 

 Figure 4: A preview of the clean template (second from template from the bottom) after the script has been executed 

and how it is relatively clean compared to the original template (top template). 

    Acknowledgements I would  like  to  thank my advisors  Igor Suarez and Niles Oien  for offering  their professional guidance and mentoring me throughout the summer. I would also like to thank them with their expertise in programming for training me to use the Unix and Python programming languages in order to work on my project. I would also like to acknowledge my supervisor Priscilla Piano  and  my  fellow  REU  students  for  their  support  which  made  the  summer  an  awesome educational experience.  This work was supported by the National Science Foundation (NSF) and the Association of Universities for Research in Astronomy (AURA). This work is carried out through the National Solar Observatory (NSO) Akamai’s Summer Research Assistantship (SRA) program.  References Oien, Niles. ʺTimestamping Film Data.ʺ Timestamping Film Data. N.p., n.d. Web. 09 Aug. 2013.  Hill, Frank,  and Ruth A. Kneale.  ʺVirtual Solar Observatory.ʺ NSO:. N.p., n.d. Web.  16 Aug. 2013.  Igor Suarez (Senior Software Engineer) (Interview).   Niles Oien (Software Engineer) (Interview).  Alexei A. Pevtsov, Ph D. (Program Scientist) (Interview).  

Page 71: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

68 NSO REU Annual Program Report 2013

National Science Foundation Research Experience for Undergraduates

Summer 2013 Report

Precision Spectro-Polarimetry at the Coudé Focus: Calibration of ProMag Data

Elora Salway

(Brigham Young University)

Advisor: Dr. J. Lewis Fox National Solar Observatory/Sacramento Peak, PO Box 62, Sunspot, NM 88349

Abstract

ProMag, the Prominence Magnetometer, is a dual beam, dual channel, slit-scanning, full Stokes spectro-polarimeter designed by the High Altitude Observatory at the National Center for Atmospheric Research (HAO/NCAR). ProMag is intended to study magnetism of solar prominences and filaments by acquiring spectro-polarimetric maps of these targets simultaneously in two chromospheric lines of He I at 5876 Å (He D3) and 10830 Å. In order to obtain proper co-alignment of the dual beams, the electro-optic modulator and polarization analyzer form a single mechanical unit located at the coudé feed of the telescope. The location, however, complicates the calibration process necessary to achieve the sensitivity required for full Stokes prominence measurements (< 10-3). I will present work done to calibrate ProMag and current problems preventing both the complete calibration of data and acquisition of full Stokes vectors in prominences.

1. Introduction

In order to more fully understand space weather and the Sun-Earth connection, the full vector magnetic field of the solar corona needs to be measured more comprehensively. The movements of the magnetic field and convective motions in the photosphere have long been associated with the dynamics and heating of the corona. However, magnetic fields in the chromosphere and transition regions are not so well determined. The large-scale magnetic topology, which supports the plasma of prominences and filaments, drives the evolution of these solar features. Understanding this magnetic topology may be the key to the prediction of eruptions which lead to Coronal Mass Ejections (CMEs). The aim of ProMag is to routinely determine the full vector magnetic field in both prominences and filaments. Previous measurements of magnetic fields in prominences have been taken at both the Dunn Solar Telescope (NSO/SP) (Casini et al., 2003) and at the THÉMIS solar telescope on Tenerife (Paletou et al., 2001). Unfortunately, these instruments have a high level of

Page 72: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

69 NSO REU Annual Program Report 2013

scattered light, which prevents observation of the fainter structures in the corona. In addition, both telescopes are in high demand from the solar community, making them unavailable to run the patrol program desired for this study. For this reason, the Evans Solar Facility (ESF) was selected for the ProMag program. My project consisted of observational, analytical, and instrumentation components. I had the opportunity to regularly observe using ProMag at the ESF, often as the only telescope operator present. This allowed me to select my own targets, collect prominence maps, and make calibration sets which I then analyzed and compared to calibration sets from earlier this year. Using this, my adviser and I have made a rudimentary telescope model based on calibration data from January through June of 2013. I also assisted in developing a successful method for acquiring flat field images without the use of a constant flat light source. I will here explain the observation process at the ESF with ProMag, as well as the methods for acquiring calibration data and the new flat field process. I will also present the calibration model for a single calibration set and a time variability of the calibration model for data from January 2013 through June 2013. Concerns with the current calibration model for both sets of data will be discussed. Lastly, two problems I discovered this summer will be presented. The first problem is the unexpected occurrence of a faulty frame in calibration sets which creates a discontinuity in intensity of the images and prevents the calibration program from determining the correct solution. The second problem is a wave pattern feature in our images which the flat field image is unable to remove.

2. The Prominence Magnetometer

ProMag was deployed in August 2009 at the 40 cm coronagraph of the ESF at the National Solar Observatory on Sacramento Peak (NSO/SP). ProMag was initially intended to run for two weeks of every quarter. However, availability at the ESF and instrumentation problems led ProMag to switch to “patrol mode” in August 2011 with a dedicated observer working throughout the year. There are two separate cameras; the PixelVision Pluto for observing He I 5876 Å and the FLIR Alpha InGaAs for observing He I 10830 Å. Each camera has a filter designed for the wavelength they are designated to observe. The FLIR camera successfully produces spectro-polarimetric maps for the 10830 Å line. The PixelVision, however, only occasionally captures spectral data for the 5876 Å line and when data is collected, the spectral features are very dim. The cause is unknown, though potentially may be the result of a faulty filter. There has not yet been an opportunity to test this possibility. As a result, all data presented in this paper will be from the FLIR camera at the wavelength of 10830 Å.

Page 73: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

70 NSO REU Annual Program Report 2013

ProMag consists of a polarimeter and a spectrograph. The spectrograph contains only a single slit to ensure co-alignment of features in both spectral lines. This allows us the certainty that both cameras are simultaneously recording images of precisely the same location within a prominence. The polarimeter was originally located at the prime focus of the ESF. This split the incoming light into two polarized beams which continued to the spectrograph located at the coudé focus. ProMag was easier to calibrate at this location, as the polarized beams were split before encountering most of the telescope. Unfortunately, upon reaching the coudé focus, the separated beams could not be properly aligned. The polarimeter was moved to the coudé focus in early December 2011 and is now located just behind the slit (see figure 1). This allows for proper alignment, but complicates calibration procedures as the light is affected by the entire telescope and its movement throughout the year. The polarimeter itself (figure 2) is made up of a UV filter, two ferroelectric liquid crystals (FLCs) that work together as a modulator, and two Wollaston prisms with a half wave retarder in between them. The fast axis of each FLC modulates electronically at a rate of 25 Hz. Each of the four modulation states is recorded as one of four frames within each image (see figure 3). The two Wollaston prisms

Figure 2- Diagram of the ESF and ProMag. The polarimeter was originally located at the

prime focus. It has been moved to the coudé focus for

alignment purposes

Figure 3- Inside the Polarimeter

Page 74: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

71 NSO REU Annual Program Report 2013

separate the polarized beams and then make them parallel at a distance of about 9 mm. These two beams then continue toward the diffraction grating and are recorded as two beams within each of the 4 frames of the image.

3. Observation and Calibration Processes

3.1 Observation process:

I selected target prominences using H-alpha images from the Global Oscillation Network Group (GONG), of which figure 4 is an example. The circled prominence is the target prominence. GONG images were loaded into PMGONG, an IDL program, which assisted in

determining the heliocentric position angle of the selected prominence. Rotation angles of the polarimeter and image rotator were both determined by inputting heliocentric position angle into the program PROMAGSET. Using the live feed, the edges of the selected prominence were located based on slit position, which is measured in millimeters. During observation, the slit moves in steps of 0.09 mm. Using this number, the necessary number of steps to cover the entire prominence can be calculated. The live feed is then used to align the slit with either the upper or lower edge of the prominence and a spectro-polarimetric map is then made either forward or backwards over the prominence. Currently, one is able to take the full map of images and reconstruct a spectral image of the prominence

in the observed wavelength, creating a simulated 10830 Å filter image. This image is created by taking the sum of intensity over the wavelength range in which the prominence is present. Red and blue shifted images can also be constructed and a Doppler shift image can be formed by subtracting one from the other (Figure 5). When calibration is completed, the Stokes vectors can be determined, for each scan, to understand magnetic field within the prominence map. Full observation procedures are detailed in the appendix.

Figure 4- He I 10830 Å data as recorded by FLIR. Each of the 4 frames within the image corresponds to a different modulation state

Figure 5- Gong image from June 18, 2013. The circled prominence is the target

Page 75: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

72 NSO REU Annual Program Report 2013

3.2 Calibration process:

Every spectro-polarimetric map is bracketed with calibration sets taken at the same heliocentric position angle as the prominence. In addition to these, every observation day begins and ends with a calibration set at the geocentric position angle of 0°. Occasionally, multiple calibration sets are taken in sequence at the geocentric position angle of 0° during a period of several hours. These last two calibration types enable us to make telescope models and determine both seasonal and daily time-dependent variations in the calibration. The calibration sets are formed using a retarder and polarizer located at the prime focus of the ESF (refer to figure 1). These two optical devices rotate independently from one another during the calibration process. This creates known Stokes vectors from which calibration parameters can be found using the process described in section 4.1 Each calibration set consists of 48 images. The first 4 are clear images without the polarizer or retarder in the beam; these are followed by 2 dark images. 36 calibration images, divided into three groups of twelve, are then taken. These three groups are distinguished by the angle of the retarder, which rotates 60° every twelve images. The polarizer rotates 15° with each

image. This consistent rotation creates a smooth periodic variation in intensity between the two beams, with a discontinuity every twelve images when the retarder rotates. The intensity variation is displayed graphically in figure 6. The 36 calibration images are then followed with 2 more dark images and 4 clear images.

Figure 5-The first image is the simulated 10830 Å filter image. The second image is the blue shift in the prominence and the third image is the red shift in the prominence. The last image is a Doppler shift diagram of the plasma in the prominence.

Figure 6- The intensity graphs of both beams during the calibration set. The arrows point out when the retarder rotates, which creates a discontinuity in intensity.

Page 76: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

73 NSO REU Annual Program Report 2013

4. Analysis 4.1 Calibration analysis

To analyze calibration sets, the program POLCAL is used. A region of interest, based on the location of the target spectral lines, is divided into 16 super-pixels (see figure 7) which are used as the input for POLCAL. POLCAL is then able to use either Amoeba or Latin Hypercube Sampling, depending on the analyzer’s preference, to determine the modulation matrix which fulfills the equation

[𝐶] = [𝑇(𝑡) ∗ 𝑃] ∗ [𝑆]

where C is the input signal from the camera, T(t) is the time dependent modulation matrix for the telescope, P is the constant modulation matrix of the polarimeter, and S is the full Stokes vector of the sun. C and S are both 4 parameter vectors, while [T(t)*P] is a 4x4 matrix. In addition to the 16 matrix parameters and 4 Stokes parameters, POLCAL determines 4 other parameters: the retardance of the calibration retarder, the transmittance of the retarder and polarizer combined, and the offsets of both calibration optics. It should be noted that no statistical difference in solution has been determined based on usage of Amoeba or Latin Hypercube Sampling. The data presented in this paper have used Amoeba because it runs faster on the computer and only 12 weeks were allotted to this project. POLCAL is run three times on a single calibration set for one final solution. In the first run Amoeba begins with a random guess. For the second run, the first solution is loaded into Amoeba as a starting position with a random offset to help it focus on the correct solution. The final run loads the second solution as a starting position with a random offset, the range of which has been decreased by a factor of five. To determine the stability of this method, the three-pass POLCAL method was run 153 times on a single set of data. The solution of each set of three passes was saved and graphed (figures 8-12). The x-axis is the point or super-pixel, the point number plus one corresponds to the numbered super pixel in figure 7. Each plus represents the value found by POLCAL at that point for one run. The line connects the median value of each collection of points. Error bars are also present. They represent the median absolute deviation from the median. The error bars appear as dashes in many graphs because they are so small. It should be noted, this is the error in POLCAL’s ability to determine the same answer from a different initial guess. This is not the error in the measurement. The next 5 graphs are constructed this same way. Current concerns arise in how POLCAL determines the polarizer and retarder offsets (figure 10). POLCAL consistently finds a difference between these two offsets of 3.2°. However, by running POLCAL on multiple calibration sets, it has been determined that POLCAL arbitrarily marks one offset as being positive and the other negative. If one of the two is locked, or forced to have a value of zero, the other will be ±3.2°. The results are the same when Latin Hypercube Sampling is used, which is able to test the entire parameter space. Without the ability to place the retarder

Figure 7- A clear image from a calibration set. The grid and number show the location of the super pixels

Page 77: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

74 NSO REU Annual Program Report 2013

and polarizer into the beam individually, the computer might be limited in only determining the difference between the offsets and not the individual offsets. Another method must be used to determine the offset of one device and input that into POLCAL so that it can determine the offset of the other device. Another apparent problem is the variation in the Q, U, and V components of the Stokes vector (figure 11). These three components seem to alternate between positive and negative values. This might be a result of a wave pattern seen in the images and flat fields, a problem which will be further discussed in section 4.2. Lastly, many parameters in the modulation matrix (figure 12) exhibit a “stair-step” pattern in the values POLCAL consistently locates. These features change with the x component on the CCD, not the wavelength. The cause and importance of these steps is still being determined.

Figu

re 8

- χ2 v

alue

retu

rned

by POLCAL

.

Page 78: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

75 NSO REU Annual Program Report 2013

Figu

re 9

- The

Ret

arda

nce

of th

e ca

libra

tion

reta

rder

and

the

tran

smitt

ance

of b

oth

calib

ratio

n op

tics.

Page 79: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

76 NSO REU Annual Program Report 2013

Figu

re 1

0- T

he m

echa

nica

l offs

et in

deg

rees

of t

he re

tard

er a

nd th

e po

lariz

er.

Page 80: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

77 NSO REU Annual Program Report 2013

Figu

re 1

1- T

he fu

ll St

okes

vec

tor o

f the

inco

min

g lig

ht, t

he su

n, a

nd it

s ass

ocia

ted

stok

es m

odul

ator

effi

cien

cies

.

Page 81: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

78 NSO REU Annual Program Report 2013

Figu

re 1

2- T

he m

odul

atio

n m

atrix

. Th

is m

atrix

take

s int

o ac

coun

t bot

h th

e po

larim

eter

and

the

tele

scop

e.

Page 82: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

79 NSO REU Annual Program Report 2013

4.2 Time Variability in the Calibration Model

After determining the reliability of POLCAL to produce consistent results regardless of the initial guess, a time variable calibration model was created. This model uses calibration sets with a geocentric position angle of 0° from the first six months of 2013. A single three-pass POLCAL run was taken of each calibration set from which the χ2 (chi-squared) weighted average across the 16 super-pixels for each of the 24 parameters was determined. These values were graphed according to time of day with a range of symbols representing the months of the year. The symbols are as follows: +=January, ◊=February, ∆=April, □=May, x=June. The first set of graphs, figure 13, demonstrates no daily time variance, which was expected for these parameters. It is interesting to note, however, that χ2 seems to decrease with a seasonal variation. This could be a result of more care being taken in more recent dates to remove calibration sets which might have had cloud interference or other problems which increased the χ2 value. Also, the calculation error in the offset values is still evident. The Stokes vector of the sun and corresponding efficiencies are graphed in figure 14. The U and V parameters follow the anticipated pattern. The parameters themselves do not vary with time or season; it wouldn’t really make sense for the polarization of the sun to change based on time or season on earth. The efficiencies, however, being based on the modulation matrix (figure 15) which does have daily time and seasonal variation, do exhibit variation. The Q parameter has the opposite characteristic, Q itself shows seasonal variation but the Q efficiency has no recognizable variation pattern. The cause for this is unknown, though may be linked to a problem in the modulation matrix (figure 15). The first column of the modulation matrix should not and does not have any seasonal variation, since this is the column associated with the I parameter. This is a normalized parameter, and should therefore be equal to 1. The even, time-independent scatter was expected for this parameter. Nearly all other parameters show curved paths based on the time of day which change based on season, either moving up, down or becoming steeper. The only exception is the second element in the second column, which has no variation, either seasonal or daily. This is the second Q parameter. The unexpected lack of trend could be the cause of the Q parameter’s variability, or the two could both be caused by the same problem. I have not yet been able to study this problem and determine possible causes.

Page 83: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

80 NSO REU Annual Program Report 2013

Figu

re 1

3- T

ime

depe

nden

t gra

phs f

or χ

2 , Bia

s, T

rans

mitt

ance

, Ret

arda

nce,

and

Offs

ets.

Page 84: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

81 NSO REU Annual Program Report 2013

Figu

re 1

4-Ti

me

depe

nden

t Sto

kes V

ecto

r and

Sto

kes M

odul

ator

Effi

cien

cies

Page 85: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

82 NSO REU Annual Program Report 2013

Figu

re 1

5- T

ime

depe

nden

t mod

ulat

ion

mat

rix.

Page 86: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

83 NSO REU Annual Program Report 2013

5. Current Problems

5.1 Faulty frames

Having had the opportunity to analyze six months of calibration sets, I discovered an unexpected problem in many sets. Figure 16, which is the same as figure 6, is the intensity graph of the two beams in a single frame in a normal calibration set. There is an anticipated discontinuity every twelve images due to the rotation of the calibration retarder, the arrows in the graph point to these discontinuities. This is a physical discontinuity and is part of the model which POLCAL uses to determine the calibration parameters. Unfortunately, not all calibration sets appear normal. I have discovered that approximately 1 in 3 calibration sets have additional, unan- ticipated discontinuities. These discontinuities are caused by a faulty frame in which the inten- sities of the two beams seem to flip for a single image and then return to normal. Figure 17 is an intensity graph from a calibration set with one of these images. The arrows again point to the expected discontinuities, but an additional dis- continuity occurs at image 30. I do not believe these discontinuities to be physical as it is un- likely an optical device could be the cause. This data error is not part of the calibration model and as such the calibration parameters POLCAL finds on a calibration set with a faulty frame vary widely from expected values. In addition, the χ2 value returned by POLCAL increases by a factor of 10 up to a factor of 100. These frames have no preferential location. They can appear in any image within the 36 calibration images (see figures 18 and 19). These faulty frames are also very frequent. Of 393 calibration sets I have analyzed, 132 sets had at least one faulty frame. 22 of the sets had between two and four faulty frames.

Figure 16- The intensity graph for a normal calibration set.

Figure 17- The intensity graph for a calibration set containing one faulty frame at image 30

Page 87: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

84 NSO REU Annual Program Report 2013

I have not yet been able to test if there is a time dependency on the frequency of the occurrence of faulty frames. We believe a possible cause to be misalignment in timing between the modulation states of the polarimeter and when the camera records an image. However, if this is the cause, we do not understand how the timing is realigned for later images. Until a cause can be found and possibly remedied, the only solution seems to be locating these faulty frames and removing them from the calibration set. Having removed the faulty frame from the calibration set and reanalyzing the data, POLCAL is able to correctly solve for the calibration parameters and again returns a χ2 value within the expected range (which is a value less than 20).

5.2 Wave pattern in Flat Field image 5.2.1 Flat Field Procedure

I had the opportunity this summer to assist in creating a flat field procedure for ProMag at the ESF. The ProMag cameras collect spectral data, the image consists of two beams with spectral lines (as seen in figure 7). In order to remove the spectral lines from the image to create a flat field, the cameras were moved slightly in location. The movement of the cameras unfocused the image, allowing the spectral lines to blur so that they were no longer detectable in our images. The two beams could not be blurred out in such a way. To create a consistent flat field, we changed the location

Figure 18- A histogram comparing image number to the number of times this image has been the faulty frame. Image numbers 1-5 consist of a combined clear image and 4 darks, which could not experience this problem.

Figure 19- An index of all calibration sets with a point marking where a faulty frame occurs. -1 represents no faulty frames.

Figure 20- The current flat field image for ProMag.

Page 88: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

85 NSO REU Annual Program Report 2013

of the coudé mirror. This consisted of taking 9 images at one location, shifting the coudé mirror, and repeating the process 7 times. The pictures were then compiled to form a flat field (figure 20). From our current flat field, we’ve determined that additional movement of the coudé mirror is necessary to fully cover the CCD field, which will bring the right hand side of the image up to the same intensity. 5.2.2 Application of Flat Field

The flat field picks up many features which are also seen in our data, including dust, smudges, and a wave pattern throughout the image. Figure 21 compares our data both before and after flat field processing. Features such as dust and smudges were easily removed. The flat field was not completely able to remove some dark, possibly dead, pixels. The greatest concern is the wave pattern, which was not removed. This pattern is very prominent near our spectral lines and we believe it may be the cause of the oscillations the Q, U and V parameters (figure 10). As the pattern is not removed with application of the flat field, an alternative method needs to be found.

6. Conclusion

In conclusion, there is still a good deal of work which needs to be finished before the ProMag calibration procedure is completed. A new flat field image, one which evenly spans the entire CCD, needs to be acquired and a method must be found to remove the wave pattern in the images. We hope to be able to find the cause of the faulty calibration frames and a prevention method so that we do not need to find and remove all the faulty images in order to use our calibration data. We also must find an effective method of calculating the mechanical offsets of the calibration polarimeter and retarder. Finally, we need to determine the cause of the “stair-step” pattern found in our modulation matrix, if the pattern is statistically significant for our data, and, if so, find a method which will remove it.

Figure 21- The left image in an unprocessed image, and the right is processed. Application of the flat field removes dust and smudges, but does not remove the wave pattern believed to be causing

oscillations in calibration parameters.

Page 89: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

86 NSO REU Annual Program Report 2013

Despite the current problems, great progress has been made in refining the calibration process. POLCAL is now a stable program, returning the same solution regardless of the initial guess input. Although I am not yet able to determine full Stokes vectors of the prominence maps I have collected, I still have assisted in forming a collection of data from which much can be learned when the calibration process has been completed. Until then, the spectral data recorded in the spectro-polarimetric maps can be used to learn more about prominences and other features able to be observed using ProMag.

7. Acknowledgements

I would like to thank Dr. J. Lewis Fox for advising and mentoring me throughout this summer. I would like to thank the entire Fox family for the support and friendship they offered. I would also like to acknowledge that this work was supported by the National Science Foundation (NSF) and the Association of Universities for Research in Astronomy (AURA). This work is carried out through the National Solar Observatory's Research Experiences for Undergraduate (REU) site program, which is co-funded by the Department of Defense in partnership with the National Science Foundation REU Program.

8. References

Casini, R., Lόpez Ariste, A., Tomcyzk, S., & Lites, B. W., 2003, ApJ, 598, L67. Casini, R., Tomcyzk, S., Elmore, D., Card, G., 2007 “Prominence and Coronal Magnetometry at the Evans Solar Facility”, http://www.csac.hao.ucar.edu/csac/downloads/ProMag_CSAC.pdf, (last accessed Aug 7, 2013). Elmore, D. F., et al., Casini, R., Card, G.L., et al. 2008, in Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series, Vol. 7014, Society of Photo-Optical Instrumentation Engineers (SPIE). Fox, J. L., Casini, R., In Preparation, “The Prominence Magnetometer, Version 2: A Design Update and Status Report”, National Solar Observatory/Sacramento Peak, NSO/ESF-2013-001. Paletou, F., Lόpez Ariste, A., Bommier, V., & Semel, M. 2001, A&A, 375, L39.

Page 90: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

87 NSO REU Annual Program Report 2013

Appendix

Observation manual for ProMag at the Evans Solar Facility Set up: Floor map of observation room included.

1. Turn on the ICC (Instrument control computer) and associated electronics by following the posted numbers 1-10.

a. Care should be taken when flipping the switch labeled 5 as it sometimes flips back to the off position

b. Step 8 involves plugging in two plugs located under the East Bench 2. Turn on the full ProMag surge protector. There are two surge protector located behind

the monitor for the “Wires” computer. One is full, the other isn’t. Turn on the full one. 3. Turn on Smoke, Mirrors, and Wires. The computers are stacked on top of each other

under the Wires monitor 4. Open the air valve to remove water from system 5. Go down the stairs to the dome 6. Turn on the telescope using the control box on the wall 7. Open the dome door pressing the right side of the second button on the remote control

above the control box 8. Remove the field mirror cover located in the bottom of the telescope 9. Move the dome using the east and west buttons on the control box and move the

telescope using the telescope hand box until it is aligned with the sun. Press the center button to set the telescope to track mode and switch dome mode to automatic. Return to observation room.

10. Log in to Smoke, Mirrors, and Wires 11. Close air valve (note: if water still seems to be moving through the tube, return to this

step later) 12. Press these settings on the ICC. Make sure it is done in this order. Lens Cap: Open, Fan:

On, Diffuser: In, Lens: Coronal, Apertures: Both 8, Diffuser: Out 13. Turn on second ProMag surge protector (same location, but now the partially filled one) 14. Using hand box near the Coronal Spectrometer: Set address to 5L: change the feed to

USG, address 4H: move O2 location and reset to 450. 15. Open up ProMag Control on Wires 16. While ProMag Control opens, return to hand box. Address 2H: move in the +X and +Y

direction to the clear aperture, center the sun as best as possible, address 1H: move coudé mirror to further center the sun. (note, sunlight will be seen on side of coronal spectrometer that is towards the old instruments)

17. Open up ProMag GUI on Wires when ProMag Control has finished set up. Change DARK to OUT (must be capitalized). Change slit and focus to 12.5 and Viscam to 13.

Page 91: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

88 NSO REU Annual Program Report 2013

18. Return to hand box. Address 2H: move to ProMag aperture (make sure to close the clear and coronal apertures), Address 4H: use ±X to find focus of all three colors on “stop light” filter holder, starting with green, record in log book for calibration purposes. When red focus is found use address 2H to center ProMag aperture.

19. Set Telescope mode using address 4, both H and L to one of the following: a. IR: O2- 1429, OD- 2047 b. D3: O2- 622, OD- focus of Yellow filter +30 c. Mixed: O2- 1024, OD- 1465

20. Address 5L: change feed to EB. Manually move East Bench Mirror. Remove window cap

21. Find image rotator angle using PROMAGSET by typing into IDL: PROMAGSET, 358.25,/PAG 22. On Wires: set image rotator angle (ImR) in GUI according to PROMAGSET 23. Check Slit, move slit in GUI until beam is centered, set Focus to the same value 24. In ProMag control enter: RUN, DEFVARS 25. On Mirrors: Open LLgrab, press grab, make sure image is “right”, press stop and quit.

(if image isn’t right, ask Lewis what to do). 26. Open Shortcut to ProMag, Nistime Interactive, and FLIR. Open the day’s folder in

Shortcut to ProMag 27. On Smoke: Open Shortcut to ProMag, Nistime Interactive, and Pluto. Open the day’s

folder. Synchronize Nistime on both computers. 28. On Gonzo: Type the following code

ESFICC AIW W/ W B111 E PMLOG calculate repetitions (# hours you’ll observe * 720) repetition # s to start Q to return to main menu

Set Up Complete

Page 92: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

89 NSO REU Annual Program Report 2013

Floor Plan of Observation Room in the ESF

Page 93: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

90 NSO REU Annual Program Report 2013

Data Collection:

1. Begin with disk calibration set at PAG=0° by entering RUN, CALNEW_V3.D into ProMag Control, Log in Log book

2. While calibration set is taken, go to halpha.nso.edu and download the latest image (preferably from Big Bear). Open PMGONG in IDL, select target, and determine PAH

3. Also in IDL enter PROMAGSET, PAH# (the number found with PMGONG) 4. Enter the ImR and Pol found by PROMAGSET into the GUI on wires (check accuracy to

0.01) 5. When calibration is finished, on Gonzo:

ESFICC SET CGR PAH PAH# CGR RV 0.95

6. Recenter slit if necessary, adjust focus to match 7. Take a limb calibration set by entering into ProMag Control: RUN, CALNEW_V3.L, Log 8. When calibration is complete:

On Mirrors: a. Close FLIR b. Open LLgrab, press grab

Enter CGR RV 1.1 on Gonzo, adjust as needed to see a small part of the limb c. Change apertures both to 16 (on ICC) d. Using slit move (on wires) find edges of prominence in terms of slit location e. Press stop and quit f. Reopen FLIR, resynchronize Nistime if needed

9. Calculate steps by dividing range of slit location by 0.09 10. On Wires, in ProMag control: DEFINE, NPOS, STEPS 11. Double check slit and focus are the same (set focus equal to slit if it isn’t the same) 12. Take Prominence map- ProMag Control: RUN, OBSERVE.F or OBSERVE.B depending on

which edge of the prominence you begin, Log 13. When the prominence map is complete, change apertures back to 8, enter CGR RV 0.95 on

Gonzo and enter RUN, CALNEW_V3.L on ProMag control to get another calibration set, Log

14. Repeat for each target as long as you have daylight 15. At the end of the day, take another disk calibration at PAG=0°

Observation Complete

Page 94: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

91 NSO REU Annual Program Report 2013

Shut Down On Smoke:

1. Close Nistime, Shortcut, and Pluto 2. Open WinSCP 3. Log in to ProMag group 4. Find today’s date, click on it, and click F5 copy (not f5, but the F5 copy button in the

window) On Mirrors

5. Repeat (closing FLIR instead of Pluto) On Wires

6. Close GUI 7. Enter EXIT into ProMag Control 8. Change ICC settings: Cap: Closed, Diffuser: In.

Wait till these are lit before continuing Fan: Off, Lens: Disk, Apertures: 8

9. Return to dome. 10. Switch dome control to manual, unlock telescope by pressing an E/W button and a N/S

button on the telescope hand box. 11. Dock telescope in “Noon” position 12. Return dome to morning location (left hand side of first button) 13. While dome rotates, replace the field mirror cover. 14. Stop dome when it reaches starting position. Close dome doors (left side, second button) 15. Power off telescope, return to observation room

On Gonzo 16. Exit till you reach ESFICC

AIW E PMLOG E (to end, never ever ever abort!)

17. Exit till ESF CD /HOME/LESF/LOG GETLOG MELT *.F

18. Turn off ICC by shutting things off in the reverse number order from set-up. (note, replace the window cap between steps 7 and 6, otherwise you might forget it)

19. Shut down wires and turn off partially filled surge protector. 20. When WinSCP is finished, shut down Smoke and Mirrors, turn off full surge protector 21. Turn off lights and make sure doors are locked before leaving

Shut Down Complete

Page 95: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

92 NSO REU Annual Program Report 2013

National Science Foundation

Research Experience for Undergraduates Summer 2013 Report

A Comparison Between Photospheric Magnetic and Current Helicities and Subsurface Kinetic Helicity during 2007-2012

Darryl Seligman (University of Pennsylvania)

Advisors: Dr. Gordon Petrie & Dr. Rudi Komm

National Solar Observatory, Tucson, AZ

Abstract

We used 1436 Hinode photospheric vector magnetograms covering 128 Active Regions from 2006-2012 and subsurface fluid velocity data from GONG Dopplergrams for the same regions to calculate photospheric current helicity Hc, photospheric twist parameter alpha (a proxy for the full relative magnetic helicity) and subsurface kinetic helicity Kh for each region. We found a hemispheric bias in all three parameters. The Kh parameter was positive/negative in the northern/southern hemisphere. The Hc and α parameters had the same bias. We looked at the temporal variability of each parameter for each active region and found that of 55 regions identified as growing/decaying independently in each three parameters, 34 demonstrated same bias (62%). The results of both analyses are consistent with Longcope et al.'s Sigma effect. Introduction

A Solar Active Region is an area in the photosphere characterized by an intense magnetic field. This field inhibits convection mechanisms that lead to a decrease in the average temperature and luminosity of the region, which can lead to the appearance of dark spots on the Sun. The most exciting and dangerous solar phenomena, flares and coronal mass ejections, come from twisted "active region" fields in the magnetically dominated atmosphere. These fields are created by dynamo processes in the fluid-dominated interior. The aim of this project was to investigate the nature of the dynamo process by comparing subsurface kinetic helicities and surface magnetic helicities of active-region fields.

From a two dimensional image of the magnetic field vector of the photosphere

𝐵���⃑ = (𝐵𝑥����⃑ ,𝐵𝑦����⃑ ,𝐵𝑧)������⃑ (1)

the perpendicular current density can be calculated

𝐽𝑧(𝑥,𝑦, 𝑧 = 0) = ∇ × B|𝑧=0 = �𝜕𝐵𝑦𝜕𝑥

− 𝜕𝐵𝑥𝜕𝑦

� |𝑧=0 (2)

Page 96: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

93 NSO REU Annual Program Report 2013

Three parameters that have been studied in correlation with these emerging regions are the Kinetic Helicity, Current Helicity and Free Force Alpha

𝐻𝑘 = 𝑉 ∘ (∇ × 𝑉) (3)

𝐻𝐶𝑧 = (𝐵𝑧 ∘ 𝐽𝑧) (4)

α = 𝐽𝑧𝐵𝑧

= ∇ × B|𝑧=0𝐵𝑧

(5)

where V is the fluid velocity vector. The alpha parameter has been used by many authors (Seehafer 1990, Pevtsov et al.1994,1995, Gosain et al. 2013) as a proxy for the magnetic helicity, which is difficult to calculate in practice, and this is how alpha was used in this project.

The differential rotation inside the sun creates a shear flow at active latitudes which stretches the field out and winds it around the rotation axis, creating very strong toroidal fields at active latitudes. This dynamo process is known as the omega effect. These strong toroidal fields then rise buoyantly and become subject to Coriolis forces of opposite handedness in each hemisphere. The fields may therefore twist in a process known as the alpha effect, in which case a hemispheric bias in the magnetic and current helicity would be expected.

The sigma effect (Longcope 1988) uses the conservation of local magnetic helicity

ℋ = Φ2

2𝜋(𝑇𝑤 + 𝑊𝑟) (6)

to demonstrate that a change in the direction of the flux tubes axis will result in a change in the angular position vector of the magnetic field lines in the opposite way.

𝜕𝑇𝑤𝜕𝑡

= ∮ ��̂� ∙ 𝜕𝑢��⃗𝜕𝑙 � 𝑞 + 𝜕𝑞𝜕𝑡𝑑ℓ = ∮Σ(ℓ, 𝑡)𝑑ℓ = −𝜕𝑊𝑟

𝜕𝑡 (7)

An observational prediction of this model is that the kinetic helicity will have the same sign as the alpha and current helicity. Since the proposal of these theories, much observational data of this hemispheric bias has been analyzed. The first person to compute the magnetic helicity parameters was Seehafer in 1990. From magnetograms of 16 active regions, he estimated the alpha and Hc for each of these regions and discovered a hemispheric bias, that the current helicity was predominantly negative/positive in the northern/southern hemisphere (Seehafer 1990). In 1994-1995 Pevtsov et al. did the first large-scale study demonstrating the observed Seehafer bias (Pevtsov et al.1994,1995). In 17200 magnetograms from 1997-2004, Zhang found the same bias in the weak fields as Seehafer but an opposite bias in the strong fields (Zhang 2006). Using SOLIS/VSM vector synoptic maps covering the period March 2011 - December 2012, Gosain et al. (2013) found the opposite result as Zhang. They found that the strong fields exhibited the same bias and the weak fields exhibited an opposite bias. Komm found that in general, active regions followed the sigma effect bias, but in regions that appeared to have a "whirly" magnetic structure indicating magnetic helicity, exhibited the opposite bias (Komm 2012).

Page 97: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

94 NSO REU Annual Program Report 2013

Past authors have found hemispheric biases in the helicity parameters. Our newcontribution is to compare subsurface kinetic vs. surface magnetic helicities to characterize the relationship between them.

Data

In this project we analyzed 1436 Hinode based magnetograms encompassing 128 Active Regions from 2006 to 2012. We also used fluid vorticity data for the same active regions using GONG Doppler data.

Analysis and Results

Using the observed horizontal magnetic field components Bx and By and Equation (2), we computed the current helicity and alpha for each pixel. We computed these values for both weak and strong Bz pixels (weak = 100G-500G, strong = 1000G+). Using the GONG data set we compiled a matching data set of the kinetic helicity for each active region.

As Figure 1 shows, there were hemispheric biases in both data sets. In both the kinetic helicity data and the magnetic helicity data there was a clear negative bias across both hemispheres.

Figure 1. Mean kinetic helicity, current helicity and alpha for weak and strong fields in 128 active regions as a function of latitude. The straight lines indicate the linear regression fit for the data set with two sigma error bars.

Page 98: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

95 NSO REU Annual Program Report 2013

As shown in figure 2, there is a negative slope (except for 2007) in the best linear fit to the alpha and current helicity for the strong-field pixels and a negative slope for the kinetic helicity data, but no significant pattern in the weak fields. We also performed an analysis of the temporal variability of each of these parameters in each active region. For each region we determined if each parameter was growing or decaying independently. After computing a linear fit for each parameter, we compared the coefficients of the regression plot and the median of each parameter. If the median and coefficient were the same sign, that meant that the region was growing in that parameter and similarly, if the median and coefficient were opposite sign, it meant that the region was diminishing in that parameter. Of 55 regions identified as growing/decaying independently in each three parameters, 34 demonstrated same bias (i.e., the three parameters were positively correlated in 62% of cases). Of the 16 decaying regions, 7 of had same sign of the median for all three parameters (44%). Of the 39 growing regions, 27 had same sign (70%). The positive correlation between the magnetic/current helicity and the kinetic helicity is consistent with the sigma effect.

Figure 2. Coefficients for linear regression fit for kinetic helicity, current helicity and alpha for weak and strong fields in 128 active regions for each year from 2007-2012 with two sigma error bars.

Page 99: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

96 NSO REU Annual Program Report 2013

Figure 3. Current helicity, alpha, kinetic helicity, and signed/unsigned flux, curl, and mean Bz verses time (in hours since start date) in AR42.

Figure 4. Current helicity, alpha, kinetic helicity, and signed/unsigned flux curl and mean Bz verses time (in hours since start date) in AR126.

Page 100: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

97 NSO REU Annual Program Report 2013

Discussion

Our calculations of alpha and Hc for strong magnetic fields follow the well-known hemispheric rule of positive/negative felicities in the southern/northern hemispheres. We conducted the same analysis as Zhang and Gosain for the weak and strong fields. Like both studies we found a bias in the strong field, similar to Gosain and opposite that of Zhang. However, our data demonstrates no bias for the weak fields. The reasons behind such a disagreement are unknown and require more attention.

We have a preliminary analysis of the temporal variability of the three parameters and we will follow up with a more in depth correlation analysis between each parameter. Also Komm et al.’s result regarding the whirling regions appearing to support the alpha effect deserves more attention, and we will examine the regions to see if we see this effect also.

Conclusion

We measured Hc, Hk and alpha for 128 active regions and our results generally supports the sigma effect in both the overall bias and the temporal variability of the parameters. We plan to do a more detailed analysis of the correlations between Hk and Hc and alpha and to look at the supernumbral whirling regions and investigate more the strong/weak correlations. References

Parker, Eugene N. "Hydromagnetic Dynamo Models." The Astrophysical Journal 122 (1955): 293. Print. Moffatt, H. K. Magnetic Field Generation in Electrically Conducting Fluids. Cambridge [Eng.: Cambridge UP, 1978. Print. Longcope, D. W., G. H. Fisher, and A. A. Pevtsov. "Flux-Tube Twist Resulting from Helical Turbulence: The Σ-Effect." The Astrophysical Journal 507.1 (1998): 417-32. Print. Zhang H., Sakurai T., Pevtsov A., Gao Yu, Xu Haiqing, Sokoloff D.D., Kuzanyan K. "New Dynamo Pattern Revealed by Solar Helical Magnetic Fields," Monthly Notices of the Royal Astronomical Society: Letters, Volume 402, Issue 1, Pp. L30-L33, 2010. Solar Astronomy Handbook by Beck, Hilbrecht, Reinsch and Volker. N.p., n.d. Web. 07 Aug. 2013. "Helicity and the Calugareanu Invariant." Helicity and the Calugareanu Invariant. N.p., n.d. Web. 09 Aug. 2013. Pevtsov, Alexei A., Richard C. Canfield, and Thomas R. Metcalf. "Latitudinal Variation of Helicity of Photospheric Magnetic Fields." The Astrophysical Journal 440 (1995): L109. Print. "Helicity Observation Of Weak And Strong Fields." Helicity Observation Of Weak And Strong Fields. N.p., n.d. Web. 09 Aug. 2013.

Page 101: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

98 NSO REU Annual Program Report 2013

Gosain, Sanjay. "ArXiv.org Astro-ph ArXiv:1305.3294." [1305.3294] First Synoptic Maps of Photospheric Vector Magnetic Field from SOLIS/VSM: Non-Radial Magnetic Fields and Hemispheric Pattern of Helicity. N.p., n.d. Web. 09 Aug. 2013. Komm, R., S. Gosain, and A. Pevtsov. "Active Regions with Superpenumbral Whirls and Their Subsurface Kinetic Helicity." (n.d.): n. pag. Print. Seehafer, N. "Electric Current Helicity in the Solar Atmosphere." Solar Physics 125.2 (1990): 219-32. Print.

Page 102: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

99 NSO REU Annual Program Report 2013

National Science Foundation

Research Experience for Undergraduates Summer 2013 Report

A Search for Flare Related Systematic Changes in Stokes V

Asymmetries in NOAA 11429

Tyler Sinotte (University of Wisconsin-Madison)

National Solar Observatory, Tucson Advisor: Dr. Brian Harker

ABSTRACT

While Stokes V profiles in a static local thermodynamic equilibrium (LTE) atmosphere are perfectly anti-symmetric about the zero-crossing wavelength, this is rarely the case in observed solar Stokes V profiles. Not only do these profiles show asymmetries, but many also have complex profiles including profiles with three or more lobes, profiles with multiple peaks per lobe, and profiles with only a single lobe. These asymmetries can be measured through both the area under the profile as well as the amplitude of their peaks. Because the asymmetries are affected by the magnetic field present in the sun, they are most often seen in active regions within the Sun and can provide information about the gradients of the magnetic field and plasmas velocity along the observer’s line of sight. Due to the capability to provide information about the magnetic field gradient, we searched for systematic changes within the flaring region of NOAA 11429 from 17:03 UT to 18:06 UT on March 13th, 2012.

1. INTRODUCTION

The Stokes polarization state parameters are an important tool in gaining insight about the magnetic field and plasma velocity of the sun. There are four parameters, Stokes I, Q, U, and V, which measure the polarization state of electromagnetic radiation in terms of its intensity. The first parameter, Stokes I, is the total intensity of the incoming radiation. Stokes Q, U, and V provide information about the polarization of the electromagnetic radiation. Stokes Q and U are the differences in linear polarization in orthogonal directions. Stokes V is the difference between the intensity of the right-handed and left-handed circularly polarized components of the incoming radiation (del Toro Iniesta 2003).

Stokes V profiles can give information about both magnetic field gradients and plasma velocity along the observer’s line-of-sight (Bellot Rubio et al 2012). In a static Local Thermodynamic Equilibrium (LTE) atmosphere, the Stokes V profile is required to be anti-symmetric about the zero-crossing wavelength, λzc (Auer & Heasley 1978). However, almost all observed Stokes V profiles have a readily measurable asymmetry between the red and blue lobes. Figure 1 shows a typical asymmetric Stokes V profile, with the parameters

often used to define the profile annotated within the figure. As can be seen from this figure, the blue lobe is defined as the lobe to the left of the zero-crossing wavelength (shorter wavelength), while the red lobe is to the right of the zero-crossing wavelength (longer wavelength). These asymmetries in the V profiles are a normalized difference in the blue and red lobes measured in terms of either the area under the lobe or the amplitude of the lobe as given by

𝛿 = |𝑋𝑏|−|𝑋𝑟||𝑋𝑏|+|𝑋𝑟| , (1)

where X represents either amplitude or area, and the subscripts b and r denote the blue and red lobes, respectively (Grossmann-Doerth et al. 1996). From Eq.(1) it can be noted that asymmetry values must be in [-1,1], with a value of -1 corresponding to a single-lobed red-only profile and a value of +1 corresponding to a single-lobed blue-only profile. A value of zero corresponds to either a perfectly anti-symmetric profile or a region of little magnetic activity.

The surface of the Sun can be separated into two basic categories: the active regions and the quiet Sun. As the name implies, the active region is a region in the Sun in which activities associated

Page 103: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

100 NSO REU Annual Program Report 2013

with the presence of a magnetic field, such as sunspots, are displayed. These sunspots can be

Figure 6: Typical asymmetric Stokes V profile observed in an active region. Inserted are the parameters needed to calculate the asymmetry: the red and blue areas (Ar and Ab) and amplitudes (ar and ab), as well as the zero-crossing wavelength λzc.

further separated into the umbra and penumbra. The umbra is the darkest region of the sunspot, where the magnetic field is strongest and primarily perpendicular to the solar surface. The penumbra is the brighter region surrounding the umbra, in which the magnetic field is weaker and often oriented with higher inclination relative to vertical. Flares are typically seen in regions of highly-structured, complex magnetic field geometry (as in sunspot penumbrae). Also Stokes V profiles are magnetic phenomena, therefore we focus our attention on the analysis of strong Stokes V profiles originating in these high magnetic field strength regions.

2. DATA AND OBSERVATIONS

The data used in this study was obtained from daily observations made by the Synoptic Optical Long-Term Investigations of the Sun (SOLIS) Vector Spectromagnetograph (VSM) at Kitt Peak in Tucson, AZ. SOLIS/VSM is a scanning slit spectro-polarimeter capable of scanning 2048 declination positions in steps of 1”. It also has a pixel size of 1” parallel to the slit, giving a full field of view of 2048” x 2048”. One arc second is approximately equivalent to 725 km on the surface of the sun. SOLIS makes both full-disc and area scans of the Sun on a daily basis with the goal of monitoring solar activity over long time-scales. The full-disc observation scans the entire field of view and takes approximately 20 minutes, while an area observation scans between 200 and 300 declination positions in 2-3 minutes.

SOLIS/VSM records the light polarization in terms of the Stokes I, Q, U, and V for each pixel.

Each individual pixel contains a spectral sampling of 128 bins in a 3 Å bandpass, which encompasses the FeI λ6301.5 and FeI λ6302.5 lines and two telluric O2 absorption features. The data used was a full-disc scan taken at 15:31 UT on May 15th, 2013 and a times series of 19 area scans taken between 17:03 and 18:06 UT on March 13th, 2012. All data used was preprocessed to model and remove modulator fringes present in the Stokes V profiles, the details of which are outside the scope of this project.

3. ASYMMETRY OF STOKES V PROFILES

The spectral data recorded by SOLIS/VSM is provided in 128 wavelength bins; however to make the profiles more readable and to provide a more accurate representation for the magnitudes of the areas, it is desired to change from bins to the actual wavelengths. This can be accomplished through the use of the two telluric O2 absorption features present within the spectrum. Because these telluric O2 lines are terrestrial absorption features, originating within the Earth’s atmosphere, they do not shift position due to solar rotation or activity. This means that these lines have stable positions within the spectrum which can be used for wavelength calibration. From these two absorption features, illustrated in Fig. 2, the spacing between wavelength bins is calculated using the fact that the separation between the two features, Δλt, is 0.760 mÅ. The wavelength of the first telluric absorption feature, λt1, is known to occur at 6302.0005 Å, and when combined with the individual bin spacing, the wavelength corresponding to each bin center can be determined.

Figure 7: Typical Stokes I profile in the quiet Sun. Annotated on the graph are the locations of the two telluric O2 absorption features, λt1 and λt2

𝜆𝑡1 𝜆𝑡2

Page 104: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

101 NSO REU Annual Program Report 2013

3.1 Active Region Separation

We developed a procedure for the routine calculation of the area and amplitude asymmetries for both full-disc and area scans of the Sun. In order to accurately identify magnetically active regions and minimize procedure run time, it is necessary to separate the pixels with strong Stokes V profiles from the noise-dominated Stokes V profiles found in the quiet Sun. Because SOLIS/VSM scans a rectangular area, the first step was distinguishing the pixels on the solar disk from those of the sky. This was accomplished by looking at an individual latitudinal scanline and finding the inflection point where the intensity was greater than 5000 counts on both the west and east sides of the scanline. The next step was distinguishing the pixels in magnetically active regions from those in the quiet Sun. Because the SOLIS/VSM data consists of a spectral sampling of 128 wavelength bins centered around 6302 Å, the spectrum contains bins dominated by both noise and the Stokes V profile. As depicted by the weaker asymmetric profile shown in Fig. 3, there is a set of bins on the left of the FeI λ6301.5 line and on the right of the FeI λ6302.5 line that are the unpolarized continuum, where the counts are due entirely to noise. The regions used in considering the noise were bins 10-29 (λ≈6300.78-6301.24 Å) for the FeI λ6301.5 line and bins 100-119 (λ≈6302.92-6303.38 Å) for the FeI λ6302.5 line. A Stokes V profile was considered to be distinguishable if either its maximum or minimum count was at least eight times the standard deviation in the continuum noise level and was tested separately for each of the FeI lines.

Figure 8: A normal weak asymmetric profile found near the edge of a penumbra of a sunspot. This spectrum was taken in an area scan at 17:03 UT on March 13th 2012. This image illustrates the wavelengths over which the noise is dominant while still containing a discernible Stokes V profile.

3.2 Fitting the Stokes V Profiles

For each of the two FeI lines in Stokes V, we searched for both the location and the value of the maximum and minimum number of counts in the profile, corresponding to the red and blue lobes respectively. Once the pixels with discernible Stokes V profiles were found, they were sorted into one of three categories in order to provide better fitting and asymmetry calculations: single-lobed profiles, normal profiles, and unusual profiles. Single-lobed profiles were those in which one lobe satisfied the criteria of the amplitude being at least eight times the standard deviation and the other lobe was less than three times the standard deviation in the noise level. Normal profiles were the Stokes V profiles that had one red lobe and one blue lobe for a given FeI line. The unusual profiles were the Stokes V profiles that either had three or more discernible lobes, one main lobe and at least two others greater than three times the standard deviation in the noise level, or a lobe that had multiple peaks.

The process for fitting curves to all three categories of Stokes V profiles was similar. We estimated the profile shape to be a linear combination of Gaussian functions described by

𝑉(𝜆) = ∑ 𝐴3𝑖4𝑖=0 𝑒

−�𝜆−𝐴3𝑖+1�2

𝐴3𝑖+2 , (2)

where the A3i, A3i+1, A3i+2 are the amplitude, center, and the standard deviation of the ith Gaussian component, and λ is the wavelength of the bins. For all three classifications of profiles, a single function was used for fitting the Stokes V values, which was a linear combination of up to five Gaussian functions as described by Eq.(2).

The fitting of all three types of profiles was accomplished using the Levenberg-Marquardt technique to solve the non-linear least-squares problem. Markwardt (2008) implemented this technique into the MPFIT IDL package, in which initial guesses for the parameters of Eq.(2) are supplied, and the function returns the parameters which best fit the data through minimization of the Chi-Square value. In order to optimize running time, weighting is applied to the data near the two FeI lines to avoid attempts to fit the continuum noise. In addition, the curve was fitted using a wavelength mesh five times more dense than that used in recording the data to provide a smoother fit for the data.

For the case of normal Stokes V profiles, only the first four of these Gaussian functions are used

Page 105: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

102 NSO REU Annual Program Report 2013

for fitting, while the fifth function is forced to zero. The initial parameter guesses are determined through examination of the location and amplitude of the bins with the maximum and minimum counts. The main fitting of the profile is done using these amplitudes for the first two amplitude parameters, and the wavelengths corresponding to these bin locations as the first two center parameters. The initial guesses for the exponential denominators are estimated using an approximation for the full widths at half-maximum of the red and blue lobes. For a standard Gaussian distribution the denominator in the exponential is proportional to the square of the standard deviation, and the full width at half maximum is related to the standard deviation by

𝛤 = 2.355𝜎, (3)

where Γ is the full width at half maximum and σ is the standard deviation (Bevington & Robinson 2003). The estimate for Γ is calculated by locating the two points closest to half of the value of the peak and linearly interpolating to find the wavelength correlating to half maximum. The estimate for Γ is then the distance between the wavelengths on both sides of the peak. The initial guess for these parameters is then calculated as

𝐴3𝑖+2 = 2 � 𝛤2.355

�2. (4)

Performing this calculation both minimizes the number of iterations necessary for the non-linear least-squares fitting and provides a more accurate fit for both the narrow and broad peaks.

The third and fourth Gaussian functions are used to fit the broad tails of the Stokes V profiles. The amplitudes of these Gaussian functions are chosen to be one-tenth of the peak amplitudes. The peak locations are offset by 0.025Å from the peak locations of the Stokes V bins in order to provide a distinction from the guesses for the center parameters used in the main fitting. The exponential denominators are estimated to be four times the guesses calculated from Eq.(4) to compensate for the broadening seen in the tails of the profiles. This fitting procedure is performed separately for each FeI line, to account for pixels in which a Gaussian component might be present for one line but not the other. The fit provided to the normal profile shown in Fig. 3 is illustrated in Fig. 4, where the fit for the FeI λ6301.5 line is shown with the green dashed line, the fit for the FeI λ6302.5 line is shown with the red solid line, and the SOLIS/VSM data is

shown with the diamonds.

Figure 9: The fit of the Stokes V profile shown in Fig. 3. The data gathered from a SOLIS/VSM area scan is shown as diamonds, the fit to the FeI λ6301.5 line is shown with the green dashed line, and the fit to the FeI λ6302.5 line is shown with the red solid line.

The fitting for the single-lobed profiles is accomplished in a similar fashion to that of the normal Stokes V profiles, except that only two Gaussian functions are used and the last three functions are forced to zero. The first Gaussian function is used for the main fitting of the peak, and the second is used for fitting the broad tail.

In the case of the unusual profiles, distinct features were present within the profile, requiring more than two main Gaussian functions to accurately represent the data. Since more than two extrema are present within these profiles, several criteria are implemented to separate the extrema needed for fitting. The first criterion is that any extrema that is less than three times the standard deviation of the noise level is ignored. The second criterion is that if an extrema is directly located next to two other extrema it is ignored when applying the fit. This criterion is implemented to avoid the complication of attempting to fit a valley between two adjacent peaks in certain profiles. After determining the extrema to be used for fitting, the fitting of the unusual Stokes V profile is accomplished in a similar fashion to that of the normal profile. The first two parameters of a given Gaussian function are initially set to the amplitude and wavelength location of the chosen extrema. Since it may not be possible to calculate Γ for all the extrema present in the unusual profiles, a constant guess of 3.5 x 10-3 Å2 was made for the parameter in the denominator of the exponential. Through trial and error, it was found that 3.5 x 10-3 Å2 was the value that provides the best fitting of both the narrow and broad peaks present within the profile. Figure 5 illustrates the fitting of an unusual profile present in the 17:48 UT area scan on March

Page 106: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

103 NSO REU Annual Program Report 2013

13th, 2012. As with the fit for the normal profile, the green dashed line is the fit to the FeI λ6301.5 line, the red solid line is the fit to the FeI λ6302.5 line, and the diamonds are the data recorded by SOLIS/VSM.

Figure 10: The fit for an unusual Stokes V profile. The data gathered from the SOLIS/VSM area scan on March 13th, 2012 at 17:48 UT is shown as diamonds, the fit to the FeI λ6301.5 line is shown with the green dashed line, and the fit to the FeI λ6302.5 line is shown with the red solid line.

3.3 Amplitude Asymmetry

The amplitude asymmetry is calculated according to Eq.(1) with X representing the amplitude. Because the SOLIS/VSM data was fit using a five times denser wavelength mesh, the amplitudes of the Stokes V profile are determined from the fitted data. The asymmetry is then calculated from these amplitudes.

3.4 Area Asymmetry

As with the amplitude asymmetry, the area asymmetry is calculated according to Eq.(1), with X now representing the area under the Stokes V profile. For all the profiles, the area is approximated using a trapezoidal sum of the fitted data. For the normal Stokes V profiles, three different bounds are needed to fully calculate the area asymmetry. The lower and upper bounds are determined to be the wavelength in the spectrum at which the Stokes V value is one thousandth of the value of the nearest peak. The middle bound is the zero-crossing wavelength, λzc. λzc is determined by finding the wavelengths at which the fitted Stokes V value reverses sign between the two peaks and linearly interpolating to get the exact zero-crossing wavelength. The calculated areas are separated into red and blue areas according to their location with respect to the zero-crossing wavelength.

The process used to calculate the areas of single-lobed profiles was very similar to that of the

normal profiles, however, only the calculation of the upper and lower bounds is necessary. The area is defined as red or blue according to the location of the peak, resulting in an asymmetry value of -1 for red-only profiles and 1 for blue-only profiles.

The process for calculating the area for the unusual profiles with more than two peaks was more complex due to the fact that there could be multiple zero crossing wavelengths or multiple peaks within a lobe. Similar to the other two asymmetries, the outer bounds are determined to be the wavelengths at which the Stokes V value falls below one thousandth of the maximum or minimum value. The intermediary bounds for calculating the areas are again the zero-crossing wavelengths determined by the location of the sign reversal, however since there may be more than two peaks within the profile, the code searches for a sign reversal between each pair of peaks. Since there may be multiple lobes of the same sign, areas between each of the bounds are calculated separately and then summed according to the location of their peaks. The area asymmetry is then calculated according to Eq.(1).

4. RESULTS AND DISCUSSION

The methods used for calculating the area and amplitude asymmetries were written into one procedure capable of handling full-disc observations, area scans, or a time-series of area scans. This fitting procedure was validated in a blind test using synthetic spectra generated from known model atmospheres, with known degrees of asymmetry artificially introduced in the Stokes V profiles.

4.1 Full-Disc Observations

Figure 6 depicts the full-disc image of the average continuum intensity in Stokes I taken at 15:31 UT on May 15th, 2013. As can be seen, there are multiple sunspots visible on the nearside of the Sun. Figure 7 shows spatial maps of the calculated area and amplitude asymmetries for the same full-disc observation for both the FeI λ6301.5 and λ6302.5 lines. In comparing these spatial maps with the continuum intensity, it can be noted that the active regions within the Sun, in particular those with sunspots, are where the majority of the asymmetries are present. In addition, the area asymmetry spatial maps highlight the regions

Page 107: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

104 NSO REU Annual Program Report 2013

Figure 11: Full-disc continuum intensity image of the Sun from May 15th, 2013. The dark spots illustrate the sunspots present in the Sun.

around the larger sunspots where the polarity inversion lines are present, as indicated by the white and black stripes in the regions from pixels 850-950, scanlines 1380-1430 and pixels 600-700, scanlines 700-750. Although both the area and amplitude asymmetries show the same active regions, the amplitude asymmetries better accentuate the extended structure surrounding these active regions because the amplitude is a more straightforward estimate for the asymmetry than the area. This is because the area asymmetry can possibly suffer from degeneracy while the amplitude asymmetry does not. An example of this degeneracy would be a Stokes V profile with a narrow and tall blue lobe and a short and broad red lobe. Such a profile could possibly have the same red and blue lobe areas with an area asymmetry of zero, but it would obviously be very asymmetric.

(a) δA1 (b) δa1

(c) δA2 (d) δa2 Figure 12: Full disk spatial maps of the Stokes V area and amplitude asymmetries. The polarity inversion lines are highlighted by the white and black stripes observed in the area asymmetries, Fig. (a) & (c), while the amplitude asymmetries, Fig. (b) & (d), better accentuate the extended structures surrounding these active regions.

Page 108: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

105 NSO REU Annual Program Report 2013

4.2 Flare-Related Area Scans

SOLIS/VSM was able to capture the ramping up and peak of a M7.9 solar flare on March 13th, 2012. A total of 19 area scans (250” x 2048”) between 17:03 UT and 18:06 UT were used to give a time evolution of the flaring region. Figure 8 shows the continuum intensity of this 250” x 2048” area scan at 17:03 UT and highlights the region within NOAA 11429 where the solar flare occurred.

Figure 13: Continuum intensity image of the solar disc captured by the area scans on March 13th, 2013. The boxed area shown above indicates the region where the flare occurred.

This region is shown in more detail in Fig. 9, which presents an X-Ray flux plot, generated from data measured by the GOES-15 satellite, with the arrows indicating the time for SOLIS/VSM observations. The first vertical dashed line indicates the time at which the flare began and the second vertical dashed line indicates the time at which the flare peaked.

Figure 14: X-Ray Flux measured during the M7.9 Flare on March 13th, 2012. The X-Ray flux was measured using the GOES-15 Satellite. Each arrow represents a SOLIS/VSM observation during the time period with 19 of the first 20 arrows representing the area scans used in the analysis (17:21 was omitted).

For all 19 area scans, the area and amplitude asymmetries were calculated in all the pixels distinguished by the criteria from Section 3.1. However, since these area scans were taken over a time range of a little more than an hour, there was

some significant solar rotation observed. From the first scan at 17:03 UT to the last scan at 18:06 UT the flaring sunspot moved west about 10’’ and north about 25”. Because we are interested in observing systematic changes within the flaring region over time, the pixel positions in each frame need to be co-aligned. This alignment was done in a two step procedure. The first step accounted for the movement of the sunspot from solar rotation, through the continuum intensity of the area scan taken at each time. By using the intensity, all pixels within the area scan were shifted to align the flaring sunspot in the same pixels across the entire time series. Fine-tuning adjustments were then made to each scan individually to correct the jaggedness observed between declination positions. This jaggedness between declination positions is present due to the time-dependent behavior of atmospheric disturbances during the observation window.

Once the area scans were co-aligned, changes in the asymmetries over time were calculated. Figure 10 shows a 20 x 14 pixel mosaic (scanlines 90-109 and pixels 1932-1945) of the time dependencies in the area and amplitude asymmetries for the FeI λ6301.5 and λ6302.5 lines. Each box within the mosaic represents one pixel, where the background is filled according to the continuum intensity of that pixel. The x-axis for each pixel is the time in minutes since 17:00 UT, ranging from 0 to 80, and the y-axis is the value of the asymmetry for the pixel, ranging from -1 to 1. Dynamic, time-dependent asymmetries are present within columns 8-11 (pixels 1939-1942); however these are a result of the complex, but low-signal Stokes V profiles found in and around the polarity inversion line. The orange highlighted region in Fig. 10 is the 10 x 6 pixel region (scanlines 94-103 and pixels 1932-1937) in which the flare occurred. Figures 11-12 provide zoomed in images of this flaring region for the asymmetries in both the FeI λ6301.5 and λ6302.5 respectively, allowing for closer observation of possible changes. Each box again represents one pixel with the background filled according to the continuum intensity. The x-axis for each pixel is again the time in minutes since 17:00 UT, ranging from 0 to 80, and the y-axis is the value of the asymmetry for the pixel, ranging from -0.5 to 0.5. As can be seen from this image, there are slight changes in both the area and amplitude asymmetries over time, however, there are no observable systematic changes that indicate

Page 109: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

106 NSO REU Annual Program Report 2013

Figure 15: Time dependencies of the area (left) and amplitude (right) asymmetries for the FeI λ6301.5 (top) and λ6302.5 (bottom). The orange box highlights the 10” x 6” area in which the flare occurred. Each box represents an individual pixel, where the x-axis is the time in minutes since 17:00 UT, ranging from 0 to 80, and the y-axis is the value of the asymmetry, ranging from -1 to 1.

Page 110: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

107 NSO REU Annual Program Report 2013

Figure 16: Zoomed in time-dependent mosaic of the flaring region for the FeI λ6301.5 line. On the left is the mosaic of the area asymmetry over time, while on the right is the mosaic of the amplitude asymmetry. The x-axis is again the time in minutes since 17:00 UT, ranging from 0 to 80, and the y-axis is the value of the asymmetry, ranging from -0.5 to 0.5. As can be seen from these images, there are no clear signs that would indicate a flare occurring within this region.

the presence or effects of a flare. This means that any signs of a chromospheric flare occurring within the photosphere are not strong enough to be evident within the photospheric Stokes V asymmetries.

4.3 FeI λ6301.5 and λ6302.5 Correlations

The FeI λ6301.5 and λ6302.5 lines form at different depths within the photosphere of the Sun. It was previously found by Aime et al (2010) that the difference in these line core formation depths is approximately 69 km. Because the two FeI lines sample slightly different atmospheric layers, it is desired to know the effect that this will have on the relation between the asymmetries in the FeI λ6301.5 and λ6302.5 lines. If both the magnetic sensitivity of these lines and the magnetic field at the

formation depths were the same, the asymmetries in the FeI λ6301.5 and λ6302.5 lines should have a linear relationship with a Pearson correlation coefficient of R=1. Figures 13-14 show that this is however not the case. In both of these images, the green data points are the pixels within the flaring region, while the black data points are the pixels within the 20” x 14” pixel area around the sunspot. Both the area and amplitude asymmetries show strong linear correlations between lines. The area asymmetries have a correlation coefficient of R = 0.758 within the entire region and a correlation coefficient of R = 0.737 within the flaring region. The amplitude asymmetries have an even stronger linear correlation with correlation coefficients of R = 0.853 in the entire region and R = 0.978 in the

Page 111: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

108 NSO REU Annual Program Report 2013

Figure 17: Zoomed in time-dependent mosaic of the flaring region for the FeI λ6302.5 line. On the left is the mosaic of the area asymmetry over time, while on the right is the mosaic of the amplitude asymmetry. The x-axis is the time in minutes since 17:00 UT, ranging from 0 to 80, and the y-axis is the value of the asymmetry, ranging from -0.5 to 0.5. As with the λ6301.5 line, there are no clear signs that would indicate a flare occurring within this region.

flaring region. The amplitude asymmetries have a stronger correlation because the FeI λ6302.5 line has greater magnetic sensitivity and therefore wider Stokes V profiles (for a given magnetic field strength) which have a much greater effect on area asymmetries than on amplitude asymmetries. Appreciable scatter within the large correlation data set are a result of the polarity inversion line found near the flaring sunspot, in particular within the amplitude asymmetry. Although the correlations provide no indication of a flare occurring, the strong correlation coefficients do indicate that the difference in the formation depths does not greatly affect the values of the asymmetries in the two different lines.

5. SUMMARY AND CONCLUSION

In general, there are a variety of Stokes V profiles within active regions in the Sun. We have developed a routine for actively fitting all these profiles for calculation of both area and amplitude asymmetries. Because these asymmetries provide information about magnetic field gradients and plasma velocity along the line of sight, we are able to locate active regions by observing spatial maps of the asymmetries. We were looking for systematic changes over time in these asymmetries within the flaring region NOAA 11429; however we found that there were no flare-related effects

Page 112: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

109 NSO REU Annual Program Report 2013

found within the flaring region. Because this was a relatively

Figure 18: Scatterplot of the area asymmetry values within the 20" x 14" active region. Shown in black is the entire region while the green points are those of the zoomed in 10” x 6” flaring region.

Figure 19: Scatterplot of the amplitude asymmetry values within the 20" x 14" active region. Shown in black is the entire region while the green points are those of the zoomed in 10” x 6” flaring region. The amplitude asymmetry values have a stronger linear correlation than the area asymmetry values.

strong flare at M7.9, this indicates that the chromospheric flare either has no effect on photospheric FeI lines, or any systematic changes occur in regions so small that

atmospheric effects could blur them out. Strong linear correlations present between the asymmetries in the FeI λ6301.5 and λ6302.5 lines do provide an indication that the magnetic field and its gradient at both of the formation depths are very similar. The amplitude asymmetries do have a stronger correlation than the area asymmetries as a result of the greater magnetic sensitivity in the FeI λ6302.5 line. This greater sensitivity causes a larger line broadening in the FeI λ6302.5 line which has a small effect on the amplitudes of the profile, but a much stronger effect on the areas under the profiles.

ACKNOWLEDGEMENTS

I would like to thank my mentor, Dr. Brian Harker, and all the other staff members at NSO and NOAO who have worked hard to make this a great REU experience.

This work was supported by the National Science Foundation (NSF) and the Association of Universities for Research in Astronomy (AURA). This work is carried out through the National Solar Observatory’s Research Experiences for Undergraduate (REU) site program, which is co-founded by the Department of Defense in partnership with the National Science Foundation REU Program.

REFERENCES Aime, C., Faurobert, M., Grec, C., & Uitenbroek, H.

2010, A&A, 521 Auer, L.H., & Heasley, J.N. 1978 , A&A, 64, 67-71 Bellot Rubio, L., Martínez-Sykora, J., Sainz Dalda,

A., Title, A. 2012, A&A, 748 Bevington, P.R. & Robinson, D.K. 2003, Data

Reduction and Error Analysis for the Physical Sciences, 3rd Ed., McGraw-Hill, Inc.

del Toro Iniesta, J.C. 2003, Introduction to Spectropolarimetry

Grossmann-Doerth, U., Keller, C. U., & Schüssler, M. 1996, A&A, 613

Markwardt, C.B. 2008, “Non-Linear Least Squares Fitting in IDL with MPFIT,” in proc. Astronomical Data Analysis Software and Systems XVIII, Quebec, Canada, ASP Conference Series, Vol. XXX, eds. B. Bohlender, P. Dowler, & D. Durand (Astronomical Society of the Pacific: San Francisco), p. 251-254

Area asymmetry for the FeI λ6301.5 line

Amplitude asymmetry for the FeI λ6301.5 line

Am

plitu

de a

sym

met

ry fo

r the

FeI

λ63

02.5

line

A

rea

asym

met

ry fo

r the

FeI

λ63

02.5

line

Page 113: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

110 NSO REU Annual Program Report 2013

APPENDIX II

NSO Research Experiences for Teachers (RET) Program During the summer of 2013, physics teacher Pia Denzmore worked at NSO/Sacramento Peak through the RET program, which is funded as a supplement to the NSO REU grant.

Pia Denzmore (DeBakey High School for the Health Professions, Houston, Texas) worked on the project "The Radiative Properties of Solar Faculae in Three-Dimensional MHD Simulations". The goal of this project was to use three-dimensional MHD simulations to better understand the contribution of solar faculae to variations in the solar irradiance, the radiative energy flux from the Sun reaching the Earth. These variations, even though small (of the order of 0.1%), have significant impact on telluric climate. Precise knowledge of the nature of these variations would benefit climate research and contribute to the resolution of the cause of climate change. To this end, Ms. Denzmore performed radiative transfer calculations using the numerical code of her advisor, Dr. Han Uitenbroek, calculating the intensity contrast of small-scale magnetic elements (faculae) as a function of viewing angle in different continuum wavelengths as well as in the spectral lines of Fe I at 630.2 nm. She successfully wrote many elegant IDL procedures to extract the relevant radiative contributions of the faculae from the three-dimensional spectral images, and compared the results to calculations using one-dimensional semi-empirical models, which are the stock of traditional irradiance modeling. Ms. Denzmore's calculations clearly show that these one-dimensional models produce the wrong center-to-limb behavior of the facular contribution to the irradiance and, therefore, lead to erroneous prediction of the irradiance variation with magnetic field distribution over the solar disk. In addition, Ms. Denzmore was able to show that the usual assumption of a clear relation between line-of-sight magnetic field strength and facular contrast is not valid, further invalidating the usual practice of using full-disk magnetic field maps for irradiance prediction, and showing that more realistic models of the solar atmosphere need to be considered.

Page 114: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

111 NSO REU Annual Program Report 2013

The Radiative Properties of Solar Faculae in Three-Dimensional

MHD Simulations

Pia M. Denzmore (DeBakey High School for the Health Professions, Houston, Texas)

Advisor: Dr. Han Uitenbroek National Solar Observatory, Sacramento Peak, NM

Introduction

Magnetic activity in the solar photosphere is responsible for at least 80% of the fluctua-tion in total solar irradiance (TSI) over the solar cycle (Domingo et al 2009). Consequently, understanding the radiative properties of solar magnetic features (specifically, sunspots and faculae) is of great importance. Sunspot contributions to the TSI are fairly well understood and can be predicted by simple empirical models, but determining facular contributions to the TSI has proven to be more difficult. Experimental contrast measurements vary widely with facular position, instrument resolution, and wavelength selection.

There have been efforts to model facular contrast using one-dimensional semi-empirical models, but these models incorrectly assume that faculae are steady state one-dimensional structures. Although these models are somewhat successful in predicting facular contrast at disk center, they vary widely for viewing angles closer to the solar limb as shown in Figure 1 and Figure 2.

Figure 1 Figure 2

Figures 1 and 2: Comparison of PSPT Blue/Red measured contrast (geometric symbols) and one-dimensional model predictions (lines) (Ermolli, et al. 2007)

Page 115: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

112 NSO REU Annual Program Report 2013

Faculae have been accurately described by the “hot wall” model (Spruit 1976, 1977).As shown in Figure 3, the measured brightness of faculae depends heavily on the angle between the observer's line of sight and the solar radius angle. One-dimensional models do not account for the effects of facular geometry or the observer’s viewing angle which explains why there are large discrepancies between model predictions and measured contrast values. Three-dimensional MHD simulations give more realistic results than one-dimensional models because they naturally take the physical geometry of faculae into account (Figure 4).

This paper will show that the center-to-limb variation (CLV) of facular contrast

predicted by one-dimensional models is very different than that predicted by three-dimensional models. Additionally, facular CLV contribution from the 630.25 nm line core wavelengths is compared to the contribution from the same line’s continuum wavelength for both one-dimensional and three-dimensional models. Finally, the relationship between contrast and magnetic field strength is analyzed to determine if three-dimensional models show a strong correlation between the two.

Previously, Tritschler & Uitenbroek (2006) showed that magnetic elements are mostly dark at disk center in the infrared (1626 nm) and bright in the visible (575 nm) and that the contrast of these elements becomes darker with lower resolution.

Methodology

MHD and Radiative Transfer Code

We have used the RH radiative transfer code (Uitenbroek 2001, 2003) to calculate the contrast of magnetic concentrations in a snapshot of solar magneto-convection produced by the Copenhagen Stagger code (Nordlund & Galsgaard 1995). This MHD code solves the equations for conservation of mass, energy and momentum as well as Maxwell’s equations, the equation of state and radiative transfer for energy sources and sinks. The radiative transfer code then

Figure 3: A magnetic field creates a flux tube whose geometry causes an observer to measure different values for brightness depending on the viewing angle (Keller et al. 2004)

Figure 4: The top panel shows G-band observations from Lites et al. 2004. The bottom panel shows 3D MHD simulation output from Keller et al. 2004. (Keller et al. 2004)

Page 116: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

113 NSO REU Annual Program Report 2013

solves both the equation of state and polarized radiative transfer in a snapshot of the MHD code at given wavelengths.

Wavelength Selection

Several wavelengths were used for the simulations. The precision solar photometric telescope (PSPT) has three continuum filters for its imager and the red and blue pass band filters were selected. The PSPT red band is centered on 607.1 nm and the PSPT blue band is centered on 409.2 nm. The calculated solar spectrum was integrated over the PSTPT transmission bands as shown in Figures 5 and 6. The Fe I 630.25 nm line was also selected because it is commonly used for magnetogram measurements.

Figure 5 Figure 6

Figures 5 and 6: The calculated solar spectrum was integrated over the PSPT blue and red continuum filter pass bands.

Simulations

For the one-dimensional simulations, Model 1001- Quiet Sun and Model 1005-Facula were selected from Table 1 (Fontenla et al. 2009). For the three-dimensional simulations, a “quiet sun” model atmosphere (B=0) was selected along with a model atmosphere with active magnetic features (<Bz>=200 Gauss). Seven different viewing angles corresponding to µz=0.14-0.99 were selected for the three-dimensional model. Both the one-dimensional and three-dimensional versions of the code were run for the PSPT red, PSPT blue and Fe I 630.25 nm line.

Page 117: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

114 NSO REU Annual Program Report 2013

Analysis

Selection of Faculae Eight regions that displayed facular features were chosen from three-dimensional model output images of intensity at disk center. A running box of 30 pixels per side was used for each region. This represents a resolution of approximately 1 arcsecond which is the imaging resolution for a typical full disk imager. The boxes were not adjusted for perspective at each viewing angle because typical imagers do not correct for perspective.

Contrast

Contrast is defined by Equation 1 where <Im > is the average intensity of magnetic pixels and <Iqs > is the average intensity over the quiet sun snapshot.

𝐶 = �⟨𝐼𝑚⟩−⟨𝐼𝑞𝑠⟩�⟨𝐼𝑞𝑠⟩

(1)

Figures 7-9 show the measured contrast for the eight faculae at disk center for the PSPT blue band, the PSPT red band and the continuum wavelength for the Fe I 630.25 nm line.

Figure 7: Eight faculae at disk center for PSPT red band filter

Figure 8: Eight faculae at disk center for PSPT blue band filter

Figure 9: Eight faculae at disk center for the continuum wavelength (630.22 nm) for the Fe I 630.25 nm line

Page 118: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

115 NSO REU Annual Program Report 2013

The Effects of Viewing Angle on Contrast Measurements

Figure 10 shows the faculae at four different viewing angles in the x-z and y-z planes. All angles had the same heliocentric angle (µz=0.5). The faculae look significantly different depending on the viewing angle.

Figure 10: Faculae at different viewing angles (µz=0.5).

Center-to-limb variation of facular contrast

The CLV for contrast for box 1 was calculated for both the PSPT blue and PSPT red filter bands. Figures 11 and 13 show box 1 in the PSPT blue and red filters, and Figures 12 and 14 show the CLV of contrast for box 1. The contrast is negative at disk center for both filter bands, but it reaches a maximum closer to disk center for the PSPT blue band. Both graphs show the contrast decreasing for µz values close to the solar limb, but the PSPT red contrast actually becomes negative again at µz=0.2 . The contrast then decreases toward the limb. The return toward disk center contrast values can be explained by the fact that as viewing angle approaches 90°, the observer would see an increase in contributions to the intensity from the granules outside the magnetic flux tube on the disk center side, which gradually obscure the limb side of the facula.

Page 119: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

116 NSO REU Annual Program Report 2013

Figure 11: Box 1 in PSPT blue at disk center

Figure 12: CLV of contrast for box 1 at disk center for PSPT blue band

Figure 13: Box 1 in PSPT red at disk center

Figure 14: CLV of contrast for box 1 at disk center for PSPT red band

The average contrast over all eight boxes was calculated and then plotted as a function of heliocentric angle as shown in Figures 15 and 16. The one-dimensional model predictions were also plotted to allow easier comparison between the two approaches. In the PSPT blue band, both 1D and 3D models show increasing contrast toward the limb, but in the midrange of µz values the 3D model predicts much higher contrast values. In the PSPT red band, the 3D model shows a a more negative contrast value at disk center than the 1D model. The 3D model also shows contrast returning to disk center values toward the limb.

Page 120: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

117 NSO REU Annual Program Report 2013

Figure 15: CLV of average contrast for PSPT blue band

Figure 16: CLV of average contrast for PSPT red band

The (PSPT red/PSPT blue) contrast ratio was also calculated for both the 1D and 3D models and Figure 17 shows how significantly different they are. Assuming that the 3D model is more representative of the real Sun, 1D models do not accurately predict contrast at one wavelength given contrast at another wavelength (see also Tritschler & Uitenbroek, 2006 for a similar conclusion as a function of telescope resolution at disk center).

Figure 17: PSPT Red/PSPT Blue contrast ratios for 1D and 3D models

Line Core vs Continuum Contrast

The line core wavelength (630.249 nm) and continuum wavelength (630.22 nm) for the Fe I 630.25 nm line were measured using the average spectrum shown in Figure 18. Both the 1D and 3D models were run at those two wavelengths to determine their contributions to the CLV of facular contrast as shown in Figures 19 and 20. In Figure 19, the 1D model predicts a

Page 121: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

118 NSO REU Annual Program Report 2013

monotonic increase in facular contrast from disk center toward the limb for the continuum wavelength. The 3D model, however, shows a negative contrast at disk center then an increase toward the solar limb until µz=0.4 followed by a decrease for heliocentric angles toward the limb. In Figure 20, the 1D and 3D models show opposing trends for the line core wavelength. The 1D model predicts contrast rising monotonically from the disk center, while the 3D model predicts contrast decreasing monotonically from disk center. The high contrast value for the 3D model is a result of the fact that the line core samples higher layers of the facular structure which are hotter than layers sampled by the continuum.

Figure 18: Average spectrum of the Fe I 630.25 nm line

Figure 19: CLV of average contrast for the continuum Figure 20: CLV of average contrast for the line core

Magnetic Field Calculations

The magnetic field strength for each facula was calculated from synthesized line profiles of the Fe I 630.25 nm line, as it would be measured by the center-of-gravity (COG) method (Stenflo 1994, p.111). As shown in equation 2, the magnetic field is directly proportional to the difference between the center of gravity of the right- and left-hand circularly polarized components of the line (i.e. I±V).

𝐵𝑙𝑜𝑠 = (𝜆+−𝜆−)2.0

4𝜋𝑚𝑐𝑒𝑔𝐿𝜆02

(2)

Page 122: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

119 NSO REU Annual Program Report 2013

Accordingly, a plot of net circular polarization in the 630.25 nm line as a function of wavelength for box 1(Figure 21) shows significant variation among the selected viewing angles which nonetheless all represent the same heliocentric angle. This results in variations in magnetic field measurements that are dependent on viewing angle because the magnetic field is not vertical.

Figure 21: Net Circular Polarization for Box 1 as a function of wavelength.

Contrast and Magnetic Field Strength

To determine the relationship, if any, between contrast and magnetic field strength, the contrast as a function of magnetic field for box 1 was plotted for four different viewing angles in the x-z and y-z planes for µz=0.5 (Figure 22). Because the magnetic field is not vertical, the COG magnetic field strength varies even though the heliocentric angle is kept constant. The calculated COG magnetic field strength also depends on the wavelength selected as shown by the fact that the PSPT blue filter band shows higher contrast values compared to the red band.

Figure 22: Contrast as a function of COG magnetic field strength for box 1

Page 123: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

120 NSO REU Annual Program Report 2013

Figures 23 and 24 show the contrast as a function of COG magnetic field strength for the eight faculae at disk center. Contrast values are generally negative, but there is no clear relationship between contrast and magnetic field strength for either PSPT red or blue filters.

Figures 23 and 24: Contrast as a function of COG magnetic field strength for the eight faculae at disk center for the PSPT red and blue filter bands.

Conclusions

Three-dimensional MHD simulations predict very different CLVs of facular contrast than one-dimensional models. For measurements in the Fe I 630.25 nm line, 1D model predicts increasing contrast towards the limb while the 3D model predicts the opposite. This difference should be accounted for when integrating over the spectrum in order to generate more accurate predictions Additionally, the one-dimensional PSPT Red/PSPT blue contrast ratio is significantly different from the 3D model contrast ratio which means that contrast measurements at one wavelength do not accurately predict contrast measurements at another wavelength. Magnetic flux and facular contrast are poorly correlated in 3D simulations. As such, magnetic flux is not a good predictor of facular contrast and vice versa.

ACKNOWLEDGMENTS

This work is carried out through the National Solar Observatory Research Experiences for Teachers (RET) site program, which is co-funded by the Department of Defense in partnership with the National Science Foundation RET Program. The National Solar Observatory is operated by the Association of Universities for Research in Astronomy, Inc. (AURA) under cooperative agreement with the National Science Foundation.

Page 124: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

121 NSO REU Annual Program Report 2013

References Berger,T.E. & Lofdahl, M. 2007,ApJ,661,1272 Domingo,V., Ermolli,I., Fox,P., et al. 2009, Space Sci. Rev.,145,337 ErmollimI., Criscuoli,S., Centrone, M., Giorgi,F., & Penza,V. 2007, A&A,465,305 Fontenla, J.M., Avrett,E., Thuillier,G., & Harder, J. 2006, ApJ,639,441 Keller,C.U., Schussler,A., Vogler,A., & Zakharvo,V. 2004,ApJ,607,L59 Nordlund & Galsgaard. 1995. Tech. Rep. Astron. Observ. Copenhagen,Univ. http://www.astro.ku.dk/aake/papers/gs.ps.gz Ortiz,A., Solanki,S.K., Doming,V., Fligge,M. ,Sanahuja,B. 2002, A&A, 388, 1036 Spruit, H. C. 1976, Sol. Phys., 50, 269 Spruit, H.C. 1977, Sol. Phys., 55, 3 Stenflo, J.-O. 1994, Solar Magnetic Fields: Polarized Radiation Diagnostics (Dordrecht: Kluwer) Topka, K.P., Tarbell,T.D., & Title,A.M. 1997,ApJ,484,479 Tritschler, A., Uitenbroek, H. 2006, ApJ,648, 741 Uitenbroek, H. 2001, ApJ, 557, 389 Uitenbroek, H. 2003, ApJ, 592,1225 Yeo,K.L., Solanki, S.K., Krivova,N.A. 2013,A&A,550,A9

Page 125: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

122 NSO REU Annual Program Report 2013

APPENDIX III

Program Evaluation

NSO REU students and RET teachers were asked to fill out an online program evaluation form, a copy of which is provided below with individual, essentially unedited, responses.

2013

NATIONAL SOLAR OBSERVATORY SUMMER STUDENT PROGRAM

Evaluation Form

The Research Experience for Undergraduates (REU) program was established to provide research opportunities for undergraduate students help them make an informed decision about pursuing a career in research. NSO supports active participation of K-12 teachers in research and education projects with the intent of facilitating professional development of K-12 teachers through strengthened partnerships between institutions of higher education and local school districts, through the Research Experiences for Teachers (RET) program. Our goals are to give students and teachers an opportunity to work on forefront research in solar physics and to expose them to a wide range of research techniques in a working environment that is both productive and pleasant. We also want to give each student/teacher the opportunity to meet a variety of scientists working in solar and nighttime astronomy for a perspective on the different ways in which each person approaches research. We continue to look for ways to improve our summer program, so we would appreciate a few moments of your time to give us your frank assessment of the program. Please provide suggestions, comments, or criticisms on the following: 1. NSO REU application form. Was the form easy to obtain via the web? Were instructions clear? Were the required application materials (essay, two letters of recommendation, transcripts reasonable?

• The application was easy to complete. I thought three letters of recommendation was a bit too much, but I didn't have a hard time getting them.

• I found the application easy to obtain and fill out. The only part of the application that I felt was unclear was the essay. Several items are listed as needing to be in the essay, but many of them are vague or broad, which made the essay difficult to complete.

• Form was easy and clear. Application materials were very reasonable compared with some other REUs I have applied for. Very good.

• The application form was actually the most difficult to fill out of the 11 that I did. Maybe it was my browser, but things were a little tedious to access and it was not easy to find on the website. I think it would be easier if there were a single link on the homepage to an application to fill out similar to this survey page.

Page 126: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

123 NSO REU Annual Program Report 2013

• The application form was very reasonable, and instructions were clear. • The application form was easy to find. The required material was all very reasonable.

2. How did you learn of our program? Can you suggest other ways we might reach prospective students?

• I googled NSF summer research programs. • I started a conversation on Linkedin asking people what REU programs allow students to

observe (this is my favorite part of astronomy). Someone recommended this one because they knew that it was on-site, therefore observation might be possible.

• Web research. I was looking to apply to as many internships as possible. Reaching out to the

various astronomy/physics departments and perhaps sending a flyer for them to post on their bulletin board may be a good way to spread the news.

• I found out about this REU program through the NSF website. Maybe if the program were

advertised via email to physics and astronomy departmental advisors, more people would apply.

• The NSF REU website (list of astronomy REU's). • I learned about the program through the NSF website.

3. How was the stipend support?

• The stipend is very generous. • Sufficient. • Support was excellent and much appreciated.

• The stipend support was fantastic. I felt that I was paid fairly and in a quick manner. I think of all the programs that I applied to, this one was the best with the stipend.

• Stipend support was very fair.

4. How was the travel support?

• No problem.

• Sufficient.

• Travel support was good and much appreciated.

• Travel support was also fantastic. I felt that it was very fair and also very generous. The travel reimbursements take a little longer to receive than I would hope, though.

• Travel support was also very nice, all business travel was fully taken care of.

• The stipend support was great.

• The travel support was very nice. It made coming to/leaving Tucson very easy.

Page 127: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

124 NSO REU Annual Program Report 2013

5. How were the institution living accommodations (dorm or other)?

• Housing is adequate.

• Very nice. Any problems we had with the house were seen to in a timely manner.

• Minor issues with the house but nothing major. Overall satisfactory.

• The living accommodations here at Sunspot were excellent. The rent was cheap and the house provided everything I needed. I didn't need to buy furniture or bring bedding or cooking supplies. Everything was clean when I moved in and the heating and electricity worked well.

• Very nice, all essentials and more were included with housing.

• The living accommodations at College Place were okay. There were not too many issues, however it was hard to contact the College Place office because of the scheduled hours.

6. How was the working environment (office, lab area used, computers?

• I'm not a fan of the cubicle setup in the photolab. It would be nice to be able to see the people around you.

• I really enjoyed the work environment. My unique project provided me with the best of both

worlds, sharing a computer lab with other students but being able to work alone while observing to get away when I needed to. The computer hated me, but I'm pretty sure that is not the fault of NSO. Overall the office and computers were very nice. Room 27 was a bit secluded but it was very nice to work side by side with the other students.

• Working environment and office were great. The computer I was on was horrible and

sometimes froze up, other times quit working... had a host of problems trying to get anything done. Sometimes I had to work on my own laptop as best I could. Mostly though, I was able to run the data and get things done.

• I had an office to myself which I thought was great. I had all the sufficient computer

equipment that I needed and everything worked perfectly. I felt very pleased with my working environment and I believe this helped my work ethic as well.

• Computer was a little old but adequate, the office was nice. • The working environment was great. It was nice to have our own computers to use and it

was nice to work in the same room as the other interns to plan social events.

7. NSO Mentor. Did you or your advisor contact one another before you arrived at the NSO? Was your advisor available to help you as needed? Did he or she take an active interest in your work and progress?

• My adviser and I exchanged emails before I arrived and was very helpful with suggestions for preparing to come to sunspot. My adviser was also available any time I needed help.

Page 128: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

125 NSO REU Annual Program Report 2013

• My adviser and I made contact before the program began, which allowed me to get a head start on a few reading assignments he had for me. He had a great interest in the work, I really felt like we shared the work and collaborated on the project, rather than receiving assignments and working on them on my own. I feel the success I had in this REU project is primarily contributed to the support I received from my mentor.

• I was in contact with both mentors before I arrived. They took an active interest in my work, unlike past REUs I have been to. They helped me as needed and I was very grateful for the opportunity.

• My advisor this summer exceeded my expectations. Not only was he a great teacher, but he also became a great friend of mine. He allowed me to see different places in New Mexico such as Carlsbad Caverns and provided me a ride to church on Sundays. He definitely exceeded his duties as an advisor. I've learned so much from him and he remains an inspiration to me for the future. We talked for about a month before the REU began and he was very friendly and helpful. He did everything in his power to help me out on my project and make sure that I got the full learning experience from it.

• I talked through my advisor through email before arriving. She was extremely helpful and was thoroughly involved in my project and seeing it through.

• My mentor was excellent. He encouraged me to work independently, but was always available if I needed help with my project.

8. Research project. Do you feel your project was sufficiently challenging? Was the project suitable for the time available if it was entirely self-contained, or was it part of a larger project?

• My project is part of a larger project that my adviser will continue after I'm gone. It was challenging and required a lot of skills. I haven't used in a long time. It became a lot easier as the summer went on and I definitely learned a lot.

• My project was soooo cool. It was much more challenging then expected, and unfortunately we were not able to finish it. Despite this, significant progress was made on a larger project which I've been invited to return and continue working on. The project was challenging and was suitable for the summer.

• Project was very challenging. I could have used more time, but I am not able to (starting classes next week!). There were some problems with the data and this slowed us down. Overall I think it was a great project, but perhaps a bit ambitious for the short time period (summer).

• I feel that I was challenged enough in my project. While I did finish about 3 weeks early, it was still a huge learning experience for me as I tried things that I never have before. I felt that perhaps the project could have pertained to astronomy a little more (the scientific method was lacking a bit, it was more of just a process). But overall, I felt that I gained thorough knowledge of the subject after completing the project.

• The project was sufficiently challenging and suitable for the time available. It was somewhat self-contained.

Page 129: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

126 NSO REU Annual Program Report 2013

• I felt like the project was challenging. It was definitely suitable for the time available.

9. Overall research experience. Did the staff take the time to help you obtain a broader picture of research in astronomy and solar physics? How do you think the REU experience has changed you and your outlook on astronomy/solar astronomy and astronomical research?

• It's been eight years since I've done astronomical research and this experience gave me a refresher on what it's really like to work in the field today. My adviser shared information about new projects and the future of solar physics and I have a really good idea of how people want things to develop over the next 10-15 years.

• This experience reaffirmed my preference for being in front of a telescope instead of a computer screen. I have a better understanding of the broad range of research topics in solar physics. Overall, I don't feel my outlook has changed, but this is a good thing since I had a very positive outlook on research to begin.

• I learned a lot and gained a lot here. I have always loved astronomy and I hope to work in solar physics or a related field after I get my degree. Sincere thanks.

• I absolutely loved the summer I spent here in Sunspot. I would not trade it for anything! I feel a lot more knowledgeable about astronomy and how it applies to the world, as in ATST. I definitely feel more in tune with solar astronomy, as I had not really taken a deep interest in it before, but I find it deeply interesting now that the summer is over.

• I did gain much experience and insight into what a career in astronomy would be like. I learned much about solar physics and this has cemented that I want to pursue a career in astronomy.

• I think the overall research experience was great. Working at a joint NSO/NOAO facility allowed for a very broad picture of research available in both astronomy as well as solar physics.

10. Local host personnel (scientific, technical and administrative staff).

• The staff was helpful and knowledgable. • The support staff was great. They were always very helpful, friendly and nice.

• Sac Peak - All were great.

• Everyone I met here was friendly and was easy to talk to. I enjoyed the diversity of the staff here at Sunspot and all the things that I learned from them and about their careers.

• All personnel were extremely helpful and kind.

• I thought all the staff were friendly and very helpful. They were very generous in providing things like camping equipment for weekend trips. They were also very helpful in teaching about a variety of astronomy topics and project specific information.

11. Field trips (to Sac Peak and VLA, or to Tucson/Kitt Peak and VLA?

Page 130: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

127 NSO REU Annual Program Report 2013

• I enjoyed the trip to Tucson and the VLA. • I felt the Tucson trip was really short. It was described as being 4 days, but the first and last

were only travel. We didn't even have scheduled meals these days with other students to have the chance to spend more time with them. I was disappointed that I didn't get to do more, see more of the facilities, or meet more individuals, especially considering how much time was spent unscheduled in the hotel.

• The field trips were great, except the Tucson host from the VLA (Ken or something) rushed us way too fast and we were not able to see everything. I did not appreciate this. The Tucson trip was wonderful. Overall I feel I learned a lot from these experiences and seeing the telescopes and how they operate was invaluable.

• The field trips were awesome. I felt that I had a broader perspective on astronomy after taking the trips. They were enjoyable and I am grateful that we were able to go on them.

• Field trips were very enjoyable and also very informative. Weekly seminar series for students: We didn't have weekly seminars, but there were some very interesting colloquia.

• I really enjoyed the field trip to Sacramento Peak and the VLA. The driving to and from was a little time consuming, but the experience was very great. It was nice to visit another solar observatory operated by NSO.

12. Weekly seminar series for students.

• The colloquia weren't weekly but I enjoyed them when one was presented. • There was no weekly seminar.

• There weren't as many of these as I might have liked, but the ones that were presented were good.

• The seminars did not occur weekly, but when I did sit in on them, they were pretty interesting. The level of science was a bit over what I had experience with, but it was still nice to have an insight on different topics.

• N/A

• The weekly seminar series were great to get background into a wide variety of astronomy topics.

13. Observing opportunities at Kitt Peak or Sac Peak.

• N/A. • I had more observing opportunity than most because my project was centered on

observation and calibration. I was trained to use the Evans Solar Facility and ran it nearly every other day until the monsoons began.

• I had none, but none were necessary for my project. • I did not have any observing opportunities during my summer here.

Page 131: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

128 NSO REU Annual Program Report 2013

• Did not get any opportunities to observe; my project involved using satellite data. • We weren't able to do any solar observing, but the night time observing was great. Although

we went during monsoon season where the weather was very sporadic, it was nice to get an opportunity to learn how to operate a telescope.

14. Required student seminars at end of program.

• It wasn't too difficult to prepare my presentation. It's important for the students to be able to summarize how we spent our summer and it was good to have feedback from other scientists.

• I really enjoyed my presentation once it was over. The presentation was a really good learning experience. I had to take everything I learned and expand my understanding of it so that I could clearly explain it to others. My mentor assisted me in brainstorming and helped me practice so that I had a very successful seminar.

• Very good.

• I felt challenged enough with my colloquium, and that I did a good job with the help and preparation of my advisor. People seemed interested and I felt that I had fulfilled my duties as a summer student.

• Seminars were instructive, with great support and advice from the scientists here.

• The required student seminars were very helpful. It was nice to have the opportunity to present to a scientific community in a friendly environment.

15. Required paper at end of program.

• It would be nice to have some sort of written guidelines for the paper. I had to read previous years' papers to get an idea of what was expected.

• The paper was much like the seminar, much nicer once it was complete. The primary difficulty I found with my paper was that the project was not completed this summer, so I had to try to write about progress, problems, and solutions we haven't yet found, which was challenging.

• Very tough to write with so many requirements but I finally finished it.

• The paper should not be required to be written in Microsoft Word. The formatting can be complicated if run on different computers and operating systems. I think a better approach would be to use LaTeX because the formatting is preserved. It's also really difficult to make flow charts on Word.

• The paper was a long yet enjoyable process.

• The required paper was fine. It was nice to be able to write what I felt was important without being constrained to a hard page limit.

Page 132: RESEARCH EXPERIENCES FOR UNDERGRADUATES … Final NSF... · research experiences for undergraduates . site program . at the . national solar observatory . final annual report

129 NSO REU Annual Program Report 2013

16. Local Activities? Did the social environment contribute to your experience at the Observatory?

• Some of the permanent residents in Sunspot are really welcoming to visitors and others are not. I wish there had been some sort of welcome to sunspot gathering at the beginning of the summer for the students. Also, making the potlucks open to students regardless of whether or not they bring a dish would be nice.

• I didn't really feel a part of the social environment. Unfortunately, observing during the day

prevented me from participating in many community activities. • All activities were great. I enjoyed the potlucks and volleyball. I am thankful for such a great

community. • I loved playing volleyball 3 times a week with the other students and staff here on the

mountain. I felt more connected with the community and it was a good way to get exercise. I also enjoyed the occasional hikes that we did. • Plenty of community events and of course volleyball helped me to have a great summer here. • The social environment was great. It was nice to have a couple interns with cars so that we

were able to visit some of the attractions within the Tucson/Arizona area that we might not have an opportunity to visit otherwise.

17. Please feel free to offer any additional comments below.

• Overall, I had a very interesting and enjoyable experience this summer. • This was one of the best summers overall, and it was a great learning experience for me as I

try to pursue a career in astrophysics. Much thanks again for the opportunity. Thank you!

• I loved giving the tours. It made me feel closer to the observatory and helped me connect the public to astronomy.