Package ivs :: Package sed :: Module builder :: Class PulsatingSED
[hide private]
[frames] | no frames]

Class PulsatingSED

source code


Instance Methods [hide private]
 
__init__(self, ID=None, photfile=None, plx=None, load_fits=True, load_hdf5=True, label='', **kwargs)
Setup the Binary sed in the same way as a normal SED.
source code
 
set_constraints(self, **kwargs)
Add constraints that are used when fitting the Pulsating SED.
source code
 
constraints2str(self)
Summarizes all constraints in a string.
source code

Inherited from SED: __repr__, __str__, generate_ranges

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

    Handling photometric data

Inherited from SED: add_photometry_fromarrays, exclude, exclude_abs, exclude_colors, get_photometry, get_spectrophotometry, include, include_abs, include_colors, set_photometry_scheme

    Additional information

Inherited from SED: compute_distance, get_angular_diameter, get_distance_from_plx, get_interstellar_reddening, has_photfile, is_target

    Fitting routines
 
igrid_search(self, points=100000, teffrange=None, loggrange=None, ebvrange=None, zrange=None, rvrange=(3.1,3.1), vradrange=None, df=None, CI_limit=None, set_model=True, distance=None, **kwargs)
Fit fundamental parameters at various phases simultaneously, 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
 
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

Inherited from SED: calculateDF, calculate_confidence_intervals, calculate_statistics, clip_grid, collect_results, store_confidence_intervals

Inherited from SED (private): _get_imin_ci

    Interfaces
 
set_best_model(self, mtype='igrid_search', law='fitzpatrick2004', **kwargs)
Get reddenend and unreddened model
source code

Inherited from SED: chi2, clear, get_model, sample_gridsearch, set_model

    Add constraints

Inherited from SED: add_constraint_angular_diameter, add_constraint_distance, add_constraint_evolution_models, add_constraint_mass, add_constraint_reddening, add_constraint_slo

    Plotting routines
 
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

Inherited from SED: make_plots, plot_CI2D, plot_MW_side, plot_MW_top, plot_chi2, plot_data, plot_distance, plot_finderchart, plot_grid, plot_grid_model

Inherited from SED (private): _label_dict

    Input and output

Inherited from SED: load_fits, load_hdf5, load_photometry, save_bibtex, save_fits, save_hdf5, save_important_info, save_photometry, save_summary

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, ID=None, photfile=None, plx=None, load_fits=True, load_hdf5=True, label='', **kwargs)
(Constructor)

source code 

Setup the Binary sed in the same way as a normal SED. The masses of both components can be provided, and will then be used in igrid_search, iminimize, and while calculating CI and CI2D confidence intervalls

Parameters:
  • plx - parallax (and error) of the object
Overrides: object.__init__

set_constraints(self, **kwargs)

source code 

Add constraints that are used when fitting the Pulsating SED. Up till now the following contraints are supported (and in fact needed to do a fitting):

  • deltaTeff (in K)
  • deltaLogg (in dex)

For each 'phase' additional to the zeroth phase, a tuple containing a lower and upper limit needs to be added to the deltaTeff and deltaLogg list. These limits have a sign!

TODO: This function should in the future accept Units.

igrid_search(self, points=100000, teffrange=None, loggrange=None, ebvrange=None, zrange=None, rvrange=(3.1,3.1), vradrange=None, df=None, CI_limit=None, set_model=True, distance=None, **kwargs)

source code 

Fit fundamental parameters at various phases simultaneously, using a (pre-integrated) grid search.

Parameter ranges only need to be provided for the first 'phase', but be aware that these ranges should encompass the parameters of your star at all phases! The part of the parameter space that falls outside the box defined for the first 'phase' is not probed at other phases, even though the defined constraints would in principle allow it.

Overrides: SED.igrid_search

generate_fit_param(self, start_from='igrid_search', **pars)

source code 

generates a dictionary with parameter information that can be handled by fit.iminimize

Overrides: SED.generate_fit_param

calculate_iminimize_CI(self, mtype='iminimize', CI_limit=0.66, **kwargs)

source code 
Overrides: SED.calculate_iminimize_CI

calculate_iminimize_CI2D(self, xpar, ypar, mtype='iminimize', limits=None, res=10, **kwargs)

source code 
Overrides: SED.calculate_iminimize_CI2D

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)

source code 

Basic minimizer method for SED fitting implemented using the lmfit library from sigproc.fit

Overrides: SED.iminimize
(inherited documentation)

imc(self, teffrange=None, loggrange=None, ebvrange=None, zrange=None, start_from='igrid_search', distribution='uniform', points=None, fitmethod='fmin', disturb=True)

source code 
Overrides: SED.imc

set_best_model(self, mtype='igrid_search', law='fitzpatrick2004', **kwargs)

source code 

Get reddenend and unreddened model

Overrides: SED.set_best_model

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)

source code 

Plot a fitted SED together with the data.

Example usage:

First set the SED:

>>> mysed = SED('HD180642')
>>> mysed.load_fits()

Then make the plots:

>>> p = pl.figure()
>>> p = pl.subplot(121)
>>> mysed.plot_sed(colors=False)
>>> p = pl.subplot(122)
>>> mysed.plot_sed(colors=True)

]]include figure]]ivs_sed_builder_plot_sed_01.png]

Decorators:
  • @standalone_figure
Overrides: SED.plot_sed