diff --git a/isotables/isotables/settings.py b/isotables/isotables/settings.py index 42a6af9..75f4b71 100644 --- a/isotables/isotables/settings.py +++ b/isotables/isotables/settings.py @@ -25,7 +25,7 @@ SECRET_KEY = 'django-insecure-3w!#8kidc1=!ehn_@b$*d@w-h!p(d(gm$*68i!9u%u#i-89=$@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = [] +ALLOWED_HOSTS = ['*'] # Application definition diff --git a/isotables/isotopapp/.views.py.swp b/isotables/isotopapp/.views.py.swp new file mode 100644 index 0000000..fc7a50e Binary files /dev/null and b/isotables/isotopapp/.views.py.swp differ diff --git a/isotables/isotopapp/views.py b/isotables/isotopapp/views.py index 723b6a3..6029f3e 100644 --- a/isotables/isotopapp/views.py +++ b/isotables/isotopapp/views.py @@ -73,8 +73,8 @@ def result(request): w_upper = Wedge((0,2.5), radius, theta1, theta2, fc='#D5D9FF42', edgecolor='black') w_lower = Wedge((0,-2.5), radius, theta1, theta2, fc='#D5D9FF42', edgecolor='black') - ax.set_xlim([-8, 8]) - ax.set_ylim([-8, 8]) + ax.set_xlim([-5.5, 5.5]) + ax.set_ylim([-5.5, 5.5]) ax.grid(True) ax.add_patch(w_upper) @@ -95,12 +95,14 @@ def result(request): close_isotopes.append(i_info) arr = FancyArrowPatch((-2.5,z*1e3), (2.5, z*1e3), - arrowstyle='<->,head_width=.1', mutation_scale=20, linewidth=2) + arrowstyle='-', mutation_scale=20, linewidth=2) ax.add_patch(arr) ax.annotate(f"{isotope.n_nucleons}{isotope.symbol}", (1.1, 0), xycoords=arr, ha='left', va='center',fontsize=8) + ax.annotate(f"{isotope1.n_nucleons}{isotope1.symbol}: {freq:.1f}MHz\ng={gradient:.1f}T/m", + (0.91, -0.45), xycoords=w, + ha='left', va='center',fontsize=11) ax.set_aspect('equal') - ax.set_ylabel('z (mm)') buf = BytesIO() diff --git a/requirements.txt b/requirements.txt index ee40f0f..5238dc0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ Django==5.1.6 +matplotlib==3.10.1