redback 1.12.0__py3-none-any.whl → 1.12.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- redback/__init__.py +1 -1
- redback/filters.py +57 -45
- redback/likelihoods.py +274 -6
- redback/model_library.py +2 -2
- redback/plotting.py +5 -3
- redback/priors/blackbody_spectrum_at_z.prior +3 -0
- redback/priors/bpl_cooling_envelope.prior +9 -0
- redback/priors/gaussianrise_cooling_envelope.prior +1 -5
- redback/priors/gaussianrise_cooling_envelope_bolometric.prior +1 -5
- redback/priors/powerlaw_plus_blackbody.prior +12 -0
- redback/priors/powerlaw_plus_blackbody_spectrum_at_z.prior +13 -0
- redback/priors/smooth_exponential_powerlaw_cooling_envelope_bolometric.prior +9 -0
- redback/priors/sn_nickel_fallback.prior +9 -0
- redback/priors/wr_bh_merger.prior +10 -0
- redback/priors/wr_bh_merger_bolometric.prior +8 -0
- redback/priors.py +14 -3
- redback/sed.py +185 -41
- redback/simulate_transients.py +13 -3
- redback/tables/filters.csv +260 -258
- redback/tables/qdot_rosswogkorobkin24.npz +0 -0
- redback/transient_models/afterglow_models.py +32 -16
- redback/transient_models/combined_models.py +16 -11
- redback/transient_models/extinction_models.py +310 -84
- redback/transient_models/gaussianprocess_models.py +1 -12
- redback/transient_models/kilonova_models.py +3 -3
- redback/transient_models/phase_models.py +97 -43
- redback/transient_models/phenomenological_models.py +172 -0
- redback/transient_models/spectral_models.py +101 -0
- redback/transient_models/stellar_interaction_models.py +254 -0
- redback/transient_models/supernova_models.py +272 -33
- redback/transient_models/tde_models.py +193 -54
- redback/utils.py +34 -7
- {redback-1.12.0.dist-info → redback-1.12.1.dist-info}/METADATA +7 -4
- {redback-1.12.0.dist-info → redback-1.12.1.dist-info}/RECORD +37 -28
- {redback-1.12.0.dist-info → redback-1.12.1.dist-info}/WHEEL +1 -1
- redback/tables/qdot_rosswogkorobkin24.pck +0 -0
- {redback-1.12.0.dist-info → redback-1.12.1.dist-info}/licenses/LICENCE.md +0 -0
- {redback-1.12.0.dist-info → redback-1.12.1.dist-info}/top_level.txt +0 -0
|
@@ -28,7 +28,7 @@ jet_spreading_models = ['tophat', 'cocoon', 'gaussian',
|
|
|
28
28
|
|
|
29
29
|
class RedbackAfterglows():
|
|
30
30
|
def __init__(self, k, n, epsb, epse, g0, ek, thc, thj, tho, p, exp, time, freq, redshift, Dl,
|
|
31
|
-
extra_structure_parameter_1,extra_structure_parameter_2, method='TH', res=100, steps=int(500), xiN=1):
|
|
31
|
+
extra_structure_parameter_1,extra_structure_parameter_2, method='TH', res=100, steps=int(500), xiN=1, a1=1):
|
|
32
32
|
"""
|
|
33
33
|
A general class for afterglow models implemented directly in redback.
|
|
34
34
|
This class is not meant to be used directly but instead via the interface for each specific model.
|
|
@@ -70,6 +70,7 @@ class RedbackAfterglows():
|
|
|
70
70
|
:param res: resolution
|
|
71
71
|
:param steps: number of steps used to resolve Gamma and dm
|
|
72
72
|
:param XiN: fraction of electrons that get accelerated
|
|
73
|
+
:param a1: the expansion description, a1 = 0 sound speed, a1 = 1 Granot & Piran 2012
|
|
73
74
|
"""
|
|
74
75
|
self.k = k
|
|
75
76
|
if self.k == 0:
|
|
@@ -95,6 +96,7 @@ class RedbackAfterglows():
|
|
|
95
96
|
self.res = res
|
|
96
97
|
self.steps = steps
|
|
97
98
|
self.xiN = xiN
|
|
99
|
+
self.a1 = a1
|
|
98
100
|
|
|
99
101
|
### Set up physical constants
|
|
100
102
|
self.mp = 1.6726231e-24 # g, mass of proton
|
|
@@ -285,7 +287,7 @@ class RedbackAfterglows():
|
|
|
285
287
|
te = np.arcsin(cs / (self.cc * (G2 - 1.) ** 0.5)) # equivalent form for angle due to spreading
|
|
286
288
|
# prepare ex and OmG in this function
|
|
287
289
|
if self.is_expansion:
|
|
288
|
-
ex = te / (
|
|
290
|
+
ex = te / G**(self.a1 + 1) # expansion
|
|
289
291
|
fac = 0.5 * latstep
|
|
290
292
|
OmG = rotstep * (np.cos(thi - fac) - np.cos(ex/self.res + thi + fac)) # equivalent form for linear spacing
|
|
291
293
|
else:
|
|
@@ -405,7 +407,7 @@ class RedbackAfterglows():
|
|
|
405
407
|
class RedbackAfterglowsRefreshed(RedbackAfterglows):
|
|
406
408
|
def __init__(self, k, n, epsb, epse, g0, g1, ek, et, s1, thc, thj, tho, p, exp, time, freq, redshift, Dl,
|
|
407
409
|
extra_structure_parameter_1, extra_structure_parameter_2,
|
|
408
|
-
method='TH', res=100, steps=int(500), xiN=1):
|
|
410
|
+
method='TH', res=100, steps=int(500), xiN=1, a1=1):
|
|
409
411
|
|
|
410
412
|
"""
|
|
411
413
|
A general class for refreshed afterglow models implemented directly in redback.
|
|
@@ -452,13 +454,14 @@ class RedbackAfterglowsRefreshed(RedbackAfterglows):
|
|
|
452
454
|
:param res: resolution
|
|
453
455
|
:param steps: number of steps used to resolve Gamma and dm
|
|
454
456
|
:param XiN: fraction of electrons that get accelerated
|
|
457
|
+
:param a1: the expansion description, a1 = 0 sound speed, a1 = 1 Granot & Piran 2012
|
|
455
458
|
"""
|
|
456
459
|
|
|
457
460
|
super().__init__(k=k, n=n, epsb=epsb, epse=epse, g0=g0, ek=ek, thc=thc, thj=thj,
|
|
458
461
|
tho=tho, p=p, exp=exp, time=time, freq=freq, redshift=redshift,
|
|
459
462
|
Dl=Dl, extra_structure_parameter_1=extra_structure_parameter_1,
|
|
460
463
|
extra_structure_parameter_2=extra_structure_parameter_2, method=method,
|
|
461
|
-
res=res, steps=steps, xiN=xiN)
|
|
464
|
+
res=res, steps=steps, xiN=xiN, a1=a1)
|
|
462
465
|
self.G1 = g1
|
|
463
466
|
self.Et = et
|
|
464
467
|
self.s1 = s1
|
|
@@ -726,6 +729,7 @@ def tophat_redback(time, redshift, thv, loge0, thc, logn0, p, logepse, logepsb,
|
|
|
726
729
|
if isinstance(frequency, float):
|
|
727
730
|
frequency = np.ones(len(time)) * frequency
|
|
728
731
|
k = kwargs.get('k', 0)
|
|
732
|
+
a1 = kwargs.get('a1', 1)
|
|
729
733
|
exp = kwargs.get('expansion', 1)
|
|
730
734
|
epse = 10 ** logepse
|
|
731
735
|
epsb = 10 ** logepsb
|
|
@@ -746,7 +750,7 @@ def tophat_redback(time, redshift, thv, loge0, thc, logn0, p, logepse, logepsb,
|
|
|
746
750
|
ag_class = RedbackAfterglows(k=k, n=nism, epse=epse, epsb=epsb, g0=g0, ek=e0, thc=thc, thj=thc, tho=thv, p=p, exp=exp,
|
|
747
751
|
time=time, freq=frequency, redshift=redshift, Dl=dl, method=method,
|
|
748
752
|
extra_structure_parameter_1=s, extra_structure_parameter_2=a,
|
|
749
|
-
res=res, xiN=xiN, steps=steps)
|
|
753
|
+
res=res, xiN=xiN, steps=steps, a1=a1)
|
|
750
754
|
flux_density = ag_class.get_lightcurve()
|
|
751
755
|
fmjy = flux_density / 1e-26
|
|
752
756
|
if kwargs['output_format'] == 'flux_density':
|
|
@@ -789,6 +793,7 @@ def gaussian_redback(time, redshift, thv, loge0, thc, thj, logn0, p, logepse, lo
|
|
|
789
793
|
if isinstance(frequency, float):
|
|
790
794
|
frequency = np.ones(len(time)) * frequency
|
|
791
795
|
k = kwargs.get('k', 0)
|
|
796
|
+
a1 = kwargs.get('a1', 1)
|
|
792
797
|
exp = kwargs.get('expansion', 1)
|
|
793
798
|
epse = 10 ** logepse
|
|
794
799
|
epsb = 10 ** logepsb
|
|
@@ -809,7 +814,7 @@ def gaussian_redback(time, redshift, thv, loge0, thc, thj, logn0, p, logepse, lo
|
|
|
809
814
|
ag_class = RedbackAfterglows(k=k, n=nism, epse=epse, epsb=epsb, g0=g0, ek=e0, thc=thc, thj=thj, tho=thv, p=p, exp=exp,
|
|
810
815
|
time=time, freq=frequency, redshift=redshift, Dl=dl, method=method,
|
|
811
816
|
extra_structure_parameter_1=s, extra_structure_parameter_2=a,
|
|
812
|
-
res=res, xiN=xiN, steps=steps)
|
|
817
|
+
res=res, xiN=xiN, steps=steps, a1=a1)
|
|
813
818
|
flux_density = ag_class.get_lightcurve()
|
|
814
819
|
fmjy = flux_density / 1e-26
|
|
815
820
|
if kwargs['output_format'] == 'flux_density':
|
|
@@ -855,6 +860,7 @@ def twocomponent_redback(time, redshift, thv, loge0, thc, thj, logn0, p, logepse
|
|
|
855
860
|
if isinstance(frequency, float):
|
|
856
861
|
frequency = np.ones(len(time)) * frequency
|
|
857
862
|
k = kwargs.get('k', 0)
|
|
863
|
+
a1 = kwargs.get('a1', 1)
|
|
858
864
|
exp = kwargs.get('expansion', 1)
|
|
859
865
|
epse = 10 ** logepse
|
|
860
866
|
epsb = 10 ** logepsb
|
|
@@ -876,7 +882,7 @@ def twocomponent_redback(time, redshift, thv, loge0, thc, thj, logn0, p, logepse
|
|
|
876
882
|
ag_class = RedbackAfterglows(k=k, n=nism, epse=epse, epsb=epsb, g0=g0, ek=e0, thc=thc, thj=thj, tho=thv, p=p, exp=exp,
|
|
877
883
|
time=time, freq=frequency, redshift=redshift, Dl=dl, method=method,
|
|
878
884
|
extra_structure_parameter_1=ss, extra_structure_parameter_2=aa,
|
|
879
|
-
res=res, xiN=xiN, steps=steps)
|
|
885
|
+
res=res, xiN=xiN, steps=steps, a1=a1)
|
|
880
886
|
flux_density = ag_class.get_lightcurve()
|
|
881
887
|
fmjy = flux_density / 1e-26
|
|
882
888
|
if kwargs['output_format'] == 'flux_density':
|
|
@@ -923,6 +929,7 @@ def powerlaw_redback(time, redshift, thv, loge0, thc, thj, logn0, p, logepse, lo
|
|
|
923
929
|
if isinstance(frequency, float):
|
|
924
930
|
frequency = np.ones(len(time)) * frequency
|
|
925
931
|
k = kwargs.get('k', 0)
|
|
932
|
+
a1 = kwargs.get('a1', 1)
|
|
926
933
|
exp = kwargs.get('expansion', 1)
|
|
927
934
|
epse = 10 ** logepse
|
|
928
935
|
epsb = 10 ** logepsb
|
|
@@ -944,7 +951,7 @@ def powerlaw_redback(time, redshift, thv, loge0, thc, thj, logn0, p, logepse, lo
|
|
|
944
951
|
ag_class = RedbackAfterglows(k=k, n=nism, epse=epse, epsb=epsb, g0=g0, ek=e0, thc=thc, thj=thj, tho=thv, p=p, exp=exp,
|
|
945
952
|
time=time, freq=frequency, redshift=redshift, Dl=dl, method=method,
|
|
946
953
|
extra_structure_parameter_1=ss, extra_structure_parameter_2=aa,
|
|
947
|
-
res=res, xiN=xiN, steps=steps)
|
|
954
|
+
res=res, xiN=xiN, steps=steps, a1=a1)
|
|
948
955
|
flux_density = ag_class.get_lightcurve()
|
|
949
956
|
fmjy = flux_density / 1e-26
|
|
950
957
|
if kwargs['output_format'] == 'flux_density':
|
|
@@ -990,6 +997,7 @@ def alternativepowerlaw_redback(time, redshift, thv, loge0, thc, thj, logn0, p,
|
|
|
990
997
|
if isinstance(frequency, float):
|
|
991
998
|
frequency = np.ones(len(time)) * frequency
|
|
992
999
|
k = kwargs.get('k', 0)
|
|
1000
|
+
a1 = kwargs.get('a1', 1)
|
|
993
1001
|
exp = kwargs.get('expansion', 1)
|
|
994
1002
|
epse = 10 ** logepse
|
|
995
1003
|
epsb = 10 ** logepsb
|
|
@@ -1011,7 +1019,7 @@ def alternativepowerlaw_redback(time, redshift, thv, loge0, thc, thj, logn0, p,
|
|
|
1011
1019
|
ag_class = RedbackAfterglows(k=k, n=nism, epse=epse, epsb=epsb, g0=g0, ek=e0, thc=thc, thj=thj, tho=thv, p=p, exp=exp,
|
|
1012
1020
|
time=time, freq=frequency, redshift=redshift, Dl=dl, method=method,
|
|
1013
1021
|
extra_structure_parameter_1=ss, extra_structure_parameter_2=aa,
|
|
1014
|
-
res=res, xiN=xiN, steps=steps)
|
|
1022
|
+
res=res, xiN=xiN, steps=steps, a1=a1)
|
|
1015
1023
|
flux_density = ag_class.get_lightcurve()
|
|
1016
1024
|
fmjy = flux_density / 1e-26
|
|
1017
1025
|
if kwargs['output_format'] == 'flux_density':
|
|
@@ -1057,6 +1065,7 @@ def doublegaussian_redback(time, redshift, thv, loge0, thc, thj, logn0, p, logep
|
|
|
1057
1065
|
if isinstance(frequency, float):
|
|
1058
1066
|
frequency = np.ones(len(time)) * frequency
|
|
1059
1067
|
k = kwargs.get('k', 0)
|
|
1068
|
+
a1 = kwargs.get('a1', 1)
|
|
1060
1069
|
exp = kwargs.get('expansion', 1)
|
|
1061
1070
|
epse = 10 ** logepse
|
|
1062
1071
|
epsb = 10 ** logepsb
|
|
@@ -1078,7 +1087,7 @@ def doublegaussian_redback(time, redshift, thv, loge0, thc, thj, logn0, p, logep
|
|
|
1078
1087
|
ag_class = RedbackAfterglows(k=k, n=nism, epse=epse, epsb=epsb, g0=g0, ek=e0, thc=thc, thj=thj, tho=thv, p=p, exp=exp,
|
|
1079
1088
|
time=time, freq=frequency, redshift=redshift, Dl=dl, method=method,
|
|
1080
1089
|
extra_structure_parameter_1=ss, extra_structure_parameter_2=aa,
|
|
1081
|
-
res=res, xiN=xiN, steps=steps)
|
|
1090
|
+
res=res, xiN=xiN, steps=steps, a1=a1)
|
|
1082
1091
|
flux_density = ag_class.get_lightcurve()
|
|
1083
1092
|
fmjy = flux_density / 1e-26
|
|
1084
1093
|
if kwargs['output_format'] == 'flux_density':
|
|
@@ -1125,6 +1134,7 @@ def tophat_redback_refreshed(time, redshift, thv, loge0, thc, g1, et, s1,
|
|
|
1125
1134
|
if isinstance(frequency, float):
|
|
1126
1135
|
frequency = np.ones(len(time)) * frequency
|
|
1127
1136
|
k = kwargs.get('k', 0)
|
|
1137
|
+
a1 = kwargs.get('a1', 1)
|
|
1128
1138
|
exp = kwargs.get('expansion', 1)
|
|
1129
1139
|
epse = 10 ** logepse
|
|
1130
1140
|
epsb = 10 ** logepsb
|
|
@@ -1146,7 +1156,7 @@ def tophat_redback_refreshed(time, redshift, thv, loge0, thc, g1, et, s1,
|
|
|
1146
1156
|
thc=thc, thj=thc, tho=thv, p=p, exp=exp,time=time, freq=frequency,
|
|
1147
1157
|
redshift=redshift, Dl=dl, method=method,
|
|
1148
1158
|
extra_structure_parameter_1=s, extra_structure_parameter_2=a,
|
|
1149
|
-
res=res, xiN=xiN, steps=steps)
|
|
1159
|
+
res=res, xiN=xiN, steps=steps, a1=a1)
|
|
1150
1160
|
flux_density = ag_class.get_lightcurve()
|
|
1151
1161
|
fmjy = flux_density / 1e-26
|
|
1152
1162
|
if kwargs['output_format'] == 'flux_density':
|
|
@@ -1194,6 +1204,7 @@ def gaussian_redback_refreshed(time, redshift, thv, loge0, thc, thj, g1, et, s1,
|
|
|
1194
1204
|
if isinstance(frequency, float):
|
|
1195
1205
|
frequency = np.ones(len(time)) * frequency
|
|
1196
1206
|
k = kwargs.get('k', 0)
|
|
1207
|
+
a1 = kwargs.get('a1', 1)
|
|
1197
1208
|
exp = kwargs.get('expansion', 1)
|
|
1198
1209
|
epse = 10 ** logepse
|
|
1199
1210
|
epsb = 10 ** logepsb
|
|
@@ -1215,7 +1226,7 @@ def gaussian_redback_refreshed(time, redshift, thv, loge0, thc, thj, g1, et, s1,
|
|
|
1215
1226
|
tho=thv, p=p, exp=exp, g1=g1, et=et, s1=s1,
|
|
1216
1227
|
time=time, freq=frequency, redshift=redshift, Dl=dl, method=method,
|
|
1217
1228
|
extra_structure_parameter_1=s, extra_structure_parameter_2=a,
|
|
1218
|
-
res=res, xiN=xiN, steps=steps)
|
|
1229
|
+
res=res, xiN=xiN, steps=steps, a1=a1)
|
|
1219
1230
|
flux_density = ag_class.get_lightcurve()
|
|
1220
1231
|
fmjy = flux_density / 1e-26
|
|
1221
1232
|
if kwargs['output_format'] == 'flux_density':
|
|
@@ -1266,6 +1277,7 @@ def twocomponent_redback_refreshed(time, redshift, thv, loge0, thc, thj, g1, et,
|
|
|
1266
1277
|
if isinstance(frequency, float):
|
|
1267
1278
|
frequency = np.ones(len(time)) * frequency
|
|
1268
1279
|
k = kwargs.get('k', 0)
|
|
1280
|
+
a1 = kwargs.get('a1', 1)
|
|
1269
1281
|
exp = kwargs.get('expansion', 1)
|
|
1270
1282
|
epse = 10 ** logepse
|
|
1271
1283
|
epsb = 10 ** logepsb
|
|
@@ -1287,7 +1299,7 @@ def twocomponent_redback_refreshed(time, redshift, thv, loge0, thc, thj, g1, et,
|
|
|
1287
1299
|
ag_class = RedbackAfterglowsRefreshed(k=k, n=nism, epse=epse, epsb=epsb, g0=g0, ek=e0, thc=thc, thj=thj,
|
|
1288
1300
|
tho=thv, p=p, exp=exp, g1=g1, et=et, s1=s1, time=time, freq=frequency,
|
|
1289
1301
|
redshift=redshift, Dl=dl, method=method, extra_structure_parameter_1=ss,
|
|
1290
|
-
extra_structure_parameter_2=aa, res=res, xiN=xiN, steps=steps)
|
|
1302
|
+
extra_structure_parameter_2=aa, res=res, xiN=xiN, steps=steps, a1=a1)
|
|
1291
1303
|
flux_density = ag_class.get_lightcurve()
|
|
1292
1304
|
fmjy = flux_density / 1e-26
|
|
1293
1305
|
if kwargs['output_format'] == 'flux_density':
|
|
@@ -1339,6 +1351,7 @@ def powerlaw_redback_refreshed(time, redshift, thv, loge0, thc, thj, g1, et, s1,
|
|
|
1339
1351
|
if isinstance(frequency, float):
|
|
1340
1352
|
frequency = np.ones(len(time)) * frequency
|
|
1341
1353
|
k = kwargs.get('k', 0)
|
|
1354
|
+
a1 = kwargs.get('a1', 1)
|
|
1342
1355
|
exp = kwargs.get('expansion', 1)
|
|
1343
1356
|
epse = 10 ** logepse
|
|
1344
1357
|
epsb = 10 ** logepsb
|
|
@@ -1361,7 +1374,7 @@ def powerlaw_redback_refreshed(time, redshift, thv, loge0, thc, thj, g1, et, s1,
|
|
|
1361
1374
|
ek=e0, thc=thc, thj=thj, tho=thv, p=p, exp=exp,
|
|
1362
1375
|
time=time, freq=frequency, redshift=redshift, Dl=dl, method=method,
|
|
1363
1376
|
extra_structure_parameter_1=ss, extra_structure_parameter_2=aa,
|
|
1364
|
-
res=res, xiN=xiN, steps=steps)
|
|
1377
|
+
res=res, xiN=xiN, steps=steps, a1=a1)
|
|
1365
1378
|
flux_density = ag_class.get_lightcurve()
|
|
1366
1379
|
fmjy = flux_density / 1e-26
|
|
1367
1380
|
if kwargs['output_format'] == 'flux_density':
|
|
@@ -1412,6 +1425,7 @@ def alternativepowerlaw_redback_refreshed(time, redshift, thv, loge0, thc, thj,
|
|
|
1412
1425
|
if isinstance(frequency, float):
|
|
1413
1426
|
frequency = np.ones(len(time)) * frequency
|
|
1414
1427
|
k = kwargs.get('k', 0)
|
|
1428
|
+
a1 = kwargs.get('a1', 1)
|
|
1415
1429
|
exp = kwargs.get('expansion', 1)
|
|
1416
1430
|
epse = 10 ** logepse
|
|
1417
1431
|
epsb = 10 ** logepsb
|
|
@@ -1434,7 +1448,7 @@ def alternativepowerlaw_redback_refreshed(time, redshift, thv, loge0, thc, thj,
|
|
|
1434
1448
|
ek=e0, thc=thc, thj=thj, tho=thv, p=p, exp=exp,
|
|
1435
1449
|
time=time, freq=frequency, redshift=redshift, Dl=dl, method=method,
|
|
1436
1450
|
extra_structure_parameter_1=ss, extra_structure_parameter_2=aa,
|
|
1437
|
-
res=res, xiN=xiN, steps=steps)
|
|
1451
|
+
res=res, xiN=xiN, steps=steps, a1=a1)
|
|
1438
1452
|
flux_density = ag_class.get_lightcurve()
|
|
1439
1453
|
fmjy = flux_density / 1e-26
|
|
1440
1454
|
if kwargs['output_format'] == 'flux_density':
|
|
@@ -1485,6 +1499,7 @@ def doublegaussian_redback_refreshed(time, redshift, thv, loge0, thc, thj, g1, e
|
|
|
1485
1499
|
if isinstance(frequency, float):
|
|
1486
1500
|
frequency = np.ones(len(time)) * frequency
|
|
1487
1501
|
k = kwargs.get('k', 0)
|
|
1502
|
+
a1 = kwargs.get('a1', 1)
|
|
1488
1503
|
exp = kwargs.get('expansion', 1)
|
|
1489
1504
|
epse = 10 ** logepse
|
|
1490
1505
|
epsb = 10 ** logepsb
|
|
@@ -1507,7 +1522,7 @@ def doublegaussian_redback_refreshed(time, redshift, thv, loge0, thc, thj, g1, e
|
|
|
1507
1522
|
thc=thc, thj=thj, tho=thv, p=p, exp=exp, g1=g1, et=et, s1=s1,
|
|
1508
1523
|
time=time, freq=frequency, redshift=redshift, Dl=dl, method=method,
|
|
1509
1524
|
extra_structure_parameter_1=ss, extra_structure_parameter_2=aa,
|
|
1510
|
-
res=res, xiN=xiN, steps=steps)
|
|
1525
|
+
res=res, xiN=xiN, steps=steps, a1=a1)
|
|
1511
1526
|
flux_density = ag_class.get_lightcurve()
|
|
1512
1527
|
fmjy = flux_density / 1e-26
|
|
1513
1528
|
if kwargs['output_format'] == 'flux_density':
|
|
@@ -1953,6 +1968,7 @@ def tophat(time, redshift, thv, loge0, thc, logn0, p, logepse, logepsb, ksin, g0
|
|
|
1953
1968
|
return calc_ABmag_from_flux_density(flux_density).value
|
|
1954
1969
|
|
|
1955
1970
|
|
|
1971
|
+
@citation_wrapper('https://ui.adsabs.harvard.edu/abs/2025MNRAS.539.3319W/abstract')
|
|
1956
1972
|
def tophat_from_emulator(time, redshift, thv, loge0, thc, logn0, p, logepse, logepsb, g0, **kwargs):
|
|
1957
1973
|
"""
|
|
1958
1974
|
Evaluate a tophat afterglow model using an mpl regressor. Note that this model predicts for a fixed redshift = 0.01 and fixed ksin = 1.
|
|
@@ -12,7 +12,7 @@ def tophat_and_twolayerstratified(time, redshift, av, thv, loge0, thc, logn0, p,
|
|
|
12
12
|
|
|
13
13
|
:param time: time in days in observer frame
|
|
14
14
|
:param redshift: source redshift
|
|
15
|
-
:param av:
|
|
15
|
+
:param av: V-band extinction from host galaxy in magnitudes
|
|
16
16
|
:param thv: viewing angle in radians
|
|
17
17
|
:param loge0: log10 on axis isotropic equivalent energy
|
|
18
18
|
:param thc: half width of jet core/jet opening angle in radians
|
|
@@ -28,7 +28,7 @@ def tophat_and_twolayerstratified(time, redshift, av, thv, loge0, thc, logn0, p,
|
|
|
28
28
|
:param vej_2: velocity of outer shell in c
|
|
29
29
|
:param kappa: constant gray opacity
|
|
30
30
|
:param beta: power law index of density profile
|
|
31
|
-
:param kwargs: Additional keyword arguments
|
|
31
|
+
:param kwargs: Additional keyword arguments e.g., for extinction or the models
|
|
32
32
|
:param r_v: extinction parameter, defaults to 3.1
|
|
33
33
|
:param spread: whether jet can spread, defaults to False
|
|
34
34
|
:param latres: latitudinal resolution for structured jets, defaults to 2
|
|
@@ -49,7 +49,8 @@ def tophat_and_twolayerstratified(time, redshift, av, thv, loge0, thc, logn0, p,
|
|
|
49
49
|
r_v = kwargs.get('r_v', 3.1)
|
|
50
50
|
# correct for extinction
|
|
51
51
|
angstroms = nu_to_lambda(kwargs['frequency'])
|
|
52
|
-
combined = em._perform_extinction(flux_density=combined, angstroms=angstroms,
|
|
52
|
+
combined = em._perform_extinction(flux_density=combined, angstroms=angstroms, av_host=av, rv_host=r_v,
|
|
53
|
+
redshift=redshift, **kwargs)
|
|
53
54
|
return combined
|
|
54
55
|
|
|
55
56
|
@citation_wrapper('https://ui.adsabs.harvard.edu/abs/2020ApJ...896..166R/abstract, redback')
|
|
@@ -62,7 +63,7 @@ def tophat_and_twocomponent(time, redshift, av, thv, loge0, thc, logn0,
|
|
|
62
63
|
|
|
63
64
|
:param time: time in days in observer frame
|
|
64
65
|
:param redshift: source redshift
|
|
65
|
-
:param av:
|
|
66
|
+
:param av: V-band extinction from host galaxy in magnitudes
|
|
66
67
|
:param thv: viewing angle in radians
|
|
67
68
|
:param loge0: log10 on axis isotropic equivalent energy
|
|
68
69
|
:param thc: half width of jet core/jet opening angle in radians
|
|
@@ -81,7 +82,7 @@ def tophat_and_twocomponent(time, redshift, av, thv, loge0, thc, logn0,
|
|
|
81
82
|
:param vej_2: minimum initial velocity of second component
|
|
82
83
|
:param temperature_floor_2: floor temperature of second component
|
|
83
84
|
:param kappa_2: gray opacity of second component
|
|
84
|
-
:param kwargs: Additional keyword arguments
|
|
85
|
+
:param kwargs: Additional keyword arguments e.g., for extinction or the models
|
|
85
86
|
:param r_v: extinction parameter, defaults to 3.1
|
|
86
87
|
:param spread: whether jet can spread, defaults to False
|
|
87
88
|
:param latres: latitudinal resolution for structured jets, defaults to 2
|
|
@@ -105,7 +106,8 @@ def tophat_and_twocomponent(time, redshift, av, thv, loge0, thc, logn0,
|
|
|
105
106
|
r_v = kwargs.get('r_v', 3.1)
|
|
106
107
|
# correct for extinction
|
|
107
108
|
angstroms = nu_to_lambda(kwargs['frequency'])
|
|
108
|
-
combined = em._perform_extinction(flux_density=combined, angstroms=angstroms,
|
|
109
|
+
combined = em._perform_extinction(flux_density=combined, angstroms=angstroms, av_host=av, rv_host=r_v,
|
|
110
|
+
redshift=redshift, **kwargs)
|
|
109
111
|
return combined
|
|
110
112
|
|
|
111
113
|
@citation_wrapper('https://ui.adsabs.harvard.edu/abs/2020ApJ...896..166R/abstract, https://ui.adsabs.harvard.edu/abs/1982ApJ...253..785A/abstract')
|
|
@@ -116,7 +118,7 @@ def tophat_and_arnett(time, av, redshift, thv, loge0, thc, logn0, p, logepse, lo
|
|
|
116
118
|
|
|
117
119
|
:param time: time in days in observer frame
|
|
118
120
|
:param redshift: source redshift
|
|
119
|
-
:param av:
|
|
121
|
+
:param av: V-band extinction from host galaxy in magnitudes
|
|
120
122
|
:param thv: viewing angle in radians
|
|
121
123
|
:param loge0: log10 on axis isotropic equivalent energy
|
|
122
124
|
:param thc: half width of jet core/jet opening angle in radians
|
|
@@ -131,7 +133,8 @@ def tophat_and_arnett(time, av, redshift, thv, loge0, thc, logn0, p, logepse, lo
|
|
|
131
133
|
:param mej: total ejecta mass in solar masses
|
|
132
134
|
:param kwargs: Additional keyword arguments
|
|
133
135
|
Must include all the kwargs required by the specific interaction_process, photosphere, sed methods used
|
|
134
|
-
e.g., for Diffusion and TemperatureFloor: kappa, kappa_gamma, vej (km/s), temperature_floor
|
|
136
|
+
e.g., for Diffusion and TemperatureFloor: kappa, kappa_gamma, vej (km/s), temperature_floor and
|
|
137
|
+
any other kwargs for the specific models.
|
|
135
138
|
:param r_v: extinction parameter, defaults to 3.1
|
|
136
139
|
:param spread: whether jet can spread, defaults to False
|
|
137
140
|
:param latres: latitudinal resolution for structured jets, defaults to 2
|
|
@@ -157,7 +160,8 @@ def tophat_and_arnett(time, av, redshift, thv, loge0, thc, logn0, p, logepse, lo
|
|
|
157
160
|
r_v = kwargs.get('r_v', 3.1)
|
|
158
161
|
# correct for extinction
|
|
159
162
|
angstroms = nu_to_lambda(kwargs['frequency'])
|
|
160
|
-
combined = em._perform_extinction(flux_density=combined, angstroms=angstroms,
|
|
163
|
+
combined = em._perform_extinction(flux_density=combined, angstroms=angstroms, av_host=av, rv_host=r_v,
|
|
164
|
+
redshift=redshift, **kwargs)
|
|
161
165
|
return combined
|
|
162
166
|
|
|
163
167
|
@citation_wrapper('redback, and any citations for the specific model you use')
|
|
@@ -167,7 +171,7 @@ def afterglow_and_optical(time, redshift, av, **model_kwargs):
|
|
|
167
171
|
|
|
168
172
|
:param time: time in days in observer frame
|
|
169
173
|
:param redshift: source redshift
|
|
170
|
-
:param av:
|
|
174
|
+
:param av: V-band extinction from host galaxy in magnitudes
|
|
171
175
|
:param model_kwargs: kwargs shared by models frequency and r_v (extinction paramater defaults to 3.1)
|
|
172
176
|
:param afterglow_kwargs: dictionary of parameters required by the afterglow transient model specified by 'base_model'
|
|
173
177
|
and any additional keyword arguments. Refer to model documentation for details.
|
|
@@ -198,6 +202,7 @@ def afterglow_and_optical(time, redshift, av, **model_kwargs):
|
|
|
198
202
|
r_v = model_kwargs.get('r_v', 3.1)
|
|
199
203
|
# correct for extinction
|
|
200
204
|
angstroms = nu_to_lambda(model_kwargs['frequency'])
|
|
201
|
-
combined = em._perform_extinction(flux_density=combined, angstroms=angstroms,
|
|
205
|
+
combined = em._perform_extinction(flux_density=combined, angstroms=angstroms, av_host=av, rv_host=r_v,
|
|
206
|
+
redshift=redshift, **kwargs)
|
|
202
207
|
return combined
|
|
203
208
|
|