{% extends "base.html" %} {% block content %}
Magnetization
Signal (emf)
{{ template_game_form.hidden_tag() }}
Main field (Gauss)
{{ template_game_form.b0_onoff_field(class="btn-check",id="b0_on",autocomplete="off",checked=session['game5']['b0_on']) }}
{{ template_game_form.b0_field(class="form-range",id='b0',step=10, value=1e4*session['game5']['b0']) }}
{% for b in [0,20,40,60,80,100] %} {{ b }} {% endfor %}

{{ template_game_form.tx_onoff_field(class="btn-check",id="tx-button",autocomplete="off", checked=session['game5']['tx_on']) }} RF pulse

{{ template_game_form.flip_angle_field.label }}

{{ session['game5']['flip_angle'] }} deg

{{ template_game_form.rf_phase_field.label }}

{{ session['game5']['rf_phase'] }} deg

{{ template_game_form.flip_angle_field(class="form-range",id='flip_angle',step=5,value=session['game5']['flip_angle']) }}
{% for angle in [0,45,90,135,180,225,270,315,360] %} {{ angle }} {% endfor %}
{{ template_game_form.rf_phase_field(class="form-range",id='rf_phase',step=5,value=session['game5']['rf_phase']) }}
{% for angle in [0,45,90,135,180,225,270,315,360] %} {{ angle }} {% endfor %}

Receive coil

{{ template_game_form.rx_onoff_field(class="btn-check",id="rx-button",autocomplete="off", checked=session['game5']['coil_on']) }}
{{ template_game_form.rot_frame_onoff_field(class="btn-check",id="rot-frame-button",autocomplete="off", checked=session['game5']['rot_frame_on']) }}
{% for subfield in template_game_form.rx_dir_field %} {% if subfield.id == "rx_dir_field-0" %} {{ subfield(class="btn-check shadow-none", autocomplete="off",checked=session['game5']['coil_dir']=='x') }} {% else %} {{ subfield(class="btn-check shadow-none", autocomplete="off", checked=session['game5']['coil_dir']=='y') }} {% endif %} {{ subfield.label(class="btn btn-outline-primary d-flex align-items-center justify-content-center") }} {% endfor %}

Set initial magnetization

SET
{{ template_game_form.m_theta_field.label }} {{ template_game_form.m_theta_field(class="form-control",id='m_theta',value=session['game5']['m_theta']) }}
{{ template_game_form.m_phi_field.label }} {{ template_game_form.m_phi_field(class="form-control",id='m_phi',value=session['game5']['m_phi']) }}
{{ template_game_form.m_size_field.label }} {{ template_game_form.m_size_field(class="form-control",id='m_size',value=session['game5']['m_size']) }}
START
STOP
TIP!
RESET
Messages
Tasks
{% for task, task_details in instructions['tasks'].items() %} {% if loop.index == ([session['game5']['task_completed']+1,4] | min) %} {% set show_text = 'show' %} {% set active_text = 'active' %} {% else %} {% set show_text = '' %} {% set active_text = '' %} {% endif %}
{{ instructions['titles'][loop.index0] }}
    {% set task_index = loop.index %} {% for step, details in instructions['explorations'][loop.index0].items() %}
  • {{ details }}
  • {% endfor %}
  • {{ task_details }}
{% if task_index == 3 %}
Target M: (0, 0, 0)
Try again.
Randomize!
Check
{% endif %}
Next

Complete and check all steps to move on.

{% set dnone = '' if session['game5']['task_completed'] >= task_index else 'd-none' %} {% set success_message = 'This step has been completed' if task_index < 4 else 'All steps complete. Congratulations! To earn the remaining stars, answer the questions to the right.' %}

{{ success_message }} {% if task_index == 4 %} Next game! {% endif %}

{% endfor %}
Questions
{% endblock %} {% block additional_imports %} {% endblock %}