Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dipolarbackgroundmodel func #493

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

HKaras
Copy link
Member

@HKaras HKaras commented Jan 10, 2025

This adds a new function called dipolarbackgroundmodel which has the aim of simplifying how dipolar background models are evaluated and propagated for multi-pathway experiments.

In the past a long convulated line had to added:

Bfcn = lambda lam1,lam5,reftime1,reftime5,conc: results.P_scale*(1-lam1-lam5)*dl.bg_hom3d(t-reftime1,conc,lam1)*dl.bg_hom3d(t-reftime5,conc,lam5)
Bfit = results.evaluate(Bfcn)
Bci = results.propagate(Bfcn).ci(95)

This how now been replaced with:

Bfcn = dl.dipolarbackgroundmodel(experimentInfo)
Bfit = results.P_scale*results.evaluate(Bfcn,t)
Bci = results.P_scale*results.propagate(Bfcn,t).ci(95)

Limitations

  • The model constant t must be specified in evaluate, as FitResult.evaluate does not automatically identify constants.
  • As before the linear scale parameter needs to be applied.

@HKaras HKaras added the enhancement New feature or request label Jan 10, 2025
@HKaras HKaras added this to the v1.2 milestone Jan 10, 2025
@HKaras HKaras requested a review from stestoll January 10, 2025 15:52
@HKaras HKaras self-assigned this Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant