Skip to content

Commit 9e9afbd

Browse files
deploy: b987b5d
1 parent 219f441 commit 9e9afbd

File tree

56 files changed

+2630
-2530
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2630
-2530
lines changed

docs/.doctrees/environment.pickle

0 Bytes
Binary file not shown.

docs/.doctrees/examples.doctree

-316 Bytes
Binary file not shown.

docs/_sources/examples.rst.txt

Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,40 @@ Those profiles are optional and will be set to zero function if not provided.
230230
Setting usere-defined structured jet in the Python level is OK for light curve and spectrum calculation. However, it is not recommended for MCMC parameter fitting.
231231
The reason is that setting user-defined profiles in the Python level leads to a large overhead due to the Python-C++ inter-process communication.
232232
Users are recommended to set up the user-defined jet structure in the C++ level for MCMC parameter fitting for better performance.
233-
233+
234+
Reverse Shock
235+
^^^^^^^^^^^^^
236+
237+
.. code-block:: python
238+
239+
from VegasAfterglow import Radiation
240+
241+
# Create a radiation model with self-Compton radiation
242+
fwd_rad = Radiation(eps_e=1e-1, eps_B=1e-3, p=2.3, SSC=True, KN=True, IC_cooling=True)
243+
rvs_rad = Radiation(eps_e=1e-2, eps_B=1e-4, p=2.4, SSC=False, KN=False, IC_cooling=False)
244+
245+
#..other settings
246+
model = Model(forward_rad=fwd_rad, reverse_rad=rvs_rad, ...)
247+
248+
times = np.logspace(2, 8, 200)
249+
250+
bands = np.array([1e9, 1e14, 1e17])
251+
252+
results = model.specific_flux(times, bands)
253+
254+
plt.figure(figsize=(4.8, 3.6),dpi=200)
255+
256+
# Plot each frequency band
257+
for i, nu in enumerate(bands):
258+
exp = int(np.floor(np.log10(nu)))
259+
base = nu / 10**exp
260+
plt.loglog(times, results['syn'][i,:], label=fr'${base:.1f} \times 10^{{{exp}}}$ Hz')
261+
plt.loglog(times, results['IC'][i,:], label=fr'${base:.1f} \times 10^{{{exp}}}$ Hz')
262+
plt.loglog(times, results['syn_rvs'][i,:], label=fr'${base:.1f} \times 10^{{{exp}}}$ Hz')#reverse shock synchrotron
263+
264+
.. note::
265+
You may increase the resolution of the grid to improve the accuracy of the reverse shock synchrotron radiation.
266+
234267

235268
Radiation Processes
236269
-------------------
@@ -262,6 +295,7 @@ Self-Synchrotron Compton Radiation
262295
model = Model(forward_rad=rad, ...)
263296
264297
times = np.logspace(2, 8, 200)
298+
265299
bands = np.array([1e9, 1e14, 1e17])
266300
267301
results = model.specific_flux(times, bands)
@@ -277,40 +311,11 @@ Self-Synchrotron Compton Radiation
277311
278312
.. note::
279313
(IC_cooling = False, KN = False, SSC = True): The IC radiation is calculated based on synchrotron spectrum without IC cooling.
280-
(IC_cooling = True, KN = False, SSC = True): The IC radiation is calculated based on synchrotron spectrum with IC cooling without Klein-Nishina correction.
281-
(IC_cooling = True, KN = True, SSC = True): The IC radiation is calculated based on synchrotron spectrum with IC cooling and Klein-Nishina correction.
282-
283-
Reverse Shock
284-
^^^^^^^^^^^^^
285-
286-
.. code-block:: python
287-
from VegasAfterglow import Radiation
288-
289-
# Create a radiation model with self-Compton radiation
290-
fwd_rad = Radiation(eps_e=1e-1, eps_B=1e-3, p=2.3, SSC=True, KN=True, IC_cooling=True)
291-
rvs_rad = Radiation(eps_e=1e-2, eps_B=1e-4, p=2.4, SSC=False, KN=False, IC_cooling=False)
292-
293-
#..other settings
294-
model = Model(forward_rad=fwd_rad, reverse_rad=rvs_rad, ...)
295-
296-
times = np.logspace(2, 8, 200)
297-
bands = np.array([1e9, 1e14, 1e17])
298-
299-
results = model.specific_flux(times, bands)
300-
301-
plt.figure(figsize=(4.8, 3.6),dpi=200)
302314

303-
# Plot each frequency band
304-
for i, nu in enumerate(bands):
305-
exp = int(np.floor(np.log10(nu)))
306-
base = nu / 10**exp
307-
plt.loglog(times, results['syn'][i,:], label=fr'${base:.1f} \times 10^{{{exp}}}$ Hz')
308-
plt.loglog(times, results['IC'][i,:], label=fr'${base:.1f} \times 10^{{{exp}}}$ Hz')
309-
plt.loglog(times, results['syn_rvs'][i,:], label=fr'${base:.1f} \times 10^{{{exp}}}$ Hz')#reverse shock synchrotron
315+
(IC_cooling = True, KN = False, SSC = True): The IC radiation is calculated based on synchrotron spectrum with IC cooling without Klein-Nishina correction.
310316

311-
.. note::
312-
You may increase the resolution of the grid to improve the accuracy of the reverse shock synchrotron radiation.
313-
317+
(IC_cooling = True, KN = True, SSC = True): The IC radiation is calculated based on synchrotron spectrum with IC cooling and Klein-Nishina correction.
318+
314319
Advanced Features
315320
-----------------
316321

docs/doxygen/inverse-compton_8cpp.html

Lines changed: 137 additions & 135 deletions
Large diffs are not rendered by default.

docs/doxygen/inverse-compton_8cpp_a330c8cd380f08f2ddce282201dae597b_cgraph.map

Lines changed: 67 additions & 66 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
313c236e101a08c9cd76b984b352ad42
1+
d6d5430888250fc72cc7f8d1e3cf725b
11.4 KB
Loading

docs/doxygen/inverse-compton_8cpp_af25c21cb4c714787c8260f220a6c2ee9_cgraph.map

Lines changed: 67 additions & 66 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1e90196a17fc0acbee16e941f41d9625
1+
5c3cf7a621680bf509372ab978976ecd
11.9 KB
Loading

0 commit comments

Comments
 (0)