Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide calculations when there is no CI #135

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 30 additions & 28 deletions lightcurve/templates/lightcurve.html
Original file line number Diff line number Diff line change
Expand Up @@ -212,39 +212,41 @@ <h2 id="calculations">Calculations</h2>
</blockquote>
</p>

<div class="ci-skipped-equation">
<p>
If CI is skipped, the equation becomes:
</p>
<p>
<blockquote>
M<sub>t</sub> = (m<sub>t</sub> - m<sub>c</sub>) + M<sub>c</sub>
</blockquote>
</p>
</div>

<div class="reduction-calculation-step">
{% include 'partials/extinction.html' %}

<div>
{% if (not lightcurve.ciband or lightcurve.ciband == "NONE") and not lightcurve.color_index_manual %}
<div class="ci-skipped-equation">
<p>
Now we will compute the transformation coefficient T<sub>f</sub> and the hidden transforms for your image.
Because CI is omitted, the equation simplifies to:
</p>
<p>
<blockquote>
M<sub>t</sub> = (m<sub>t</sub> - m<sub>c</sub>) + M<sub>c</sub>
</blockquote>
</p>
<div class="button-row">
<div class="btn btn-primary js-run-lightcurve-reductions">Run lightcurve reductions</div>
<img style="display:none" class="page-loader" src="{% static "imageflow/images/loader-eclipse.svg" %}" />
</div>
</div>

{% if lightcurve.is_reduction_complete %}
{% include 'partials/transformation_coefficient.html' with reduction=lightcurve.lightcurvereduction %}
{% include 'partials/hidden_transform.html' with reduction=lightcurve.lightcurvereduction %}
{% else %}
<div class="well">
Your results will display here when lightcurve reductions are complete.
<div class="reduction-calculation-step">
{% include 'partials/extinction.html' %}

<div>
<p>
Now we will compute the transformation coefficient T<sub>f</sub> and the hidden transforms for your image.
</p>
<div class="button-row">
<div class="btn btn-primary js-run-lightcurve-reductions">Run lightcurve reductions</div>
<img style="display:none" class="page-loader" src="{% static "imageflow/images/loader-eclipse.svg" %}" />
</div>
</div>
{% endif %}
</div>

{% if lightcurve.is_reduction_complete %}
{% include 'partials/transformation_coefficient.html' with reduction=lightcurve.lightcurvereduction %}
{% include 'partials/hidden_transform.html' with reduction=lightcurve.lightcurvereduction %}
{% else %}
<div class="well">
Your results will display here when lightcurve reductions are complete.
</div>
{% endif %}
</div>
{% endif %}

<hr/>

Expand Down