This is for conventional and irregular forc diagrams.

two example of irforc and convential forc data in PmagPy/data_files/forc_diagram/

The input data format could be very different due to different softwares and instruments,

Nevertheless, only if the line [' Field Moment '] included before the measured data, the software will work.

in command line:

python3 forcdiagram /data_files/irforc_example.irforc 3

will plot the FORC diagram with SF=3


In [2]:
from forc_diagram import *
from matplotlib import pyplot as plt

In [3]:
#forc = Forc(fileAdres='/data_files/irforc_example.irforc',SF=3)
forc = Forc(fileAdres='../example/MSM33-60-1-d416_2.irforc',SF=3)

fig = plt.figure(figsize=(6,5), facecolor='white')

fig.subplots_adjust(left=0.18, right=0.97,
                    bottom=0.18, top=0.9, wspace=0.5, hspace=0.5)
plt.contour(forc.xi*1000,
            forc.yi*1000,
            forc.zi,9,
            colors='k',linewidths=0.5)#mt to T

plt.pcolormesh(forc.xi*1000,
               forc.yi*1000,
               forc.zi,
               cmap=plt.get_cmap('rainbow'))#vmin=np.min(rho)-0.2)
plt.colorbar()
plt.xlabel('B$_{c}$ (mT)',fontsize=12)
plt.ylabel('B$_{i}$ (mT)',fontsize=12)

plt.show()



In [ ]: