Version 1.3.0#
New features#
Apple ARM binaries#
pip and anaconda binaries for apple M processors (python version = 3.11)
C threads#
Introduction of C threads: Starting from version 1.3.0 the JetBase
class and all the derived classes, perform the C computation using threads.
This increase the computational speed Each time you create a new Jet object, you will get a log noticing how many C threads have been created.
The number of threads is automatically determined according to the number of cores and threads of your CPU.
You can revert to single thread, or set a custom number of threads, using the JetBase.set_num_c_threads()
and passing the number of threads:
from jetset.jet_model import Jet
my_jet=Jet(electron_distribution='lppl')
#to switch back to no threads
my_jet.set_num_c_threads(1)
#to use 8 C threads
my_jet.set_num_c_threads(8)
You can increase or decrease the number of C threads using the same method. It is not advised to exceed the actual number of threads offered by your CPU, since will not increase the speed performance.
Introduction of leptonic synchrotron polarization#
from jetset.jet_model import Jet
my_jet=Jet(electron_distribution='lppl')
nu_range=np.logspace(10,22,50)
p_nu,nuF_nu=jet.eval_synch_pol(nu_range)
#p_nu stores the fractional polarization for each frequency in nu_range
Custom Models#
a notebook showing how to implement a galactic expanding shell for (e.g. galactic nova) Implement recurrent nova with using the Galactic class
a notebook showing the implementation of a two-zone jet with a compact and extended Composite Models: two-zone jets
Minimizers#
Heat map for correlation matrix: added convenience method to plot correlation matrix
Added
simplex
on top ofmigrad
inminuit
MCMC functionalities#
labels setting and bounds have been placed in specific methods
from jetset.mcmc import McmcSampler model_minimizer = ModelMinimizer.load_model('model_minimizer_minuit.pkl') mcmc=McmcSampler(model_minimizer) labels=['N','B','beam_obj','s','gamma0_log_parab'] model_name='jet_leptonic' use_labels_dict={model_name:labels} mcmc.set_labels(use_labels_dict=use_labels_dict) mcmc.set_bounds(bound=5.0,bound_rel=True)
added option to plot model and residuals, for the mcmc best fit (obtained setting the pars to their quantiles=0.5 posterior), instead of the frequentist best-fit model, passing
plot_mcmc_best_fit_model=True
p=mcmc.plot_model(sed_data=sed_data,fit_range=[1E11, 2E27],size=100,quantiles=[0.05,0.95], plot_mcmc_best_fit_model=True)
customization of lables for plotting
mcmc.set_plot_label('N',r'$N$') mcmc.set_plot_label('B',r'$B$') mcmc.set_plot_label('beam_obj',r'$\delta$') mcmc.set_plot_label('s',r'$s$') mcmc.set_plot_label('gamma0_log_parab',r'$\gamma_0$')
EBL models#
Franceschini et al. (2008) [Franceschini2008]
Finke et al. (2010) [Finke2010]
Dominguez et al. (2011) [Dominguez2011]
Dominguez & Saldana-Lopez (2023) [Dominguez2023], [Saldana-Lopez2021]
EC emission#
Improved EC computation for large angles for anisotropic external fields
Added convenience methods for conical jet and EC fields:
method
JetBase.make_conical_jet()
class will set parameters dependencies to have conical jet constraining the blob radiusImportant
if you use a
jet
model withR
depending (i.e. you usedJetBase.make_conical_jet()
) to perform a temporal evolution (in theJetTimeEvol
class), the dependencies onR
will be removed, and to haveR
dependent on the position across the jet axis, use the parameterbeta_exp_R
in theJetTimeEvol
instead. In the next release a more flexible and direct approach will be provided.method
JetBase.set_EC_dependencies()
class will set parameters dependencies to have scaling relations between BLR and DT radius and disk luminosity
Improved functionalities#
Improved dependent parameters: handling of astropy units has been improved the functional dependency of the parameters
Improved serialization: saved models will not break if astropy or numba break their interface in future releases
Improved functionality to merge light curves
jetset.jet_timedep.merge_lcs()
bug fixing#
fixed typo in EC_components_list kw in the method
ObsConstrain.constrain_SSC_EC_model()