Signal class for luminescence data (BaseSignal class)
- class lumispy.signals.common_luminescence.CommonLumi
General luminescence signal class (dimensionless)
Crop the amount of pixels from the four edges of the scanning region, from out the edges inwards.
crop_px (int) – Amount of pixels to be cropped on each side individually.
signal_cropped – A smaller cropped CL signal object. If inplace is True, the original object is modified and no LumiSpectrum is returned.
- Return type
- normalize(pos=nan, element_wise=False, inplace=False)
Normalizes data to value at pos along signal axis, defaults to maximum value.
Can be helpful for e.g. plotting, but does not make sense to use on signals that will be used as input for further calculations!
pos (float, int) – If ‘nan’ (default), spectra are normalized to the maximum. If float, position along signal axis in calibrated units at which to normalize the spectra. If int, index along signal axis at which to normalize the spectra.
element_wise (boolean) – If False (default), a spectrum image is normalized by a common factor. If True, each spectrum is normalized individually.
inplace (boolean) – If False (default), a new signal object is created and returned. If True, the operation is performed on the existing signal object.
Sets metadata.Signal.normalized to True. If metadata.Signal.quantity contains the word ‘Intensity’, replaces this field with ‘Normalized intensity’.
- remove_negative(basevalue=1, inplace=False)
Sets all negative values to ‘basevalue’, e.g. for logarithmic scale plots.
basevalue (float) – Value by which negative values are replaced (default = 1).
inplace (boolean) – If False (default), a new signal object is created and returned. Otherwise, the operation is performed on the existing signal object.
Sets metadata.Signal.negative_removed to True.
- scale_by_exposure(integration_time=None, inplace=False, **kwargs)
Scale data in spectrum by integration time / exposure, (e.g. convert counts to counts/s).
integration_time (float) – Integration time (exposure) in s. If not given, the function tries to use the ‘metadata.Acqusition_instrument.Detector.integration_time’ field or alternatively find any ‘integration_time’, ‘exposure’ or ‘dwell_time’ fields in the original_metadata.
Sets metadata.Signal.scaled to True. If intensity units is ‘counts’, replaces them by ‘counts/s’.
Deprecated since version 0.2: The exposure argument was renamed integration_time, and it will be removed in LumiSpy 1.0.