Check the geometry of LSLGA galaxies derived from ellipse-fitting against the original geometry from Hyperleda.


In [2]:
import os, glob
import fitsio
import numpy as np
import matplotlib.pyplot as plt
from astropy.table import vstack, Table, hstack

In [3]:
import seaborn as sns
sns.set(context='talk', style='ticks', font_scale=1.0)
%matplotlib inline

In [4]:
lslgaver = b'L6'
lslgafile = '/global/cfs/cdirs/desi/users/ioannis/LSLGA-data-DR9fg/LSLGA-model-v6.0.fits'
#lslgafile = '/global/project/projectdirs/cosmo/staging/largegalaxies/v6.0/LSLGA-model-v6.0.fits'
#lslgafile = os.getenv('LARGEGALAXIES_CAT')
lslga = Table(fitsio.read(lslgafile))
print('Read {} galaxies from {}'.format(len(lslga), lslgafile))
#lslga


Read 516182 galaxies from /global/cfs/cdirs/desi/users/ioannis/LSLGA-data-DR9fg/LSLGA-model-v6.0.fits

Geometry comparison of LSLGA galaxies


In [5]:
plslga = lslga[lslga['REF_CAT'] == lslgaver]

In [6]:
fig, (ax1, ax2, ax3) = plt.subplots(3, 1, figsize=(6, 14))
ax1.hexbin(np.log10(plslga['D25']), np.log10(plslga['D25_ORIG']), mincnt=1,
          cmap=plt.cm.Blues_r)
#ax1.scatter(np.log10(lslga['D25']), np.log10(lslga['D25_ORIG']), s=15)
ax1.set_xlim(-0.7, 1)
ax1.set_ylim(-0.7, 1)
ax1.plot([-1, 1], [-1, 1], color='k', ls='--', lw=3, alpha=0.7)
ax1.set_xlabel(r'$\log_{10}\ D_{25}$ [ellipse-fit, arcmin]')
ax1.set_ylabel(r'$\log_{10}\ D_{25}$ [Hyperleda, arcmin]')

ax2.hexbin(plslga['PA'], plslga['PA_ORIG'], mincnt=1,
           cmap=plt.cm.Blues_r)
ax2.set_xlabel('PA [ellipse-fit, degrees]')
ax2.set_ylabel('PA [Hyperleda, degrees]')
ax2.plot([0, 180], [0, 180], color='k', ls='--', lw=3, alpha=0.7)

ax3.hexbin(plslga['BA'], plslga['BA_ORIG'], mincnt=1,
           cmap=plt.cm.Blues_r)
ax3.set_xlabel('b/a [ellipse-fit]')
ax3.set_ylabel('b/a [Hyperleda]')
ax3.plot([0, 1], [0, 1], color='k', ls='--', lw=3, alpha=0.7)

fig.subplots_adjust(hspace=0.3)



In [7]:
lslga[(lslga['LSLGA_ID'] > 0) * (lslga['D25'] == 0)]


Out[7]:
<Table length=0>
LSLGA_IDGALAXYPGCRADECTYPEBARRINGMULTIPLECOMPACTNESSTPAD25BADIAM_REFZSB_D25MAGMAG_REFWISE_RAWISE_DECCNTRW1MPROW1SIGMPROW2MPROW2SIGMPROW3MPROW3SIGMPROW4MPROW4SIGMPRORCHI2CC_FLAGSEXT_FLGPH_QUALXSCPROXW1RSEMIW1BAW1PAW1GMAGW1GERRW2GMAGW2GERRW3GMAGW3GERRW4GMAGW4GERRIN_ALLWISEIN_DESI_NORTHIN_DESI_NORTH_GRZIN_DESI_SOUTHIN_DESI_SOUTH_GRZIN_DESIIN_DESI_GRZGROUP_IDGROUP_NAMEGROUP_MULTGROUP_PRIMARYGROUP_RAGROUP_DECGROUP_DIAMETERNEAR_BRIGHTSTARLSLGA_RALSLGA_DECMORPHTYPED25_ORIGPA_ORIGBA_ORIGRELEASEBRICKIDBRICKNAMEOBJIDBRICK_PRIMARYBRIGHTBLOBMASKBITSITERATIVERA_IVARDEC_IVARBXBYDCHISQ [5]EBVMJD_MINMJD_MAXREF_CATREF_IDPMRAPMDECPARALLAXPMRA_IVARPMDEC_IVARPARALLAX_IVARREF_EPOCHGAIA_POINTSOURCEGAIA_PHOT_G_MEAN_MAGGAIA_PHOT_G_MEAN_FLUX_OVER_ERRORGAIA_PHOT_G_N_OBSGAIA_PHOT_BP_MEAN_MAGGAIA_PHOT_BP_MEAN_FLUX_OVER_ERRORGAIA_PHOT_BP_N_OBSGAIA_PHOT_RP_MEAN_MAGGAIA_PHOT_RP_MEAN_FLUX_OVER_ERRORGAIA_PHOT_RP_N_OBSGAIA_PHOT_VARIABLE_FLAGGAIA_ASTROMETRIC_EXCESS_NOISEGAIA_ASTROMETRIC_EXCESS_NOISE_SIGGAIA_ASTROMETRIC_N_OBS_ALGAIA_ASTROMETRIC_N_GOOD_OBS_ALGAIA_ASTROMETRIC_WEIGHT_ALGAIA_DUPLICATED_SOURCEGAIA_A_G_VALGAIA_E_BP_MIN_RP_VALGAIA_PHOT_BP_RP_EXCESS_FACTORGAIA_ASTROMETRIC_SIGMA5D_MAXGAIA_ASTROMETRIC_PARAMS_SOLVEDFLUX_GFLUX_RFLUX_ZFLUX_W1FLUX_W2FLUX_W3FLUX_W4FLUX_IVAR_GFLUX_IVAR_RFLUX_IVAR_ZFLUX_IVAR_W1FLUX_IVAR_W2FLUX_IVAR_W3FLUX_IVAR_W4FIBERFLUX_GFIBERFLUX_RFIBERFLUX_ZFIBERTOTFLUX_GFIBERTOTFLUX_RFIBERTOTFLUX_ZAPFLUX_G [8]APFLUX_R [8]APFLUX_Z [8]APFLUX_RESID_G [8]APFLUX_RESID_R [8]APFLUX_RESID_Z [8]APFLUX_BLOBRESID_G [8]APFLUX_BLOBRESID_R [8]APFLUX_BLOBRESID_Z [8]APFLUX_IVAR_G [8]APFLUX_IVAR_R [8]APFLUX_IVAR_Z [8]MW_TRANSMISSION_GMW_TRANSMISSION_RMW_TRANSMISSION_ZMW_TRANSMISSION_W1MW_TRANSMISSION_W2MW_TRANSMISSION_W3MW_TRANSMISSION_W4NOBS_GNOBS_RNOBS_ZNOBS_W1NOBS_W2NOBS_W3NOBS_W4RCHISQ_GRCHISQ_RRCHISQ_ZRCHISQ_W1RCHISQ_W2RCHISQ_W3RCHISQ_W4FRACFLUX_GFRACFLUX_RFRACFLUX_ZFRACFLUX_W1FRACFLUX_W2FRACFLUX_W3FRACFLUX_W4FRACMASKED_GFRACMASKED_RFRACMASKED_ZFRACIN_GFRACIN_RFRACIN_ZANYMASK_GANYMASK_RANYMASK_ZALLMASK_GALLMASK_RALLMASK_ZWISEMASK_W1WISEMASK_W2PSFSIZE_GPSFSIZE_RPSFSIZE_ZPSFDEPTH_GPSFDEPTH_RPSFDEPTH_ZGALDEPTH_GGALDEPTH_RGALDEPTH_ZPSFDEPTH_W1PSFDEPTH_W2PSFDEPTH_W3PSFDEPTH_W4WISE_COADD_IDLC_FLUX_W1 [15]LC_FLUX_W2 [15]LC_FLUX_IVAR_W1 [15]LC_FLUX_IVAR_W2 [15]LC_NOBS_W1 [15]LC_NOBS_W2 [15]LC_FRACFLUX_W1 [15]LC_FRACFLUX_W2 [15]LC_RCHISQ_W1 [15]LC_RCHISQ_W2 [15]LC_MJD_W1 [15]LC_MJD_W2 [15]LC_EPOCH_INDEX_W1 [15]LC_EPOCH_INDEX_W2 [15]SERSICSERSIC_IVARSHAPE_RSHAPE_R_IVARSHAPE_E1SHAPE_E1_IVARSHAPE_E2SHAPE_E2_IVARPREBURNEDFREEZERADIUS_SB23MAG_G_SB23MAG_R_SB23MAG_Z_SB23RADIUS_SB24MAG_G_SB24MAG_R_SB24MAG_Z_SB24RADIUS_SB25MAG_G_SB25MAG_R_SB25MAG_Z_SB25RADIUS_SB25.5MAG_G_SB25.5MAG_R_SB25.5MAG_Z_SB25.5RADIUS_SB26MAG_G_SB26MAG_R_SB26MAG_Z_SB26MAG_G_TOTMAG_R_TOTMAG_Z_TOT
int64bytes29int64float64float64bytes9bytes3bytes3bytes3bytes3float32float32float32float32bytes3float32float32float32bytes1float64float64int64float64float64float64float64float64float64float64float64float32bytes4int32bytes4float64float64float64float64float64float64float64float64float64float64float64float64boolboolboolboolboolboolboolint64bytes29int16boolfloat64float64float32boolfloat64float64bytes9float32float32float32int16int32bytes19int32boolint16int16boolfloat32float32float32float32float32float32float64float64bytes2int64float32float32float32float32float32float32float32boolfloat32float32int16float32float32int16float32float32int16boolfloat32float32int16int16float32boolfloat32float32float32float32uint8float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32int16int16int16int16int16int16int16float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32int16int16int16int16int16int16uint8uint8float32float32float32float32float32float32float32float32float32float32float32float32float32bytes8float32float32float32float32int16int16float32float32float32float32float64float64uint8uint8float32float32float32float32float32float32float32float32boolboolfloat32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32

In [8]:
ff = Table.read('/global/cfs/cdirs/desi/users/ioannis/LSLGA-data-DR9fg/LSLGA-reject-v6.0.fits')
ff


Out[8]:
<Table length=51>
NAMERADECLSLGA_IDD25PABA
str23float64float64int64float32float32float32
PGC108916031.915563000000002-2.5404093446240.3981072179.00.63095737
PGC1365237205.688849999999979.4471738340.3890451235.00.5011872
PGC1148178213.77019600000003-0.246213299999999971175580.45708823105.380.3715352
PGC051602216.79871753.623967000000011527510.403645430.00.9036495
PGC1292230209.273488500000045.9672534000000012392020.3539973519.190.8317638
PGC2057027151.5780554999999834.94471862554510.7762471102.00.724436
PGC2482646216.0517650000000254.8582535000000044085500.34673685107.00.74131024
PGC2482655216.0557414999999854.8587646000000113009780.33884412128.00.8709636
PGC1173289217.1908770.705090199999999913626830.4073802897.670.60255957
PGC1104284176.15639249999998-2.00169719999999973358870.354813449.00.61659503
.....................
PGC057003241.2105464999999623.9749196999999971235430.58884364105.870.691831
PGC105053438.89802699999999-5.009073613009940.33884412147.00.8912509
PGC1495540268.352566515.88304709999999913049880.4365158168.00.53703177
PGC2168941273.237361540.65262613073140.4466835658.00.45708817
PGC108335137.285917-2.769055613265960.363078060.00.91201085
PGC1541189269.4027615000000517.769971813413220.3388441243.00.64565426
PGC091604265.36544118.65481213886000.553350184.40.23442288
PGC2202123223.6035690000000242.596058813980550.3388441231.00.66069347
PGC103523731.851553499999994-6.22997514135930.6309573772.00.48977882
PGC3111236217.7676615-0.325420314243240.35727280.00.8892011

In [9]:
rr = Table.read('/global/cfs/cdirs/desi/users/ioannis/LSLGA-data-DR9fg/LSLGA-inspect-v6.0.fits')
rr


Out[9]:
<Table length=193>
NAMERADECLSLGA_IDD25PABA
str23float64float64int64float32float32float32
PGC050965214.02195450000002-1.26037661290.62086904172.830.5675446
PGC2183601224.20596941.5963809132530.69823235172.380.40926066
PGC116720535.6575890.4857232191170.537031870.110.22387213
PGC1943146138.846982531.3520025310720.41783038148.860.63095737
PGC140295214.65709652.045988416490.6426877476.990.34673685
PGC2024569136.577458533.1421389421940.3630780645.50.66069347
PGC2239206281.430292544.210889555780.46773514172.00.53703177
PGC2208915281.9715000000000542.9184595380.35481342.00.691831
PGC061664274.039231542.6562809713571.995262148.50.27542287
DR8-555740-1273274.05678034024442.678495837511850003180.739629390.411920.29153687
.....................
PGC2729390146.08994769.2943935999999913732740.33573765124.330.7585776
PGC1113006213.96330000000003-1.677579499999999813930610.72443654.00.61659503
PGC2189971281.31508541.96440113936010.34673685101.00.56234133
UGC06970179.6914245-1.461759713954800.816582477.00.4295364
PGC1598935261.231250519.61091669999999713987070.3630780686.00.4168694
PGC1222845211.5475232.31207270000000036604900.354813452.610.5495409
PGC050297211.5391622.331141414095821.0839269160.020.54575783
PGC1131556174.264381-0.911780800000000114249650.51286140.00.78886014
PGC1356619206.1589268.938545114307370.3819443116.970.5011872
LeoA149.8604166666666530.7463888888888930000624.602566102.00.613762

Compare the various sizes


In [10]:
plslga.colnames


Out[10]:
['LSLGA_ID',
 'GALAXY',
 'PGC',
 'RA',
 'DEC',
 'TYPE',
 'BAR',
 'RING',
 'MULTIPLE',
 'COMPACTNESS',
 'T',
 'PA',
 'D25',
 'BA',
 'DIAM_REF',
 'Z',
 'SB_D25',
 'MAG',
 'MAG_REF',
 'WISE_RA',
 'WISE_DEC',
 'CNTR',
 'W1MPRO',
 'W1SIGMPRO',
 'W2MPRO',
 'W2SIGMPRO',
 'W3MPRO',
 'W3SIGMPRO',
 'W4MPRO',
 'W4SIGMPRO',
 'RCHI2',
 'CC_FLAGS',
 'EXT_FLG',
 'PH_QUAL',
 'XSCPROX',
 'W1RSEMI',
 'W1BA',
 'W1PA',
 'W1GMAG',
 'W1GERR',
 'W2GMAG',
 'W2GERR',
 'W3GMAG',
 'W3GERR',
 'W4GMAG',
 'W4GERR',
 'IN_ALLWISE',
 'IN_DESI_NORTH',
 'IN_DESI_NORTH_GRZ',
 'IN_DESI_SOUTH',
 'IN_DESI_SOUTH_GRZ',
 'IN_DESI',
 'IN_DESI_GRZ',
 'GROUP_ID',
 'GROUP_NAME',
 'GROUP_MULT',
 'GROUP_PRIMARY',
 'GROUP_RA',
 'GROUP_DEC',
 'GROUP_DIAMETER',
 'NEAR_BRIGHTSTAR',
 'LSLGA_RA',
 'LSLGA_DEC',
 'MORPHTYPE',
 'D25_ORIG',
 'PA_ORIG',
 'BA_ORIG',
 'RELEASE',
 'BRICKID',
 'BRICKNAME',
 'OBJID',
 'BRICK_PRIMARY',
 'BRIGHTBLOB',
 'MASKBITS',
 'ITERATIVE',
 'RA_IVAR',
 'DEC_IVAR',
 'BX',
 'BY',
 'DCHISQ',
 'EBV',
 'MJD_MIN',
 'MJD_MAX',
 'REF_CAT',
 'REF_ID',
 'PMRA',
 'PMDEC',
 'PARALLAX',
 'PMRA_IVAR',
 'PMDEC_IVAR',
 'PARALLAX_IVAR',
 'REF_EPOCH',
 'GAIA_POINTSOURCE',
 'GAIA_PHOT_G_MEAN_MAG',
 'GAIA_PHOT_G_MEAN_FLUX_OVER_ERROR',
 'GAIA_PHOT_G_N_OBS',
 'GAIA_PHOT_BP_MEAN_MAG',
 'GAIA_PHOT_BP_MEAN_FLUX_OVER_ERROR',
 'GAIA_PHOT_BP_N_OBS',
 'GAIA_PHOT_RP_MEAN_MAG',
 'GAIA_PHOT_RP_MEAN_FLUX_OVER_ERROR',
 'GAIA_PHOT_RP_N_OBS',
 'GAIA_PHOT_VARIABLE_FLAG',
 'GAIA_ASTROMETRIC_EXCESS_NOISE',
 'GAIA_ASTROMETRIC_EXCESS_NOISE_SIG',
 'GAIA_ASTROMETRIC_N_OBS_AL',
 'GAIA_ASTROMETRIC_N_GOOD_OBS_AL',
 'GAIA_ASTROMETRIC_WEIGHT_AL',
 'GAIA_DUPLICATED_SOURCE',
 'GAIA_A_G_VAL',
 'GAIA_E_BP_MIN_RP_VAL',
 'GAIA_PHOT_BP_RP_EXCESS_FACTOR',
 'GAIA_ASTROMETRIC_SIGMA5D_MAX',
 'GAIA_ASTROMETRIC_PARAMS_SOLVED',
 'FLUX_G',
 'FLUX_R',
 'FLUX_Z',
 'FLUX_W1',
 'FLUX_W2',
 'FLUX_W3',
 'FLUX_W4',
 'FLUX_IVAR_G',
 'FLUX_IVAR_R',
 'FLUX_IVAR_Z',
 'FLUX_IVAR_W1',
 'FLUX_IVAR_W2',
 'FLUX_IVAR_W3',
 'FLUX_IVAR_W4',
 'FIBERFLUX_G',
 'FIBERFLUX_R',
 'FIBERFLUX_Z',
 'FIBERTOTFLUX_G',
 'FIBERTOTFLUX_R',
 'FIBERTOTFLUX_Z',
 'APFLUX_G',
 'APFLUX_R',
 'APFLUX_Z',
 'APFLUX_RESID_G',
 'APFLUX_RESID_R',
 'APFLUX_RESID_Z',
 'APFLUX_BLOBRESID_G',
 'APFLUX_BLOBRESID_R',
 'APFLUX_BLOBRESID_Z',
 'APFLUX_IVAR_G',
 'APFLUX_IVAR_R',
 'APFLUX_IVAR_Z',
 'MW_TRANSMISSION_G',
 'MW_TRANSMISSION_R',
 'MW_TRANSMISSION_Z',
 'MW_TRANSMISSION_W1',
 'MW_TRANSMISSION_W2',
 'MW_TRANSMISSION_W3',
 'MW_TRANSMISSION_W4',
 'NOBS_G',
 'NOBS_R',
 'NOBS_Z',
 'NOBS_W1',
 'NOBS_W2',
 'NOBS_W3',
 'NOBS_W4',
 'RCHISQ_G',
 'RCHISQ_R',
 'RCHISQ_Z',
 'RCHISQ_W1',
 'RCHISQ_W2',
 'RCHISQ_W3',
 'RCHISQ_W4',
 'FRACFLUX_G',
 'FRACFLUX_R',
 'FRACFLUX_Z',
 'FRACFLUX_W1',
 'FRACFLUX_W2',
 'FRACFLUX_W3',
 'FRACFLUX_W4',
 'FRACMASKED_G',
 'FRACMASKED_R',
 'FRACMASKED_Z',
 'FRACIN_G',
 'FRACIN_R',
 'FRACIN_Z',
 'ANYMASK_G',
 'ANYMASK_R',
 'ANYMASK_Z',
 'ALLMASK_G',
 'ALLMASK_R',
 'ALLMASK_Z',
 'WISEMASK_W1',
 'WISEMASK_W2',
 'PSFSIZE_G',
 'PSFSIZE_R',
 'PSFSIZE_Z',
 'PSFDEPTH_G',
 'PSFDEPTH_R',
 'PSFDEPTH_Z',
 'GALDEPTH_G',
 'GALDEPTH_R',
 'GALDEPTH_Z',
 'PSFDEPTH_W1',
 'PSFDEPTH_W2',
 'PSFDEPTH_W3',
 'PSFDEPTH_W4',
 'WISE_COADD_ID',
 'LC_FLUX_W1',
 'LC_FLUX_W2',
 'LC_FLUX_IVAR_W1',
 'LC_FLUX_IVAR_W2',
 'LC_NOBS_W1',
 'LC_NOBS_W2',
 'LC_FRACFLUX_W1',
 'LC_FRACFLUX_W2',
 'LC_RCHISQ_W1',
 'LC_RCHISQ_W2',
 'LC_MJD_W1',
 'LC_MJD_W2',
 'LC_EPOCH_INDEX_W1',
 'LC_EPOCH_INDEX_W2',
 'SERSIC',
 'SERSIC_IVAR',
 'SHAPE_R',
 'SHAPE_R_IVAR',
 'SHAPE_E1',
 'SHAPE_E1_IVAR',
 'SHAPE_E2',
 'SHAPE_E2_IVAR',
 'PREBURNED',
 'FREEZE',
 'RADIUS_SB23',
 'MAG_G_SB23',
 'MAG_R_SB23',
 'MAG_Z_SB23',
 'RADIUS_SB24',
 'MAG_G_SB24',
 'MAG_R_SB24',
 'MAG_Z_SB24',
 'RADIUS_SB25',
 'MAG_G_SB25',
 'MAG_R_SB25',
 'MAG_Z_SB25',
 'RADIUS_SB25.5',
 'MAG_G_SB25.5',
 'MAG_R_SB25.5',
 'MAG_Z_SB25.5',
 'RADIUS_SB26',
 'MAG_G_SB26',
 'MAG_R_SB26',
 'MAG_Z_SB26',
 'MAG_G_TOT',
 'MAG_R_TOT',
 'MAG_Z_TOT']

In [11]:
def qa_radii(ax, xx, yy, xlim, ylim):
    ax.hexbin(np.log10(xx), np.log10(yy), mincnt=1, cmap=plt.cm.Blues_r)
    ax.set_xlim(xlim)
    ax.set_ylim(ylim)
    #ax.plot([-1, 1], [-1, 1], color='k', ls='--', lw=3, alpha=0.7)
    #ax.set_xlabel(r'$\log_{10}\ D_{25}$ [ellipse-fit, arcmin]')
    #ax.set_ylabel(r'$\log_{10}\ D_{25}$ [Hyperleda, arcmin]')

In [19]:
fig, ax = plt.subplots(2, 2, figsize=(12, 8), sharey=True, sharex=True)
for ax1, typ in zip(ax.flat, ['REX', 'DEV', 'EXP', 'SER']):
    ww = np.where(plslga['TYPE'] == typ)[0]
    xx = plslga['RADIUS_SB26'][ww] / 60 
    yy = plslga['RADIUS_SB26'][ww] / plslga['RADIUS_SB25'][ww]
    print(typ, np.median(yy))
    ax1.set_xlim(-1, 0.7)
    ax1.set_ylim(-0.1, 0.3)
    ax1.axhline(y=0, ls='-', lw=2, color='gray')
    ax1.axhline(y=np.log10(1.25), ls='--', lw=2, color='red')
    if typ == 'SER':
        ax1.hexbin(np.log10(xx), np.log10(yy), mincnt=1, cmap=plt.cm.Blues_r)
    else:
        ax1.scatter(np.log10(xx), np.log10(yy), s=5, color='cornflowerblue')
    ax1.text(0.9, 0.9, '{} (N={})'.format(typ, len(ww)), 
             transform=ax1.transAxes, ha='right', va='center',
             fontsize=14)
ax[0, 0].set_ylabel(r'$\log_{10}\ R(26) / R(25)$')
ax[1, 0].set_ylabel(r'$\log_{10}\ R(26) / R(25)$')
ax[1, 0].set_xlabel(r'$\log_{10}\ R(26)$ (arcmin)')
ax[1, 1].set_xlabel(r'$\log_{10}\ R(26)$ (arcmin)')
fig.subplots_adjust(hspace=0.1, wspace=0.1)
print('Median over all types: {:.4f}'.format(np.median(plslga['RADIUS_SB26'] / plslga['RADIUS_SB25'])))


REX 1.1897559
DEV 1.3185232
EXP 1.210517
SER 1.247677
Median over all types: 1.2485
/global/common/software/desi/cori/desiconda/20190311-1.2.7-img/conda/lib/python3.6/site-packages/ipykernel/__main__.py:14: RuntimeWarning: invalid value encountered in log10
/global/common/software/desi/cori/desiconda/20190311-1.2.7-img/conda/lib/python3.6/site-packages/ipykernel/__main__.py:12: RuntimeWarning: invalid value encountered in log10

In [20]:
fig, ax = plt.subplots(2, 2, figsize=(12, 8), sharey=True, sharex=True)
for ax1, typ in zip(ax.flat, ['REX', 'DEV', 'EXP', 'SER']):
    ww = np.where(plslga['TYPE'] == typ)[0]
    xx = plslga['RADIUS_SB26'][ww] / 60 
    yy = plslga['RADIUS_SB26'][ww] / plslga['RADIUS_SB24'][ww]
    print(typ, np.median(yy))
    ax1.set_xlim(-1, 0.7)
    ax1.set_ylim(-0.1, 0.6)
    ax1.axhline(y=0, ls='-', lw=2, color='gray')
    ax1.axhline(y=np.log10(1.25), ls='--', lw=2, color='red')
    if typ == 'SER':
        ax1.hexbin(np.log10(xx), np.log10(yy), mincnt=1, cmap=plt.cm.Blues_r)
    else:
        ax1.scatter(np.log10(xx), np.log10(yy), s=5, color='cornflowerblue')
    ax1.text(0.9, 0.9, '{} (N={})'.format(typ, len(ww)), 
             transform=ax1.transAxes, ha='right', va='center',
             fontsize=14)
ax[0, 0].set_ylabel(r'$\log_{10}\ R(26) / R(24)$')
ax[1, 0].set_ylabel(r'$\log_{10}\ R(26) / R(24)$')
ax[1, 0].set_xlabel(r'$\log_{10}\ R(26)$ (arcmin)')
ax[1, 1].set_xlabel(r'$\log_{10}\ R(26)$ (arcmin)')
fig.subplots_adjust(hspace=0.1, wspace=0.1)
print('Median over all types: {:.4f}'.format(np.median(plslga['RADIUS_SB26'] / plslga['RADIUS_SB24'])))


REX 1.4780828
DEV 1.8161318
EXP 1.5054811
SER 1.5931568
Median over all types: 1.5964
/global/common/software/desi/cori/desiconda/20190311-1.2.7-img/conda/lib/python3.6/site-packages/ipykernel/__main__.py:14: RuntimeWarning: invalid value encountered in log10
/global/common/software/desi/cori/desiconda/20190311-1.2.7-img/conda/lib/python3.6/site-packages/ipykernel/__main__.py:12: RuntimeWarning: invalid value encountered in log10

In [ ]: