예제 #1
0
파일: YSO.py 프로젝트: DJRumble/PHD
def GBS(fig):
    #Plots from the GBS Spitzer catalog
    #Input a figure in '.sdf' format and this module will arrange for some markers to plotted over thier location. To be used in conjunction with the Map Maker

####################################################
#load GBS catalogue 

    tbl = atpy.Table()
    c2dtable.c2d_read('catalog-Serp-YSOc+head.tbl',tbl,3)
    ra_t=tbl.data['RA']
    dec_t=tbl.data['DEC']
    alpha= tbl.data['alpha']

###################################################
#Classification by Colour

    CYSO = []
    SYSO = []
    FYSO = []
    i = 0

    while (i < len(alpha)): #iterate through length of the array   
        a = alpha[i]
        if a >= 0.3: #Class I as yellow
            colour = 'lime'
            shape = '^'
            fill = 'lime'
        elif 0.3 > a >= -0.3: #Class FS as Orange
            colour = 'lime'
            shape = 's'
            fill = 'lime'
        elif -0.3 > a >= -1.6: #Class II as Red
            colour = 'red'
            shape = 'o'
            fill = colour
        elif -1.6 > a: #Class III as Magenta
            colour = 'red'
            shape = 'o'
            fill = 'none'
        else: #else(Clss O)
            colour = 'lime'
            shape = 'x'
            fill = colour
        CYSO.append(colour)
        SYSO.append(shape)
        FYSO.append(fill)
        i = i + 1
    
    ra = 200.0+ra_t
    dec = dec_t
    fig.show_markers(ra,dec, layer='GBS',edgecolor=CYSO ,facecolor=FYSO, marker='o',s=40, alpha=1)   
    return
예제 #2
0
import c2dtable
import alpha_func as AF

#####################################################
#plot background maps

s850 = aplpy.FITSFigure('coadd_aquila_850_u20_cal556_th.fits')
s850.show_grayscale(invert='false')
s850.tick_labels.set_font(size='small')
s850.add_colorbar()

####################################################
#load GBS catalogue 

tbl = atpy.Table()
c2dtable.c2d_read('catalog-Serp-YSOc+head.tbl',tbl,3)
ra_t=tbl.data['RA']
dec_t=tbl.data['DEC']
alpha = tbl.data['alpha']
print alpha

###################################################
#Classification by Colour

CYSO = []
i = 0
while (i < len(alpha)):
#iterate through length of the array
    a = alpha[i]
    if a >= 0.3:
#Class I as yellow