-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot.py
More file actions
executable file
·78 lines (64 loc) · 1.48 KB
/
plot.py
File metadata and controls
executable file
·78 lines (64 loc) · 1.48 KB
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
"""
Created on Tue Mar 10 22:35:43 2020
@author: blahblahmac
"""
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import statistics as st
# Loading different arrays
magpsf = np.load('nparray/magpsf.npy')
rb = np.load('nparray/rb.npy')
jd = np.load('nparray/jd.npy')
sigmagap = np.load('nparray/sigmagap.npy')
fwhm = np.load('nparray/fwhm.npy')
# Substracting min jd
jd = jd - min(jd)
#printing median of fwhm
print(st.median(fwhm))
#plt.clf()
#Plotting diff figures
#Magpsf
plt.figure(1)
plt.hist(magpsf, bins = 20)
plt.title('Magnitude from PSF-fit photometry')
plt.ylabel('No of alerts')
plt.xlabel('Mag')
#plt.show()
plt.savefig("graphs/magpsf",dpi = 1200)
#RB
plt.figure(2)
plt.hist(rb, bins = 20)
plt.title('RealBogus quality score')
plt.ylabel('No of alerts')
plt.xlabel('RB Score')
#plt.show()
plt.savefig("graphs/rb",dpi = 1200)
#JD
plt.figure(3)
plt.hist(jd, bins = 20)
plt.title('Julian Date')
plt.ylabel('No of alerts')
plt.xlabel('Julian Date - min')
#plt.show()
plt.savefig("graphs/jd",dpi = 1200)
'''
#Sigmagap
#plt.figure(4)
plt.hist(sigmagap, bins = 20)
plt.title('1-sigma uncertainty in magpsf')
plt.ylabel('No of alerts')
plt.xlabel('MAG')
#plt.show()
plt.savefig("graphs/sigmapsf",dpi = 1200)
'''
#FWHM
plt.figure(5)
plt.hist(fwhm, bins = 20)
plt.title('Full Width Half Max assuming a Gaussian core, from SExtractor')
plt.ylabel('No of alerts')
plt.xlabel('Pixels')
#plt.show()
plt.savefig("graphs/fwhm",dpi = 1200)
print(st.median(fwhm))