Example #1
0
    def plot_omega(self, p):
        omega_m = self.omega_m_field.subfields[0]
        xdata = omega_m.vtk_X[:, 0]
        ydata = omega_m.field_arr[:]
        idata = argsort(xdata)
        p.fill(xdata[idata], ydata[idata], facecolor='gray', alpha=0.2)

        print 'max omega', max(ydata[idata])

        p.set_ylim(ymin=0, ymax=1.0)
        p.set_xlabel('bar axis [mm]')
        p.set_ylabel('omega [-]')
Example #2
0
    def plot_omega(self, p):
        omega_m = self.omega_m_field.subfields[0]
        xdata = omega_m.vtk_X[:, 0]
        ydata = omega_m.field_arr[:]
        idata = argsort(xdata)
        p.fill(xdata[idata], ydata[idata], facecolor="gray", alpha=0.2)

        print "max omega", max(ydata[idata])

        p.set_ylim(ymin=0, ymax=1.0)
        p.set_xlabel("bar axis [mm]")
        p.set_ylabel("omega [-]")
Example #3
0
    def plot_eps(self, p):
        eps_m = self.eps_m_field.subfields[0]
        xdata = eps_m.vtk_X[:, 0]
        ydata = eps_m.field_arr[:, 0, 0]
        idata = argsort(xdata)
        p.plot(xdata[idata], ydata[idata], 'o-')

        eps_f = self.eps_f_field.subfields[1]
        xdata = eps_f.vtk_X[:, 0]
        ydata = eps_f.field_arr[:, 0, 0]
        idata = argsort(xdata)
        p.plot(xdata[idata], ydata[idata], 'o-')

        p.set_ylim(ymin=0)
        p.set_xlabel('bar axis [mm]')
        p.set_ylabel('strain [-]')
Example #4
0
    def plot_eps(self, p):
        eps_m = self.eps_m_field.subfields[0]
        xdata = eps_m.vtk_X[:, 0]
        ydata = eps_m.field_arr[:, 0, 0]
        idata = argsort(xdata)
        p.plot(xdata[idata], ydata[idata], "o-")

        eps_f = self.eps_f_field.subfields[1]
        xdata = eps_f.vtk_X[:, 0]
        ydata = eps_f.field_arr[:, 0, 0]
        idata = argsort(xdata)
        p.plot(xdata[idata], ydata[idata], "o-")

        p.set_ylim(ymin=0)
        p.set_xlabel("bar axis [mm]")
        p.set_ylabel("strain [-]")
Example #5
0
    def plot_sig(self, p):
        sig_m = self.sig_m_field.subfields[0]
        xdata = sig_m.vtk_X[:, 0]
        ydata = sig_m.field_arr[:, 0, 0]
        idata = argsort(xdata)
        ymax = max(ydata)
        p.plot(xdata[idata], ydata[idata], 'o-')

        sig_f = self.sig_f_field.subfields[1]
        xdata = sig_f.vtk_X[:, 0]
        ydata = sig_f.field_arr[:, 0, 0]
        idata = argsort(xdata)
        p.plot(xdata[idata], ydata[idata], 'o-')

        xdata = sig_f.vtk_X[:, 0]
        ydata = sig_f.field_arr[:, 0, 0] + sig_m.field_arr[:, 0, 0]
        p.plot(xdata[idata], ydata[idata], 'ro-')

        p.set_ylim(ymin=0)  # , ymax = 1.2 * ymax )
        p.set_xlabel('bar axis [mm]')
        p.set_ylabel('stress [MPa]')
Example #6
0
    def plot_sig(self, p):
        sig_m = self.sig_m_field.subfields[0]
        xdata = sig_m.vtk_X[:, 0]
        ydata = sig_m.field_arr[:, 0, 0]
        idata = argsort(xdata)
        ymax = max(ydata)
        p.plot(xdata[idata], ydata[idata], "o-")

        sig_f = self.sig_f_field.subfields[1]
        xdata = sig_f.vtk_X[:, 0]
        ydata = sig_f.field_arr[:, 0, 0]
        idata = argsort(xdata)
        p.plot(xdata[idata], ydata[idata], "o-")

        xdata = sig_f.vtk_X[:, 0]
        ydata = sig_f.field_arr[:, 0, 0] + sig_m.field_arr[:, 0, 0]
        p.plot(xdata[idata], ydata[idata], "ro-")

        p.set_ylim(ymin=0)  # , ymax = 1.2 * ymax )
        p.set_xlabel("bar axis [mm]")
        p.set_ylabel("stress [MPa]")
Example #7
0
             Y,
             rv.pdf(pos),
             offset=0.15,
             level=[0.069182369442786328, 0.069182369442786329])
ax1.axes.errorbar(centroid_off_x,
                  centroid_off_y,
                  xerr=std[0],
                  yerr=std[1],
                  marker='+',
                  color='green')
ax1.scatter(centroid_off_x, centroid_off_y, marker='X', color='white', s=150)
ax1.scatter(0, 0, marker='*', color='red', s=150)
ax1.set_xlim(xmin=-5, xmax=5)
ax1.set_ylim(ymin=-5, ymax=5)
ax1.set_title('Offset Relative to Out of Transit Centroid', fontweight=1000)
ax1.set_xlabel('RA Offset (arcsec)', fontweight=1000)
ax1.set_ylabel('Dec Offset (arcsec)', fontweight=1000)
fig1.savefig("Centroid_Offset1.eps", format='eps')
fig2 = plt.figure(figsize=(14, 10))
plt.scatter((x1_ - x0_) * np.cos(y0_ * np.pi / 180.0) * 3600,
            (y1_ - y0_) * 3600,
            marker='X',
            color='purple',
            s=150)
plt.scatter(0, 0, marker='*', color='red', s=150)
plt.set_xlim(xmin=-1, xmax=1)
plt.set_ylim(ymin=-1, ymax=1)
plt.set_title('Offset Relative to K2 Position', fontweight=1000)
plt.set_xlabel('RA Offset (arcsec)', fontweight=1000)
plt.set_ylabel('Dec Offset (arcsec)', fontweight=1000)
fig2.savefig("Centroid_Offset2.eps", format='eps')