Libraries


In [1]:
import numpy              as np
import pandas             as pd
import matplotlib.pyplot  as plt
import matplotlib         as mt
import seaborn            as sns
from matplotlib.gridspec  import GridSpec
from mpl_toolkits.mplot3d import Axes3D
from __future__           import unicode_literals
from astropy.cosmology    import FlatLambdaCDM

In [2]:
# %matplotlib notebook

Loading Dataset


In [3]:
my_data = np.loadtxt('../Catalogue/Match07_smalldoubleclean_emlines.csv', delimiter=',', dtype=str)

In [4]:
my_dictionary = {}
for i in range(len(my_data[0, :])):                                         # Converting numpy array into dictionary
    my_dictionary[my_data[0, i]] = np.array(my_data[0 + 1:, i], dtype=str)

In [5]:
print my_data.shape
print my_data.size
print my_data[0,:]


(14332, 164)
2350448
['CATAID' 'OBJID_SDSSDR7' 'ALPHA_J2000' 'DELTA_J2000' 'KRON_RADIUS'
 'PETRO_RADIUS' 'MAG_PETRO_u' 'MAGERR_PETRO_u' 'FLAGS_u' 'MAG_PETRO_g'
 'MAGERR_PETRO_g' 'FLAGS_g' 'MAG_PETRO_r' 'MAGERR_PETRO_r' 'FLAGS_r'
 'MAG_PETRO_i' 'MAGERR_PETRO_i' 'FLAGS_i' 'MAG_PETRO_z' 'MAGERR_PETRO_z'
 'FLAGS_z' 'MAG_PETRO_X' 'MAGERR_PETRO_X' 'FLAGS_X' 'MAG_PETRO_Y'
 'MAGERR_PETRO_Y' 'FLAGS_Y' 'MAG_PETRO_J' 'MAGERR_PETRO_J' 'FLAGS_J'
 'MAG_PETRO_H' 'MAGERR_PETRO_H' 'FLAGS_H' 'MAG_PETRO_K' 'MAGERR_PETRO_K'
 'FLAGS_K' 'FLAGS' 'PSFMAG_R' 'FIBERMAG_R' 'FLAGS_R_SDSS' 'PETRORAD_R'
 'PETROR90_R' 'PETROR50_R' 'PETROMAG_R' 'MODELMAG_U' 'MODELMAG_G'
 'MODELMAG_R' 'MODELMAG_I' 'MODELMAG_Z' 'STATUS' 'BEST_MAG_NUV'
 'BEST_MAGERR_NUV' 'BEST_MAG_FUV' 'BEST_MAGERR_FUV' 'BEST_METHOD'
 'NMATCHUV' 'NMATCHOPT' 'NUVFLAG' 'FUVFLAG' 'NN_DIST' 'NN_NMATCH4'
 'NN_MANY2ONE' 'NN_SFLAGS_NUV' 'NN_SFLAGS_FUV' 'KCORR_FUV' 'KCORR_NUV'
 'KCORR_U' 'KCORR_G' 'KCORR_R' 'KCORR_I' 'KCORR_Z' 'KCORR_Y' 'KCORR_J'
 'KCORR_H' 'KCORR_K' 'CHI2' 'MASS' 'INTSFH' 'METS' 'B300' 'B1000'
 'SURVEY_CODE' 'SURVEY_CLASS' 'nbands' 'S2N' 'PPP' 'logmstar' 'dellogmstar'
 'logmoverl_i' 'dellogmoverl_i' 'logage' 'dellogage' 'logtau' 'dellogtau'
 'logmintsfh' 'dellogmintsfh' 'logmremnants' 'dellogmremnants' 'metal'
 'delmetal' 'extBV' 'delextBV' 'logLWage' 'dellogLWage' 'gminusi'
 'delgminusi' 'uminusr' 'deluminusr' 'gminusi_stars' 'uminusr_stars'
 'C_logM_ur' 'C_logM_gi' 'C_logM_eBV' 'SPECID' 'SURVEY_CODE_EMLINES' 'SN'
 'D4000N' 'D4000N_ERR' 'SURVEY' 'Z' 'NQ' 'PROB' 'HB_FLUX_COMP'
 'HB_FLUX_ERR_COMP' 'HB_EW_COMP' 'HB_EW_ERR_COMP' 'OIIIR_FLUX_COMP'
 'OIIIR_FLUX_ERR_COMP' 'OIIIR_EW_COMP' 'OIIIR_EW_ERR_COMP' 'HA_FLUX_COMP'
 'HA_FLUX_ERR_COMP' 'HA_EW_COMP' 'HA_EW_ERR_COMP' 'NIIR_FLUX_COMP'
 'NIIR_FLUX_ERR_COMP' 'NIIR_EW_COMP' 'NIIR_EW_ERR_COMP' 'MAG_AB_FUV'
 'MAG_AB_NUV' 'MAG_AB_U' 'MAG_AB_G' 'MAG_AB_R' 'MAG_AB_I' 'MAG_AB_Z'
 'MAG_AB_Y' 'MAG_AB_J' 'MAG_AB_H' 'MAG_AB_K' 'MAG_ABSOLUTE_FUV'
 'MAG_ABSOLUTE_NUV' 'MAG_ABSOLUTE_U' 'MAG_ABSOLUTE_G' 'MAG_ABSOLUTE_R'
 'MAG_ABSOLUTE_I' 'MAG_ABSOLUTE_Z' 'MAG_ABSOLUTE_Y' 'MAG_ABSOLUTE_J'
 'MAG_ABSOLUTE_H' 'MAG_ABSOLUTE_K' 'UV_CLASS_YI2011' 'TYPE' 'BPT_CLASS'
 'WHAN_CLASS']

In [6]:
redshift     = my_dictionary['Z'].astype(float)
cataid       = my_dictionary['CATAID'].astype(str)
fuv_band     = my_dictionary['MAG_AB_FUV'].astype(float)   
nuv_band     = my_dictionary['MAG_AB_NUV'].astype(float)
u_band       = my_dictionary['MAG_AB_U'].astype(float)
g_band       = my_dictionary['MAG_AB_G'].astype(float)
r_band       = my_dictionary['MAG_AB_R'].astype(float)
mag_abs_r    = my_dictionary['MAG_ABSOLUTE_R'].astype(float)
mag_abs_nuv  = my_dictionary['MAG_ABSOLUTE_NUV'].astype(float)
mag_abs_fuv  = my_dictionary['MAG_ABSOLUTE_FUV'].astype(float)
stellar_mass = my_dictionary['logmstar'].astype(float)   # stellar mass from sed fitting - log scale
stellar_age  = my_dictionary['logage'].astype(float)     # stellar age - log scale
stellar_met  = my_dictionary['metal'].astype(float)      # stellar metallicity
dn4000       = my_dictionary['D4000N'].astype(float)
h_alpha_flux = my_dictionary['HA_FLUX_COMP'].astype(float) # taken from the COMPLEX table
survey       = my_dictionary['SURVEY'].astype(str)
uv_class     = my_dictionary['UV_CLASS_YI2011'].astype(str)
bpt_class    = my_dictionary['BPT_CLASS'].astype(str)
whan_class   = my_dictionary['WHAN_CLASS'].astype(str)

In [7]:
idx_sf = np.where(whan_class=='SF')
idx_rp = np.where(whan_class=='Retired/Passive')
idx_wa = np.where(whan_class=='wAGN')
idx_sa = np.where(whan_class=='sAGN')
idx_na = np.where(whan_class=='NA')

Selecting only SDSS and GAMA observed H$\alpha$ fluxes

See warning here: http://www.gama-survey.org/dr3/schema/dmu.php?id=8

Warnings

  • Only AAOmega and SDSS spectra are flux calibrated. DO NOT USE THE LINE FLUXES DERIVED FOR SPECTRA FROM SURVEYS OTHER THAN SDSS AND GAMA!

  • SDSS spectra have been scaled by the ratio of the petrosian to 3" aperture flux. This places them on a similar absolute flux scale cf. the GAMA AAOmega spectra (although note that BOSS spectra are taken through 2" apertures so the absolute flux calibration for BOSS spectra will be systematically underestimated). The FSCALE parameter gives the scaling factor used.

  • Again, only EWs should be used for 2dFGRS, 2QZ, WiggleZ, MGC, 2SLAQ spectra.


In [8]:
survey_safe_idx = []
for i in range (survey.size):
    if survey[i] == 'GAMA':
        survey_safe_idx.append(i)
    elif survey[i] == 'SDSS':
        survey_safe_idx.append(i)
    else:
        continue
survey_safe_idx = np.array(survey_safe_idx)
survey_safe = survey[survey_safe_idx]

print np.unique(survey_safe)
print survey_safe.size
print survey.size
print np.unique(survey)


['GAMA']
14331
14331
['GAMA']

SUCCESS

ALL OF OUR EMISSION LINES WERE OBSERVED BY GAMA! YES!

SFR -- See Kenicutt 1998

Calculating the luminosity for a given cosmology for H$\alpha$ fluxes


In [9]:
adopted_cosmology = FlatLambdaCDM(H0=70, Om0=0.3)

In [10]:
luminosity_distance = adopted_cosmology.luminosity_distance(redshift).value

In [11]:
adopted_cosmology.luminosity_distance(redshift)


Out[11]:
$[1007.0937,~405.36982,~891.82435,~\dots, 883.42906,~1293.7449,~356.51212] \; \mathrm{Mpc}$

But... 1Mpc = 3.086E24 cm


In [12]:
mpc_to_cm = 3.086E24

In [13]:
h_alpha_wl        = 6.563E-5   # in cm = 6563A
idx_clean         = np.where((h_alpha_flux!=-99999.0)*(stellar_mass!=-99.))
h_alpha_clean     = h_alpha_flux[idx_clean]
uv_clean          = uv_class[idx_clean]
mass_clean        = stellar_mass[idx_clean]
stellar_age_clean = stellar_age[idx_clean]
stellar_met_clean = stellar_met[idx_clean]
dn4000_clean      = dn4000[idx_clean]

In [14]:
idx_d4k_clean = np.where((dn4000_clean>=0)*(dn4000_clean<3))
print idx_d4k_clean


(array([    0,     1,     2, ..., 13315, 13316, 13317]),)

In [15]:
# plt.hist(dn4000_clean, bins=50)
plt.hist(dn4000_clean[idx_d4k_clean], bins=50)
plt.yscale('log')
plt.show()



In [16]:
luminosity = 4*np.pi*((luminosity_distance[idx_clean]/h_alpha_wl)**2)*(h_alpha_clean)

In [17]:
luminosity_cm = luminosity * mpc_to_cm

In [18]:
sfr = (7.9E-42) * luminosity_cm  # the wl correction 
print sfr.size
print (h_alpha_flux[[stellar_mass==-99]]).size


13318
13

In [19]:
idx_uvup   = np.where(uv_class[idx_clean]=='UV_UPTURN')
idx_uvwk   = np.where(uv_class[idx_clean]=='UV_WEAK')
idx_rsf    = np.where(uv_class[idx_clean]=='RSF')
idx_redseq = np.where((nuv_band-r_band)[idx_clean]>5.4)

In [20]:
print np.array(idx_uvup).size
print np.array(idx_uvwk).size
print np.array(idx_redseq).size
print np.array(idx_uvup).size+np.array(idx_uvwk).size


209
292
501
501

But let's separate the UV upturn objects


In [21]:
plt.hist(sfr, bins=50)
plt.xscale('log')
plt.show()



In [22]:
sns.set_style("white")
plt.semilogy(mass_clean[[uv_clean=='RSF']], sfr[[uv_clean=='RSF']], 'o', c='green', label='RSF', alpha=0.5)
plt.semilogy(mass_clean[[uv_clean=='UV_WEAK']], sfr[[uv_clean=='UV_WEAK']], 'o', color='yellow', label='UV weak', 
             alpha=0.5)
plt.semilogy(mass_clean[[uv_clean=='UV_UPTURN']], sfr[[uv_clean=='UV_UPTURN']], 'o', color='red', label='UV upturn', 
             alpha=0.5)
plt.xlabel('Log(M$_*$)')
plt.ylabel('SFR (M$_\odot$ yr$^{-1}$)')
plt.legend(loc='best')
plt.ylim(10**(-3), )
plt.show()

plt.savefig('./../Figs/g2_mass_sfr.png')



In [23]:
mag_abs_nuv_clean = mag_abs_nuv[idx_clean]
mag_abs_fuv_clean = mag_abs_fuv[idx_clean]
uv_color_clean = (fuv_band-nuv_band)[idx_clean]
uv_class_clean = uv_class[idx_clean]

In [24]:
with plt.style.context("seaborn-white"):
    plt.rcParams["axes.edgecolor"] = "0.15"
    plt.rcParams["axes.linewidth"] = 1.
      
    fig = plt.figure(figsize=(8,6))
    gs  = GridSpec(4,4, height_ratios=[2.,1.5,3.,3.], width_ratios=[3.,1.5,3.,1.5])

    ax_joint  = fig.add_subplot(gs[1:4,0:3])
    ax_marg_x = fig.add_subplot(gs[0,0:3])
    ax_marg_y = fig.add_subplot(gs[1:4,3])
    
    # Scatter plot -- MAIN PLOT ------------------------------------------------------------------------------------
    ax_joint.scatter(mag_abs_nuv_clean, uv_color_clean, c='gray', alpha=0.3, label='All galaxies')
    ax_joint.scatter(mag_abs_nuv_clean[idx_uvwk], uv_color_clean[idx_uvwk], c='#dfc27d', alpha=0.5, label='UV Weak')
    ax_joint.scatter(mag_abs_nuv_clean[idx_uvup], uv_color_clean[idx_uvup], c='#a6611a', alpha=0.5, label='UV Upturn')
    ax_joint.xaxis.set_major_locator(mt.ticker.MultipleLocator(1))
    ax_joint.yaxis.set_major_locator(mt.ticker.MultipleLocator(1))
    ax_joint.tick_params('both', labelsize='14')
    l1 = ax_joint.legend(loc='lower left', numpoints=1, fontsize=14, frameon=True, framealpha=0.85)
    l1.get_frame().set_edgecolor('black')
    
    # Mnuv distribution -- on the top ------------------------------------------------------------------------------
    n, bins, patches = ax_marg_x.hist(mag_abs_nuv_clean, color='gray', alpha=0.3, bins=30, edgecolor='black', 
                                      normed=True)
    n, bins, patches = ax_marg_x.hist(mag_abs_nuv_clean[idx_uvwk], color='#dfc27d', alpha=0.5, bins=bins, 
                                      edgecolor='black', normed=True)
    n, bins, patches = ax_marg_x.hist(mag_abs_nuv_clean[idx_uvup], color='#a6611a', alpha=0.5, bins=bins, 
                                      edgecolor='black', normed=True)
    ax_marg_x.tick_params('both', labelsize='14')
    ax_marg_x.yaxis.set_major_locator(mt.ticker.MultipleLocator(0.5))
   
    
    # FUV-NUV distribution --on the right --------------------------------------------------------------------------
    n, bins, patches = ax_marg_y.hist(uv_color_clean, orientation="horizontal", color='gray', alpha=0.3, bins=20, 
                                      edgecolor='black', normed=True)
    n, bins, patches = ax_marg_y.hist(uv_color_clean[idx_uvwk], orientation="horizontal", color='#dfc27d', 
                                      alpha=0.5, bins=bins, edgecolor='black', normed=True)
    n, bins, patches = ax_marg_y.hist(uv_color_clean[idx_uvup], orientation="horizontal", color='#a6611a', 
                                      alpha=0.5, bins=bins, edgecolor='black', normed=True)
    ax_marg_y.yaxis.set_major_locator(mt.ticker.MultipleLocator(0.5))
    ax_marg_y.tick_params(axis='x', labelsize='14')
    
   # Turn off tick labels on marginals
    plt.setp(ax_marg_x.get_xticklabels(), visible=False)
    plt.setp(ax_marg_y.get_yticklabels(), visible=False)

    # Set labels on joint
    ax_joint.set_xlabel("M$_{NUV}$", fontsize=15)
    ax_joint.set_ylabel("FUV-NUV", fontsize=15)

    # Set labels on marginals
    ax_marg_y.set_xlabel('FUV-NUV \n frequency', fontsize=15)
    ax_marg_x.set_ylabel('M$_{NUV}$ \n frequency', fontsize=15)
    
    plt.savefig('../Figs/g2_cmag2_uv_dist.pdf')
    plt.savefig('../Figs/g2_cmag2_uv_dist.png')
    plt.tight_layout()
    plt.show()


<matplotlib.figure.Figure at 0x7ff084361250>

In [24]:
with plt.style.context("seaborn-white"):
    plt.rcParams["axes.edgecolor"] = "0.15"
    plt.rcParams["axes.linewidth"] = 1.
      
    fig = plt.figure(figsize=(8,6))
    gs  = GridSpec(4,4, height_ratios=[2.,1.5,3.,3.], width_ratios=[3.,1.5,3.,1.5])

    ax_joint  = fig.add_subplot(gs[1:4,0:3])
    ax_marg_x = fig.add_subplot(gs[0,0:3])
    ax_marg_y = fig.add_subplot(gs[1:4,3])
    
    # Scatter plot -- MAIN PLOT ------------------------------------------------------------------------------------
#     ax_joint.scatter(mag_abs_nuv_clean, uv_color_clean, c='gray', alpha=0.3, label='All galaxies')
    ax_joint.scatter(mag_abs_nuv_clean[idx_uvwk], uv_color_clean[idx_uvwk], c='#dfc27d', alpha=0.5, label='UV Weak')
    ax_joint.scatter(mag_abs_nuv_clean[idx_uvup], uv_color_clean[idx_uvup], c='#a6611a', alpha=0.5, label='UV Upturn')
    ax_joint.xaxis.set_major_locator(mt.ticker.MultipleLocator(1))
    ax_joint.yaxis.set_major_locator(mt.ticker.MultipleLocator(1))
    ax_joint.tick_params('both', labelsize='14')
    l1 = ax_joint.legend(loc='lower left', numpoints=1, fontsize=14, frameon=True, framealpha=0.85)
    l1.get_frame().set_edgecolor('black')
    
    # Mnuv distribution -- on the top ------------------------------------------------------------------------------
    n, bins, patches = ax_marg_x.hist(mag_abs_nuv_clean, color='gray', alpha=0.0, bins=30, edgecolor='black', 
                                      normed=True)
    n, bins, patches = ax_marg_x.hist(mag_abs_nuv_clean[idx_uvwk], color='#dfc27d', alpha=0.5, bins=bins, 
                                      edgecolor='black', normed=True)
    n, bins, patches = ax_marg_x.hist(mag_abs_nuv_clean[idx_uvup], color='#a6611a', alpha=0.5, bins=bins, 
                                      edgecolor='black', normed=True)
    ax_marg_x.tick_params('both', labelsize='14')
    ax_marg_x.yaxis.set_major_locator(mt.ticker.MultipleLocator(0.5))
   
    
    # FUV-NUV distribution --on the right --------------------------------------------------------------------------
    n, bins, patches = ax_marg_y.hist(uv_color_clean, orientation="horizontal", color='gray', alpha=0.0, bins=20, 
                                      edgecolor='black', normed=True)
    n, bins, patches = ax_marg_y.hist(uv_color_clean[idx_uvwk], orientation="horizontal", color='#dfc27d', 
                                      alpha=0.5, bins=bins, edgecolor='black', normed=True)
    n, bins, patches = ax_marg_y.hist(uv_color_clean[idx_uvup], orientation="horizontal", color='#a6611a', 
                                      alpha=0.5, bins=bins, edgecolor='black', normed=True)
    ax_marg_y.yaxis.set_major_locator(mt.ticker.MultipleLocator(0.5))
    ax_marg_y.tick_params(axis='x', labelsize='14')
    
   # Turn off tick labels on marginals
    plt.setp(ax_marg_x.get_xticklabels(), visible=False)
    plt.setp(ax_marg_y.get_yticklabels(), visible=False)

    # Set labels on joint
    ax_joint.set_xlabel("M$_{NUV}$", fontsize=15)
    ax_joint.set_ylabel("FUV-NUV", fontsize=15)

    # Set labels on marginals
    ax_marg_y.set_xlabel('FUV-NUV \n frequency', fontsize=15)
    ax_marg_x.set_ylabel('M$_{NUV}$ \n frequency', fontsize=15)
    
    plt.savefig('../Figs/g2_cmag3_uv_dist.pdf')
    plt.savefig('../Figs/g2_cmag3_uv_dist.png')
    plt.tight_layout()
    plt.show()


<matplotlib.figure.Figure at 0x7f77be17c150>

In [26]:
with plt.style.context("seaborn-white"):
    plt.rcParams["axes.edgecolor"] = "0.15"
    plt.rcParams["axes.linewidth"] = 1.
      
    fig = plt.figure(figsize=(8,6))
    gs  = GridSpec(4,4, height_ratios=[2.,1.5,3.,3.], width_ratios=[3.,1.5,3.,1.5])

    ax_joint  = fig.add_subplot(gs[1:4,0:3])
    ax_marg_x = fig.add_subplot(gs[0,0:3])
    ax_marg_y = fig.add_subplot(gs[1:4,3])
    
    # Scatter plot -- MAIN PLOT ------------------------------------------------------------------------------------
#     ax_joint.scatter(mag_abs_fuv_clean, uv_color_clean, c='gray', alpha=0.3, label='All galaxies')
    ax_joint.scatter(mag_abs_fuv_clean[idx_uvwk], uv_color_clean[idx_uvwk], c='#dfc27d', alpha=0.5, label='UV Weak')
    ax_joint.scatter(mag_abs_fuv_clean[idx_uvup], uv_color_clean[idx_uvup], c='#a6611a', alpha=0.5, label='UV Upturn')
    ax_joint.xaxis.set_major_locator(mt.ticker.MultipleLocator(1))
    ax_joint.yaxis.set_major_locator(mt.ticker.MultipleLocator(1))
    ax_joint.tick_params('both', labelsize='14')
    l1 = ax_joint.legend(loc='lower left', numpoints=1, fontsize=14, frameon=True, framealpha=0.85)
    l1.get_frame().set_edgecolor('black')
    
    # Mnuv distribution -- on the top ------------------------------------------------------------------------------
    n, bins, patches = ax_marg_x.hist(mag_abs_fuv_clean, color='gray', alpha=0.0, bins=30, edgecolor='black', 
                                      normed=True)
    n, bins, patches = ax_marg_x.hist(mag_abs_fuv_clean[idx_uvwk], color='#dfc27d', alpha=0.5, bins=bins, 
                                      edgecolor='black', normed=True)
    n, bins, patches = ax_marg_x.hist(mag_abs_fuv_clean[idx_uvup], color='#a6611a', alpha=0.5, bins=bins, 
                                      edgecolor='black', normed=True)
    ax_marg_x.tick_params('both', labelsize='14')
    ax_marg_x.yaxis.set_major_locator(mt.ticker.MultipleLocator(0.5))
   
    
    # FUV-NUV distribution --on the right --------------------------------------------------------------------------
    n, bins, patches = ax_marg_y.hist(uv_color_clean, orientation="horizontal", color='gray', alpha=0.0, bins=20, 
                                      edgecolor='black', normed=True)
    n, bins, patches = ax_marg_y.hist(uv_color_clean[idx_uvwk], orientation="horizontal", color='#dfc27d', 
                                      alpha=0.5, bins=bins, edgecolor='black', normed=True)
    n, bins, patches = ax_marg_y.hist(uv_color_clean[idx_uvup], orientation="horizontal", color='#a6611a', 
                                      alpha=0.5, bins=bins, edgecolor='black', normed=True)
    ax_marg_y.yaxis.set_major_locator(mt.ticker.MultipleLocator(0.5))
    ax_marg_y.tick_params(axis='x', labelsize='14')
    
   # Turn off tick labels on marginals
    plt.setp(ax_marg_x.get_xticklabels(), visible=False)
    plt.setp(ax_marg_y.get_yticklabels(), visible=False)

    # Set labels on joint
    ax_joint.set_xlabel("M$_{FUV}$", fontsize=15)
    ax_joint.set_ylabel("FUV-NUV", fontsize=15)

    # Set labels on marginals
    ax_marg_y.set_xlabel('FUV-NUV \n frequency', fontsize=15)
    ax_marg_x.set_ylabel('M$_{FUV}$ \n frequency', fontsize=15)
    
    plt.savefig('../Figs/g2_cmag4_uv_dist.pdf')
    plt.savefig('../Figs/g2_cmag4_uv_dist.png')
    plt.tight_layout()
    plt.show()


Redoing the above with "my" classification


In [25]:
sns.set_style("white")
plt.rcParams["axes.edgecolor"] = "0.15"
plt.rcParams["axes.linewidth"] = 1.
plt.subplots(1,1, figsize=(10,3.3))

# WHAN SF CLASS ------------------
ax01 = plt.subplot(1,5,1)
plt.semilogy(mass_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='SF')]], 
            sfr[[(uv_clean=='RSF')*(whan_class[idx_clean]=='SF')]], 'o', alpha=0.5, label='RSF')
plt.semilogy(mass_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='SF')]], 
            sfr[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='SF')]], 'o', alpha=0.5, label='UV weak')
plt.semilogy(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='SF')]], 
            sfr[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='SF')]], 'o', alpha=0.5, label='UV upturn')
plt.title("WHAN: SF")
# plt.xlabel('Log(M$_*$)')
plt.ylabel('SFR (M$_\odot$ yr$^{-1}$)', fontsize=14)
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
plt.ylim(10**(-2), 10**(3))

# WHAN sAGN CLASS ------------------
ax02 = plt.subplot(1,5,2)
plt.semilogy(mass_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='sAGN')]], 
            sfr[[(uv_clean=='RSF')*(whan_class[idx_clean]=='sAGN')]], 'o', alpha=0.5, label='RSF')
plt.semilogy(mass_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='sAGN')]], 
            sfr[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='sAGN')]], 'o', alpha=0.5, label='UV weak')
plt.semilogy(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='sAGN')]], 
            sfr[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='sAGN')]], 'o', alpha=0.5, label='UV upturn')
ax02.yaxis.set_visible(False)
plt.title("WHAN: sAGN")
# plt.xlabel('Log(M$_*$)')
plt.ylabel('SFR (M$_\odot$ yr$^{-1}$)')
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
plt.ylim(10**(-2), 10**(3))

# WHAN wAGN CLASS ------------------
ax03= plt.subplot(1,5,3)
plt.semilogy(mass_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='wAGN')]], 
            sfr[[(uv_clean=='RSF')*(whan_class[idx_clean]=='wAGN')]], 'o', alpha=0.5, label='RSF')
plt.semilogy(mass_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='wAGN')]], 
            sfr[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='wAGN')]], 'o', alpha=0.5, label='UV weak')
plt.semilogy(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='wAGN')]], 
            sfr[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='wAGN')]], 'o', alpha=0.5, label='UV upturn')
ax03.yaxis.set_visible(False)
plt.title("WHAN: wAGN")
plt.xlabel('Log(M$_*$)', fontsize=15)
plt.ylabel('SFR (M$_\odot$ yr$^{-1}$)')
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
plt.ylim(10**(-2), 10**(3))
plt.legend(loc='upper left')

# WHAN Retired/Passive CLASS ------------------
ax04 = plt.subplot(1,5,4)
plt.semilogy(mass_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='Retired/Passive')]], 
            sfr[[(uv_clean=='RSF')*(whan_class[idx_clean]=='Retired/Passive')]], 'o', alpha=0.5, label='RSF')
plt.semilogy(mass_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='Retired/Passive')]], 
            sfr[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='Retired/Passive')]], 'o', alpha=0.5, 
             label='UV weak')
plt.semilogy(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='Retired/Passive')]], 
            sfr[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='Retired/Passive')]], 'o', alpha=0.5, 
             label='UV upturn')
plt.title("WHAN: Retired/Passive")
ax04.yaxis.set_visible(False)
# plt.xlabel('Log(M$_*$)')
plt.ylabel('SFR (M$_\odot$ yr$^{-1}$)')
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
plt.ylim(10**(-2), 10**(3))

# WHAN NA CLASS (unclassified) ------------------
ax05 = plt.subplot(1,5,5)
plt.semilogy(mass_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='NA')]], 
            sfr[[(uv_clean=='RSF')*(whan_class[idx_clean]=='NA')]], 'o', alpha=0.5, label='RSF')
plt.semilogy(mass_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='NA')]], 
            sfr[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='NA')]], 'o', alpha=0.5, label='UV weak')
plt.semilogy(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='NA')]], 
            sfr[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='NA')]], 'o', alpha=0.5, label='UV upturn')
plt.title("WHAN: NA")
ax05.yaxis.set_visible(False)
# plt.xlabel('Log(M$_*$)')
plt.ylabel('SFR (M$_\odot$ yr$^{-1}$)')
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
plt.ylim(10**(-2), 10**(3))

plt.tight_layout(w_pad=0.0)
plt.savefig('./../Figs/g2_mass_sfr_whan.png')
plt.show()


Other dependencies


In [26]:
sns.set_style("white")
plt.rcParams["axes.edgecolor"] = "0.15"
plt.rcParams["axes.linewidth"] = 1.
plt.subplots(1,1, figsize=(10,3.3))

# WHAN SF CLASS ------------------
ax01 = plt.subplot(1,5,1)
plt.semilogy(stellar_age_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='SF')]], 
            sfr[[(uv_clean=='RSF')*(whan_class[idx_clean]=='SF')]], 'o', alpha=0.5, label='RSF')
plt.semilogy(stellar_age_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='SF')]], 
            sfr[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='SF')]], 'o', alpha=0.5, label='UV weak')
plt.semilogy(stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='SF')]], 
            sfr[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='SF')]], 'o', alpha=0.5, label='UV upturn')
plt.title("WHAN: SF")
# plt.xlabel('Log(M$_*$)')
plt.ylabel('SFR (M$_\odot$ yr$^{-1}$)', fontsize='14')
plt.tick_params('both', labelsize='12')
plt.xticks([9,9.5,10])
plt.xlim(8.8,10)
plt.ylim(10**(-2), 10**(3))

# WHAN sAGN CLASS ------------------
ax02 = plt.subplot(1,5,2)
plt.semilogy(stellar_age_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='sAGN')]], 
            sfr[[(uv_clean=='RSF')*(whan_class[idx_clean]=='sAGN')]], 'o', alpha=0.5, label='RSF')
plt.semilogy(stellar_age_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='sAGN')]], 
            sfr[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='sAGN')]], 'o', alpha=0.5, label='UV weak')
plt.semilogy(stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='sAGN')]], 
            sfr[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='sAGN')]], 'o', alpha=0.5, label='UV upturn')
ax02.yaxis.set_visible(False)
plt.title("WHAN: sAGN")
plt.ylabel('SFR (M$_\odot$ yr$^{-1}$)')
plt.tick_params('both', labelsize='12')
plt.xticks([9,9.5,10])
plt.xlim(8.8,10)
plt.ylim(10**(-2), 10**(3))

# WHAN wAGN CLASS ------------------
ax03= plt.subplot(1,5,3)
plt.semilogy(stellar_age_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='wAGN')]], 
            sfr[[(uv_clean=='RSF')*(whan_class[idx_clean]=='wAGN')]], 'o', alpha=0.5, label='RSF')
plt.semilogy(stellar_age_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='wAGN')]], 
            sfr[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='wAGN')]], 'o', alpha=0.5, label='UV weak')
plt.semilogy(stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='wAGN')]], 
            sfr[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='wAGN')]], 'o', alpha=0.5, label='UV upturn')
ax03.yaxis.set_visible(False)
plt.title("WHAN: wAGN")
plt.xlabel('Log(t)  (Gyr)', fontsize=14)
plt.ylabel('SFR (M$_\odot$ yr$^{-1}$)')
plt.tick_params('both', labelsize='12')
plt.xlim(8.8,10)
plt.xticks([9,9.5,10])
plt.ylim(10**(-2), 10**(3))
plt.legend(loc='lower left')

# WHAN Retired/Passive CLASS ------------------
ax04 = plt.subplot(1,5,4)
plt.semilogy(stellar_age_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='Retired/Passive')]], 
            sfr[[(uv_clean=='RSF')*(whan_class[idx_clean]=='Retired/Passive')]], 'o', alpha=0.5, label='RSF')
plt.semilogy(stellar_age_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='Retired/Passive')]], 
            sfr[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='Retired/Passive')]], 'o', alpha=0.5, 
             label='UV weak')
plt.semilogy(stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='Retired/Passive')]], 
            sfr[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='Retired/Passive')]], 'o', alpha=0.5, 
             label='UV upturn')
plt.title("WHAN: Retired/Passive")
ax04.yaxis.set_visible(False)
# plt.xlabel('Log(M$_*$)')
plt.ylabel('SFR (M$_\odot$ yr$^{-1}$)')
plt.tick_params('both', labelsize='12')
plt.xticks([9,9.5,10])
plt.xlim(8.8,10)
plt.ylim(10**(-2), 10**(3))

# WHAN NA CLASS (unclassified) ------------------
ax05 = plt.subplot(1,5,5)
plt.semilogy(stellar_age_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='NA')]], 
            sfr[[(uv_clean=='RSF')*(whan_class[idx_clean]=='NA')]], 'o', alpha=0.5, label='RSF')
plt.semilogy(stellar_age_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='NA')]], 
            sfr[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='NA')]], 'o', alpha=0.5, label='UV weak')
plt.semilogy(stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='NA')]], 
            sfr[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='NA')]], 'o', alpha=0.5, label='UV upturn')
plt.title("WHAN: NA")
ax05.yaxis.set_visible(False)
# plt.xlabel('Log(M$_*$)')
plt.ylabel('SFR (M$_\odot$ yr$^{-1}$)')
plt.tick_params('both', labelsize='12')
plt.xticks([9,9.5,10])
plt.xlim(8.8,10)
plt.ylim(10**(-2), 10**(3))

plt.tight_layout(w_pad=0.0)
plt.savefig('./../Figs/g2_stellar_age_sfr_whan.png')
plt.savefig('./../Figs/g2_stellar_age_sfr_whan.pdf')
plt.show()


Other mass dependencies

Dn4000


In [27]:
dn4000_clean2 = dn4000_clean[idx_d4k_clean]
mass_clean2 = mass_clean[idx_d4k_clean]
uv_clean2 = uv_clean[idx_d4k_clean]
whan_clean = whan_class[idx_clean]
whan_clean2 = whan_clean[idx_d4k_clean]

In [28]:
print dn4000_clean2[[dn4000_clean2<0]].size


0

In [29]:
print dn4000_clean.size, dn4000_clean2.size, dn4000_clean.size - dn4000_clean2.size


13318 12944 374

In [30]:
sns.set_style("white")
plt.rcParams["axes.edgecolor"] = "0.15"
plt.rcParams["axes.linewidth"] = 1.
plt.subplots(1,1, figsize=(10,3.3))

# WHAN SF CLASS ------------------
ax01 = plt.subplot(1,5,1)
plt.plot(mass_clean2[[(uv_clean2=='RSF')*(whan_clean2=='SF')]], 
            dn4000_clean2[[(uv_clean2=='RSF')*(whan_clean2=='SF')]], 'o', alpha=0.5, label='RSF')
plt.plot(mass_clean2[[(uv_clean2=='UV_WEAK')*(whan_clean2=='SF')]], 
            dn4000_clean2[[(uv_clean2=='UV_WEAK')*(whan_clean2=='SF')]], 'o', alpha=0.5, label='UV weak')
plt.plot(mass_clean2[[(uv_clean2=='UV_UPTURN')*(whan_clean2=='SF')]], 
            dn4000_clean2[[(uv_clean2=='UV_UPTURN')*(whan_clean2=='SF')]], 'o', alpha=0.5, label='UV upturn')
plt.title("WHAN: SF")
# plt.xlabel('Log(M$_*$)')
plt.ylabel('D$_n$ 4000', fontsize=14)
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
plt.ylim(0, 3)

# WHAN sAGN CLASS ------------------
ax02 = plt.subplot(1,5,2)
plt.plot(mass_clean2[[(uv_clean2=='RSF')*(whan_clean2=='sAGN')]], 
            dn4000_clean2[[(uv_clean2=='RSF')*(whan_clean2=='sAGN')]], 'o', alpha=0.5, label='RSF')
plt.plot(mass_clean2[[(uv_clean2=='UV_WEAK')*(whan_clean2=='sAGN')]], 
            dn4000_clean2[[(uv_clean2=='UV_WEAK')*(whan_clean2=='sAGN')]], 'o', alpha=0.5, label='UV weak')
plt.plot(mass_clean2[[(uv_clean2=='UV_UPTURN')*(whan_clean2=='sAGN')]], 
            dn4000_clean2[[(uv_clean2=='UV_UPTURN')*(whan_clean2=='sAGN')]], 'o', alpha=0.5, label='UV upturn')
ax02.yaxis.set_visible(False)
plt.title("WHAN: sAGN")
# plt.xlabel('Log(M$_*$)')
plt.ylabel('D$_n$ 4000', fontsize=14)
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
plt.ylim(0, 3)

# WHAN wAGN CLASS ------------------
ax03= plt.subplot(1,5,3)
plt.plot(mass_clean2[[(uv_clean2=='RSF')*(whan_clean2=='wAGN')]], 
            dn4000_clean2[[(uv_clean2=='RSF')*(whan_clean2=='wAGN')]], 'o', alpha=0.5, label='RSF')
plt.plot(mass_clean2[[(uv_clean2=='UV_WEAK')*(whan_clean2=='wAGN')]], 
            dn4000_clean2[[(uv_clean2=='UV_WEAK')*(whan_clean2=='wAGN')]], 'o', alpha=0.5, label='UV weak')
plt.plot(mass_clean2[[(uv_clean2=='UV_UPTURN')*(whan_clean2=='wAGN')]], 
            dn4000_clean2[[(uv_clean2=='UV_UPTURN')*(whan_clean2=='wAGN')]], 'o', alpha=0.5, label='UV upturn')
ax03.yaxis.set_visible(False)
plt.title("WHAN: wAGN")
plt.xlabel('Log(M$_*$)', fontsize=14)
plt.ylabel('D$_n$ 4000', fontsize=14)
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
plt.ylim(0, 3)
ax03.legend(loc='lower center', bbox_to_anchor=(2.1, -0.3), fontsize=12, frameon=True, framealpha=1., ncol=3)

# WHAN Retired/Passive CLASS ------------------
ax04 = plt.subplot(1,5,4)
plt.plot(mass_clean2[[(uv_clean2=='RSF')*(whan_clean2=='Retired/Passive')]], 
            dn4000_clean2[[(uv_clean2=='RSF')*(whan_clean2=='Retired/Passive')]], 'o', alpha=0.5, label='RSF')
plt.plot(mass_clean2[[(uv_clean2=='UV_WEAK')*(whan_clean2=='Retired/Passive')]], 
            dn4000_clean2[[(uv_clean2=='UV_WEAK')*(whan_clean2=='Retired/Passive')]], 'o', alpha=0.5, 
             label='UV weak')
plt.plot(mass_clean2[[(uv_clean2=='UV_UPTURN')*(whan_clean2=='Retired/Passive')]], 
            dn4000_clean2[[(uv_clean2=='UV_UPTURN')*(whan_clean2=='Retired/Passive')]], 'o', alpha=0.5, 
             label='UV upturn')
plt.title("WHAN: Retired/Passive")
ax04.yaxis.set_visible(False)
# plt.xlabel('Log(M$_*$)')
plt.ylabel('D$_n$ 4000', fontsize=14)
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
plt.ylim(0, 3)

# WHAN NA CLASS (unclassified) ------------------
ax05 = plt.subplot(1,5,5)
plt.plot(mass_clean2[[(uv_clean2=='RSF')*(whan_clean2=='NA')]], 
            dn4000_clean2[[(uv_clean2=='RSF')*(whan_clean2=='NA')]], 'o', alpha=0.5, label='RSF')
plt.plot(mass_clean2[[(uv_clean2=='UV_WEAK')*(whan_clean2=='NA')]], 
            dn4000_clean2[[(uv_clean2=='UV_WEAK')*(whan_clean2=='NA')]], 'o', alpha=0.5, label='UV weak')
plt.plot(mass_clean2[[(uv_clean2=='UV_UPTURN')*(whan_clean2=='NA')]], 
            dn4000_clean2[[(uv_clean2=='UV_UPTURN')*(whan_clean2=='NA')]], 'o', alpha=0.5, label='UV upturn')
plt.title("WHAN: NA")
ax05.yaxis.set_visible(False)
# plt.xlabel('Log(M$_*$)')
plt.ylabel('D$_n$ 4000', fontsize=14)
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
plt.ylim(0, 3)

plt.tight_layout(w_pad=0.0)
plt.savefig('./../Figs/g2_mass_dn4000_whan.png')
plt.savefig('./../Figs/g2_mass_dn4000_whan.pdf')
plt.show()



In [31]:
sns.set_style("white")
plt.rcParams["axes.edgecolor"] = "0.15"
plt.rcParams["axes.linewidth"] = 1.
plt.subplots(1,1, figsize=(10,3.3))

# WHAN SF CLASS ------------------
ax01 = plt.subplot(1,5,1)
plt.plot(mass_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='SF')]], 
            stellar_age_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='SF')]], 'o', alpha=0.5, label='RSF')
plt.plot(mass_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='SF')]], 
            stellar_age_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='SF')]], 'o', alpha=0.5, label='UV weak')
plt.plot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='SF')]], 
            stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='SF')]], 'o', alpha=0.5, label='UV upturn')
plt.title("WHAN: SF")
# plt.xlabel('Log(M$_*$)')
plt.ylabel('Log(t)  (Gyr)', fontsize=14)
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
plt.ylim(8.5,)

# WHAN sAGN CLASS ------------------
ax02 = plt.subplot(1,5,2)
plt.plot(mass_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='sAGN')]], 
            stellar_age_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='sAGN')]], 'o', alpha=0.5, label='RSF')
plt.plot(mass_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='sAGN')]], 
            stellar_age_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='sAGN')]], 'o', alpha=0.5, label='UV weak')
plt.plot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='sAGN')]], 
            stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='sAGN')]], 'o', alpha=0.5, label='UV upturn')
# ax02.yaxis.set_visible(False)
plt.title("WHAN: sAGN")
# plt.xlabel('Log(M$_*$)')
# plt.ylabel('stellar_age_clean (M$_\odot$ yr$^{-1}$)')
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
plt.ylim(9.3,)

# WHAN wAGN CLASS ------------------
ax03= plt.subplot(1,5,3)
plt.plot(mass_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='wAGN')]], 
            stellar_age_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='wAGN')]], 'o', alpha=0.5, label='RSF')
plt.plot(mass_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='wAGN')]], 
            stellar_age_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='wAGN')]], 'o', alpha=0.5, label='UV weak')
plt.plot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='wAGN')]], 
            stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='wAGN')]], 'o', alpha=0.5, label='UV upturn')
# ax03.yaxis.set_visible(False)
plt.title("WHAN: wAGN")
plt.xlabel('Log(M$_*$)', fontsize=14)
# plt.ylabel('Log(t)  (Gyr)', fontsize=14)
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
plt.ylim(9.6, )
ax03.legend(loc='lower center', bbox_to_anchor=(2.3, -0.3), fontsize=12, frameon=True, framealpha=1., ncol=3)

# WHAN Retired/Passive CLASS ------------------
ax04 = plt.subplot(1,5,4)
plt.plot(mass_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='Retired/Passive')]], 
            stellar_age_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='Retired/Passive')]], 'o', alpha=0.5, label='RSF')
plt.plot(mass_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='Retired/Passive')]], 
            stellar_age_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='Retired/Passive')]], 'o', alpha=0.5, 
             label='UV weak')
plt.plot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='Retired/Passive')]], 
            stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='Retired/Passive')]], 'o', alpha=0.5, 
             label='UV upturn')
plt.title("WHAN: Retired/Passive")
# ax04.yaxis.set_visible(False)
# plt.xlabel('Log(M$_*$)')
# plt.ylabel('stellar_age_clean (M$_\odot$ yr$^{-1}$)')
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
plt.ylim(9.6,)

# WHAN NA CLASS (unclassified) ------------------
ax05 = plt.subplot(1,5,5)
plt.plot(mass_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='NA')]], 
            stellar_age_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='NA')]], 'o', alpha=0.5, label='RSF')
plt.plot(mass_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='NA')]], 
            stellar_age_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='NA')]], 'o', alpha=0.5, label='UV weak')
plt.plot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='NA')]], 
            stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='NA')]], 'o', alpha=0.5, label='UV upturn')
plt.title("WHAN: NA")
# ax05.yaxis.set_visible(False)
# plt.xlabel('Log(M$_*$)')
# plt.ylabel('stellar_age_clean (M$_\odot$ yr$^{-1}$)')
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
plt.ylim(9.1, )

plt.tight_layout(w_pad=0.0)
plt.savefig('./../Figs/g2_mass_stellar_age_whan_01.png')
plt.show()



In [34]:
sns.set_style("white")
plt.rcParams["axes.edgecolor"] = "0.15"
plt.rcParams["axes.linewidth"] = 1.
plt.subplots(1,1, figsize=(10,3.3), sharey=True)

# WHAN SF CLASS ------------------
ax01 = plt.subplot(1,5,1)
plt.plot(mass_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='SF')]], 
            stellar_age_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='SF')]], 'o', alpha=0.5, label='RSF')
plt.plot(mass_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='SF')]], 
            stellar_age_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='SF')]], 'o', alpha=0.5, label='UV weak')
plt.plot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='SF')]], 
            stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='SF')]], 'o', alpha=0.5, label='UV upturn')
plt.title("WHAN: SF")
# plt.xlabel('Log(M$_*$)')
plt.ylabel('Log(t)  (Gyr)', fontsize=14)
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
# plt.ylim(8.5,)

# WHAN sAGN CLASS ------------------
ax02 = plt.subplot(1,5,2, sharey=ax01)
plt.plot(mass_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='sAGN')]], 
            stellar_age_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='sAGN')]], 'o', alpha=0.5, label='RSF')
plt.plot(mass_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='sAGN')]], 
            stellar_age_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='sAGN')]], 'o', alpha=0.5, label='UV weak')
plt.plot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='sAGN')]], 
            stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='sAGN')]], 'o', alpha=0.5, label='UV upturn')
ax02.yaxis.set_visible(False)
plt.title("WHAN: sAGN")
# plt.xlabel('Log(M$_*$)')
# plt.ylabel('stellar_age_clean (M$_\odot$ yr$^{-1}$)')
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
# plt.ylim(9.3,)

# WHAN wAGN CLASS ------------------
ax03= plt.subplot(1,5,3, sharey=ax01)
plt.plot(mass_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='wAGN')]], 
            stellar_age_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='wAGN')]], 'o', alpha=0.5, label='RSF')
plt.plot(mass_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='wAGN')]], 
            stellar_age_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='wAGN')]], 'o', alpha=0.5, label='UV weak')
plt.plot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='wAGN')]], 
            stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='wAGN')]], 'o', alpha=0.5, label='UV upturn')
ax03.yaxis.set_visible(False)
plt.title("WHAN: wAGN")
plt.xlabel('Log(M$_*$)', fontsize=14)
# plt.ylabel('Log(t)  (Gyr)', fontsize=14)
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
# plt.ylim(9.6, )
ax03.legend(loc='lower center', bbox_to_anchor=(2.1, -0.3), fontsize=12, frameon=True, framealpha=1., ncol=3)

# WHAN Retired/Passive CLASS ------------------
ax04 = plt.subplot(1,5,4, sharey=ax01)
plt.plot(mass_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='Retired/Passive')]], 
            stellar_age_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='Retired/Passive')]], 'o', alpha=0.5, label='RSF')
plt.plot(mass_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='Retired/Passive')]], 
            stellar_age_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='Retired/Passive')]], 'o', alpha=0.5, 
             label='UV weak')
plt.plot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='Retired/Passive')]], 
            stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='Retired/Passive')]], 'o', alpha=0.5, 
             label='UV upturn')
plt.title("WHAN: Retired/Passive")
ax04.yaxis.set_visible(False)
# plt.xlabel('Log(M$_*$)')
# plt.ylabel('stellar_age_clean (M$_\odot$ yr$^{-1}$)')
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
# plt.ylim(9.6,)

# WHAN NA CLASS (unclassified) ------------------
ax05 = plt.subplot(1,5,5, sharey=ax01)
plt.plot(mass_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='NA')]], 
            stellar_age_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='NA')]], 'o', alpha=0.5, label='RSF')
plt.plot(mass_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='NA')]], 
            stellar_age_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='NA')]], 'o', alpha=0.5, label='UV weak')
plt.plot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='NA')]], 
            stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='NA')]], 'o', alpha=0.5, label='UV upturn')
plt.title("WHAN: NA")
ax05.yaxis.set_visible(False)
# plt.xlabel('Log(M$_*$)')
# plt.ylabel('stellar_age_clean (M$_\odot$ yr$^{-1}$)')
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
# plt.ylim(9.1, )

plt.tight_layout(w_pad=0.0)
plt.savefig('./../Figs/g2_mass_stellar_age_whan_02.png')
plt.show()



In [32]:
sns.set_style("white")
plt.rcParams["axes.edgecolor"] = "0.15"
plt.rcParams["axes.linewidth"] = 1.
plt.subplots(1,1, figsize=(10,3.3), sharey=True)

# WHAN SF CLASS ------------------
ax01 = plt.subplot(1,5,1)
plt.plot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='SF')]], 
        stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='SF')]], 'o',  color='#a6611a',
         alpha=0.8, label='UV upturn')
sns.kdeplot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='SF')]],
            stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='SF')]], color='#a6611a',
            alpha=0.4, label='UV upturn')
plt.title("WHAN: SF")
plt.ylabel('Log(t)  (Gyr)', fontsize=14)
plt.tick_params('both', labelsize='12')
plt.xlim(9, 12)
plt.ylim(9.70, 9.93)

# WHAN sAGN CLASS ------------------
ax02 = plt.subplot(1,5,2, sharey=ax01)
plt.plot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='sAGN')]], 
        stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='sAGN')]], 'o', color='#a6611a',
         alpha=0.8, label='UV upturn')
sns.kdeplot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='sAGN')]],
            stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='sAGN')]], color='#a6611a',
            alpha=0.4, label='UV upturn')
ax02.yaxis.set_visible(False)
plt.title("WHAN: sAGN")
plt.tick_params('both', labelsize='12')
plt.xlim(9, 12)
plt.ylim(9.70, 9.93)

# WHAN wAGN CLASS ------------------
ax03= plt.subplot(1,5,3, sharey=ax01)
plt.plot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='wAGN')]], 
        stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='wAGN')]], 'o', color='#a6611a', 
         alpha=0.8, label='UV upturn')
sns.kdeplot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='wAGN')]],
            stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='wAGN')]], color='#a6611a',
            alpha=0.4, label='UV upturn')
ax03.yaxis.set_visible(False)
plt.title("WHAN: wAGN")
plt.xlabel('Log(M$_*$)', fontsize=14)
plt.tick_params('both', labelsize='12')
plt.xlim(9, 12)
plt.ylim(9.70, 9.93)
# ax03.legend(loc='lower center', bbox_to_anchor=(2.1, -0.3), fontsize=12, frameon=True, framealpha=0.8, ncol=1)

# WHAN Retired/Passive CLASS ------------------
ax04 = plt.subplot(1,5,4, sharey=ax01)
plt.plot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='Retired/Passive')]],
         stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='Retired/Passive')]], 'o',  
         color='#a6611a', alpha=0.8,label='UV upturn')
sns.kdeplot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='Retired/Passive')]],
            stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='Retired/Passive')]], 
            color='#a6611a',alpha=0.4, label='UV upturn')
plt.title("WHAN: Retired/Passive")
ax04.yaxis.set_visible(False)
plt.tick_params('both', labelsize='12')
plt.xlim(9, 12)
plt.ylim(9.70, 9.93)

# WHAN NA CLASS (unclassified) ------------------
ax05 = plt.subplot(1,5,5, sharey=ax01)
plt.plot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='NA')]], 
         stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='NA')]], 'o', color='#a6611a', 
         alpha=0.8, label='UV upturn')
sns.kdeplot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='NA')]],
            stellar_age_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='NA')]], 
            color='#a6611a',alpha=0.4, label='UV upturn')
plt.title("WHAN: NA")
ax05.yaxis.set_visible(False)
plt.tick_params('both', labelsize='12')
plt.xlim(9, 12)
plt.ylim(9.70, 9.93)

plt.tight_layout(w_pad=0.0)
plt.savefig('./../Figs/g2_mass_stellar_age_whan_uvup.png')
plt.show()



In [33]:
print stellar_age_clean[[(uv_clean=='UV_UPTURN')]].max()
print stellar_age_clean[[(uv_clean=='UV_UPTURN')]].min()


9.915195
9.36917

In [34]:
sns.set_style("white")
plt.rcParams["axes.edgecolor"] = "0.15"
plt.rcParams["axes.linewidth"] = 1.
plt.subplots(1,1, figsize=(10,3.3), sharey=True)

# WHAN SF CLASS ------------------
ax01 = plt.subplot(1,5,1)
plt.plot(mass_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='SF')]], 
            stellar_met_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='SF')]], 'o', alpha=0.5, label='RSF')
plt.plot(mass_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='SF')]], 
            stellar_met_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='SF')]], 'o', alpha=0.5, label='UV weak')
plt.plot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='SF')]], 
            stellar_met_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='SF')]], 'o', alpha=0.5, label='UV upturn')
plt.title("WHAN: SF")
# plt.xlabel('Log(M$_*$)')
plt.ylabel('<Z/Z$_{\odot}$>', fontsize=14)
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
# plt.ylim(8.5,)

# WHAN sAGN CLASS ------------------
ax02 = plt.subplot(1,5,2, sharey=ax01)
plt.plot(mass_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='sAGN')]], 
            stellar_met_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='sAGN')]], 'o', alpha=0.5, label='RSF')
plt.plot(mass_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='sAGN')]], 
            stellar_met_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='sAGN')]], 'o', alpha=0.5, label='UV weak')
plt.plot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='sAGN')]], 
            stellar_met_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='sAGN')]], 'o', alpha=0.5, label='UV upturn')
ax02.yaxis.set_visible(False)
plt.title("WHAN: sAGN")
# plt.xlabel('Log(M$_*$)')
# plt.ylabel('stellar_met_clean (M$_\odot$ yr$^{-1}$)')
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
# plt.ylim(9.3,)

# WHAN wAGN CLASS ------------------
ax03= plt.subplot(1,5,3, sharey=ax01)
plt.plot(mass_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='wAGN')]], 
            stellar_met_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='wAGN')]], 'o', alpha=0.5, label='RSF')
plt.plot(mass_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='wAGN')]], 
            stellar_met_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='wAGN')]], 'o', alpha=0.5, label='UV weak')
plt.plot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='wAGN')]], 
            stellar_met_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='wAGN')]], 'o', alpha=0.5, label='UV upturn')
ax03.yaxis.set_visible(False)
plt.title("WHAN: wAGN")
plt.xlabel('Log(M$_*$)', fontsize=14)
# plt.ylabel('Log(t)  (Gyr)', fontsize=14)
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
# plt.ylim(9.6, )
ax03.legend(loc='lower center', bbox_to_anchor=(2.1, -0.3), fontsize=12, frameon=True, framealpha=1., ncol=3)

# WHAN Retired/Passive CLASS ------------------
ax04 = plt.subplot(1,5,4, sharey=ax01)
plt.plot(mass_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='Retired/Passive')]], 
            stellar_met_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='Retired/Passive')]], 'o', alpha=0.5, label='RSF')
plt.plot(mass_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='Retired/Passive')]], 
            stellar_met_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='Retired/Passive')]], 'o', alpha=0.5, 
             label='UV weak')
plt.plot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='Retired/Passive')]], 
            stellar_met_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='Retired/Passive')]], 'o', alpha=0.5, 
             label='UV upturn')
plt.title("WHAN: Retired/Passive")
ax04.yaxis.set_visible(False)
# plt.xlabel('Log(M$_*$)')
# plt.ylabel('stellar_met_clean (M$_\odot$ yr$^{-1}$)')
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
# plt.ylim(9.6,)

# WHAN NA CLASS (unclassified) ------------------
ax05 = plt.subplot(1,5,5, sharey=ax01)
plt.plot(mass_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='NA')]], 
            stellar_met_clean[[(uv_clean=='RSF')*(whan_class[idx_clean]=='NA')]], 'o', alpha=0.5, label='RSF')
plt.plot(mass_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='NA')]], 
            stellar_met_clean[[(uv_clean=='UV_WEAK')*(whan_class[idx_clean]=='NA')]], 'o', alpha=0.5, label='UV weak')
plt.plot(mass_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='NA')]], 
            stellar_met_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='NA')]], 'o', alpha=0.5, label='UV upturn')
plt.title("WHAN: NA")
ax05.yaxis.set_visible(False)
# plt.xlabel('Log(M$_*$)')
# plt.ylabel('stellar_met_clean (M$_\odot$ yr$^{-1}$)')
plt.tick_params('both', labelsize='12')
plt.xlim(8, 13)
# plt.ylim(9.1, )

plt.tight_layout(w_pad=0.0)
plt.savefig('./../Figs/g2_mass_stellar_met_whan.png')
plt.show()



In [37]:
cataid_clean = cataid[idx_clean]
objdr7_clean = my_dictionary['OBJID_SDSSDR7'][idx_clean]

In [38]:
print cataid_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='NA')]], 
cataid_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='NA')]].size


['598961' '611468' '301850' '321414' '373305' '375789' '376042' '423115'
 '3604402' '3613123' '492701' '3882902' '3888169' '3889591' '3910157'
 '39151' '39732' '48736' '55601' '65427' '70294' '549148' '562060' '138989'
 '196101' '209881' '216892' '574429']
Out[38]:
28


In [39]:
print objdr7_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='NA')]],
objdr7_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='NA')]].size


['588848900427481399' '588848900451729571' '587726032229040530'
 '587726032267378887' '587727942956024011' '587727943488635247'
 '587727943489094234' '587728879794585926' '587729150911971799'
 '587729150914134215' '587729778519507274' '588010930832998667'
 '588010930834374925' '588010930834768089' '588010931371376935'
 '587722982274957434' '587722982276071649' '587722982293766374'
 '587722982815039630' '587722982832669131' '587722983350403258'
 '588848899354132992' '588848899378446610' '587724650333012209'
 '587725073914003890' '587725074990432619' '587725075529400544'
 '588848899893297496']
Out[39]:
28


In [40]:
spec_i_need = {}
spec_i_need['CATAID'] = cataid_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='NA')]]
spec_i_need['OBJID_SDSSDR7'] = objdr7_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='NA')]]

In [41]:
cataid_uvup_rp = cataid_clean[[(uv_clean=='UV_UPTURN')*(whan_class[idx_clean]=='Retired/Passive')]]

In [42]:
print cataid_uvup_rp.size
for i in range(cataid_uvup_rp.size):
    print cataid_uvup_rp[i]


87
594994
600232
609836
610293
610441
617899
619222
619575
6840
14922
17387
22885
23262
23618
231048
271394
272306
273046
273844
289261
289379
297022
298594
301906
302370
318790
318810
324302
343900
361693
363924
371001
381583
383050
417755
422871
519135
3582527
3584590
3604645
3613085
3617808
3623290
3627066
460401
3878612
3909928
30716
30793
30897
31060
31799
39013
41058
47685
48688
49358
54859
54925
54979
55641
63271
84716
84945
85618
85928
93394
99005
106081
106915
534783
536903
549755
560345
560512
560599
561506
569109
143845
144624
145111
196998
198705
203412
203848
238896
240455

In [43]:
spec_i_need = pd.DataFrame(spec_i_need)

In [44]:
spec_i_need.to_csv('./spec.csv', index=False)

In [45]:
spec_i_need


Out[45]:
CATAID OBJID_SDSSDR7
0 598961 588848900427481399
1 611468 588848900451729571
2 301850 587726032229040530
3 321414 587726032267378887
4 373305 587727942956024011
5 375789 587727943488635247
6 376042 587727943489094234
7 423115 587728879794585926
8 3604402 587729150911971799
9 3613123 587729150914134215
10 492701 587729778519507274
11 3882902 588010930832998667
12 3888169 588010930834374925
13 3889591 588010930834768089
14 3910157 588010931371376935
15 39151 587722982274957434
16 39732 587722982276071649
17 48736 587722982293766374
18 55601 587722982815039630
19 65427 587722982832669131
20 70294 587722983350403258
21 549148 588848899354132992
22 562060 588848899378446610
23 138989 587724650333012209
24 196101 587725073914003890
25 209881 587725074990432619
26 216892 587725075529400544
27 574429 588848899893297496

In [ ]: