@ -444,6 +449,7 @@ class DensityProfileBEC2dModel(lmfit.Model):
"""
"""
self.pre_check=pre_check
self.pre_check=pre_check
self.post_check=post_check
self.post_check=post_check
self.is_debug=is_debug
# reshaping the image to 2D in the form [[a_00, a_01, .., a_0Y], [a_10,.., a_1Y], .., [a_X0, .., a_XY]], with a_xy
# reshaping the image to 2D in the form [[a_00, a_01, .., a_0Y], [a_10,.., a_1Y], .., [a_X0, .., a_XY]], with a_xy
x_width=len(np.unique(x))
x_width=len(np.unique(x))
@ -454,6 +460,17 @@ class DensityProfileBEC2dModel(lmfit.Model):
data=np.reshape(data,(y_width,x_width))
data=np.reshape(data,(y_width,x_width))
data=data.T
data=data.T
ifis_debug:
X,Y=np.meshgrid(x_1d,y_1d)
plt.pcolormesh(X,Y,data.T,cmap='jet')
plt.gca().set_aspect('equal')
plt.title(f'Input data')
plt.xlabel('x_axis')
plt.ylabel('y_axis')
plt.show()
# the image is rotated counterclockwise by rot_angle, CAREFUL: The image has the form a_xy (last coordinate y) and therefore the rotation is done counter-clockwise.
# Doing the same with a standard image with a_yx rotates it clockwise!
ifrot_angle!=0:
ifrot_angle!=0:
data=rotate(data,rot_angle,reshape=False)
data=rotate(data,rot_angle,reshape=False)
@ -602,7 +619,7 @@ class DensityProfileBEC2dModel(lmfit.Model):
else:
else:
print('Error in small width BEC recogintion, s_width_ind should be 0 or 1')
print('Error in small width BEC recogintion, s_width_ind should be 0 or 1')