Example #1
0
# SrFit objects can be examined by calling their show() function.  SrFit
# parses the model equation and finds two parameters A, B at independent
# variable x.  The values of parameters A, B are at this stage undefined.

large_gaussian.show()
small_gaussian.show()

# <demo> --- stop ---

# We can set A and B to some specific values and calculate model
# observations.  The x and y attributes of the FitContribution are
# the observed values, which may be re-sampled or truncated to a shorter
# fitting range.

large_gaussian.lgA = 25000
large_gaussian.lgx0 = 40
large_gaussian.lgsig = 20
small_gaussian.sgA = 500
small_gaussian.sgx0 = 71
small_gaussian.sgsig = 3

print(large_gaussian.lgA, large_gaussian.lgA.value)
print(large_gaussian.lgx0, large_gaussian.lgx0.value)
print(large_gaussian.lgsig, large_gaussian.lgsig.value)
print(small_gaussian.sgA, small_gaussian.sgA.value)
print(small_gaussian.sgx0, small_gaussian.sgx0.value)
print(small_gaussian.sgsig, small_gaussian.sgsig.value)

# <demo> --- stop ---