fitroom.slit_tool module

Created on Wed Sep 27 10:38:25 2017

@author: erwan

# Todo: Overlay with “template” slit (ex: imported )


class SlitTool(plot_unit='nm', overlay=None, overlay_options=None)[source]

Bases: object

Tool to manipulate slit function

Parameters
  • plot_unit (‘nm’, ‘cm-1’)

  • overlay (str, or int, or tuple) – plot a slit in background (to compare generated slit with experimental slit for instance)

Examples

connect(fitroom)[source]

Triggered on connection to FitRoom

plot_slit(w, I=None, waveunit='', plot_unit='same', wover=None, Iover=None)[source]

Variant of the plot_slit function defined in slit.py that can set_data when figure already exists

Plot slit, calculate and display FWHM, and calculate effective FWHM. FWHM is calculated from the limits of the range above the half width, while FWHM is the equivalent width of a triangular slit with the same area

Parameters
  • w, I (arrays or (str, None)) – if str, open file directly

  • waveunit (‘nm’, ‘cm-1’ or ‘’)

  • plot_unit (‘nm, ‘cm-1’ or ‘same’) – change plot unit (and FWHM units)

  • warnings (boolean) – if True, test if slit is correctly centered and output a warning if it is not. Default True

slit_function()[source]
slit_options()[source]
update_figure()[source]
update_slider(val)[source]

update slit function in Solver and replot