openghg / openghg_inversions

University of Bristol Atmospheric Chemistry Research Group RHIME Inversion code (with openghg dependency)
MIT License
5 stars 0 forks source link

Use deterministics in pymc model #204

Closed brendan-m-murphy closed 2 months ago

brendan-m-murphy commented 2 months ago

This PR is preparation for combining the PARIS formatting code with inversions.

There are a few changes in this PR:

  1. quantities like mu and pt.dot(hbc, xbc) are now deterministics, so their traces will be calculated automatically
  2. coordinates have been added to the pymc Model in inferpymc, so that the trace produces by pm.sample has coordinates, and the sizes of random variables are specified by their dimensions.
  3. "save trace" functionality was moved entirely to fixedbasisMCMC and removed from inferpymc
  4. inferpymc now returns the trace output by pm.sample, as well as the pymc model. This will be useful for adding the PARIS formatting code to inversions.
  5. changed some variable names in the pymc model to align with the PARIS formatting code.