Skip to content

Cobaya gaussian prior #3

@JesusTorrado

Description

@JesusTorrado

Hi,

I can see that in e.g. https://github.com/SouthPoleTelescope/spt_candl_data/blob/main/cobaya/SPT3G_D1_TnE/cobaya_ttteee_lite.yaml (and elsewhere) you are imposing gaussian priors as

params:
  Tcal:
    prior:
      max: 1.2
      min: 0.8
prior:
  gaussian_Tcal: 'lambda Tcal: stats.norm.logpdf(Tcal, loc=1.0, scale=0.0036)'

This is possible, but very much not recommended (for normalisation, initial sampling, etc reasons). Instead, it would be a better idea to declare the gaussian priors directly as

params:
  Tcal:
    prior:
      dist: norm
      loc: 1.0  # this is the mean
      scale: 0.0036  # this is the std

Could I recommend you to update to this notation?

In case the prior bounds are within reach of the gaussian, you can also use truncnorm instead of norm and keep the min, max fields together with loc and scale.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions