BosonicBimodalFit1D

BosonicBimodalFit1D#

class BosonicBimodalFit1D(rawData)#

Bases: FitData1D

BosonicBimodalFit1D fits a TF condensate + thermal Gaussian.

Models a one-dimensional atomic density profile as the sum of a Thomas–Fermi (condensate) component and a thermal (bosonic) Gaussian wing.

  • Formula: \(y = A\,\max\{0,1-((x-x_0)/R)^2\}^{3/2} + B\,\mathrm{Bose}(e^{-(x-x_g)^2/(2\sigma_g^2)};2.5) + C\)

  • Coefficients: TF: \(A,x_0,R\); Thermal: \(B,x_g,\sigma_g\); Offset: \(C\)

Provides a multi-stage initialization routine to generate robust starting values for the final composite fit.

Example1:

x = linspace(-5, 5, 201)';
tf  = 1.5 * max(0, 1 - ((x-0.2)/1.2).^2).^(3/2);
th  = 0.6 * boseFunctionApprox(exp(-(x+0.4).^2/(2*0.8^2)), 2.5);
y   = tf + th + 0.05;
data = [x, y];
fitObj = BosonicBimodalFit1D(data);
fitObj.do();
fitObj.plot();
Constructor Summary
BosonicBimodalFit1D(rawData)#

Construct a BosonicBimodalFit1D.

Parameters:

rawData (double array) – Input data as n x 2 matrix [x, y]

Property Summary
ScaleFactor double = 1.1#

Exclusion radius factor

Method Summary
do()#

Perform the composite bimodal fit with optional weighting.

Down-weights the TF core to stabilize the combined fit; runs the final fit using the assembled options and stores results.

Returns:

Self-reference for method chaining

Return type:

BosonicBimodalFit1D

optional: down‐weight the TF core

guessCoefficient()#

Generate initial parameter guesses via staged fitting.

Step 1: Fit the TF core with a clamped profile to get \(A,x_0,R,C\). Step 2: Fit the wings with the thermal component to get \(B,x_g,\sigma_g\). Step 3: Assemble composite start points and bounds.

setFormula()#

Set the bimodal fit formula (TF + thermal Gaussian).