* added gradient calculation

* added magnet selection
* calculate probe position
This commit is contained in:
Markus Rosenstihl 2025-04-23 21:40:33 +02:00
parent ef59bd1aa2
commit 53e1433394
3 changed files with 34 additions and 15 deletions

View File

@ -6,6 +6,9 @@
<link href=”https://cdn.pydata.org/bokeh/release/bokeh-3.7.1.min.css" rel=”stylesheet” type=”text/css”> <link href=”https://cdn.pydata.org/bokeh/release/bokeh-3.7.1.min.css" rel=”stylesheet” type=”text/css”>
<link href=”https://cdn.pydata.org/bokeh/release/bokeh-widgets-3.7.1.min.css" rel=”stylesheet” type=”text/css”> <link href=”https://cdn.pydata.org/bokeh/release/bokeh-widgets-3.7.1.min.css" rel=”stylesheet” type=”text/css”>
<link href=”https://cdn.pydata.org/bokeh/release/bokeh-tables-3.7.1.min.css" rel=”stylesheet” type=”text/css”>
<link href=”https://cdn.pydata.org/bokeh/release/bokeh-gl-3.7.1.min.css" rel=”stylesheet” type=”text/css”>
<link href=”https://cdn.pydata.org/bokeh/release/bokeh-mathjax-3.7.1.min.css" rel=”stylesheet” type=”text/css”>
</head> </head>
<nav class="navbar navbar-expand-lg navbar-light bg-light"> <nav class="navbar navbar-expand-lg navbar-light bg-light">
@ -58,6 +61,14 @@
{% block content %} {% block content %}
{% endblock %} {% endblock %}
<script src="https://cdn.bokeh.org/bokeh/release/bokeh-3.7.1.min.js"></script> <script src="https://cdn.bokeh.org/bokeh/release/bokeh-3.7.1.min.js"
<script src="https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.7.1.min.js"></script> crossorigin="anonymous"></script>
<script src="https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.7.1.min.js"
crossorigin="anonymous"></script>
<script src="https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.7.1.min.js"
crossorigin="anonymous"></script>
<script src="https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.7.1.min.js"
crossorigin="anonymous"></script>
<script src="https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-3.7.1.min.js"
crossorigin="anonymous"></script>
</body> </body>

View File

@ -1,7 +1,7 @@
{% extends 'base.html' %} {% extends 'base.html' %}
{% block content %} {% block content %}
<div class="center"> <div class="container">
<h1>Isotopes</h1> <h1>Isotopes</h1>
<table class="table w-auto table-responsive-sm table-striped table-hover table-bordered"> <table class="table w-auto table-responsive-sm table-striped table-hover table-bordered">
<caption> <caption>
@ -32,15 +32,20 @@
</tbody> </tbody>
</table> </table>
{{ div| safe }} <div class="row justify-content-left">
{{ div_plot | safe }}
</div>
<div class="row justify-content-left ">
{{ div_table | safe }}
</div>
<div>s <div>
{{ script| safe }} {{ script_plot| safe }}
{{ script_table| safe }}
</div> </div>
<a href="{% url 'home' %}">Go Back</a> <a href="{% url 'home' %}">Go Home</a>
</div> </div>
</body>
{% endblock %} {% endblock %}

View File

@ -267,12 +267,15 @@ def position(request):
] ]
data_table = DataTable(source=source, columns=columns, width=400, height=280) data_table = DataTable(source=source, columns=columns, width=400, height=280)
#show(data_table) script_plot, div_plot = components(plot)
# boke plot
#plot.add_layout(data_table) script_table, div_table = components(data_table)
script, div = components(plot)
ans = sorted(close_isotopes, key=lambda x: float(x[3])) ans = sorted(close_isotopes, key=lambda x: float(x[3]))
print(div_plot)
return render(request, 'posiiton.html', {'ans': ans, 'script': script, 'div': div}) return render(request, 'posiiton.html', {'ans': ans,
'script_plot': script_plot,
'div_plot': div_plot,
"script_table": script_table,
"div_table": div_table})