Skip to content

Dipolarbackgroundmodel func#493

Merged
HKaras merged 16 commits into
JeschkeLab:mainfrom
HKaras:dipolarbackgroundmodel_func
May 28, 2026
Merged

Dipolarbackgroundmodel func#493
HKaras merged 16 commits into
JeschkeLab:mainfrom
HKaras:dipolarbackgroundmodel_func

Conversation

@HKaras
Copy link
Copy Markdown
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
@HKaras HKaras marked this pull request as draft April 16, 2026 15:55
@HKaras HKaras marked this pull request as draft April 16, 2026 15:55
HKaras added 4 commits April 17, 2026 10:15
`dl.freedist` added to the documentaion but hidden from the other models in API references.
@HKaras HKaras marked this pull request as ready for review May 27, 2026 07:26
@HKaras HKaras linked an issue May 27, 2026 that may be closed by this pull request
@HKaras HKaras merged commit 9d2e636 into JeschkeLab:main May 28, 2026
8 checks passed
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.

Should the background be exported in FitResult?

2 participants