Beispiel #1
0
from howtofit.simulators.chapter_1 import profiles

import numpy as np

# %%
"""
__Gaussian x3__

Create the model instances of all three Gaussians.
"""

# %%
gaussian_0 = profiles.Gaussian(centre=50.0, intensity=20.0, sigma=1.0)
gaussian_1 = profiles.Gaussian(centre=50.0, intensity=40.0, sigma=5.0)
gaussian_2 = profiles.Gaussian(centre=50.0, intensity=60.0, sigma=10.0)

# %%
"""
Specify the number of pixels used to create the xvalues on which the 1D line of the profile is generated using and
thus defining the number of data-points in our data.
"""

# %%
pixels = 100
xvalues = np.arange(pixels)

# %%
"""
Evaluate all three Gaussian model instances at every xvalues to create their model profiles and sum them
together to create the overall model profile.
"""
from howtofit.simulators.chapter_1 import profiles

import numpy as np

# %%
"""
__Gaussian X2 + Exponential x1__

Create a model instance of both Gaussians and the Exponential.
"""

# %%
gaussian_0 = profiles.Gaussian(centre=50.0, intensity=25.0, sigma=10.0)
gaussian_1 = profiles.Gaussian(centre=20.0, intensity=30.0, sigma=5.0)
exponential = profiles.Exponential(centre=70.0, intensity=40.0, rate=0.005)

# %%
"""
Specify the number of pixels used to create the xvalues on which the 1D line of the profile is generated using and
thus defining the number of data-points in our data.
"""

# %%
pixels = 100
xvalues = np.arange(pixels)

# %%
"""
Evaluate both Gaussian model instances and Exponential model instance at every xvalues to create their model line
profiles and sum them together to create the overall model profile.
"""
Beispiel #3
0
from howtofit.simulators.chapter_1 import profiles

import numpy as np

# %%
"""
__Gaussian X1__

Create a model instance of the Gaussian.
"""

# %%
gaussian = profiles.Gaussian(centre=50.0, intensity=25.0, sigma=10.0)

# %%
"""
Specify the number of pixels used to create the xvalues on which the 1D line of the profile is generated using and
thus defining the number of data-points in our data.
"""

# %%
pixels = 100
xvalues = np.arange(pixels)

# %%
"""
Evaluate this Gaussian model instance at every xvalues to create its model profile.
"""

# %%
model_line = gaussian.profile_from_xvalues(xvalues=xvalues)
from howtofit.simulators.chapter_1 import profiles

import numpy as np

# %%
"""
__Gaussian x2 Split__

Create the model instances of the two Gaussians.
"""

# %%
gaussian_0 = profiles.Gaussian(centre=25.0, intensity=50.0, sigma=12.5)
gaussian_1 = profiles.Gaussian(centre=75.0, intensity=50.0, sigma=12.5)

# %%
"""
Specify the number of pixels used to create the xvalues on which the 1D line of the profile is generated using and
thus defining the number of data-points in our data.
"""

# %%
pixels = 100
xvalues = np.arange(pixels)

# %%
"""
Evaluate both Gaussian model instances at every xvalues to create their model profiles and sum them
together to create the overall model profile.
"""