Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
G
gracedb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
99
Issues
99
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lscsoft
gracedb
Commits
54e9c062
Commit
54e9c062
authored
May 31, 2019
by
Jonah Kanner
🤓
Committed by
GraceDB
Jun 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
far in hz
parent
05e210f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
15 deletions
+14
-15
gracedb/superevents/views.py
gracedb/superevents/views.py
+7
-8
gracedb/templates/superevents/public.html
gracedb/templates/superevents/public.html
+7
-7
No files found.
gracedb/superevents/views.py
View file @
54e9c062
...
...
@@ -198,7 +198,7 @@ class SupereventPublic(ListView):
return
context
class
SupereventPublic2
(
ListView
):
class
SupereventPublic2
(
DisplayFarMixin
,
ListView
):
model
=
Superevent
template_name
=
'superevents/public.html'
filter_permissions
=
[
'superevents.view_superevent'
]
...
...
@@ -240,16 +240,15 @@ class SupereventPublic2(ListView):
se
.
default_superevent_id
)
se
.
gcnurl
=
self
.
gcnurl_template
.
format
(
sd_id
=
se
.
default_superevent_id
[
1
:])
# Comment from Tanner: suggest to refactor ifar yrs so it shows as
# either 1 per X yrs or 1/X per 1 yr, depending on which one
# is most understandable (see lines 389-398 of events/views.py)
# However: is this right? Looks like we are presenting iFAR as FAR
# in the template. Maybe I'm not understanding it, though.
se
.
ifar_yrs
=
1.0
/
(
se
.
far
*
3600
*
24
*
365.0
)
se
.
t0_iso
=
gpstime
.
gps_to_utc
(
se
.
t_0
).
isoformat
(
' '
).
split
(
'.'
)[
0
]
se
.
t0_utc
=
se
.
t0_iso
.
split
()[
1
]
# Get display FARs for preferred_event
se
.
disp_far
=
self
.
get_display_far
(
obj
=
se
.
preferred_event
)[
0
]
#-- Get list of voevents
# Comment from Tanner: do as much work as you can in the database.
# Also, use VOEvent types from the model rather than hard-coding
...
...
gracedb/templates/superevents/public.html
View file @
54e9c062
...
...
@@ -44,22 +44,20 @@
{% endif %}
<th
scope=
"col"
data-tablesaw-sortable-col
data-tablesaw-priority=
"4"
>
Comments
</th>
<th
scope=
"col"
data-tablesaw-sortable-col
data-tablesaw-priority=
"
0"
>
GPS
</th>
<th
scope=
"col"
data-tablesaw-sortable-col
data-tablesaw-
priority=
"0"
>
False Alarm Rate (per year
)
</th>
<th
scope=
"col"
data-tablesaw-sortable-col
data-tablesaw-priority=
"
5"
>
GPS
</th>
<th
scope=
"col"
data-tablesaw-sortable-col
data-tablesaw-
sortable-numeric
data-tablesaw-priority=
"0"
>
FAR (Hz
)
</th>
<th
scope=
"col"
data-tablesaw-col
data-tablesaw-priority=
"0"
>
VOEvent
</th>
{% if not user_is_external %}
<th
scope=
"col"
data-tablesaw-col
data-tablesaw-priority=
"0"
>
PE
</th>
{% endif %}
{% endif %}
</tr>
</thead>
<tbody>
{% for event in object_list %}
<tr
{%
if
event.retract
%}
style=
'background-color:#EDD'
{%
endif
%}
>
<tr
{%
if
event.retract
%}
style=
'background-color:#EDD'
{%
endif
%}
>
<td
style=
'min-width:100px;'
><a
href=
/superevents/{{
event.superevent_id
}}
>
{{ event.default_superevent_id }}
</a></td>
...
...
@@ -86,7 +84,9 @@
<td>
{{ event.comments |safe}}
</td>
<td>
{{ event.t_0|floatformat:2 }}
</td>
<td>
1 per {{ event.ifar_yrs|floatformat:2 }} years
</td>
<!-- <td> 1 per {{ event.ifar_yrs|floatformat:2 }} years</td> -->
<td>
{{ event.disp_far|stringformat:".2e" }}
</td>
<td>
<a
href=
'/api/superevents/{{ event.default_superevent_id }}/voevents/'
>
VOEvent
</a></td>
{% if not user_is_external %}
<td>
{{ event.pe |safe}}
</td>
{% endif %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment