<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 adrasteia
01 Gaia Universe Model
Step1:  Read in the data
Step2:  I had to modify the raw data to get it to read in conveniently.  I try not to modify raw data formats (for reproducibility purposes) but there didn't seem to be a convenient way otherwise.  The problem was the Vtype column is undefined for most of the file, so a fixed-width-file appears to have no column there, which screws up the last few columns.  I simply labeled the first three columns as "ajun" to make it look like there was something there.  So I will just drop those rows.
Step3:  These are the input stars.  The absolute magnitude versus effective temperature.
Step4:  This is sort-of a Malmquist bias plot.  At a given distance, you can detect the brighter stars.
Step5:  This is a typical proper motion scatter plot.
<ASSISTANT_TASK:>
Python Code:
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
%config InlineBackend.figure_format = "retina"
import pandas as pd
sns.set_context("talk")
Explanation: adrasteia
01 Gaia Universe Model: Milky Way Sample
gully
March 2016
Tasks:
- Read in the data
- Make a plot
End of explanation
names = ['byte_range', 'data_type', 'col_ID', 'desc']
fwf_cols = pd.read_fwf('../data/synthetic/gum_mw_columns.tsv',names=names)
fwf_cols.head()
col_names = fwf_cols.col_ID.values
Explanation: Read in the data
End of explanation
gum_mw_alt = pd.read_fwf('../data/synthetic/gum_mw.sam', names=col_names)
gum_mw_alt.drop(["Vamp", "Vper", "Vphase", "Vtype"], inplace=True, axis=1)
gum_mw_alt.head()
col_names
gum = gum_mw_alt
plt.figure(figsize=[5, 8])
#plt.plot(gum['V-I'], gum.Mbol, '.')
plt.plot(gum.Teff, gum.Mbol, '.')
plt.xlim(10000, 2000)
plt.ylim(20, -5)
plt.xlabel("$T_{\mathrm{eff}}$")
plt.ylabel("$M_{\mathrm{bol}}$");
Explanation: I had to modify the raw data to get it to read in conveniently.  I try not to modify raw data formats (for reproducibility purposes) but there didn't seem to be a convenient way otherwise.  The problem was the Vtype column is undefined for most of the file, so a fixed-width-file appears to have no column there, which screws up the last few columns.  I simply labeled the first three columns as "ajun" to make it look like there was something there.  So I will just drop those rows.
End of explanation
plt.figure(figsize=[8, 8])
#plt.plot(gum['V-I'], gum.Mbol, '.')
sc = plt.scatter(gum.r/1000.0, gum.Gmag, c=gum.Teff, s=20, marker='o', vmin=2000, vmax=10000, cmap="Spectral")
plt.xlabel("$d$ (kpc)")
plt.ylabel("$G$")
plt.hlines(12, 0, 10, colors = 'b', linestyles='--')
plt.colorbar(sc)
plt.ylim(20, 5)
plt.xlim(0, 10)
Explanation: These are the input stars.  The absolute magnitude versus effective temperature.
End of explanation
plt.figure(figsize=[8, 8])
plt.plot(gum.pmRA, gum.pmDE, '.', alpha=0.2)
plt.xlabel("$\delta_{\mathrm{RA}}$ (mas/yr)")
plt.ylabel("$\delta_{\mathrm{DEC}}$ (mas/yr)")
Explanation: This is sort-of a Malmquist bias plot.  At a given distance, you can detect the brighter stars.
End of explanation
plt.figure(figsize=[8, 8])
pm = np.sqrt(gum.pmDE**2 + gum.pmDE**2)
plt.plot(gum.r/1000.0, pm, '.', alpha=0.5)
plt.xlabel("$d$ (kpc)")
plt.ylabel("$\delta$ (mas/yr)")
Explanation: This is a typical proper motion scatter plot.
End of explanation
<END_TASK>