Commit 6ddfa4eb authored by Zolnierczuk, Piotr's avatar Zolnierczuk, Piotr
Browse files

mag field and cleanup

parent b9427f75
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3,5 +3,5 @@
*.pyc
*.log
*.h5
*.mac
*.mac*
.ipynb_checkpoints
+8 −8
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ import h5py

from functools import partial

from pysen          import NANOSECOND, OMEGA_N, MICROTM
from pysen          import NANOSECOND, OMEGA_N, MICRO
from pysen.mathutil import normalize_counts
from pysen.echo.fit import flux_weighted_eshape, gaussian_eshape, echo_fit, echo_curve
from pysen.echo.smooth_lib import smooth_phase_map_slice, smooth_phase_map_patch
@@ -78,7 +78,7 @@ def plot_fit(axes, dj, res, phase0=None, nolabels=False):
    esig = res['esig']


    axes.errorbar(dj/MICROTM, esig[0], yerr=esig[1], fmt='.')
    axes.errorbar(dj/MICRO, esig[0], yerr=esig[1], fmt='.')
    if nolabels:
        axes.set_xticklabels([])
        axes.set_yticklabels([])
@@ -89,12 +89,12 @@ def plot_fit(axes, dj, res, phase0=None, nolabels=False):
        amp  = res['amplitude']
        fitc = res['fitc']

        axes.plot(fitc[0]/MICROTM, fitc[1], 'r-')
        axes.plot(fitc[0]/MICRO, fitc[1], 'r-')
        if phase0 is not None:
            axes.axvline(phase0/MICROTM, lw=1,color='blue')       # phase fit
        axes.axvline((dj0[0]-dj0[1])/MICROTM, ls=':',color='red') # phase fit
        axes.axvline(dj0[0]/MICROTM, lw=1,color='red')            # phase fit
        axes.axvline((dj0[0]+dj0[1])/MICROTM, ls=':',color='red') # phase fit
            axes.axvline(phase0/MICRO, lw=1,color='blue')       # phase fit
        axes.axvline((dj0[0]-dj0[1])/MICRO, ls=':',color='red') # phase fit
        axes.axvline(dj0[0]/MICRO, lw=1,color='red')            # phase fit
        axes.axvline((dj0[0]+dj0[1])/MICRO, ls=':',color='red') # phase fit
        axes.axvline(0.0, ls='--',color='black')
        axes.axhline(ave[0],        color='green', lw=1)    # average
        axes.axhline(ave[0]-amp[0], color='green', ls='--') # average - ampl
@@ -168,7 +168,7 @@ def plot_phasemap(results):
        if phases is not None:
            ax = axes[0][0]
            ax.set_title('phase map [uTm]')
            img = ax.imshow(phases/MICROTM, interpolation='nearest')
            img = ax.imshow(phases/MICRO, interpolation='nearest')
            #img.set_clim(0.8, 1.2)
            fig.colorbar(img, ax=ax)

+0 −0

File moved.

+4 −1
Original line number Diff line number Diff line
@@ -17,7 +17,10 @@ GAMMA_N = 1.83247172e+08 #s^-1 T^-1
# Convenience constants
ANGSTROM   = 1e-10 # Angstrom in meters
NANOSECOND = 1e-09 #
MICROTM    = 1e-06 # micro tesla-meter
GAUSS      = 1e-04 # Gauss-> Tesla
#
MICRO      = 1e-06 # mu - micro prefix


# conversion constant from field integral to phase angle
# d(phi) = OMEGA_N * d(J)
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
PySEN revision module
"""
import sys
__version__  = "0.7.2"
__version__  = "0.7.3"
__release__  = "dev1"
__date__     = "Feb 13, 2019"
#
Loading