{% macro status_card(label, icon) -%}
{{label}}
{% if icon %}
{% endif %}
{{ caller() }}
{%- endmacro %} {% macro status_card_counter(label, counter_id, icon) -%}
{{label}}
{% if icon %}
{% endif %}

{{ caller() }}
{%- endmacro %} {% macro status_row(label, value, id) -%}
{%- endmacro %} {% set booking = s.booking %} {% set owner = booking.owner %} {% set pi = owner.get_pi() %} {% set is_manager = current_user.is_manager %}
{% set title = "Session Live Pre-processing " %} {% set navigation = [('Sessions', url_for_content('sessions_list')), (s.shortname, url_for_content('session_details', session_id=s.id)), ('OTF', '')] %} {% include 'include_header.html' %} {% import "entry_macros.html" as macros %} {% if is_manager or current_user.same_pi(owner) %}
{% call status_card('Info') %}
{{ booking.resource.name }}
{{ status_row('Staff', booking.operator|shortname) }} {{ status_row('Owner', owner|pairname) }} {{ status_row('Project', macros.project(s.project)) }}
{% endcall %} {% call status_card_counter('Imported', 'counter_imported', True) %} {% endcall %} {% call status_card_counter('Motioncor/CTF', 'ctf_count', True) %} {% endcall %} {% call status_card_counter('Particle Picking', 'counter_picked') %} 0 {% endcall %} {% call status_card('Data', True) %}

{{ s.size|pretty_size }}

{{ status_row('Files', s.total_files) }} {{ status_row('Images', s.images) }}
{% endcall %} {% call status_card('Status') %}

{{ s.otf_status }}

{{ status_row('Processes', s.total_files, 'label_processes') }} {{ status_row('Updated', s.extra['updated'], 'label_updated') }} {% if current_user.is_admin %} {% endif %}
{% endcall %}
{% if stats['movies']['count'] > 0 and stats['ctfs']['count'] > 0 %}
CTF Defocus
{{ macros.bins_table('Defocus (µm)', defocus_bins) }}
CTF Resolution
{{ macros.bins_table('Resolution (Å)', resolution_bins) }}
Polar Charts
{% if gs_info %}
{% set card_id = 'gs_card' %} {% include 'gridsquare_card.html' %}
{% set micCol = 7 %} {% else %} {% set micCol = 12 %} {% endif %}
{% set card_id = 'mic_card' %} {% set show_ctf_plot = False %} {% include 'micrograph_card.html' %}
Classes 2D
{{ macros.overlay('overlay_classes2d') }}
{% else %}

Files for this session have not been processed yet

Reloading in seconds
{% endif %}
{% else %}

You do not have access to this information.

A session is only visible by people on the same lab

{% endif %}