from . import plasmamodel
import os
import sys
import logging
logging.basicConfig()
import datetime
import math
import matplotlib.pyplot as plt
import numpy as np
import scipy as sp
from . import plasmamodel
def main():
'''Main script'''
fig = plt.figure()
ax = fig.add_subplot(111)
pm = plasmamodel.CorotationalFlowMJconv()
x = np.linspace(0, 25, 1000)
xkm = x * 71492.
density = np.array([pm.get_density(xi, 0, 0) for xi in xkm]) / 1e6
ax.plot(x, density, 'k-')
xref = np.array([5, 6, 7, 9, 11, 13, 15, 20, 25]) * 71492.
densityref = np.array([pm.get_density(xi, 0, 0) for xi in xref]) / 1e6
# ax.plot(xref / 71492., densityref, 'k-')
ax.set_yscale('log')
ax.set_xlabel('Distance [Rj]')
ax.set_ylabel('Density [cm-3]')
ax.set_xlim(0, 10)
fig.savefig('plasmamodel_plot.png')
if __name__ == "__main__":
main()