---
# System prepended metadata

title: Astro Hack Week 2019課程筆記

---

# Astro Hack Week 2019課程筆記

## 8/26 Data Visualization
### 簡介 (by [Ellianna Abrahams](https://elliesch.github.io/))
* [簡報](https://github.com/AstroHackWeek/AstroHackWeek2019/blob/master/day1_dataviz/ahw2019_dataviz_slides.pdf)
* 資料視覺化的重要性：科學家用圖表發現資料間的關聯，並用圖表向大眾解釋其研究發現
* 有些圖表讓人很快就了解其意涵，有些則否。補充：[Pre-Attentive processing](https://en.wikipedia.org/wiki/Pre-attentive_processing)
* 練習: 給其他人看自己做的圖表, 詢問他們很快就能辨識出圖表資訊是來自哪部份
* [How to Make Your Charts More Accessible with Color Blind Friendly Palettes](https://venngage.com/blog/color-blind-friendly-palette/)
* 分組練習： 從[dataviz_exercise](https://github.com/AstroHackWeek/AstroHackWeek2019/tree/master/day1_dataviz/dataviz_exercise)選一張圖，討論如何改進讓圖的資訊更容易傳達 


### 程式示範 (by [Thomas Robitaille](http://www.thomasrobitaille.com/))
* [Jupyter notebook講義](https://github.com/AstroHackWeek/AstroHackWeek2019/blob/master/day1_dataviz/visualization_tools.ipynb)
* Python的視覺化工具
  * [PyViz - Python tools for data visualization](https://pyviz.org/) 
  * [Matplotlib](https://matplotlib.org/) 
  * [seaborn: statistical data visualization](https://seaborn.pydata.org/) 
  * [Altair: Declarative Visualization in Python](https://altair-viz.github.io/) 
  * [pywwt: WorldWide Telescope from Python](https://pywwt.readthedocs.io/en/stable/)
  * [Glue: multi-dimensional linked-data exploration](http://glueviz.org/)
  * [vaex](https://docs.vaex.io/en/latest/)


## 8/27 Software Development
* [簡報](https://github.com/AstroHackWeek/AstroHackWeek2019/blob/master/day2_software/AHW2019_Day2_SE.pdf) (by [Brigitta Sipocz](https://github.com/bsipocz), [Erik Tollerud](http://www.stsci.edu/~etollerud/) and [Thomas Robitaille](http://www.thomasrobitaille.com/))
### Pull Requests and Reviewing Code
* [Jupyter notebook講義(含練習)](https://github.com/AstroHackWeek/AstroHackWeek2019/blob/master/day2_software/prs_and_reviewing.ipynb)
* 練習：在GitHub上fork講師預先準備的GitHub repo.到自己的帳號下，該repo.中有待修正改進的程式碼，先用git branch指令開分支修正問題，然後向原本的repo.提交修正(pull request)。 
* 練習: review別人的pull request，如果通過，則會將別人的修正合併回原本的repo.的主分支。

### Python packaging
* [Jupyter notebook講義(含練習)](https://github.com/AstroHackWeek/AstroHackWeek2019/blob/master/day2_software/packaging.ipynb)
* 練習：用GitHub開個新專案(加入README檔、授權條款檔案)
* 練習：將自己的專案包成Python套件，並發佈到PyPI平台，讓別人容易安裝
* 可參考[Python Packaging Guide](https://packaging.python.org/guides/tool-recommendations/)及[Astropy package template](https://docs.astropy.org/projects/package-template/)

### Code Documentation
* [Jupyter notebook講義(含練習)](https://github.com/AstroHackWeek/AstroHackWeek2019/blob/master/day2_software/documentation.ipynb)
* 練習：針對自己開發的函式、類別、模組、套件加入說明(用途、需要輸入的參數、會回傳什麼...)
* 練習：利用Python套件[Sphinx](http://www.sphinx-doc.org/en/master/)製作專案的說明文件


### Code testing and continuous integration
* [Jupyter notebook講義(含練習)](https://github.com/AstroHackWeek/AstroHackWeek2019/blob/master/day2_software/testing_and_CI.ipynb)
* 程式加入新功能時，自動化測試之前的功能是否還能運作


## 8/27 Querying surveys & data Management
### Querying with Astroquery
* [Jupyter notebook講義(含練習)](https://github.com/AstroHackWeek/AstroHackWeek2019/blob/master/day2_software/Querying%20with%20Astroquery.ipynb)


### Data Management
* [Jupyter notebook講義(含練習)](https://github.com/AstroHackWeek/AstroHackWeek2019/blob/master/day2_software/data_management.ipynb)


## 8/28 - 29 Machine Learning & Bayesian Inference
### Bayesian Inference
* [簡報](https://github.com/AstroHackWeek/AstroHackWeek2019/blob/master/day3_bayes/AHW_2019_Bayes.pdf) 
* [Jupyter notebook講義1(含練習)](https://github.com/AstroHackWeek/AstroHackWeek2019/blob/master/day3_bayes/ahw_intro_incomplete.ipynb)
* [Jupyter notebook講義2(含練習)](https://github.com/AstroHackWeek/AstroHackWeek2019/blob/master/day3_bayes/ahw_incomplete.ipynb)

### Deep Learning 101
* [簡報](https://github.com/AstroHackWeek/AstroHackWeek2019/blob/master/day4_bayesiandeep/Deep%20Learning%20101%20AHW.pdf)
* [Jupyter notebook講義 - Tutorial Deep 101](https://github.com/AstroHackWeek/AstroHackWeek2019/blob/master/day4_bayesiandeep/_TutorialDeep101_incomplete.ipynb) ([可在Colab中操作運行](https://colab.research.google.com/drive/1DWaS6dCyYkOcJFsoeR8lX87vmx8agu6p))

### Introduction to Deep Probabilistic Learning
* [簡報](https://slides.com/eiffl/tf_proba#/)
* [Jupyter notebook講義 - Understanding Regression Loss Functions And Introduction to TensorFlow Probability](https://github.com/AstroHackWeek/AstroHackWeek2019/blob/master/day4_bayesiandeep/UnderstandingLossFunctions_exercise.ipynb) ([可在Colab中操作運行](https://colab.research.google.com/drive/1vS0v_Ta9ih_KDRfoy0LIY6YtY2jukpsJ))
* [Jupyter notebook講義 - Estimating Galaxy Cluster Masses with TensorFlow Probability](https://github.com/AstroHackWeek/AstroHackWeek2019/blob/master/day4_bayesiandeep/TFP_mass_estimate_exercise.ipynb) ([可在Colab中操作運行](https://colab.research.google.com/drive/1bXb1Lobg3Y2Qu_4pU487Hqn_FrydPBEB))
* [Jupyter notebook講義 - Estimating Photometric Redshifts with TensorFlow Probability](https://github.com/AstroHackWeek/AstroHackWeek2019/blob/master/day4_bayesiandeep/photoz_inference_exercise.ipynb) ([可在Colab中操作運行]())