Class that facilitates the use of the ivs.sed module.
This class is meant to be an easy interface to many of the ivs.sed
module's functionality.
|
__init__(self,
ID=None,
photfile=None,
plx=None,
load_fits=True,
load_hdf5=True,
label='')
Initialize SED class. |
source code
|
|
|
|
|
|
|
generate_ranges(self,
start_from='igrid_search',
distribution='uniform',
**kwargs)
Generate sensible search range for each parameter. |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|
|
get_photometry(self,
radius=None,
ra=None,
dec=None,
include=None,
exclude=None,
force=False,
units='erg/s/cm2/AA')
Search photometry on the net or from the phot file if it exists. |
source code
|
|
|
|
|
exclude(self,
names=None,
wrange=None,
sources=None,
indices=None)
Exclude (any) photometry from fitting process. |
source code
|
|
|
exclude_colors(self,
names=None,
wrange=None,
sources=None,
indices=None)
Exclude (color) photometry from fitting process. |
source code
|
|
|
exclude_abs(self,
names=None,
wrange=None,
sources=None,
indices=None)
Exclude (absolute) photometry from fitting process. |
source code
|
|
|
include(self,
names=None,
wrange=None,
sources=None,
indices=None)
Include (any) photometry in fitting process. |
source code
|
|
|
include_colors(self,
names=None,
wrange=None,
sources=None,
indices=None)
Include (color) photometry in fitting process. |
source code
|
|
|
include_abs(self,
names=None,
wrange=None,
sources=None,
indices=None)
Include (absolute) photometry in fitting process. |
source code
|
|
|
|
|
|
bool
|
|
bool
|
|
(float,float)
|
|
|
get_interstellar_reddening(self,
distance=None,
Rv=3.1)
Under construction. |
source code
|
|
|
get_angular_diameter(self)
Under construction. |
source code
|
|
(float,float)
|
|
|
clip_grid(self,
mtype='igrid_search',
CI_limit=None)
Clip grid on CI limit, to save memory. |
source code
|
|
|
collect_results(self,
grid=None,
fitresults=None,
mtype='igrid_search',
selfact='chisq',
**kwargs)
creates record array(s) of all fit results and removes the failures |
source code
|
|
|
calculateDF(self,
**ranges)
Calculates the degrees of freedom from the given ranges |
source code
|
|
|
calculate_statistics(self,
df=None,
ranges=None,
mtype='igrid_search',
selfact='chisq')
Calculates the Chi2 and reduced Chi2 based on nr of observations and
degrees of freedom. |
source code
|
|
|
|
|
store_confidence_intervals(self,
mtype='igrid_search',
name=None,
value=None,
cilow=None,
cihigh=None,
**kwargs)
Saves the provided confidence intervals in the result dictionary of
self. |
source code
|
|
|
igrid_search(self,
points=100000,
teffrange=None,
loggrange=None,
ebvrange=None,
zrange=(0,0),
rvrange=(3.1,3.1),
vradrange=(0,0),
df=None,
CI_limit=None,
set_model=True,
exc_interpolpar=[],
**kwargs)
Fit fundamental parameters using a (pre-integrated) grid search. |
source code
|
|
|
generate_fit_param(self,
start_from='igrid_search',
**pars)
generates a dictionary with parameter information that can be handled
by fit.iminimize |
source code
|
|
|
calculate_iminimize_CI(self,
mtype='iminimize',
CI_limit=0.66,
**kwargs) |
source code
|
|
|
calculate_iminimize_CI2D(self,
xpar,
ypar,
mtype='iminimize',
limits=None,
res=10,
**kwargs) |
source code
|
|
|
_get_imin_ci(self,
mtype='iminimize',
**ranges)
returns ci information for store_confidence_intervals |
source code
|
|
|
iminimize(self,
teff=None,
logg=None,
ebv=None,
z=0,
rv=3.1,
vrad=0,
teffrange=None,
loggrange=None,
ebvrange=None,
zrange=None,
rvrange=None,
vradrange=None,
points=None,
distance=None,
start_from='igrid_search',
df=None,
CI_limit=None,
calc_ci=False,
set_model=True,
**kwargs)
Basic minimizer method for SED fitting implemented using the lmfit
library from sigproc.fit |
source code
|
|
|
imc(self,
teffrange=None,
loggrange=None,
ebvrange=None,
zrange=None,
start_from='igrid_search',
distribution='uniform',
points=None,
fitmethod='fmin',
disturb=True) |
source code
|
|
|
|
|
set_best_model(self,
mtype='igrid_search',
law='fitzpatrick2004',
**kwargs)
Get reddenend and unreddened model |
source code
|
|
|
set_model(self,
wave,
flux,
label='manual',
unique_phase=None)
Manually set the best SED model. |
source code
|
|
|
|
|
sample_gridsearch(self,
mtype='igrid_search',
NrSamples=1,
df=None,
selfact='chisq')
Retrieve an element from the results of a grid search according to
the derived probability. |
source code
|
|
|
chi2(self,
select=None,
reduced=False,
label='igrid_search')
Calculate chi2 of best model. |
source code
|
|
|
|
|
add_constraint_slo(self,
numax,
Deltanu0,
mtype='igrid_search',
chi2_type='red')
Use diagnostics from solar-like oscillations to put additional
constraints on the parameters. |
source code
|
|
|
add_constraint_reddening(self,
distance=None,
ebv=None,
e_ebv=0.1,
Rv=3.1,
model=None,
mtype='igrid_search',
chi2_type='red',
upper_limit=False)
Use reddening maps to put additional constraints on the parameters. |
source code
|
|
|
add_constraint_angular_diameter(self,
angdiam) |
source code
|
|
|
|
|
add_constraint_evolution_models(self,
models='siess2000',
ylabels=['age','labs','radius'],
e_y=None,
function='linear',
mtype='igrid_search',
chi2_type='red')
Use stellar evolutionary models to put additional constraints on the
parameters. |
source code
|
|
|
|
|
plot_grid(self,
x='teff',
y='logg',
ptype='ci_red',
mtype='igrid_search',
limit=0.95,
d=None,
**kwargs)
Plot grid as scatter plot |
source code
|
|
|
plot_CI2D(self,
xpar='teff',
ypar='logg',
mtype='iminimize',
ptype='ci_red',
**kwargs)
Plot a 2D confidence intervall calculated using the CI2D computation
from calculate_iminimize_CI2D. |
source code
|
|
|
plot_data(self,
colors=False,
plot_unselected=True,
unit_wavelength='angstrom',
unit_flux=None,
**kwargs)
Plot only the SED data. |
source code
|
|
|
plot_sed(self,
colors=False,
mtype='igrid_search',
plot_redded=True,
plot_deredded=False,
plot_unselected=True,
wave_units='AA',
flux_units='erg/s/cm2',
**kwargs)
Plot a fitted SED together with the data. |
source code
|
|
|
plot_chi2(self,
colors=False,
mtype='igrid_search',
**kwargs)
Plot chi2 statistic for every datapoint included in the fit. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
save_fits(self,
filename=None,
overwrite=True)
Save content of SED object to a FITS file. |
source code
|
|
|
|
string
|
|
bool
|
|
|
|
|
save_summary(self,
filename=None,
CI_limit=None,
method='igrid_search',
chi2type='ci_red')
Save a summary of the results to an ASCII file. |
source code
|
|
|
save_important_info(self,
filename=None,
CI_limit=None,
method='igrid_search',
chi2type='ci_red')
Save a summary of the results to an ASCII file. |
source code
|
|