SlideShare a Scribd company logo
Python in Astronomy 2016



Matt Craig
Department of Physics and Astronomy
Minnesota State University Moorhead
1
Acknowledgements
•Current students
•Nathan Walker
•Laura Herzog
•Michael Meraz
•Connor Stotts
•Erin Aadland
•Andy Block
•Elias Holte
•Laura Maixner
•Stefan Nelson
•Jane Glanzer
•Elizabeth Dougherty
2
•Colleagues
•Juan Cabanela
•Linda Winkler
Context
•undergraduate-only program
•5 ± 3 new astronomy emphasis students/
year
•0.5/year go to graduate school
•primary responsibility is teaching
•prepare students for a (non-astronomy)
career
•python introduced in first calculus-based
physics course, continues throughout
curriculum.
3
Constraints
•Some students use Windows
Anaconda python distribution.
•Cannot
Graphical interface to python for 1st year
students.
•Need record of student work
Traditional GUI app does not do that
•Use existing, well-supported packages
active dev + multiple devs +
documentation + modularity = win!
4
Coding goals
•Start participating early
•Begin with little or no coding
•Develop coding skills over 4 years
• Introduce GitHub as early as possible
•Introduce git when and if needed
•Encourage contributions to open source
projects
5
Variable Star Astronomy
•Look for new variable stars in fields
containing known exoplanets
•Take data
•Add metadata
•Review data
•Reduce data
•Identify sources
•Perform aperture photometry
•Differential ensemble photometry
•Analyze time series
6
Visual review
7
Visual review
7
Visual review
7
Data reduction
•ccdproc 1.0 released last week!
•New features:
•Combine images based on WCS
•Cosmic ray removal with astroscrappy
•Work with directories of images easily:
8
Data reduction
•HUGE THANKS to Steve Crawford and all of
the new contributors:
•Christoph Deil
•Forrest Gasdia
•Carlos Gomez
•Hans Moritz Günther
•Nathan Heidt
•Anthony Horton
•Jennifer Karr
•Stefan Nelson
•Joe Philip Ninan
9
•Punyaslok Pattnaik
•Evert Rol
•William Schoenell
•Michael Seifert
•Sourav Singh
•Brigitta Sipocz
•Connor Stotts
•Ole Streicher
•Erik Tollerud
•Nathan Walker
Data reduction
•reducer: jupyter notebook with
interactive widgets
10
Data reduction
•reducer: jupyter notebook with
interactive widgets
10
Data reduction
•reducer: jupyter notebook with
interactive widgets
10
Photometry, currently
•Use AstroImageJ to:
•Choose sources
•Click on them once
•Save as list
•Perform aperture photometry with local
background subtraction
•Reject outlying pixels in annulus
•Result
•instrumental magnitudes for night of data
•AIJ: http://arxiv.org/abs/1601.02622
11
Progress in python
12
Ensemble differential photometry
•Magnitude differences to eliminate atmospheric
effects
•Several comparison stars
•Which stars should be used as comparisons?
•How should they be combined?
•HELP: which approach is “best”? Is there a
best?
•Everett & Howell 2001
•Broeg, Fernández & Neuhäuser 2005
•lemon (on github)
•Collins, Keilkopf & Stassun 2016
•OSCAAR (somewhat like Broeg et al)(on github)
•AAVSO
13
Solution for now
•Trial and error…
•… and gatspy
•Insanely fast Lomb-Scargle periodogram
14
Solution for now
•Trial and error…
•… and gatspy
•Insanely fast Lomb-Scargle periodogram
14
Variable?
15
Image viewer
•Image viewer with catalog overlay
•astroquery to get catalog from Vizer
•ccdproc, astropy.wcs and
astropy.coordinates to handle
coordinates.
•mpld3 to display
•transition to bqplot?
•%matplotlib notebook?
16
Image viewer
•Image viewer with catalog overlay
•astroquery to get catalog from Vizer
•ccdproc, astropy.wcs and
astropy.coordinates to handle
coordinates.
•mpld3 to display
•transition to bqplot?
•%matplotlib notebook?
16
This week
•differential photometry
•Which approach to comparing?
•Selecting comparison set
•idea: use APASS to transform to standard
magnitude system frame-by-frame?
•reducer updates (help welcome)
•start turning these demos into a package
•sneak peak on github, repo is:
•glowing-waffle/glowing-waffles
17
Links•lemon: http://lemon.readthedocs.org/en/latest/
•end-to-end data reduction and photometry
•OSCAAR: http://oscaar.github.io/OSCAAR/
•Focuses on exoplanet transit measurements
•gatspy: http://www.astroml.org/gatspy/
•fast Lomb-Scargle implementation
•conda-build-all: https://github.com/SciTools/conda-build-all
•eases the pain of building packages
•sep: http://sep.readthedocs.org/en/v0.5.x/
•Photometry (uses internals from SExtractor)
•astroquery: http://astroquery.readthedocs.org/
•Search a variety of online data sources from python.
•ginga: https://ejeschke.github.io/ginga/
•Image viewer framework (and a reference viewer)
•ccdproc: http://ccdproc.readthedocs.org/en/latest/
•Data reduction
•photutils: https://photutils.readthedocs.org/en/latest/
•Photometry (including, but not limited to, IRAF-equivalents)
•AstroImageJ: http://www.astro.louisville.edu/software/astroimagej/
•Very nice graphical interface with sophisticated fitting and graphing
•reducer: http://reducer.readthedocs.org/en/latest/
•Widget-interface to ccdproc reduction
•glowing-waffles: https://github.com/glowing-waffle/glowing-waffles
•Very much work-in-progress, examples from today will be up there by Tue, 3/22/16
•feder_image_shuffle: https://github.com/mwcraig/feder_image_shuffle
•Among other things, makes jpeg images and gallery pages, also demonstrates interacting with Github API.
•msumastro: https://github.com/mwcraig/msumastro
•Infrastructure for adding metadata (largely telescope specific)
18

More Related Content

PDF
Joshua Bloom Data Science at Berkeley
PPT
Python in Astronomy
PDF
Python for variable star astronomy: A status report
PDF
Widgets and astropy: accomplishing useful research with undergraduates
PDF
Photometric Reduction Manual for Gaia Science Alerts
PDF
Data Science at Berkeley
PDF
Mapping the Milky Way in 5D with 170 Million Stars
PDF
Pablo Gomez - Solving Large-scale Challenges with ESA Datalabs
Joshua Bloom Data Science at Berkeley
Python in Astronomy
Python for variable star astronomy: A status report
Widgets and astropy: accomplishing useful research with undergraduates
Photometric Reduction Manual for Gaia Science Alerts
Data Science at Berkeley
Mapping the Milky Way in 5D with 170 Million Stars
Pablo Gomez - Solving Large-scale Challenges with ESA Datalabs

Similar to Variable Star Research with Undergraduates Using Astropy (click images for link to video clips) (20)

PDF
Astronomy_python_data_Analysis_made_easy.pdf
ODP
Lofar python meetup jan9 2013
PDF
20131107 damasso great
PDF
Astronomical Photometry Past Present And Future 1st Edition Christiaan Sterken
PDF
Simulating X-ray Observations with yt
PPTX
Stellar Object Classification: Unveiling the Universe with Machine Learning
PPT
ppt
PDF
Aa16869 11
PDF
Data Science Education: Needs & Opportunities in Astronomy
PDF
Emission Line Objects in Integral Field Spectroscopic Datacubes
PDF
Astropy Project Update for ADASS
PDF
A young protoplanet_candidate_embedded_in_the_circumstellar_disk_of_hd100546
PPTX
Applications Of Computer Science in Astronomy
PDF
Astroimagej Image Processing And Photometric Extraction For Ultra-Precise As...
PDF
Astronomical data processing of ccd data.pdf
PDF
Processing of raw astronomical data of large volume by map reduce model
PDF
Do Cosmos a Terra: Usando Python para desvendar os mistérios do Universo.
PPT
Sepl 310 introduction to aerial photography and photogrammetry
PDF
PyconTW2018
PDF
Solutions Manual to accompany an Introduction to Modern Astrophysics 2nd 9780...
Astronomy_python_data_Analysis_made_easy.pdf
Lofar python meetup jan9 2013
20131107 damasso great
Astronomical Photometry Past Present And Future 1st Edition Christiaan Sterken
Simulating X-ray Observations with yt
Stellar Object Classification: Unveiling the Universe with Machine Learning
ppt
Aa16869 11
Data Science Education: Needs & Opportunities in Astronomy
Emission Line Objects in Integral Field Spectroscopic Datacubes
Astropy Project Update for ADASS
A young protoplanet_candidate_embedded_in_the_circumstellar_disk_of_hd100546
Applications Of Computer Science in Astronomy
Astroimagej Image Processing And Photometric Extraction For Ultra-Precise As...
Astronomical data processing of ccd data.pdf
Processing of raw astronomical data of large volume by map reduce model
Do Cosmos a Terra: Usando Python para desvendar os mistérios do Universo.
Sepl 310 introduction to aerial photography and photogrammetry
PyconTW2018
Solutions Manual to accompany an Introduction to Modern Astrophysics 2nd 9780...
Ad

Recently uploaded (20)

PDF
ELS_Q1_Module-11_Formation-of-Rock-Layers_v2.pdf
PPTX
BIOMOLECULES PPT........................
PPTX
Fluid dynamics vivavoce presentation of prakash
PDF
. Radiology Case Scenariosssssssssssssss
PPTX
C1 cut-Methane and it's Derivatives.pptx
PDF
Formation of Supersonic Turbulence in the Primordial Star-forming Cloud
PDF
Cosmic Outliers: Low-spin Halos Explain the Abundance, Compactness, and Redsh...
PDF
Assessment of environmental effects of quarrying in Kitengela subcountyof Kaj...
PPTX
Introcution to Microbes Burton's Biology for the Health
PPTX
Seminar Hypertension and Kidney diseases.pptx
PPTX
Biomechanics of the Hip - Basic Science.pptx
PDF
Phytochemical Investigation of Miliusa longipes.pdf
PPT
veterinary parasitology ````````````.ppt
PPTX
Microbes in human welfare class 12 .pptx
PPTX
7. General Toxicologyfor clinical phrmacy.pptx
PDF
An interstellar mission to test astrophysical black holes
PPTX
Overview of calcium in human muscles.pptx
PDF
Lymphatic System MCQs & Practice Quiz – Functions, Organs, Nodes, Ducts
PPT
1. INTRODUCTION TO EPIDEMIOLOGY.pptx for community medicine
PPTX
perinatal infections 2-171220190027.pptx
ELS_Q1_Module-11_Formation-of-Rock-Layers_v2.pdf
BIOMOLECULES PPT........................
Fluid dynamics vivavoce presentation of prakash
. Radiology Case Scenariosssssssssssssss
C1 cut-Methane and it's Derivatives.pptx
Formation of Supersonic Turbulence in the Primordial Star-forming Cloud
Cosmic Outliers: Low-spin Halos Explain the Abundance, Compactness, and Redsh...
Assessment of environmental effects of quarrying in Kitengela subcountyof Kaj...
Introcution to Microbes Burton's Biology for the Health
Seminar Hypertension and Kidney diseases.pptx
Biomechanics of the Hip - Basic Science.pptx
Phytochemical Investigation of Miliusa longipes.pdf
veterinary parasitology ````````````.ppt
Microbes in human welfare class 12 .pptx
7. General Toxicologyfor clinical phrmacy.pptx
An interstellar mission to test astrophysical black holes
Overview of calcium in human muscles.pptx
Lymphatic System MCQs & Practice Quiz – Functions, Organs, Nodes, Ducts
1. INTRODUCTION TO EPIDEMIOLOGY.pptx for community medicine
perinatal infections 2-171220190027.pptx
Ad

Variable Star Research with Undergraduates Using Astropy (click images for link to video clips)

  • 1. Python in Astronomy 2016
 
 Matt Craig Department of Physics and Astronomy Minnesota State University Moorhead 1
  • 2. Acknowledgements •Current students •Nathan Walker •Laura Herzog •Michael Meraz •Connor Stotts •Erin Aadland •Andy Block •Elias Holte •Laura Maixner •Stefan Nelson •Jane Glanzer •Elizabeth Dougherty 2 •Colleagues •Juan Cabanela •Linda Winkler
  • 3. Context •undergraduate-only program •5 ± 3 new astronomy emphasis students/ year •0.5/year go to graduate school •primary responsibility is teaching •prepare students for a (non-astronomy) career •python introduced in first calculus-based physics course, continues throughout curriculum. 3
  • 4. Constraints •Some students use Windows Anaconda python distribution. •Cannot Graphical interface to python for 1st year students. •Need record of student work Traditional GUI app does not do that •Use existing, well-supported packages active dev + multiple devs + documentation + modularity = win! 4
  • 5. Coding goals •Start participating early •Begin with little or no coding •Develop coding skills over 4 years • Introduce GitHub as early as possible •Introduce git when and if needed •Encourage contributions to open source projects 5
  • 6. Variable Star Astronomy •Look for new variable stars in fields containing known exoplanets •Take data •Add metadata •Review data •Reduce data •Identify sources •Perform aperture photometry •Differential ensemble photometry •Analyze time series 6
  • 10. Data reduction •ccdproc 1.0 released last week! •New features: •Combine images based on WCS •Cosmic ray removal with astroscrappy •Work with directories of images easily: 8
  • 11. Data reduction •HUGE THANKS to Steve Crawford and all of the new contributors: •Christoph Deil •Forrest Gasdia •Carlos Gomez •Hans Moritz Günther •Nathan Heidt •Anthony Horton •Jennifer Karr •Stefan Nelson •Joe Philip Ninan 9 •Punyaslok Pattnaik •Evert Rol •William Schoenell •Michael Seifert •Sourav Singh •Brigitta Sipocz •Connor Stotts •Ole Streicher •Erik Tollerud •Nathan Walker
  • 12. Data reduction •reducer: jupyter notebook with interactive widgets 10
  • 13. Data reduction •reducer: jupyter notebook with interactive widgets 10
  • 14. Data reduction •reducer: jupyter notebook with interactive widgets 10
  • 15. Photometry, currently •Use AstroImageJ to: •Choose sources •Click on them once •Save as list •Perform aperture photometry with local background subtraction •Reject outlying pixels in annulus •Result •instrumental magnitudes for night of data •AIJ: http://arxiv.org/abs/1601.02622 11
  • 17. Ensemble differential photometry •Magnitude differences to eliminate atmospheric effects •Several comparison stars •Which stars should be used as comparisons? •How should they be combined? •HELP: which approach is “best”? Is there a best? •Everett & Howell 2001 •Broeg, Fernández & Neuhäuser 2005 •lemon (on github) •Collins, Keilkopf & Stassun 2016 •OSCAAR (somewhat like Broeg et al)(on github) •AAVSO 13
  • 18. Solution for now •Trial and error… •… and gatspy •Insanely fast Lomb-Scargle periodogram 14
  • 19. Solution for now •Trial and error… •… and gatspy •Insanely fast Lomb-Scargle periodogram 14
  • 21. Image viewer •Image viewer with catalog overlay •astroquery to get catalog from Vizer •ccdproc, astropy.wcs and astropy.coordinates to handle coordinates. •mpld3 to display •transition to bqplot? •%matplotlib notebook? 16
  • 22. Image viewer •Image viewer with catalog overlay •astroquery to get catalog from Vizer •ccdproc, astropy.wcs and astropy.coordinates to handle coordinates. •mpld3 to display •transition to bqplot? •%matplotlib notebook? 16
  • 23. This week •differential photometry •Which approach to comparing? •Selecting comparison set •idea: use APASS to transform to standard magnitude system frame-by-frame? •reducer updates (help welcome) •start turning these demos into a package •sneak peak on github, repo is: •glowing-waffle/glowing-waffles 17
  • 24. Links•lemon: http://lemon.readthedocs.org/en/latest/ •end-to-end data reduction and photometry •OSCAAR: http://oscaar.github.io/OSCAAR/ •Focuses on exoplanet transit measurements •gatspy: http://www.astroml.org/gatspy/ •fast Lomb-Scargle implementation •conda-build-all: https://github.com/SciTools/conda-build-all •eases the pain of building packages •sep: http://sep.readthedocs.org/en/v0.5.x/ •Photometry (uses internals from SExtractor) •astroquery: http://astroquery.readthedocs.org/ •Search a variety of online data sources from python. •ginga: https://ejeschke.github.io/ginga/ •Image viewer framework (and a reference viewer) •ccdproc: http://ccdproc.readthedocs.org/en/latest/ •Data reduction •photutils: https://photutils.readthedocs.org/en/latest/ •Photometry (including, but not limited to, IRAF-equivalents) •AstroImageJ: http://www.astro.louisville.edu/software/astroimagej/ •Very nice graphical interface with sophisticated fitting and graphing •reducer: http://reducer.readthedocs.org/en/latest/ •Widget-interface to ccdproc reduction •glowing-waffles: https://github.com/glowing-waffle/glowing-waffles •Very much work-in-progress, examples from today will be up there by Tue, 3/22/16 •feder_image_shuffle: https://github.com/mwcraig/feder_image_shuffle •Among other things, makes jpeg images and gallery pages, also demonstrates interacting with Github API. •msumastro: https://github.com/mwcraig/msumastro •Infrastructure for adding metadata (largely telescope specific) 18