HW Software & Tools#
1-1. Slack (1) [10 points]#
(I will check each one of your Slack accounts in our workspace)
Watch the videos below (yes|no)
https://slack.com/#what-is-slack (2m 33s; retrieved 2020-04-14)
https://slack.com/features#why-slack (1m 59s; retrieved 2020-04-14)
Join our workspace (ask TA for the invitation).
NOTE: Refer to our lecture notes Softwares and follow the section for slack.
Change your name to your real name in English, profile picture to whatever you like.
Send a DM (private message) to the TA saying hello.
What are the differences between workspaces and channels? (Describe in about 1-2 lines)
TIP: See the lecture note.
1-2. Slack (2) [10 points]#
Open the DM (direct message) for yourself. Send messages to yourself (for testing purposes) following the items below. Do the following and take screenshots or photos.
(Slack syntax: ≈ Facebook/Instagram + markdown)
Call yourself by
@<yourname>
. Tag a channel with#notice
.Use backquote(
`
) to make an inline code (e.g.,`print("Hello, world!")`
). Your text should become a reddish color with a gray-boxed background.For longer code, use three back quotes (
```
), and a gray block will appear. Make a simple code block with as much content as you wish. Use shift+Enter for a newline.Slack accepts many Markdown syntaxes. Write any message, including bold (use
*
or ctrl+B), italic (use_
or ctrl+I), and strike-through (use~
or ctrl+shift+X). Example:**bold**, _italic_, and ~strike-through~
TIP: In Slack,
*bold*
works. But in normal markdown, a single asterisk means italic, and only a double asterisk means bold (sigh…).
Write any message using a bullet list (use
* content
or ctrl+shift+8 and then use shift+enter) or a numbered list (use1. content
or ctrl+shift+7 and then use shift+enter), and quotation (use> content
or ctrl+shift+9 and then use shift+enter).Write any message using emoji by colon(
:
). Example::smirk::thumbsup:
(use autocomplete!)Write a message with, e.g., your GitHub repo link (ctrl+shift+U)
Open a thread for any of the messages you wrote to yourself (by replying to any of the messages).
Add any reaction to any of the messages.
Share any message with yourself (it cannot be exported since it’s a private message).
2-1. GitHub (1) [4 points]#
What is a
repo
on GitHub?ANSWER: repo = repository.
How can you download a GitHub repo?
TIP: Search for
git clone
.
2-2. GitHub (2 optional) [14 points]#
Skip this unless the TA asks you to solve these.
2 points each. (I will check whether you did these correctly by visiting your repo and looking at the commit histories)
Make a GitHub account. What’s your ID?
Apply for a GitHub student account here. You will get the education pack soon (maybe it will take a few days). Did you get the pack? (answer: yes|no)
Make a test public repo by yourself, using any name. Initialize with the README. Make at least one commit by changing
README.md
or adding other files (see lecture presentation). What is the link to your repo?Note: You must be able to see your commit on GitHub within 1 minute. If you cannot, check whether you added, committed, or pushed correctly. Search on Google by yourselves to learn how to do these.
Clone your repo to your local workspace by
$ git clone <repo_url>
in the terminal (see lecture presentation PPT file)Write
*.txt
to the top line of.gitignore
file. Then add/commit/push.gitignore
file.Tip:
.gitignore
is a hidden file. You may have to tune the file explorer (Finder for Mac) option to see this file.If you don’t see the hidden file
.gitignore
, it means you didn’t select anything for “Add .gitignore” when you were making the repo. Do$ touch .gitignore
on the terminal to make the file.
Make a fake file
test2.txt
($ touch test2.txt
) and dogit status
. Can you seetest2.txt
? (answer: yes|no)Open an issue in your test repo (you can put as much content as you like). Then modify any of the files in your local workspace. Do
git add
this file, make a commit with a message like “Fixes #1”, and push. Is your issue closed? (answer: yes|no)I will visit your repo to check whether you correctly closed this issue.
In the future (when you “work”), you may learn to fork, commit to the forked repo, and request a pull request (PR). The way you closed your first issue is how you will close issues in the future.
2-3. GitHub (3 optional) [6 points]#
Skip this unless the TA asks you to solve these.
2 points each
What is your GitHub repo address again? (Because I just want to click this from your answer sheet…)
I have visited all your repos and raised at least one issue. Modify any file at your local workspace as you wish, commit with the message “Fixes #x” (x is the number of the issue I opened), and push to close the isse. (answer: I did)
Edit your GitHub bio (profile) at
https://github.com/<YourUserName>
. (answer: I did)
3. SAO ds9, Astrometry.net
[8 points]#
Install the most recent version of SAO DS9 on your computer. (answer: yes|no)
Follow the steps below:
Download
SNUO_STX16803-kw4-4-4-20190602-135247-R-60.0.fits
andSNUO_STX16803-kw4-4-4-20190602-135247-R-60.0_bdfw.fits
from our tutorial data link (see README).The first FITS file will not be used, but it is the file before what is called the preprocessing (bias subtraction, dark subtraction, and flat fielding).
Open the second one with SAO DS9.
Can you see the RA/DEC information? (answer: yes|no)
Open the two FITS files you downloaded using SAO DS9. What differences can you find? List at least three of them (e.g., pixel values are different, they are visually different, etc.).
Actually, this WCS information is wrong because I did 4x4 binning to reduce the file size after I obtained the WCS. Thus, we need to update this. Follow the steps below:
Go to
astrometry.net
web service (link).Choose the file (the second FITS file,
SNUO_STX16803-kw4-4-4-20190602-135247-R-60.0_bdfw.fits
)Click on
Advanced Settings [+]
, set the followingsScale →
custom
, Units → “arcseconds per pixel”, Lower bound: 1, Upper bound: 2CRPIX center: check
Click upload.
After a success, go to the results page and download the new FITS file.
Find the positions of USNO URAT 1 stars in the field of view by using SAO ds9’s “Analysis-Catalogs-Optical-URAT1” (see the presentation file).
Take a photo/screenshot of what you see and submit it.
If you have Linux on your computer, you may try the offline version of astrometry.net. This is often essential for professional research. On Mac, you can use brew
. (TO BE UPDATED 2023-04-06. If this is not updated, please let me know — I must have forgotten.)
4. Python & conda [8 points]#
2 points each
I am assuming you have already downloaded and installed Python (Anaconda recommended).
Turn on the terminal (or Anaconda Prompt for Windows users). Install astropy-related packages with the following command: See also Section 5 of our lecture note Softwares. Could you finish the installation? (yes|no)
Open a Jupyter notebook or IPython console (if you don’t know what these are, google it). Then import each of the above packages and print the versions of them (e.g.,
import ccdproc
andprint(ccdproc.__version__)
).While installing affiliated packages, what does
-c
mean? Answer in one word.TIP: Search for
conda install -c
on the Web.
If you do
conda create -n
, what does it create? Answer in one word.TIP: Search for “conda environment” on the web.
Deprecated homework problems regarding IRAF
Why did I use
conda config --set channel_priority false
when installing IRAF?TIP: Search for conda channels and channel priority.
How can you create a new environment via Anaconda? (What is an environment for?)
TIP: Search for
conda create -n
. You used it when you were installing IRAF.
5. Interactive Image Analysis [28 points]#
2 points each
You may have downloaded the FITS files from the SAO DS9 part.
First, open any one of these. Then:
Go to
Frame
→New Frame
and thenFile
→open
to open the other file. ClickFrame
→Single Frame
andScale
→ZScale
. (answer: I did|I didn’t)Press the tab key on your keyboard. Set it to ZScale if this frame hasn’t yet. (answer: yes|no)
On one of the images, use your mouse wheel to zoom in and out, and click the mouse wheel button to move your center of view. Then press the tab key. They are now mismatched with each other in the image frame. Go to
Frame
→Match
→Frame
→Image
and hit the tab key. Are they spatially matched now? (answer: yes|no)When visually inspecting the data, you may also use
Frame
→Match
→Scale
//Scale and Limits
, but these are not useful in our case.
Play with scales (
Scale
→Linear
,Log
, …,Histogram
) and color. Select a scale and color combination for your favorite. Also, choose your favorite style by tuning the options available underColor
→Colarbar
. SelectView
→Horizontal Graph
andVertical Graph
to show both graphs. (answer: yes|no)Display the file
~~~~_bdfw.fits
. SelectEdit
→Region
, andRegion
→Shape
→Circle
. Draw any circle near our object, located roughly at (x, y) = (557, 504). Then clickRegion
→Centroid
. The region should now be centered on the star you chose. If not, move the region slightly so that it centers near the true center of the star, and clickCentroid
again. Did it find the correct center? (answer: yes|no)This centroiding algorithm in DS9 is not robust, so it may change depending on the initial condition. Don’t be too surprised if it changes when you click Centroid many times…
Double-click on the circle you drew, write
Text
you want to display, tune theRadius
to5
in the unit of “Image” and clickApply
. Select your favorite style of this “region”, byColor
,Width
,Property
, andFont
. Go toAnalysis
→Statistics
. From the new window, write down the sum and area(arcsec**2), down to the precision of around 3 significant figures. These should be around 1.6e+5 and 7.6. This is the statistic of “target + sky”.Draw a region as in previous, but with
Region
→Shape
→Annulus
. Make it centered on the same star. Double click it, setInner
andOuter
ofRadius
to20
and40
in the unit of “Image”, respectively. ClickGenerate
andApply
. Go toAnalysis
→Statistics
and write down surf_bri, mean, median, and stddev, down to the precision of around 3 significant figures. These should be around 20000, 2000, 2000, and 10. This is the statistics of the “sky”.Crudely speaking, mean and median must be similar, and it’s nice if |mean - median| ≪ stddev. This is true in our case. Otherwise, we need to employ some empirical or mathematical tricks such as the “MMM (mean-median-mode)” relationship, which we will learn later.
To see how the sky values are distributed, draw a circular region in the sky (where no visible object is there). Then
Analysis
→Histogram
. Does it look like Gaussian? (answer: yes|no)Draw an annulus as in the previous problem and center it on the same star. Double click it. (If you cannot, you may remove the previous regions, or click them and do
Region
→Move to Back
) SetInner
andOuter
ofRadius
to0
and20
in the unit of “Image”, respectively. SetAnnuli
to20
. ClickGenerate
andApply
. Show the radial profile byAnalysis
→Radial profile
. The x-axis must be in arc seconds. Estimate FWHM.From the radial plot from the previous problem: What is a rough estimate of the sky value you find from this plot? Does this match with the
surf_bri
from the previous problem?Roughly calculate
I = sum(circular region) - area(circular region)*surf_bri(annulus)
and instrumental magnitudem_inst = -2.5 log_{10} (I)
of your object.Congratulations! You have just finished your very first simple photometry in your life (answer: yay|yes|hooray|oh|wow|~~no~~).
Do a similar calculation (calculate
I
andm_inst
) for any nearby star (you can choose any star, that (a) does not have any nearby stars and (b) not too faint, not too bright). What is a rough position in X, Y,I
, andm_inst
?Say that star has a cataloged magnitude
m_0
. Using Pogson’s formula, what is our target’s magnitude in terms ofm_0
?