Skip to content

Commit

Permalink
Merge pull request #6 from sot/package-and-perigee
Browse files Browse the repository at this point in the history
Modernize low Kalman events processing and output
  • Loading branch information
taldcroft authored Sep 1, 2022
2 parents 6991f83 + fabd71a commit fa59f2a
Show file tree
Hide file tree
Showing 15 changed files with 1,421 additions and 217 deletions.
1 change: 1 addition & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ref-names: $Format:%D$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git_archival.txt export-subst
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
repos:
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
language_version: python3.8

- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort (python)
56 changes: 0 additions & 56 deletions index_template.html

This file was deleted.

142 changes: 0 additions & 142 deletions kalman_watch.py

This file was deleted.

7 changes: 7 additions & 0 deletions kalman_watch/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Ska_helpers is a collection of utilities for the Ska3 runtime environment.
"""
from ska_helpers.version import get_version

__version__ = get_version(__package__)
54 changes: 54 additions & 0 deletions kalman_watch/index_kalman_perigee_detail.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<!doctype html>
<html lang=en>

<head>
<meta charset=utf-8>
<title>Perigee {{dirname}}</title>
<style type="text/css">
table {
border-width: 1px;
border-spacing: 0px;
border-style: outset;
border-color: gray;
border-collapse: separate;
}

table th,
td {
border-width: 1px;
padding: 1px 5px 1px 5px;
border-style: solid;
border-color: gray;
}
</style>
</head>

<body>
{% if evt_perigee_prev_dirname %} <a href="../../{{evt_perigee_prev_dirname}}/index.html">Previous</a>{%
endif %}
<a href="../../index.html">Index</a>
{% if evt_perigee_next_dirname %} <a href="../../{{evt_perigee_next_dirname}}/index.html">Next</a>{% endif %}
<h1>Perigee Kalman plot {{date_perigee}} ({{dirname}})</h1>
{{kalman_plot_html}}
<p></p>
{% if has_low_kalmans %}
<h2> Low Kalman intervals </h2>
{{low_kalmans_html}}
{% endif %}
<p></p>
<table>
<tr>
<th>Obsid</th>
{% for obsid in obsids %}
</tr>
<tr>
<td><a
href="https://web-kadi.cfa.harvard.edu/mica/?obsid_or_date={{obsid}}"
target="_blank" rel="noopener noreferrer">
{{obsid}} </a> </td>
</tr>
{% endfor %}
</table>
</body>

</html>
70 changes: 70 additions & 0 deletions kalman_watch/index_kalman_perigee_list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<!doctype html>
<html lang=en>

<head>
<meta charset=utf-8>
<title>Perigee {{date_perigee}}</title>
<style type="text/css">
table {
border-width: 1px;
border-spacing: 0px;
border-style: outset;
border-color: gray;
border-collapse: separate;
background-color: white;
}

table th,
td {
border-width: 1px;
padding: 1px 5px 1px 5px;
border-style: solid;
border-color: gray;
background-color: white;
}
</style>
</head>

<body>
{% if prev %} <a href="{{prev}}/index.html">Previous</a>{% endif %}
{% if index %} <a href="{{index}}/index.html">Index</a>{% endif %}
{% if next %} <a href="{{next}}/index.html">Next</a>{% endif %}
<h1>Perigee Kalman index page: {{description}}</h1>
<table>
<tr>
<th>Perigee ID</th>
<th>Date</th>
<th>N&le;3 for &gt;120 s</th>
<th>N&le;2 for &gt;20 s</th>
<th>N&le;1 for &gt;10 s</th>
<th>N&le;3</th>
<th>N&le;2</th>
<th>N&le;1</th>
</tr>
{% for row in kalman_stats %}
<tr>
<td><a href="{{row.dirname}}/index.html">{{row.dirname}}</a> </td>
<td>{{row.perigee}}</td>
<td>{{row.n3_ints}}</td>
<td>{{row.n2_ints}}</td>
<td>{{row.n1_ints}}</td>
<td>{{row.n3_cnt}}</td>
<td>{{row.n2_cnt}}</td>
<td>{{row.n1_cnt}}</td>
</tr>
{% endfor %}
</table>

{% if years %}
<h2>Perigee plots by year</h2>
<table>
<tr><th>Year</th></tr>
{% for year in years %}
<tr><td><a href="{{year}}/index.html">{{year}}</a></td></tr>
{% endfor %}
</table>
{% endif %}

</body>

</html>
Loading

0 comments on commit fa59f2a

Please sign in to comment.