Source windows functions

class camb.sources.SourceWindow[source]

Abstract base class for a number count/lensing/21cm source window function. A list of instances of these classes can be assigned to the SourceWindows field of model.CAMBparams.

Note that source windows can currently only be used in flat models.

  • source_type – (integer/string, one of: 21cm, counts, lensing)
  • bias – (float64)
  • dlog10Ndm – (float64)
class camb.sources.GaussianSourceWindow[source]

Bases: camb.sources.SourceWindow

A Gaussian W(z) source window function.

  • redshift – (float64)
  • sigma – (float64)
class camb.sources.SplinedSourceWindow(**kwargs)[source]

Bases: camb.sources.SourceWindow

A numerical W(z) source window function constructed by interpolation from a numerical table.

set_table(z, W, bias_z=None)[source]

Set arrays of z and W(z) for cublic spline interpolation. Note that W(z) is the total count distribution observed, not a fractional selection function on an underlying distribution.

  • z – array of redshift values (monotonically increasing)
  • W – array of window function values. It must be well enough sampled to smoothly cubic-spline interpolate
  • bias_z – optional array of bias values at each z