{% extends "base.html" %} {% block content %}
{% for il in images %}

{{ il.image.title }} {% if il.image.short_description %} - {{ il.image.short_description }}{% endif %}

{{ il.image.created_at.strftime('%b %Y')|default('No date available') }}
{% set main_tabs = [ ('image', 'Image'), ('details', 'Details'), ('explore', 'Explore') ] %} {% for tab_id, tab_label in main_tabs %} {% endfor %}

{{ il.image.description | safe }}

{% set rows = { 'Lights': 'light_count', 'Single Exposure': 'exposure_time', 'Total Exposure': 'total_time', 'Gain': 'gain', 'Offset': 'offset_cam', 'Temp (°C)': 'temperature' } %} {% set weighted_source = il.lights[0] if il.lights else {} %} {% set has_weighted_exposure = il.lights and ( 'effective_total' in weighted_source or 'effective_red' in weighted_source or 'effective_green' in weighted_source or 'effective_blue' in weighted_source ) %} {% set weighted_rows = [ ('Red Channel', weighted_source.get('effective_red')), ('Green Channel', weighted_source.get('effective_green')), ('Blue Channel', weighted_source.get('effective_blue')), ('Total', weighted_source.get('effective_total')) ] %} {% set acquisition_software = il.software_list | selectattr('type', 'equalto', 'acquisition') | list %} {% set processing_software = il.software_list | selectattr('type', 'equalto', 'processing') | list %}

Lights

{% for light in il.lights %} {% endfor %} {% for label, field in rows.items() if field in il.lights[0] %} {% for light in il.lights %} {% endfor %} {% endfor %}
Filter {{ light.cam_filter|replace("Filter", "") }}
{{ label }}{{ light[field] }}

Equipment

{% for equipment in il.equipment_list %} {% else %} {% endfor %}
{{ equipment.table|replace('_', ' ')|title }} {{ equipment.brand | default('') + " " + equipment.name|replace(equipment.brand | default(''), '') }}
No equipment recorded.
{% if has_weighted_exposure %}

Weighted Exposure

{% for label, value in weighted_rows %} {% endfor %}
{{ label }} {{ value or 'N/A' }}
{% endif %} {% if il.dates %}

Nights

{% for date in il.dates %} {% endfor %}
Capture Dates Moon Illumination
{{ date.capture_date }} {{ date.moon_phase }} ({{ date.moon_illumination }}%)
{% endif %}

Software

Acquisition {% if acquisition_software %}
{% for software in acquisition_software %}

{{ software.name }}

{% endfor %}
{% else %} No acquisition software recorded. {% endif %}
Processing {% if processing_software %}
{% for software in processing_software %} {% if software.metadata %}

{{ software.metadata | safe }}

{% else %}

{{ software.name }}

{% endif %} {% endfor %}
{% else %} No processing software recorded. {% endif %}
{% set explore_tabs = [('hr', 'Hertzsprung Russel Diagram')] %} {% if il.meta_json and 'variable' in il.meta_json %} {% set explore_tabs = explore_tabs + [('analyse', 'Analyse')] %} {% endif %} {% if il.guiding_plot %} {% set explore_tabs = explore_tabs + [('guiding', 'Guiding')] %} {% endif %} {% if il.calibration_plot %} {% set explore_tabs = explore_tabs + [('calibration', 'Calibration')] %} {% endif %} {% if explore_tabs|length > 1 %}
{% for pane_id, pane_label in explore_tabs %} {% endfor %}
{% endif %}
{% if il.meta_json and 'variable' in il.meta_json %}
{% endif %} {% if il.guiding_plot %}
{% endif %} {% if il.calibration_plot %}
{% endif %}
{% endfor %}
{% endblock %}