Class that facilitates the use of the cc.ivs.sed module.
This class is meant to be an easy interface to many of the cc.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,
type=' single ' ,
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 a record array of all fit results and removes the failurs |
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,
**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=' imc ' ,
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
|
|
|
|
|
|
|
sample_gridsearch(self,
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
|
|
|
|
|
|
|
|
|
plot_CI2D(*args,
**kwargs)
Plot a 2D confidence intervall calculated using the CI2D computation
from calculate_iminimize_CI2D. |
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
|
|
str
|
ci2str(self,
mtype=' igrid_search ' )
Prints the stored confidence intervals of the given mtype, the
confidence intervals are sorted alfabetically. |
source code
|
|