SEDShape#
- class jetset.sed_shaper.SEDShape(sed_data)[source]#
Bases:
objectThis handle the SED shaping process
Methods Summary
IC_fit([fit_range, use_log_par, Ep_start, ...])Ic fit.
add_BBB_template(fit_model)Add bbb template.
add_disk(fit_model)Add disk.
add_host_template(fit_model)Add host template.
check_adapt_range_size(x, index, min_size[, ...])Check adapt range size.
do_sync_fit(fit_model, fit_law_name[, ...])Do sync fit.
eval_indices([minimizer, silent, ...])This methods evaluates the indices for the SED indices are istances of the index_array () class
find_class(E_S)method to evaluate obj class 'L/I/HPS' according to Ep
get_initial_index_values(index, loglog_pl)Return initial index values.
get_nu_max(nu, fit_range)Return nu max.
plot_indices([plot_obj])Plot indices.
plot_shape_fit([plot_obj])Plot shape fit.
save_sync_fit_report([name])Save object state to disk.
save_values(name)Save object state to disk.
set_S_LE_slope(fit_func, fit_law_name, ...)Set s le slope.
Display values.
sync_fit([check_host_gal_template, ...])This method analyses the synchrotron shape by means of log-log polynomial fits
Methods Documentation
- IC_fit(fit_range=None, use_log_par=False, Ep_start=None, minimizer='minuit', silent=False)[source]#
Ic fit.
- Parameters:
fit_range (object, optional) – Range for fit.
use_log_par (bool, optional) – If
True, enable log par.Ep_start (object, optional) – Lower bound/control for ep start.
minimizer (str, optional) – Lower bound/control for minimizer.
silent (bool, optional) – If
True, suppress informational output.
- Returns:
Computed result.
- Return type:
object
- add_BBB_template(fit_model)[source]#
Add bbb template.
- Parameters:
fit_model (object) – Model instance used for fitting.
- add_disk(fit_model)[source]#
Add disk.
- Parameters:
fit_model (object) – Model instance used for fitting.
- add_host_template(fit_model)[source]#
Add host template.
- Parameters:
fit_model (object) – Model instance used for fitting.
- check_adapt_range_size(x, index, min_size, silent=False)[source]#
Check adapt range size.
- Parameters:
x (object) – Parameter controlling x.
index (object) – Index/identifier for index.
min_size (object) – Lower bound/control for min size.
silent (bool, optional) – If
True, suppress informational output.
- Returns:
Computed result.
- Return type:
object
- do_sync_fit(fit_model, fit_law_name, fit_range=None, check_disk=False, check_BBB=False, check_host=False, Ep_start=None, no_check=False, minimizer='lsb', silent=True, show_fit_report=True)[source]#
Do sync fit.
- Parameters:
fit_model (object) – Model instance used for fitting.
fit_law_name (object) – Parameter controlling fit law name.
fit_range (object, optional) – Range for fit.
check_disk (bool, optional) – Parameter controlling check disk.
check_BBB (bool, optional) – Parameter controlling check bbb.
check_host (bool, optional) – Parameter controlling check host.
Ep_start (object, optional) – Lower bound/control for ep start.
no_check (bool, optional) – Parameter controlling no check.
minimizer (str, optional) – Lower bound/control for minimizer.
silent (bool, optional) – If
True, suppress informational output.show_fit_report (bool, optional) – If
True, display fit report.
- Returns:
Computed result.
- Return type:
object
- eval_indices(minimizer='lsb', silent=True, show_fit_report=False, min_size=3)[source]#
This methods evaluates the indices for the SED indices are istances of the index_array () class
- find_class(E_S)[source]#
method to evaluate obj class ‘L/I/HPS’ according to Ep
args: E_S
the obj_class member is updated
obj_class==None means undefined class
- get_initial_index_values(index, loglog_pl)[source]#
Return initial index values.
- Parameters:
index (object) – Index/identifier for index.
loglog_pl (object) – Parameter controlling loglog pl.
- Returns:
Requested value.
- Return type:
object
- get_nu_max(nu, fit_range)[source]#
Return nu max.
- Parameters:
nu (object) – Frequency values in Hz.
fit_range (object) – Range for fit.
- Returns:
Requested value.
- Return type:
object
- plot_indices(plot_obj=None)[source]#
Plot indices.
- Parameters:
plot_obj (object, optional) – Existing plot object to update.
- Returns:
Computed result.
- Return type:
object
- plot_shape_fit(plot_obj=None)[source]#
Plot shape fit.
- Parameters:
plot_obj (object, optional) – Existing plot object to update.
- Returns:
Computed result.
- Return type:
object
- save_sync_fit_report(name=None)[source]#
Save object state to disk.
- Parameters:
name (object, optional) – Name identifier.
- set_S_LE_slope(fit_func, fit_law_name, use_log_par)[source]#
Set s le slope.
- Parameters:
fit_func (object) – Parameter controlling fit func.
fit_law_name (object) – Parameter controlling fit law name.
use_log_par (object) – If
True, enable log par.
- sync_fit(check_host_gal_template=False, check_BBB_template=False, check_disk=False, fit_range=None, nu_min=None, nu_max=None, Ep_start=None, use_log_par=False, minimizer='lsb', silent=True, show_fit_report=False)[source]#
This method analyses the synchrotron shape by means of log-log polynomial fits
The following paremeters are estimated:
the SED peak frequency Ep
the SED peak flux Sp
the curvature at the peak
checks for the host galaxy
-) first a log-log cubic fit is performed, with the ‘blind’ interval
-) the SED class ‘I/L/HPS’ is set according to Ep, by find_class
- -) the fit range is changed from ‘blind’, according to the
value returned by find_class, using the function sync_fit_range
-) the SED nu, and nuFnu are generated for the ‘blind’ fit
- -) if the option is selected in the call of the method
the estimate of the host galaxy is performed
-) a second run improve the obj class is performed
values are stored in the class :class: ‘peak_values’