pypeline.impl.misc package

Submodules

pypeline.impl.misc.img_proc module

pypeline.impl.misc.sig_proc module

pypeline.impl.misc.sig_proc.calibrate_sampling(v, cali_coeff, method='cubic')[source]

calibrate the vector to linear wavenumber domain before image reconstruction

Parameters:
  • v – vector as 1D numpy array
  • cali_coeff – polynominal coefficents that maps linear pixel index to its actual wavenumber, the linear pixel index and actual wavenumber are both normalized to [0, 1]
  • method – the interpolation kind, can be ‘linear’ or ‘cubic’, default to ‘cubic’
Returns:

spectrum as 1D numpy array after calibration

Return type:

sp

pypeline.impl.misc.sig_proc.filter(data, axis=-1, win=[])[source]
pypeline.impl.misc.sig_proc.resample(x, y, xq, method='cubic')[source]
pypeline.impl.misc.sig_proc.shift_phase(v, poly_coeff, slope=False)[source]

shift_phase adds a pixel dependent phase shift to the 1D signal

Example

it can be used to
  1. add/remove physical dispersion mismatch between sample and reference
  2. numerical refocusing, etc.
Parameters:
  • v – vector as 1D numpy array that phase shift applies to
  • poly_coeff – polynominal coefficents for the polyfit of phase shift function
  • slope (bool) – if False, the linear slope from begin to end will be removed to ensure begin == end if True, keep the linear slope from begin to end.
Returns:

vector as 1D numpy array after phase shifted

Return type:

v

Module contents