-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipeline_utils.py
84 lines (75 loc) · 2.62 KB
/
pipeline_utils.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
from os.path import dirname, abspath
crts_url_list = ["http://nesssi.cacr.caltech.edu/catalina/Allns.arch.html#table1",
"http://nesssi.cacr.caltech.edu/MLS/Allns.arch.html",
"http://nesssi.cacr.caltech.edu/SSS/Allns.html"]
utils_dir = dirname(abspath(__file__))+"/utils/"
data_dir = dirname(abspath(__file__))+"/data/"
transient_fieldnames = ['ID', 'RA', 'Dec', 'UT Date', 'Mag', 'CSS images', 'SDSS', 'Others', 'Followed', 'Last', 'LC', 'FC', 'Classification','SubClassification']
variables_fieldnames = ["ID", "RA", "Dec", "Peroid", "V_CSS", "Npts", "V_amp", "SubType"]
unified_fieldnames = ["ID", "RA", "Dec", "SubType", "Type" ]
feature_list = ["amplitude",
"anderson_darling",
"beyond1Std",
"eta_e",
"mean",
"std",
"rcs",
"stetsonK",
"medianAbsDev",
"medianBRP",
"pairSlopeTrend",
"percentAmplitude",
"percentDifferenceFluxPercentile",
"q31",
"gskew",
"smallKurtosis",
"meanVariance",
"maxSlope",
"linearTrend",
"autocor_length",
"con",
"skew",
"fluxPercentileRatioMid20",
"fluxPercentileRatioMid35",
"fluxPercentileRatioMid50",
"fluxPercentileRatioMid65",
"fluxPercentileRatioMid80"]
clean_feature_list = ["amplitude",
"anderson_darling",
"beyond1Std",
# "eta_e",
"mean",
"std",
"rcs",
# "stetsonK",
"medianAbsDev",
"medianBRP",
"pairSlopeTrend",
"percentAmplitude",
"percentDifferenceFluxPercentile",
"q31",
"gskew",
"smallKurtosis",
"meanVariance",
# "maxSlope",
"linearTrend",
"autocor_length",
"con",
"skew",
"fluxPercentileRatioMid20",
"fluxPercentileRatioMid35",
"fluxPercentileRatioMid50",
"fluxPercentileRatioMid65",
"fluxPercentileRatioMid80"]
dmranges0 = [-8,-5,-3,-2.5,-2,-1.5,-1,-0.5,-0.3,-0.2,-0.1,0, 0.1, 0.2, 0.3, 0.5, 1, 1.5, 2, 2.5, 3, 5, 8]
dmranges1 = [-8,-7.8,-7.5,-7.3,-7,-6.8,-6.5,-6,-5.5,-5.0,-3.0,-1,0,1.0,3.0,5.0,5.5,6.0,6.5,6.8,7,7.3,7.5,7.8,8]
# dmranges2 = [-8,-7.5,-7,-6.5,-6,-5.5,-5,4.5,-4,-3.5,-3,-2.5,-2,-1.5,-1,0,1,1.5,2,2.5,3,3.5,4,4.5,5,5.5,6,6.5,7,7.5,8]
dtranges = [1/145, 2/145, 3/145, 4/145, 1/25, 2/25, 3/25, 1.5, 2.5, 3.5,4.5,
5.5,7,10,20,30,60,90,120,240,600,960,2000,4000]
dtrnames = ["dt-"+str(x) for x in range(len(dtranges)-1)]
dmrnames0 = ["dm-"+str(x) for x in range(len(dmranges0)-1)]
fnames0 = ["ID"]+dmrnames0+dtrnames+["Type"]+["SubType"]
dmrnames1 = ["dm-"+str(x) for x in range(len(dmranges1)-1)]
fnames1 = ["ID"]+dmrnames1+dtrnames+["Type"]+["SubType"]
# dmrnames2 = ["dm-"+str(x) for x in range(len(dmranges2)-1)]
# fnames2 = ["ID"]+dmrnames2+dtrnames+["Type"]+["SubType"]