caput.pfb

Tools for calculating the effects of the CASPER tools PFB.

This module can: - Evaluate the typical window functions used - Evaluate a python model of the PFB - Calculate the decorrelation effect for signals offset by a known time delay.

Window functions

PFB

  • pfb()

  • decorrelation_ratio()

class caput.pfb.PFB(ntap, lblock, window=None, oversample=4)[source]

Bases: object

Model for the CASPER PFB.

This is the PFB used in CHIME and other experiments.

Parameters
  • ntap (int) – Number of taps (i.e. blocks) used in one step of the PFB.

  • lblock (int) – The length of a block that gets transformed. This is twice the number of output frequencies.

  • window (function, optional) – The window function being used. If not set, use a Sinc-Hamming window.

  • oversample (int, optional) – The amount to oversample when calculating the decorrelation ratio. This will improve accuracy.

apply(timestream)[source]

Apply the PFB to a timestream.

Parameters

timestream (np.ndarray) – Timestream to process.

Returns

pfb – Array of PFB frequencies.

Return type

np.ndarray[:, lblock // 2]

decorrelation_ratio(delay)[source]

Calculates the decorrelation caused by a relative relay of two timestreams.

This is caused by the fact that the PFB is generated from a finite time window of data.

Parameters

delay (array_like) – The relative delay between the correlated streams in units of samples (not required to be an integer).

Returns

decorrelation – The decorrelation ratio.

Return type

array_like

caput.pfb.sinc_hamming(ntap, lblock)[source]

Hamming-sinc window function.

Parameters
  • ntap (integer) – Number of taps.

  • lblock (integer) – Length of block.

Returns

window

Return type

np.ndarray[ntap * lblock]

caput.pfb.sinc_hann(ntap, lblock)[source]

Hann-sinc window function.

Parameters
  • ntap (integer) – Number of taps.

  • lblock (integer) – Length of block.

Returns

window

Return type

np.ndarray[ntap * lblock]

caput.pfb.sinc_window(ntap, lblock)[source]

Sinc window function.

Parameters
  • ntap (integer) – Number of taps.

  • lblock (integer) – Length of block.

Returns

window

Return type

np.ndarray[ntap * lblock]