-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix html repr tables for spectrum objects
- Loading branch information
Showing
3 changed files
with
74 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{% set section = "Frequencies" %} | ||
{% set section_class_name = section | lower | append_uuid %} | ||
|
||
{# Collapse content during documentation build. #} | ||
{% if collapsed %} | ||
{% set collapsed_row_class = "mne-repr-collapsed" %} | ||
{% else %} | ||
{% set collapsed_row_class = "" %} | ||
{% endif %} | ||
|
||
{%include 'static/_section_header_row.html.jinja' %} | ||
|
||
<tr class="repr-element {{ section_class_name }} {{ collapsed_row_class }}"> | ||
<td class="mne-repr-section-toggle"></td> | ||
<td>Data type</td> | ||
<td>{{ inst._data_type }}</td> | ||
</tr> | ||
<tr class="repr-element {{ section_class_name }} {{ collapsed_row_class }}"> | ||
<td class="mne-repr-section-toggle"></td> | ||
<td>Computed from</td> | ||
<td>{{ computed_from }}</td> | ||
</tr> | ||
<tr class="repr-element {{ section_class_name }} {{ collapsed_row_class }}"> | ||
<td class="mne-repr-section-toggle"></td> | ||
<td>Estimation method</td> | ||
<td>{{ inst.method }}</td> | ||
</tr> | ||
<!-- | ||
<tr class="repr-element {{ section_class_name }} {{ collapsed_row_class }}"> | ||
<td class="mne-repr-section-toggle"></td> | ||
<td>Dims</td> | ||
<td>{{ inst._dims | join(", ") }}</td> | ||
</tr> | ||
--> | ||
{% if "taper" in inst._dims %} | ||
<tr class="repr-element {{ section_class_name }} {{ collapsed_row_class }}"> | ||
<td class="mne-repr-section-toggle"></td> | ||
<td>Number of tapers</td> | ||
<td>{{ inst._mt_weights.size }}</td> | ||
</tr> | ||
{% endif %} | ||
{% if inst.freqs is defined %} | ||
<tr class="repr-element {{ section_class_name }} {{ collapsed_row_class }}"> | ||
<td class="mne-repr-section-toggle"></td> | ||
<td>Frequency range</td> | ||
<td>{{ '%.2f'|format(inst.freqs[0]) }} – {{ '%.2f'|format(inst.freqs[-1]) }} Hz</td> | ||
</tr> | ||
<tr class="repr-element {{ section_class_name }} {{ collapsed_row_class }}"> | ||
<td class="mne-repr-section-toggle"></td> | ||
<td>Number of frequency bins</td> | ||
<td>{{ inst.freqs|length }}</td> | ||
</tr> | ||
{%- for unit in units %} | ||
<tr class="repr-element {{ section_class_name }} {{ collapsed_row_class }}"> | ||
<td class="mne-repr-section-toggle"></td> | ||
{%- if loop.index == 1 %} | ||
<td rowspan={{ units | length }}>Units</td> | ||
{%- endif %} | ||
<td class="justify">{{ unit }}</td> | ||
</tr> | ||
{%- endfor %} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,11 @@ | ||
{%include '_js_and_css.html.jinja' %} | ||
|
||
{% set info = inst.info %} | ||
|
||
<table class="table mne-repr-table"> | ||
<tr> | ||
<th>Data type</th> | ||
<td>{{ spectrum._data_type }}</td> | ||
</tr> | ||
{%- for unit in units %} | ||
<tr> | ||
{%- if loop.index == 1 %} | ||
<th rowspan={{ units | length }}>Units</th> | ||
{%- endif %} | ||
<td class="justify">{{ unit }}</td> | ||
</tr> | ||
{%- endfor %} | ||
<tr> | ||
<th>Data source</th> | ||
<td>{{ inst_type }}</td> | ||
</tr> | ||
{%- if inst_type == "Epochs" %} | ||
<tr> | ||
<th>Number of epochs</th> | ||
<td>{{ spectrum.shape[0] }}</td> | ||
</tr> | ||
{% endif -%} | ||
<tr> | ||
<th>Dims</th> | ||
<td>{{ spectrum._dims | join(", ") }}</td> | ||
</tr> | ||
<tr> | ||
<th>Estimation method</th> | ||
<td>{{ spectrum.method }}</td> | ||
</tr> | ||
{% if "taper" in spectrum._dims %} | ||
<tr> | ||
<th>Number of tapers</th> | ||
<td>{{ spectrum._mt_weights.size }}</td> | ||
</tr> | ||
{% endif %} | ||
<tr> | ||
<th>Number of channels</th> | ||
<td>{{ spectrum.ch_names|length }}</td> | ||
</tr> | ||
<tr> | ||
<th>Number of frequency bins</th> | ||
<td>{{ spectrum.freqs|length }}</td> | ||
</tr> | ||
<tr> | ||
<th>Frequency range</th> | ||
<td>{{ '%.2f'|format(spectrum.freqs[0]) }} – {{ '%.2f'|format(spectrum.freqs[-1]) }} Hz</td> | ||
</tr> | ||
{%include '_general.html.jinja' %} | ||
{%include '_acquisition.html.jinja' %} | ||
{%include '_channels.html.jinja' %} | ||
{%include '_frequencies.html.jinja' %} | ||
{%include '_filters.html.jinja' %} | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters