-
Notifications
You must be signed in to change notification settings - Fork 0
/
data_used.py
100 lines (79 loc) · 6.5 KB
/
data_used.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import aplpy
import numpy as np
path='/Users/boyangliu/Dropbox/MAGMA/'
fig = aplpy.FITSFigure(path+'HIcol.fits')
fig.show_grayscale(invert=1) #white background
fig.recenter(79.75,-69.0,radius=4) #radius in degree
fig.add_grid()
fig.grid.set_linewidth(0.5)
#fig.tick_labels.set_font(size='small')
fig.tick_labels.set_xformat('hh:mm')
fig.tick_labels.set_yformat('dd')
fig.add_colorbar()
fig.colorbar.show()
fig.colorbar.set_axis_label_text('$cm^{-2}$')
fig.show_contour(path+'LMC_MAGMA_DR3.co.sgm.mom0.fits', levels=[1.0], colors='red', linewidths=0.5) #[1.0] is float list for contour values
#Get the polygon corner coordinates with Aladin - Drawing tool.
#RA, dec in two [] respectively.
#Continue line with \.
#Another [] on "a" for show_polygons() input.
#N11
a = np.array([[75.27390451,74.08033729,74.05400222,73.64827766,73.64118674,74.25980807,74.26644135,74.67442863,74.68309936,75.04672795,75.04963952,75.27202868,75.27009343,75.08633503,75.08371405,75.26735744,75.27390451],\
[-66.05809615,-66.05888274,-66.43176555,-66.43047761,-66.67851279,-66.68020081,-66.54646046,-66.54403383,-66.3894869,-66.38569715,-66.46526529,-66.46581656,-66.22110673,-66.21961519,-66.15155019,-66.15096543,-66.05809615]])
fig.show_polygons([a],color='white',linewidth=0.5)
#N44
a = np.array([[80.67435837,80.44794314,80.44497738,80.26177367,80.24060582,80.03135941,80.01373863,80.20229598,80.19157328,80.3925416,80.38920114,80.84301733,80.84479816,81.06535857,81.09027147,80.85271246,80.84541946,80.66251164,80.67580632,80.86888498,80.8731737,80.69729851,80.70473492,80.67738596,80.67435837],\
[-67.55073014,-67.55178897,-67.60595449,-67.60677558,-67.76194781,-67.76454431,-67.93324395,-67.93270714,-68.08893742,-68.09133215,-68.17049679,-68.17031337,-68.09114175,-68.09164301,-67.84467842,-67.84424882,-67.92238808,-67.92365768,-67.82052273,-67.815051,-67.72649957,-67.72883764,-67.60695461,-67.60593688,-67.55073014]])
fig.show_polygons([a],color='white',linewidth=0.5)
#NAN17
a = np.array([[73.78392135,73.08256583,73.08793828,73.77486612,73.78392135],\
[-69.07207778,-69.07155993,-69.23980268,-69.23902582,-69.07207778]])
fig.show_polygons([a],color='white',linewidth=0.5)
#NAN216
a = np.array([[86.09799256,85.62678539,85.62354989,85.76258676,85.76379961,86.47827041,86.47481939,86.09811722,86.09799256],\
[-69.21774367,-69.21827824,-69.38389946,-69.38470418,-69.51699943,-69.5187849,-69.27087044,-69.27191044,-69.21774367]])
fig.show_polygons([a],color='white',linewidth=0.5)
#NAN223
a = np.array([[86.73656741,86.48350448,86.48304555,86.43218384,86.42706714,86.67493427,86.67930798,86.73780651,86.73656741],\
[-69.51959796,-69.52068706,-69.62485365,-69.62481898,-69.71387749,-69.71391445,-69.68630774,-69.68470162,-69.51959796]])
fig.show_polygons([a],color='white',linewidth=0.5)
#Ridge
a = np.array([[85.10464178,84.85158424,84.84611294,84.7517235,84.74555925,84.54566243,84.54532464,84.40964414,84.37391452,84.14467119,84.12841491,84.80929781,84.81590912,84.44989065,84.45441529,84.57123144,84.5643386,84.79363027,84.78362886,85.01111828,85.0140043,85.16683937,\
85.16882248,85.51437381,85.51516731,85.66776649,85.66956753,85.52406858,85.53423773,85.40348929,85.39521252,85.43202612,85.45030855,85.19402006,85.19839176,85.30179927,85.30510934,85.21430429,85.21243741,85.30903481,85.31229224,85.09594395,85.09114281,84.87718186,84.88777514,85.09463077,85.10464178],\
[-69.26760069,-69.26806978,-69.31599625,-69.31190588,-69.24523723,-69.24730537,-69.31189354,-69.31591796,-69.78879956,-69.79244743,-69.95907268,-69.95771633,-70.02854419,-70.0326577,-70.19308093,-70.19317572,-70.3556745,-70.35564904,-70.74734334,-70.74913344,-70.91164827,-70.90921079,-70.98630223,\
-70.99129299,-70.86209254,-70.86341108,-70.77379618,-70.7745333,-70.42859608,-70.42501084,-70.19585734,-70.19361943,-70.02894231,-70.0257277,-69.95904526,-69.96078509,-69.87118466,-69.87149259,-69.80066193,-69.80241615,-69.71281492,-69.71140231,-69.47598585,-69.47221921,-69.35136526,-69.35513466,-69.26760069]])
fig.show_polygons([a],color='white',linewidth=0.5)
a = np.array([[84.59075432,84.45760178,84.45827795,84.59099651,84.59075432],\
[-69.8661001,-69.86599888,-69.79516566,-69.79109985,-69.8661001]])
fig.show_polygons([a],color='white',linewidth=0.5)
a = np.array([[84.11038071,83.87005722,83.87025144,84.11471527,84.11038071],\
[-69.719424,-69.716427,-69.54974403,-69.55067748,-69.719424]])
fig.show_polygons([a],color='white',linewidth=0.5)
a = np.array([[84.87407068,84.1830098,84.20245278,84.41244232,84.42490676,84.8782303,84.87407068],\
[-69.16178278,-69.16125739,-69.07171405,-69.07006274,-68.99506928,-68.99300501,-69.16178278]])
fig.show_polygons([a],color='white',linewidth=0.5)
a = np.array([[84.16045218,83.76071704,83.76004928,83.65241627,83.65121433,83.9010846,83.89355693,84.15919647,84.16045218],\
[-68.99502088,-68.99806844,-69.0321881,-69.03028382,-69.11988361,-69.12117298,-69.0857158,-69.0822717,-68.99502088]])
fig.show_polygons([a],color='white',linewidth=0.5)
#>0.2 marks
xw=np.array([71.841239,71.895764,72.257477,72.294002,72.373006,72.598984,72.959219,73.069755,73.212667,73.523764,73.891089,74.073412,74.676177,75.948556,76.358901,77.483187,78.337628,78.356254,78.46388,78.638794,80.554041,81.091014,81.214431,81.294496,81.47361,83.853115,83.949401,83.971081,84.623886,84.898579,84.935074,85.01205,85.318982,85.847604,86.177372,86.572708,86.757814])
yw=np.array([-67.195076,-67.204442,-68.604774,-68.589958,-68.504026,-69.504405,-69.354991,-66.894605,-68.064296,-69.192526,-66.471359,-66.624016,-66.133117,-67.309752,-66.898346,-68.892573,-69.38429,-67.471547,-67.12856,-68.769225,-67.961909,-68.428101,-69.672431,-69.677802,-66.23535,-67.581782,-69.218882,-69.039694,-69.036005,-69.771228,-69.625439,-69.857336,-70.925518,-69.420056,-69.470454,-69.64071,-70.769733])
fig.show_ellipses(xw, yw, 0.03,0.03, color='white', linewidth=3, alpha=0.8)
#>0.2 IDs
ID=np.array([2,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,24,25,26,27,28,29,30,31,32,33,34,35,36,37])
for i in ID :
fig.add_label(xw[i-1]+0.3, yw[i-1]+0.04, str(i), color='white', size=8,weight=5)
ID=np.array([1,3,23])
for i in ID :
fig.add_label(xw[i-1]-0.3, yw[i-1]+0.04, str(i), color='white', size=8,weight=5)
#Rings
rinkpc=np.array([0.5,1,1.5,2,2.5,3])
PA=np.array([-3.1,-5.7,1.4,-7.1,-19.4,-21.4])
for i in np.array([0,1,2,3,4,5]):
rindeg=rinkpc[i]/50.*57.3
ax2indeg=rindeg*2
bx2indeg=ax2indeg*0.93
fig.show_ellipses(79.4, -69.03, ax2indeg, bx2indeg, angle=PA[i], color='white', linewidth=0.5) # Kim 1998 503 674
#Highest dpi is 300.
#fig.save(path+'data_used.eps',dpi=42)
fig.save(path+'data_used.png',dpi=150)