Kernel: Python 3 (Ubuntu Linux)
Simplified Hubble Diagram
This is a tutorial exercise from the Sloan Digital Sky Survey (SDSS) website:
In [1]:
/usr/lib/python3/dist-packages/astroquery/sdss/__init__.py:29: UserWarning: Experimental: SDSS has not yet been refactored to have its API match the rest of astroquery (but it's nearly there).
warnings.warn("Experimental: SDSS has not yet been refactored to have its API "
In [2]:
In [3]:
In [4]:
Object ID | RA | Dec | Magnitude | Redshift | |
---|---|---|---|---|---|
0 | 1237666408439939277 | 354.35000 | 0.39167 | NaN | NaN |
1 | 1237663784195195105 | 354.98998 | 0.13519 | NaN | NaN |
2 | 1237648704592806164 | 219.31858 | 0.17731 | NaN | NaN |
3 | 1237659895636296017 | 260.80622 | 58.58956 | NaN | NaN |
4 | 1237656529458233684 | 263.94885 | 54.36385 | NaN | NaN |
5 | 1237651800697274648 | 150.09651 | -0.27059 | NaN | NaN |
6 | NaN | NaN | NaN | NaN | NaN |
7 | NaN | NaN | NaN | NaN | NaN |
8 | What magnitude did you use? | NaN | NaN | NaN | NaN |
In [5]:
Object ID | RA | Dec | Magnitude | Redshift | |
---|---|---|---|---|---|
0 | 1237666408439939277 | 354.35000 | 0.39167 | NaN | NaN |
1 | 1237663784195195105 | 354.98998 | 0.13519 | NaN | NaN |
2 | 1237648704592806164 | 219.31858 | 0.17731 | NaN | NaN |
3 | 1237659895636296017 | 260.80622 | 58.58956 | NaN | NaN |
4 | 1237656529458233684 | 263.94885 | 54.36385 | NaN | NaN |
5 | 1237651800697274648 | 150.09651 | -0.27059 | NaN | NaN |
In [6]:
0 15.75727
1 16.25334
2 17.0536
3 17.8716
4 18.94336
5 20.13298
/usr/lib/python3/dist-packages/astroquery/sdss/core.py:856: VisibleDeprecationWarning: Reading unicode strings without specifying the encoding argument is deprecated. Set the encoding, use None for the system default.
comments='#'))
In [7]:
In [8]:
Flux is proportional to
In [9]:
Object ID | RA | Dec | Magnitude | Redshift | Flux | |
---|---|---|---|---|---|---|
0 | 1237666408439939277 | 354.35000 | 0.39167 | 15.75727 | 0.009 | 5.037711e-07 |
1 | 1237663784195195105 | 354.98998 | 0.13519 | 16.25334 | 0.060 | 3.191296e-07 |
2 | 1237648704592806164 | 219.31858 | 0.17731 | 17.05360 | 0.105 | 1.528003e-07 |
3 | 1237659895636296017 | 260.80622 | 58.58956 | 17.87160 | 0.152 | 7.197657e-08 |
4 | 1237656529458233684 | 263.94885 | 54.36385 | 18.94336 | 0.238 | 2.684336e-08 |
5 | 1237651800697274648 | 150.09651 | -0.27059 | 20.13298 | 0.314 | 8.982081e-09 |
Distance is proportional to
In [10]:
Object ID | RA | Dec | Magnitude | Redshift | Flux | Relative Distance | |
---|---|---|---|---|---|---|---|
0 | 1237666408439939277 | 354.35000 | 0.39167 | 15.75727 | 0.009 | 5.037711e-07 | 1408.910386 |
1 | 1237663784195195105 | 354.98998 | 0.13519 | 16.25334 | 0.060 | 3.191296e-07 | 1770.175975 |
2 | 1237648704592806164 | 219.31858 | 0.17731 | 17.05360 | 0.105 | 1.528003e-07 | 2558.219991 |
3 | 1237659895636296017 | 260.80622 | 58.58956 | 17.87160 | 0.152 | 7.197657e-08 | 3727.386607 |
4 | 1237656529458233684 | 263.94885 | 54.36385 | 18.94336 | 0.238 | 2.684336e-08 | 6103.537178 |
5 | 1237651800697274648 | 150.09651 | -0.27059 | 20.13298 | 0.314 | 8.982081e-09 | 10551.434821 |
In [11]:
Object ID | RA | Dec | Magnitude | Redshift | Flux | Relative Distance | |
---|---|---|---|---|---|---|---|
0 | 1237666408439939277 | 354.35000 | 0.39167 | 15.75727 | 0.009 | 5.037711e-07 | 1.000000 |
1 | 1237663784195195105 | 354.98998 | 0.13519 | 16.25334 | 0.060 | 3.191296e-07 | 1.256415 |
2 | 1237648704592806164 | 219.31858 | 0.17731 | 17.05360 | 0.105 | 1.528003e-07 | 1.815744 |
3 | 1237659895636296017 | 260.80622 | 58.58956 | 17.87160 | 0.152 | 7.197657e-08 | 2.645581 |
4 | 1237656529458233684 | 263.94885 | 54.36385 | 18.94336 | 0.238 | 2.684336e-08 | 4.332098 |
5 | 1237651800697274648 | 150.09651 | -0.27059 | 20.13298 | 0.314 | 8.982081e-09 | 7.489074 |
In [12]:
In [0]: