Skip to content

adding the functionality for fixed and reversible jump #24

Merged
bvandekerkhof merged 95 commits intosede-open:mainfrom
TannazH:main
Jun 24, 2025
Merged

adding the functionality for fixed and reversible jump #24
bvandekerkhof merged 95 commits intosede-open:mainfrom
TannazH:main

Conversation

@TannazH
Copy link
Contributor

@TannazH TannazH commented Feb 19, 2025

Description

This pull request is for adding a new feature to pyELQ enabling the use of fixed sources and reversible jump simultaneously.
With this functionality a use can provide a list of location for the fixed sources in which the emission rate will be estimated for them and their location is assumed to be fixed. The reversible jump functionality explores the area for remaining potential emission sources.

For the implementation we create "ParameterMapping" class to map the map the variables or parameterized labels needed for creating the mcmc. Therefore, the "map" dictionary is dynamic and its values can be changed by appending a string to the default "map". All the hard coded keys in the "source.py" and "source_model.py" are replaced by the keys in the mapping dictionary. The ELQModel is also changed to accept a "fixed_source_model" (with its default being set to None)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Jupyter Notebooks

I made a new Jupyter notebook (example_fixed_RJ) to setup and run pyELQ for fixed and reversible jump.

How Has This Been Tested?

I can add test if you think it is necessary

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@TannazH TannazH requested a review from mattj89 February 19, 2025 15:11
@TannazH TannazH marked this pull request as ready for review February 19, 2025 15:33
Copy link
Collaborator

@mattj89 mattj89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The approach looks good- many thanks for doing the implementation. I think you could maybe simplify the defaults in model, and a couple of other minor comments on the rest of the code. I think that we probably need to sort out the plotting in the example notebook (or possibly in general) before we offer this as an example in the main code base- will chat to you about this separately.

Copy link
Collaborator

@mattj89 mattj89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One extra comment about code formatting.

@TannazH
Copy link
Contributor Author

TannazH commented May 21, 2025

The original example in the repo works now with the proposed changes.
It is now backwards compatible.
More explanation is added to the new_example and text is checked
Figures are now opened in the notebook.

@bvandekerkhof bvandekerkhof merged commit 8179747 into sede-open:main Jun 24, 2025
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants