# Modified from: http://www2.yukawa.kyoto-u.ac.jp/~kyohei.kawaguchi/kn_calc/main.html
# Reference: Kawaguchi et al. https://arxiv.org/abs/1601.07711
import numpy as np
import scipy
from .model import register_model
from .. import KNTable
from gwemlightcurves.EjectaFits.KaKy2016 import calc_meje, calc_vave
[docs]def get_KaKy2016_model(table, **kwargs):
if not 'mej' in table.colnames:
# calc the mass of ejecta
table['mej'] = calc_meje(table['q'], table['chi_eff'], table['c'], table['mb'], table['mns'])
# calc the velocity of ejecta
table['vej'] = calc_vave(table['q'])
# Throw out smaples where the mass ejecta is less than zero.
mask = (table['mej'] > 0)
table = table[mask]
if len(table) == 0: return table
# Log mass ejecta
table['mej10'] = np.log10(table['mej'])
# Initialize columns
timeseries = np.arange(table['tini'][0], table['tmax'][0]+table['dt'][0], table['dt'][0])
table['t'] = [np.zeros(timeseries.size)]
table['lbol'] = [np.zeros(timeseries.size)]
table['mag'] = [{}]
# Loop over samples
for isample in range(len(table)):
table['t'][isample], table['lbol'][isample], table['mag'][isample] = calc_lc(table['tini'][isample], table['tmax'][isample], table['dt'][isample],
table['mej'][isample], table['vej'][isample], table['vmin'][isample],
table['th'][isample], table['ph'][isample], table['kappa'][isample],
table['eps'][isample], table['alp'][isample], table['eth'][isample])
return table
[docs]def slope(x,a):
if (x>a):
s=x
else:
s=a*Math.exp((x-a)/a)
return s
[docs]def calc_lc(tini,tmax,dt,mej,vave,vmin,th,ph,kappa,eps,alp,eth):
td, bc = setbc_APR4Q3a75()
lbol_d=[]
bc_tmp=[]
t_d = np.arange(tini,tmax+dt,dt)
mag_d = {}
for ii in xrange(9):
mag_d[ii] = np.array([])
epsBarnes = 0
if epsBarnes:
mejtab = (0.001,0.001,0.001,0.005,0.005,0.005,0.01,0.01,0.01,0.05,0.05,0.05)
vejtab = (0.1,0.2,0.3,0.1,0.2,0.3,0.1,0.2,0.3,0.1,0.2,0.3)
a = (2.01,4.52,8.16,0.81,1.90,3.20,0.56,1.31,2.19,0.27,0.55,0.95)
b = (0.28,0.62,1.19,0.19,0.28,0.45,0.17,0.21,0.31,0.10,0.13,0.15)
d = (1.12,1.39,1.52,0.86,1.21,1.39,0.74,1.13,1.32,0.60,0.90,1.13)
fa = scipy.interpolate.interp2d(mejtab,vejtab,a, kind='linear')
fb = scipy.interpolate.interp2d(mejtab,vejtab,b, kind='linear')
fd = scipy.interpolate.interp2d(mejtab,vejtab,d, kind='linear')
fam = fa(mej,vave)
fbm = fb(mej,vave)
fdm = fd(mej,vave)
for t in t_d:
if epsBarnes:
eth = 0.36*(np.exp(-fam*t)+ np.log(1+2*fbm*t**fdm)/(2*fbm*t**fdm))[0]
lbol=kn_lbol(t,mej,vave,vmin,th,ph,kappa,eps,alp,eth)
lbol_d.append(lbol)
mbol=mag_bol(lbol,10)
tt=t/(mej**(1/3.2))
bc_tmp=getBC(td,bc,tt)
for ii in xrange(9):
if t > 2.*(mej*100)**(1.0/3.2):
mag_d[ii] = np.append(mag_d[ii],mbol-bc_tmp[ii])
else:
mag_d[ii] = np.append(mag_d[ii],np.nan)
lbol_d = np.array(lbol_d)
wavelengths = [3543, 4775.6, 6129.5, 7484.6, 8657.8, 12350, 16620, 21590]
wavelength_interp = 9603.1
mag_y = np.zeros(t_d.shape)
for ii in xrange(len(t_d)):
mags = [mag_d[jj][ii] for jj in xrange(8)]
mag_y[ii] = np.interp(wavelength_interp,wavelengths,mags)
mag_new = {}
mag_new[0] = mag_d[0]
mag_new[1] = mag_d[1]
mag_new[2] = mag_d[2]
mag_new[3] = mag_d[3]
mag_new[4] = mag_d[4]
mag_new[5] = mag_y
mag_new[6] = mag_d[5]
mag_new[7] = mag_d[6]
mag_new[8] = mag_d[7]
return t_d, lbol_d, mag_new
[docs]def mag_bol(lbol,d):
f0=2.52e-5
pc=3.08568e18
d0=d*pc
return -2.5*np.log(lbol/4/np.pi/d0/d0/f0)/np.log(10.0)
[docs]def getBC(td,bc,tt):
if (tt<td[0]) or (tt>td[99]):
return np.array([np.nan,np.nan,np.nan,np.nan,np.nan,np.nan,np.nan,np.nan,np.nan])
else:
for ii in xrange(100):
if (td[ii]<=tt) and (tt<=td[ii+1]):
break
bc_tmp=np.zeros((9,))
fac=(tt-td[ii])/(td[ii+1]-td[ii])
for jj in xrange(9):
bc_tmp[jj]=(1-fac)*bc[jj][ii]+fac*bc[jj][ii+1]
if not np.isfinite(bc_tmp[jj]):
bc_tmp[jj] = np.nan
return bc_tmp
[docs]def kn_lbol(t,mej,vave,vmin,th,ph,kappa,eps,alp,eth):
c=2.99792458e10
msun=1.988e33
day=24*3600
lu0=c*day
eneu0=msun*c*c
lumu0=eneu0/day
kappa0=kappa/lu0/lu0*msun
eps0=eth*eps/eneu0*day*msun
vdiff = vmax(vave,vmin)-vmin
if vdiff < 0:
tobs = 0.0
else:
tobs=(th*mej*kappa0/(2*ph*vdiff))**(1/2.0)
if (t<tobs):
fac=t/tobs
else:
fac=1
lbol=(1+th)*mej*fac*eps0*(t**(-alp))*lumu0
return lbol
[docs]def vmax(vave,vmin):
vdiff = 12*vave*vave-3*vmin*vmin
if vdiff < 0:
return 0
else:
return 0.5*(vdiff**(1/2.0) -vmin)
[docs]def setbc_APR4Q3a75():
td= np.zeros((100,))
bc = np.zeros((9,100))
# Rescaled time
td[0] = 4.4699829363429719
td[1] = 5.6963104447984145
td[2] = 6.9226379532538571
td[3] = 8.1489654617093006
td[4] = 9.3752929701647432
td[5] = 10.601620478620186
td[6] = 11.827947987075628
td[7] = 13.054275495531071
td[8] = 14.280603003986513
td[9] = 15.506930512441956
td[10] = 16.733258020897399
td[11] = 17.959585529352843
td[12] = 19.185913037808287
td[13] = 20.412240546263732
td[14] = 21.638568054719176
td[15] = 22.864895563174620
td[16] = 24.091223071630065
td[17] = 25.317550580085509
td[18] = 26.543878088540954
td[19] = 27.770205596996398
td[20] = 28.996533105451842
td[21] = 30.222860613907287
td[22] = 31.449188122362731
td[23] = 32.675515630818175
td[24] = 33.901843139273616
td[25] = 35.128170647729057
td[26] = 36.354498156184498
td[27] = 37.580825664639939
td[28] = 38.807153173095379
td[29] = 40.033480681550820
td[30] = 41.259808190006261
td[31] = 42.486135698461702
td[32] = 43.712463206917143
td[33] = 44.938790715372583
td[34] = 46.165118223828024
td[35] = 47.391445732283465
td[36] = 48.617773240738906
td[37] = 49.844100749194347
td[38] = 51.070428257649787
td[39] = 52.296755766105228
td[40] = 53.523083274560669
td[41] = 54.749410783016110
td[42] = 55.975738291471551
td[43] = 57.202065799926991
td[44] = 58.428393308382432
td[45] = 59.654720816837873
td[46] = 60.881048325293314
td[47] = 62.107375833748755
td[48] = 63.333703342204196
td[49] = 64.560030850659643
td[50] = 65.786358359115084
td[51] = 67.012685867570525
td[52] = 68.239013376025966
td[53] = 69.465340884481407
td[54] = 70.691668392936847
td[55] = 71.917995901392288
td[56] = 73.144323409847729
td[57] = 74.370650918303170
td[58] = 75.596978426758611
td[59] = 76.823305935214051
td[60] = 78.049633443669492
td[61] = 79.275960952124933
td[62] = 80.502288460580374
td[63] = 81.728615969035815
td[64] = 82.954943477491256
td[65] = 84.181270985946696
td[66] = 85.407598494402137
td[67] = 86.633926002857578
td[68] = 87.860253511313019
td[69] = 89.086581019768460
td[70] = 90.312908528223900
td[71] = 91.539236036679341
td[72] = 92.765563545134782
td[73] = 93.991891053590223
td[74] = 95.218218562045664
td[75] = 96.444546070501104
td[76] = 97.670873578956545
td[77] = 98.897201087411986
td[78] = 100.12352859586743
td[79] = 101.34985610432287
td[80] = 102.57618361277831
td[81] = 103.80251112123375
td[82] = 105.02883862968919
td[83] = 106.25516613814463
td[84] = 107.48149364660007
td[85] = 108.70782115505551
td[86] = 109.93414866351095
td[87] = 111.16047617196639
td[88] = 112.38680368042183
td[89] = 113.61313118887728
td[90] = 114.83945869733272
td[91] = 116.06578620578816
td[92] = 117.29211371424360
td[93] = 118.51844122269904
td[94] = 119.74476873115448
td[95] = 120.97109623960992
td[96] = 122.19742374806536
td[97] = 123.42375125652080
td[98] = 124.65007876497624
td[99] = 125.87640627343168
# bc u-band
bc[0][0] = -0.64998193646052016
bc[0][1] = -0.88447187670334049
bc[0][2] = -1.0617706374989619
bc[0][3] = -1.1859175709954335
bc[0][4] = -1.3842182755105226
bc[0][5] = -1.6758123759582895
bc[0][6] = -2.0783766926649365
bc[0][7] = -2.4967373454227104
bc[0][8] = -2.8462743779006012
bc[0][9] = -3.2234420925878662
bc[0][10] = -3.5467009027796408
bc[0][11] = -3.8554653576433289
bc[0][12] = -4.2091759654385879
bc[0][13] = -4.5543545961036402
bc[0][14] = -4.8856122220361335
bc[0][15] = -5.2123947422465200
bc[0][16] = -5.5320453146889701
bc[0][17] = -5.8249153623281043
bc[0][18] = -5.9665032767826940
bc[0][19] = -6.1080911912372864
bc[0][20] = -6.2225577268322576
bc[0][21] = -6.3239384066128812
bc[0][22] = -6.4253190863935057
bc[0][23] = -6.6654363270669617
bc[0][24] = -6.9291179246901100
bc[0][25] = -7.1927995223132584
bc[0][26] = -7.3512553932163840
bc[0][27] = -7.4699179064800596
bc[0][28] = -7.5885804197437343
bc[0][29] = -7.7133260906105248
bc[0][30] = -7.8650952404325576
bc[0][31] = -8.0168643902545913
bc[0][32] = -8.1686335400766232
bc[0][33] = -8.5877120838495209
bc[0][34] = -9.9055172112238594
bc[0][35] = -11.223322338598201
bc[0][36] = -12.541127465972542
bc[0][37] = -13.858932593346882
bc[0][38] = -np.inf
bc[0][39] = -np.inf
bc[0][40] = -np.inf
bc[0][41] = -np.inf
bc[0][42] = -np.inf
bc[0][43] = -np.inf
bc[0][44] = -np.inf
bc[0][45] = -np.inf
bc[0][46] = -np.inf
bc[0][47] = -np.inf
bc[0][48] = -np.inf
bc[0][49] = -np.inf
bc[0][50] = -np.inf
bc[0][51] = -np.inf
bc[0][52] = -np.inf
bc[0][53] = -np.inf
bc[0][54] = -np.inf
bc[0][55] = -np.inf
bc[0][56] = -np.inf
bc[0][57] = -np.inf
bc[0][58] = -np.inf
bc[0][59] = -np.inf
bc[0][60] = -np.inf
bc[0][61] = -np.inf
bc[0][62] = -np.inf
bc[0][63] = -np.inf
bc[0][64] = -np.inf
bc[0][65] = -np.inf
bc[0][66] = -np.inf
bc[0][67] = -np.inf
bc[0][68] = -np.inf
bc[0][69] = -np.inf
bc[0][70] = -np.inf
bc[0][71] = -np.inf
bc[0][72] = -np.inf
bc[0][73] = -np.inf
bc[0][74] = -np.inf
bc[0][75] = -np.inf
bc[0][76] = -np.inf
bc[0][77] = -np.inf
bc[0][78] = -np.inf
bc[0][79] = -np.inf
bc[0][80] = -np.inf
bc[0][81] = -np.inf
bc[0][82] = -np.inf
bc[0][83] = -np.inf
bc[0][84] = -np.inf
bc[0][85] = -np.inf
bc[0][86] = -np.inf
bc[0][87] = -np.inf
bc[0][88] = -np.inf
bc[0][89] = -np.inf
bc[0][90] = -np.inf
bc[0][91] = -np.inf
bc[0][92] = -np.inf
bc[0][93] = -np.inf
bc[0][94] = -np.inf
bc[0][95] = -np.inf
bc[0][96] = -np.inf
bc[0][97] = -np.inf
bc[0][98] = -np.inf
bc[0][99] = -np.inf
# bc g-band
bc[1][0] = -0.52998193646052094
bc[1][1] = -0.54345583392259189
bc[1][2] = -0.57096255669088136
bc[1][3] = -0.52944853278726511
bc[1][4] = -0.52147157776382391
bc[1][5] = -0.59157343482279667
bc[1][6] = -0.75986429597072158
bc[1][7] = -0.99445339480542638
bc[1][8] = -1.2547124168264452
bc[1][9] = -1.5396726912574901
bc[1][10] = -1.8412243986074857
bc[1][11] = -2.1432649219134818
bc[1][12] = -2.4057416220042449
bc[1][13] = -2.6600599252572450
bc[1][14] = -2.9010667674906778
bc[1][15] = -3.1534203832721595
bc[1][16] = -3.4238572805009344
bc[1][17] = -3.6840273151900571
bc[1][18] = -3.8862002464796648
bc[1][19] = -4.0883731777692729
bc[1][20] = -4.2823630976132385
bc[1][21] = -4.4724047776402287
bc[1][22] = -4.6624464576672189
bc[1][23] = -4.7706555522861844
bc[1][24] = -4.8649654105375939
bc[1][25] = -4.9592752687890043
bc[1][26] = -5.0999363778197004
bc[1][27] = -5.2581262030378717
bc[1][28] = -5.4163160282560421
bc[1][29] = -5.5840129592973948
bc[1][30] = -5.7939437252810428
bc[1][31] = -6.0038744912646926
bc[1][32] = -6.2138052572483407
bc[1][33] = -6.4238659300033625
bc[1][34] = -6.6343633650700138
bc[1][35] = -6.8448608001366651
bc[1][36] = -7.0553582352033164
bc[1][37] = -7.2658556702699686
bc[1][38] = -7.5106528973036184
bc[1][39] = -7.7663444289711832
bc[1][40] = -8.0220359606387461
bc[1][41] = -8.2777274923063118
bc[1][42] = -8.5334190239738739
bc[1][43] = -9.1858495661685033
bc[1][44] = -9.9548946310079494
bc[1][45] = -10.723939695847399
bc[1][46] = -11.492984760686845
bc[1][47] = -12.262029825526295
bc[1][48] = -np.inf
bc[1][49] = -np.inf
bc[1][50] = -np.inf
bc[1][51] = -np.inf
bc[1][52] = -np.inf
bc[1][53] = -np.inf
bc[1][54] = -np.inf
bc[1][55] = -np.inf
bc[1][56] = -np.inf
bc[1][57] = -np.inf
bc[1][58] = -np.inf
bc[1][59] = -np.inf
bc[1][60] = -np.inf
bc[1][61] = -np.inf
bc[1][62] = -np.inf
bc[1][63] = -np.inf
bc[1][64] = -np.inf
bc[1][65] = -np.inf
bc[1][66] = -np.inf
bc[1][67] = -np.inf
bc[1][68] = -np.inf
bc[1][69] = -np.inf
bc[1][70] = -np.inf
bc[1][71] = -np.inf
bc[1][72] = -np.inf
bc[1][73] = -np.inf
bc[1][74] = -np.inf
bc[1][75] = -np.inf
bc[1][76] = -np.inf
bc[1][77] = -np.inf
bc[1][78] = -np.inf
bc[1][79] = -np.inf
bc[1][80] = -np.inf
bc[1][81] = -np.inf
bc[1][82] = -np.inf
bc[1][83] = -np.inf
bc[1][84] = -np.inf
bc[1][85] = -np.inf
bc[1][86] = -np.inf
bc[1][87] = -np.inf
bc[1][88] = -np.inf
bc[1][89] = -np.inf
bc[1][90] = -np.inf
bc[1][91] = -np.inf
bc[1][92] = -np.inf
bc[1][93] = -np.inf
bc[1][94] = -np.inf
bc[1][95] = -np.inf
bc[1][96] = -np.inf
bc[1][97] = -np.inf
bc[1][98] = -np.inf
bc[1][99] = -np.inf
# bc r-band
bc[2][0] = -0.49998193646051980
bc[2][1] = -0.27366379589526002
bc[2][2] = -0.21522742762241803
bc[2][3] = -0.10349332857119102
bc[2][4] = -6.6308629231085926E-003
bc[2][5] = 2.8029490987026610E-002
bc[2][6] = -8.5603150791109875E-004
bc[2][7] = -8.4560016578715425E-002
bc[2][8] = -0.21137169251011179
bc[2][9] = -0.38993876664551713
bc[2][10] = -0.56170749039492529
bc[2][11] = -0.73106448618363395
bc[2][12] = -0.90230727856990067
bc[2][13] = -1.0676705139023159
bc[2][14] = -1.2234405048644157
bc[2][15] = -1.3768469566987329
bc[2][16] = -1.5264866511303048
bc[2][17] = -1.6803825340452756
bc[2][18] = -1.8583214586008765
bc[2][19] = -2.0362603831564776
bc[2][20] = -2.1697343713259745
bc[2][21] = -2.2817543711361630
bc[2][22] = -2.3937743709463510
bc[2][23] = -2.5234361050667369
bc[2][24] = -2.6560942816664652
bc[2][25] = -2.7887524582661936
bc[2][26] = -2.9010121844294865
bc[2][27] = -3.0055578005665549
bc[2][28] = -3.1101034167036241
bc[2][29] = -3.2237907370751713
bc[2][30] = -3.3780886528172740
bc[2][31] = -3.5323865685593776
bc[2][32] = -3.6866844843014803
bc[2][33] = -3.8538659300033622
bc[2][34] = -4.0643633650700135
bc[2][35] = -4.2748608001366657
bc[2][36] = -4.4853582352033170
bc[2][37] = -4.6958556702699692
bc[2][38] = -4.8995557186202348
bc[2][39] = -5.1010967800683638
bc[2][40] = -5.3026378415164910
bc[2][41] = -5.5041789029646191
bc[2][42] = -5.7057199644127481
bc[2][43] = -5.9296505388583745
bc[2][44] = -6.1601621207198960
bc[2][45] = -6.3906737025814166
bc[2][46] = -6.6211852844429373
bc[2][47] = -6.8516968663044580
bc[2][48] = -7.0534280512415188
bc[2][49] = -7.1415706249492050
bc[2][50] = -7.2297131986568894
bc[2][51] = -7.3178557723645747
bc[2][52] = -7.4059983460722609
bc[2][53] = -7.4941409197799462
bc[2][54] = -7.5822834934876306
bc[2][55] = -7.5467410838212539
bc[2][56] = -7.4988679710759447
bc[2][57] = -7.4509948583306382
bc[2][58] = -7.4031217455853291
bc[2][59] = -7.3552486328400217
bc[2][60] = -7.3073755200947144
bc[2][61] = -7.2595024073494052
bc[2][62] = -7.2509857955794850
bc[2][63] = -7.2488749470943326
bc[2][64] = -7.2467640986091801
bc[2][65] = -7.2446532501240268
bc[2][66] = -7.2425424016388753
bc[2][67] = -7.2404315531537220
bc[2][68] = -7.2383207046685696
bc[2][69] = -7.2362098561834172
bc[2][70] = -7.3068625659175943
bc[2][71] = -7.3785924943494177
bc[2][72] = -7.4503224227812410
bc[2][73] = -7.5220523512130635
bc[2][74] = -7.5937822796448868
bc[2][75] = -7.6655122080767111
bc[2][76] = -7.7372421365085335
bc[2][77] = -7.8089720649403569
bc[2][78] = -7.8677005516237264
bc[2][79] = -7.8249621290041054
bc[2][80] = -7.7822237063844844
bc[2][81] = -7.7394852837648624
bc[2][82] = -7.6967468611452414
bc[2][83] = -7.6540084385256204
bc[2][84] = -7.6112700159059994
bc[2][85] = -7.5685315932863784
bc[2][86] = -7.5257931706667573
bc[2][87] = -7.4830547480471354
bc[2][88] = -7.4522731903570421
bc[2][89] = -7.4941141636394608
bc[2][90] = -7.5359551369218787
bc[2][91] = -7.5777961102042966
bc[2][92] = -7.6196370834867153
bc[2][93] = -7.6614780567691341
bc[2][94] = -7.7033190300515511
bc[2][95] = -7.7451600033339698
bc[2][96] = -7.7870009766163877
bc[2][97] = -7.8288419498988064
bc[2][98] = -7.8706829231812243
bc[2][99] = -7.9125238964636422
# bc i-band
bc[3][0] =-0.49998193646051980
bc[3][1] = -2.0199743607678230E-002
bc[3][2] = 0.18197795958296778
bc[3][3] = 0.34334461609284000
bc[3][4] = 0.47643440514215879
bc[3][5] = 0.55286404340778539
bc[3][6] = 0.59303744874920494
bc[3][7] = 0.59772393403856861
bc[3][8] = 0.56107965018513306
bc[3][9] = 0.48181289632565821
bc[3][10] = 0.37448047622782432
bc[3][11] = 0.25656078614752115
bc[3][12] = 0.14233918607656418
bc[3][13] = 4.2813637961146622E-002
bc[3][14] = -3.2733434157344393E-002
bc[3][15] = -9.3723413575189138E-002
bc[3][16] =-0.13151384615750000
bc[3][17] =-0.17458848241789135
bc[3][18] =-0.24751337779279570
bc[3][19] =-0.32043827316770002
bc[3][20] =-0.39820443784482118
bc[3][21] =-0.47830647756631761
bc[3][22] =-0.55840851728781404
bc[3][23] =-0.65338726501789679
bc[3][24] =-0.75089281646499983
bc[3][25] =-0.84839836791210321
bc[3][26] =-0.94076897564258855
bc[3][27] = -1.0311976946530512
bc[3][28] = -1.1216264136635139
bc[3][29] = -1.2135685148529485
bc[3][30] = -1.3122335803535055
bc[3][31] = -1.4108986458540627
bc[3][32] = -1.5095637113546199
bc[3][33] = -1.6148915710290022
bc[3][34] = -1.7426205523272003
bc[3][35] = -1.8703495336253986
bc[3][36] = -1.9980785149235964
bc[3][37] = -2.1258074962217948
bc[3][38] = -2.2638921867498065
bc[3][39] = -2.4052660590652288
bc[3][40] = -2.5466399313806507
bc[3][41] = -2.6880138036960730
bc[3][42] = -2.8293876760114953
bc[3][43] = -3.0146785972197669
bc[3][44] = -3.2128781701026119
bc[3][45] = -3.4110777429854577
bc[3][46] = -3.6092773158683027
bc[3][47] = -3.8074768887511481
bc[3][48] = -3.9863192583950204
bc[3][49] = -4.0887638688637598
bc[3][50] = -4.1912084793324977
bc[3][51] = -4.2936530898012366
bc[3][52] = -4.3960977002699746
bc[3][53] = -4.4985423107387135
bc[3][54] = -4.6009869212074523
bc[3][55] = -4.6518792952033650
bc[3][56] = -4.6976321987182192
bc[3][57] = -4.7433851022330735
bc[3][58] = -4.7891380057479278
bc[3][59] = -4.8348909092627821
bc[3][60] = -4.8806438127776364
bc[3][61] = -4.9263967162924907
bc[3][62] = -4.9298936514305716
bc[3][63] = -4.9265128986624145
bc[3][64] = -4.9231321458942574
bc[3][65] = -4.9197513931261003
bc[3][66] = -4.9163706403579432
bc[3][67] = -4.9129898875897862
bc[3][68] = -4.9096091348216282
bc[3][69] = -4.9062283820534720
bc[3][70] = -4.8957800351839058
bc[3][71] = -4.8852270570304963
bc[3][72] = -4.8746740788770877
bc[3][73] = -4.8641211007236791
bc[3][74] = -4.8535681225702696
bc[3][75] = -4.8430151444168610
bc[3][76] = -4.8324621662634524
bc[3][77] = -4.8219091881100429
bc[3][78] = -4.8178374377261228
bc[3][79] = -4.8643470123200165
bc[3][80] = -4.9108565869139094
bc[3][81] = -4.9573661615078022
bc[3][82] = -5.0038757361016959
bc[3][83] = -5.0503853106955887
bc[3][84] = -5.0968948852894824
bc[3][85] = -5.1434044598833752
bc[3][86] = -5.1899140344772690
bc[3][87] = -5.2364236090711618
bc[3][88] = -5.2741524770511488
bc[3][89] = -5.2585498788159208
bc[3][90] = -5.2429472805806938
bc[3][91] = -5.2273446823454677
bc[3][92] = -5.2117420841102398
bc[3][93] = -5.1961394858750118
bc[3][94] = -5.1805368876397857
bc[3][95] = -5.1649342894045578
bc[3][96] = -5.1493316911693299
bc[3][97] = -5.1337290929341028
bc[3][98] = -5.1181264946988758
bc[3][99] = -5.1025238964636479
# bc z-band
bc[4][0] =-0.67998193646051952
bc[4][1] = 2.2040303926486433E-002
bc[4][2] = 0.31197795958296859
bc[4][3] = 0.54018256075687276
bc[4][4] = 0.74434038804814207
bc[4][5] = 0.92756623776515212
bc[4][6] = 1.0569309290063214
bc[4][7] = 1.1529427892574238
bc[4][8] = 1.2135309928803786
bc[4][9] = 1.2335645592968330
bc[4][10] = 1.2268564094733221
bc[4][11] = 1.2064736401780221
bc[4][12] = 1.1663795901169682
bc[4][13] = 1.1223399354184791
bc[4][14] = 1.0718625254386160
bc[4][15] = 1.0383511784994042
bc[4][16] = 1.0318785392348868
bc[4][17] = 1.0239160069199329
bc[4][18] = 1.0075371272577105
bc[4][19] = 0.99115824759548832
bc[4][20] = 0.95332549563633240
bc[4][21] = 0.90514141600352760
bc[4][22] = 0.85695733637072280
bc[4][23] = 0.79392986229923146
bc[4][24] = 0.72838124280906058
bc[4][25] = 0.66283262331888981
bc[4][26] = 0.58947423314431091
bc[4][27] = 0.51316241126045381
bc[4][28] = 0.43685058937659660
bc[4][29] = 0.35875471747028426
bc[4][30] = 0.27273348157007821
bc[4][31] = 0.18671224566987210
bc[4][32] = 0.10069100976966605
bc[4][33] = 3.0571469197148947E-003
bc[4][34] =-0.13361977532642394
bc[4][35] =-0.27029669757256275
bc[4][36] =-0.40697361981870156
bc[4][37] =-0.54365054206484043
bc[4][38] =-0.68237006902079234
bc[4][39] =-0.82173836836512426
bc[4][40] =-0.96110666770945619
bc[4][41] = -1.1004749670537883
bc[4][42] = -1.2398432663981203
bc[4][43] = -1.3622487431232475
bc[4][44] = -1.4796682935594039
bc[4][45] = -1.5970878439955603
bc[4][46] = -1.7145073944317164
bc[4][47] = -1.8319269448678728
bc[4][48] = -1.9543503893769698
bc[4][49] = -2.0965228797375230
bc[4][50] = -2.2386953700980756
bc[4][51] = -2.3808678604586286
bc[4][52] = -2.5230403508191812
bc[4][53] = -2.6652128411797338
bc[4][54] = -2.8073853315402864
bc[4][55] = -2.9173481298917094
bc[4][56] = -3.0240998015760630
bc[4][57] = -3.1308514732604174
bc[4][58] = -3.2376031449447717
bc[4][59] = -3.3443548166291253
bc[4][60] = -3.4511064883134797
bc[4][61] = -3.5578581599978336
bc[4][62] = -3.5993815434512126
bc[4][63] = -3.6302882063241828
bc[4][64] = -3.6611948691971534
bc[4][65] = -3.6921015320701231
bc[4][66] = -3.7230081949430938
bc[4][67] = -3.7539148578160635
bc[4][68] = -3.7848215206890341
bc[4][69] = -3.8157281835620043
bc[4][70] = -3.8224408291702789
bc[4][71] = -3.8287952975754793
bc[4][72] = -3.8351497659806801
bc[4][73] = -3.8415042343858805
bc[4][74] = -3.8478587027910813
bc[4][75] = -3.8542131711962817
bc[4][76] = -3.8605676396014825
bc[4][77] = -3.8669221080066829
bc[4][78] = -3.8713452747167221
bc[4][79] = -3.8606960196345446
bc[4][80] = -3.8500467645523671
bc[4][81] = -3.8393975094701891
bc[4][82] = -3.8287482543880120
bc[4][83] = -3.8180989993058336
bc[4][84] = -3.8074497442236561
bc[4][85] = -3.7968004891414786
bc[4][86] = -3.7861512340593007
bc[4][87] = -3.7755019789771231
bc[4][88] = -3.7706236704667830
bc[4][89] = -3.8007964182846794
bc[4][90] = -3.8309691661025758
bc[4][91] = -3.8611419139204726
bc[4][92] = -3.8913146617383694
bc[4][93] = -3.9214874095562653
bc[4][94] = -3.9516601573741617
bc[4][95] = -3.9818329051920580
bc[4][96] = -4.0120056530099548
bc[4][97] = -4.0421784008278507
bc[4][98] = -4.0723511486457475
bc[4][99] = -4.1025238964636443
# bc J-band
bc[5][0] = -1.3499819364605194
bc[5][1] =-0.65040770558034644
bc[5][2] =-0.37015447588279993
bc[5][3] =-0.40819688588344422
bc[5][4] =-0.47485541614766247
bc[5][5] =-0.29276465739333002
bc[5][6] = -2.0892762453734171E-002
bc[5][7] = 0.25164088128884832
bc[5][8] = 0.47754429664978004
bc[5][9] = 0.68908562359838643
bc[5][10] = 0.86351429265294577
bc[5][11] = 1.0178244027052559
bc[5][12] = 1.1373896911270689
bc[5][13] = 1.2361609037222050
bc[5][14] = 1.3010039395800297
bc[5][15] = 1.3521507122989371
bc[5][16] = 1.3814698368261835
bc[5][17] = 1.4039160069199321
bc[5][18] = 1.3875371272577095
bc[5][19] = 1.3711582475954873
bc[5][20] = 1.3620320736112028
bc[5][21] = 1.3564052740966541
bc[5][22] = 1.3507784745821054
bc[5][23] = 1.3485641169334870
bc[5][24] = 1.3469293613571796
bc[5][25] = 1.3452946057808726
bc[5][26] = 1.3365929935640424
bc[5][27] = 1.3252188984625723
bc[5][28] = 1.3138448033611021
bc[5][29] = 1.2971183538339208
bc[5][30] = 1.2566149044949793
bc[5][31] = 1.2161114551560379
bc[5][32] = 1.1756080058170966
bc[5][33] = 1.1294674033299710
bc[5][34] = 1.0643740086673597
bc[5][35] = 0.99928061400474832
bc[5][36] = 0.93418721934213689
bc[5][37] = 0.86909382467952556
bc[5][38] = 0.80242616922372090
bc[5][39] = 0.73525849683863675
bc[5][40] = 0.66809082445355261
bc[5][41] = 0.60092315206846847
bc[5][42] = 0.53375547968338422
bc[5][43] = 0.46243450915259715
bc[5][44] = 0.38989274896460113
bc[5][45] = 0.31735098877660511
bc[5][46] = 0.24480922858860907
bc[5][47] = 0.17226746840061302
bc[5][48] = 0.10010564639053873
bc[5][49] = 2.9443339835251506E-002
bc[5][50] = -4.1218966720035333E-002
bc[5][51] =-0.11188127327532219
bc[5][52] =-0.18254357983060898
bc[5][53] =-0.25320588638589581
bc[5][54] =-0.32386819294118263
bc[5][55] =-0.37832915970200892
bc[5][56] =-0.43117494323657252
bc[5][57] =-0.48402072677113617
bc[5][58] =-0.53686651030569976
bc[5][59] =-0.58971229384026336
bc[5][60] =-0.64255807737482695
bc[5][61] =-0.69540386090939055
bc[5][62] =-0.72828939930230008
bc[5][63] =-0.75792615789226558
bc[5][64] =-0.78756291648223120
bc[5][65] =-0.81719967507219660
bc[5][66] =-0.84683643366216221
bc[5][67] =-0.87647319225212772
bc[5][68] =-0.90610995084209334
bc[5][69] =-0.93574670943205873
bc[5][70] =-0.94133010957118746
bc[5][71] =-0.94655741487248068
bc[5][72] =-0.95178472017377413
bc[5][73] =-0.95701202547506714
bc[5][74] =-0.96223933077636059
bc[5][75] =-0.96746663607765393
bc[5][76] =-0.97269394137894727
bc[5][77] =-0.97792124668024050
bc[5][78] =-0.98282594347325236
bc[5][79] =-0.98521291270316103
bc[5][80] =-0.98759988193306969
bc[5][81] =-0.98998685116297835
bc[5][82] =-0.99237382039288713
bc[5][83] =-0.99476078962279568
bc[5][84] =-0.99714775885270446
bc[5][85] =-0.99953472808261312
bc[5][86] = -1.0019216973125218
bc[5][87] = -1.0043086665424306
bc[5][88] = -1.0060557692322178
bc[5][89] = -1.0039165080714387
bc[5][90] = -1.0017772469106596
bc[5][91] =-0.99963798574988050
bc[5][92] =-0.99749872458910127
bc[5][93] =-0.99535946342832204
bc[5][94] =-0.99322020226754293
bc[5][95] =-0.99108094110676381
bc[5][96] =-0.98894167994598470
bc[5][97] =-0.98680241878520536
bc[5][98] =-0.98466315762442624
bc[5][99] =-0.98252389646364713
# bc H-band
bc[6][0] = -1.8699819364605208
bc[6][1] = -1.2481676580461809
bc[6][2] =-0.91949229855395631
bc[6][3] = -1.0437831836436553
bc[6][4] = -1.4869649732572194
bc[6][5] = -1.9056800178948963
bc[6][6] = -1.9640608065308687
bc[6][7] = -1.6408563128750124
bc[6][8] = -1.2302211628229971
bc[6][9] =-0.84135783538165843
bc[6][10] =-0.53053928661802563
bc[6][11] =-0.26302527049735941
bc[6][12] = -7.5034551297173652E-002
bc[6][13] = 9.6645055585667453E-002
bc[6][14] = 0.24171101028710087
bc[6][15] = 0.35940012954835482
bc[6][16] = 0.43345895881530583
bc[6][17] = 0.50788766797492690
bc[6][18] = 0.58440581412639747
bc[6][19] = 0.66092396027786804
bc[6][20] = 0.71552308124855246
bc[6][21] = 0.75954644187196840
bc[6][22] = 0.80356980249538446
bc[6][23] = 0.84407638244575245
bc[6][24] = 0.88398563841345679
bc[6][25] = 0.92389489438116146
bc[6][26] = 0.95937126168211684
bc[6][27] = 0.99317123738578550
bc[6][28] = 1.0269712130894542
bc[6][29] = 1.0601284548440224
bc[6][30] = 1.0904304512670486
bc[6][31] = 1.1207324476900751
bc[6][32] = 1.1510344441131013
bc[6][33] = 1.1825443264068953
bc[6][34] = 1.2181152674086193
bc[6][35] = 1.2536862084103433
bc[6][36] = 1.2892571494120670
bc[6][37] = 1.3248280904137910
bc[6][38] = 1.3539657024873917
bc[6][39] = 1.3810599597435469
bc[6][40] = 1.4081542169997023
bc[6][41] = 1.4352484742558578
bc[6][42] = 1.4623427315120134
bc[6][43] = 1.4679277127939470
bc[6][44] = 1.4671904170030079
bc[6][45] = 1.4664531212120688
bc[6][46] = 1.4657158254211298
bc[6][47] = 1.4649785296301907
bc[6][48] = 1.4600642488081559
bc[6][49] = 1.4386645133187188
bc[6][50] = 1.4172647778292815
bc[6][51] = 1.3958650423398447
bc[6][52] = 1.3744653068504076
bc[6][53] = 1.3530655713609705
bc[6][54] = 1.3316658358715334
bc[6][55] = 1.3190800543901307
bc[6][56] = 1.3073729749698808
bc[6][57] = 1.2956658955496310
bc[6][58] = 1.2839588161293811
bc[6][59] = 1.2722517367091311
bc[6][60] = 1.2605446572888810
bc[6][61] = 1.2488375778686314
bc[6][62] = 1.2282634655911751
bc[6][63] = 1.2062461326992380
bc[6][64] = 1.1842287998073009
bc[6][65] = 1.1622114669153638
bc[6][66] = 1.1401941340234267
bc[6][67] = 1.1181768011314894
bc[6][68] = 1.0961594682395521
bc[6][69] = 1.0741421353476150
bc[6][70] = 1.0608948532351710
bc[6][71] = 1.0477774062065266
bc[6][72] = 1.0346599591778822
bc[6][73] = 1.0215425121492379
bc[6][74] = 1.0084250651205937
bc[6][75] = 0.99530761809194912
bc[6][76] = 0.98219017106330486
bc[6][77] = 0.96907272403466060
bc[6][78] = 0.95614897815684174
bc[6][79] = 0.94473693055702723
bc[6][80] = 0.93332488295721250
bc[6][81] = 0.92191283535739799
bc[6][82] = 0.91050078775758347
bc[6][83] = 0.89908874015776874
bc[6][84] = 0.88767669255795423
bc[6][85] = 0.87626464495813949
bc[6][86] = 0.86485259735832498
bc[6][87] = 0.85344054975851036
bc[6][88] = 0.84292914160454491
bc[6][89] = 0.83788795632561852
bc[6][90] = 0.83284677104669191
bc[6][91] = 0.82780558576776553
bc[6][92] = 0.82276440048883892
bc[6][93] = 0.81772321520991231
bc[6][94] = 0.81268202993098582
bc[6][95] = 0.80764084465205932
bc[6][96] = 0.80259965937313271
bc[6][97] = 0.79755847409420633
bc[6][98] = 0.79251728881527972
bc[6][99] = 0.78747610353635322
# bc K-band
bc[7][0] = -2.8699819364605208
bc[7][1] = -2.4585835819915167
bc[7][2] = -1.8478761369377952
bc[7][3] = -1.8195934603234976
bc[7][4] = -2.2645523858446319
bc[7][5] = -3.0641579001658821
bc[7][6] = -3.5603601637393165
bc[7][7] = -3.5302053588907247
bc[7][8] = -3.1937786893073534
bc[7][9] = -2.8332868819448516
bc[7][10] = -2.4717338408560576
bc[7][11] = -2.1200623075343956
bc[7][12] = -1.8351355613981828
bc[7][13] = -1.5823970900082016
bc[7][14] = -1.3821778786017873
bc[7][15] = -1.1943760942278681
bc[7][16] = -1.0263638850075367
bc[7][17] =-0.85510335334942611
bc[7][18] =-0.66549317577259059
bc[7][19] =-0.47588299819575541
bc[7][20] =-0.28639611067063725
bc[7][21] = -9.6968709643180703E-002
bc[7][22] = 9.2458691384275815E-002
bc[7][23] = 0.26334489171426412
bc[7][24] = 0.43108187550969651
bc[7][25] = 0.59881885930512901
bc[7][26] = 0.73697643967564597
bc[7][27] = 0.86394793641491274
bc[7][28] = 0.99091943315417941
bc[7][29] = 1.1126739093894766
bc[7][30] = 1.2112525856543999
bc[7][31] = 1.3098312619193233
bc[7][32] = 1.4084099381842468
bc[7][33] = 1.5012622751248430
bc[7][34] = 1.5748619651553155
bc[7][35] = 1.6484616551857885
bc[7][36] = 1.7220613452162614
bc[7][37] = 1.7956610352467341
bc[7][38] = 1.8430984088614761
bc[7][39] = 1.8822261039441732
bc[7][40] = 1.9213537990268703
bc[7][41] = 1.9604814941095676
bc[7][42] = 1.9996091891922647
bc[7][43] = 2.0273503340684207
bc[7][44] = 2.0517446008164515
bc[7][45] = 2.0761388675644827
bc[7][46] = 2.1005331343125135
bc[7][47] = 2.1249274010605443
bc[7][48] = 2.1500228512257746
bc[7][49] = 2.1778856868021870
bc[7][50] = 2.2057485223785989
bc[7][51] = 2.2336113579550112
bc[7][52] = 2.2614741935314235
bc[7][53] = 2.2893370291078354
bc[7][54] = 2.3171998646842478
bc[7][55] = 2.3335895394849793
bc[7][56] = 2.3488354041396251
bc[7][57] = 2.3640812687942709
bc[7][58] = 2.3793271334489159
bc[7][59] = 2.3945729981035613
bc[7][60] = 2.4098188627582071
bc[7][61] = 2.4250647274128525
bc[7][62] = 2.4322906368672532
bc[7][63] = 2.4382111982014201
bc[7][64] = 2.4441317595355869
bc[7][65] = 2.4500523208697533
bc[7][66] = 2.4559728822039202
bc[7][67] = 2.4618934435380870
bc[7][68] = 2.4678140048722534
bc[7][69] = 2.4737345662064207
bc[7][70] = 2.4708913296269959
bc[7][71] = 2.4679183505335169
bc[7][72] = 2.4649453714400384
bc[7][73] = 2.4619723923465595
bc[7][74] = 2.4589994132530810
bc[7][75] = 2.4560264341596021
bc[7][76] = 2.4530534550661232
bc[7][77] = 2.4500804759726447
bc[7][78] = 2.4471740565267477
bc[7][79] = 2.4447870872968389
bc[7][80] = 2.4424001180669297
bc[7][81] = 2.4400131488370214
bc[7][82] = 2.4376261796071130
bc[7][83] = 2.4352392103772038
bc[7][84] = 2.4328522411472955
bc[7][85] = 2.4304652719173867
bc[7][86] = 2.4280783026874779
bc[7][87] = 2.4256913334575696
bc[7][88] = 2.4238173446223774
bc[7][89] = 2.4250590499781932
bc[7][90] = 2.4263007553340090
bc[7][91] = 2.4275424606898253
bc[7][92] = 2.4287841660456415
bc[7][93] = 2.4300258714014573
bc[7][94] = 2.4312675767572731
bc[7][95] = 2.4325092821130889
bc[7][96] = 2.4337509874689047
bc[7][97] = 2.4349926928247210
bc[7][98] = 2.4362343981805372
bc[7][99] = 2.4374761035363530
return td, bc
register_model('KaKy2016', KNTable, get_KaKy2016_model,
usage="table")