barak.fitcont.InteractiveCoFit¶
- class barak.fitcont.InteractiveCoFit(wa, fl, er, contpoints, co=None, nbin=8, redshift=None, atmos=None, fig=None)[source]¶
- __init__(wa, fl, er, contpoints, co=None, nbin=8, redshift=None, atmos=None, fig=None)[source]¶
Initialise figure, plots and variables.
Parameters : wa : Wavelengths
fl : Fluxes
er : One sigma errors
nbin : int (8)
Number of pixels to bin arrays in wavelength. Default 8.
contpoints : list of x,y tuple pairs (None)
The points through which a cubic spline is passed, defining the continuum.
redshift : float (None)
Redshift used to plot reference emission lines.
atmos : list of wavelength pairs (None)
Regions of atmospheric absorption to plot.
Notes
Updates the following attributes:
self.spec : Dictionary of wa, fl, er. self.contpoints : Points used to define the continuum. self.nbin : The input nbin value. self.markers : Dictionary of matplotlib plotting artists. self.connections : Callback connections. self.fig : The plotting figure instance.
Methods
__init__(wa, fl, er, contpoints[, co, nbin, ...]) Initialise figure, plots and variables. modifypoints() Add/remove continuum points. on_button_release(event) on_keypress(event) Add or remove a continuum point. plotinit() Set up the figure and do initial plots. update() Calculates the new continuum, residuals and updates the plots. Attributes
help_message str(object) -> string