Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GraceDB Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michael Coughlin
GraceDB Server
Commits
54e9c062
Commit
54e9c062
authored
5 years ago
by
Jonah Kanner
Committed by
GraceDB
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
far in hz
parent
05e210f8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gracedb/superevents/views.py
+7
-8
7 additions, 8 deletions
gracedb/superevents/views.py
gracedb/templates/superevents/public.html
+7
-7
7 additions, 7 deletions
gracedb/templates/superevents/public.html
with
14 additions
and
15 deletions
gracedb/superevents/views.py
+
7
−
8
View file @
54e9c062
...
@@ -198,7 +198,7 @@ class SupereventPublic(ListView):
...
@@ -198,7 +198,7 @@ class SupereventPublic(ListView):
return
context
return
context
class
SupereventPublic2
(
ListView
):
class
SupereventPublic2
(
DisplayFarMixin
,
ListView
):
model
=
Superevent
model
=
Superevent
template_name
=
'
superevents/public.html
'
template_name
=
'
superevents/public.html
'
filter_permissions
=
[
'
superevents.view_superevent
'
]
filter_permissions
=
[
'
superevents.view_superevent
'
]
...
@@ -240,16 +240,15 @@ class SupereventPublic2(ListView):
...
@@ -240,16 +240,15 @@ class SupereventPublic2(ListView):
se
.
default_superevent_id
)
se
.
default_superevent_id
)
se
.
gcnurl
=
self
.
gcnurl_template
.
format
(
sd_id
=
se
.
gcnurl
=
self
.
gcnurl_template
.
format
(
sd_id
=
se
.
default_superevent_id
[
1
:])
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_iso
=
gpstime
.
gps_to_utc
(
se
.
t_0
).
isoformat
(
'
'
).
split
(
'
.
'
)[
0
]
se
.
t0_utc
=
se
.
t0_iso
.
split
()[
1
]
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
#-- Get list of voevents
# Comment from Tanner: do as much work as you can in the database.
# Comment from Tanner: do as much work as you can in the database.
# Also, use VOEvent types from the model rather than hard-coding
# Also, use VOEvent types from the model rather than hard-coding
...
...
This diff is collapsed.
Click to expand it.
gracedb/templates/superevents/public.html
+
7
−
7
View file @
54e9c062
...
@@ -44,22 +44,20 @@
...
@@ -44,22 +44,20 @@
{% endif %}
{% endif %}
<th
scope=
"col"
data-tablesaw-sortable-col
data-tablesaw-priority=
"4"
>
Comments
</th>
<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=
"
5
"
>
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-
sortable-numeric
data-tablesaw-priority=
"0"
>
FAR (Hz
)
</th>
<th
scope=
"col"
data-tablesaw-col
data-tablesaw-priority=
"0"
>
VOEvent
</th>
<th
scope=
"col"
data-tablesaw-col
data-tablesaw-priority=
"0"
>
VOEvent
</th>
{% if not user_is_external %}
{% if not user_is_external %}
<th
scope=
"col"
data-tablesaw-col
data-tablesaw-priority=
"0"
>
PE
</th>
<th
scope=
"col"
data-tablesaw-col
data-tablesaw-priority=
"0"
>
PE
</th>
{% endif %}
{% endif %}
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
{% for event in object_list %}
{% 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>
<td
style=
'min-width:100px;'
><a
href=
/superevents/{{
event.superevent_id
}}
>
{{ event.default_superevent_id }}
</a></td>
...
@@ -86,7 +84,9 @@
...
@@ -86,7 +84,9 @@
<td>
{{ event.comments |safe}}
</td>
<td>
{{ event.comments |safe}}
</td>
<td>
{{ event.t_0|floatformat:2 }}
</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>
<td>
<a
href=
'/api/superevents/{{ event.default_superevent_id }}/voevents/'
>
VOEvent
</a></td>
{% if not user_is_external %}
<td>
{{ event.pe |safe}}
</td>
{% endif %}
{% if not user_is_external %}
<td>
{{ event.pe |safe}}
</td>
{% endif %}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment