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 William Coughlin
GraceDB Server
Commits
e256c2bc
Commit
e256c2bc
authored
11 years ago
by
Branson Stephens
Browse files
Options
Downloads
Patches
Plain Diff
Made changes to streamline CBC event presentation according to Issue 1176.
parent
72d753e3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
gracedb/templatetags/timeutil.py
+16
-0
16 additions, 0 deletions
gracedb/templatetags/timeutil.py
static/css/style.css
+3
-0
3 additions, 0 deletions
static/css/style.css
templates/gracedb/event_detail_LM.html
+112
-106
112 additions, 106 deletions
templates/gracedb/event_detail_LM.html
with
131 additions
and
106 deletions
gracedb/templatetags/timeutil.py
+
16
−
0
View file @
e256c2bc
...
...
@@ -12,6 +12,7 @@ from utils import posixToGpsTime, gpsToUtc
import
pytz
import
time
import
datetime
import
logging
# DATETIME_SETTINGS is guaranteed to be set. GRACE_DATETIME_FORMAT is not.
FORMAT
=
getattr
(
settings
,
'
GRACE_DATETIME_FORMAT
'
,
settings
.
DATETIME_FORMAT
)
...
...
@@ -157,3 +158,18 @@ def timeSelections(t):
rv
[
'
utc
'
]
=
dateformat
.
format
(
dt
.
astimezone
(
pytz
.
utc
),
format
)
return
rv
# XXX Branson added this. God will punish me.
@register.filter
def
end_time
(
event
,
digits
=
4
):
try
:
#return float(event.end_time) + float(event.end_time_ns)/1.e9
# The approach above did not work. For some reason, the value loses precision
# in the django template, so that the final digits get truncated and padded
# with zeros. Why? The current gpstime is only 10 digits. So I'm going to have to
# make this into a string. Totally sick, I know.
decimal_part
=
float
(
event
.
end_time_ns
)
/
1.e9
decimal_part
=
round
(
decimal_part
,
digits
)
return
str
(
event
.
end_time
)
+
str
(
decimal_part
)[
1
:]
except
Exception
,
e
:
return
None
This diff is collapsed.
Click to expand it.
static/css/style.css
+
3
−
0
View file @
e256c2bc
...
...
@@ -12,6 +12,9 @@ table.event {border-bottom:1px solid gray;}
/* Branson added */
table
.event
{
width
:
100%
}
table
.analysis_specific_lm
th
{
padding
:
3px
;
border
:
none
;
text-align
:
center
;
vertical-align
:
bottom
;}
table
.analysis_specific_lm
{
border-bottom
:
1px
solid
gray
;}
table
.analysis_specific
{
width
:
100%
}
table
.gstlalcbc
{
border
:
0
;
border-spacing
:
0px
;
width
:
100%
;}
...
...
This diff is collapsed.
Click to expand it.
templates/gracedb/event_detail_LM.html
+
112
−
106
View file @
e256c2bc
{% extends "gracedb/event_detail.html" %}
{% load timeutil %}
{% load scientific %}
{# Analysis-specific attributes for an LM event#}
{% block analysis_specific %}
<h3>
Analysis-Specific Attributes
</h3>
<table
class=
"analysis_specific"
>
<tbody>
<tr>
<td>
<table
class=
"event"
>
<tbody>
<tr>
<th>
ifos
</th>
<td>
{{object.ifos}}
</td>
</tr>
<tr>
<th>
end_time
</th>
<td>
{{object.end_time}}
</td>
</tr>
<tr>
<th>
end_time_ns
</th>
<td>
{{object.end_time_ns}}
</td>
</tr>
</tbody></table>
</td>
<td>
<table
class=
"event"
>
<tbody>
<tr>
<th>
mass
</th>
<td>
{{object.mass|floatformat:"-4"}}
</td>
</tr>
<tr>
<th>
mchirp
</th>
<td>
{{object.mchirp|floatformat:"-4"}}
</td>
</tr>
<tr>
<th>
minimum_duration
</th>
<td>
{{object.minimum_duration|scientific}}
</td>
</tr>
</tbody></table>
</td>
<td>
<table
class=
"event"
>
<tbody>
<tr>
<th>
snr
</th>
<td>
{{object.snr|floatformat:"-4"}}
</td>
</tr>
<tr>
<th>
false_alarm_rate
</th>
<td>
{{object.false_alarm_rate|floatformat:"-4"}}
</td>
</tr>
<tr>
<th>
combined_far
</th>
<td>
{{object.combined_far|scientific}}
</td>
</tr>
</tbody></table>
</td>
<div
id=
"container"
style=
"display:table;width:100%"
>
<div
style=
"display:table-row;width:100%"
>
</tr>
</tbody>
</table>
<div
style=
"display:table-cell;float:left;width:35%;"
>
<h3>
Coinc Tables
</h3>
<!-- <table class="analysis_specific"> <tbody> -->
<!-- 5 rows here -->
<table
style=
"height:320px"
>
<!-- <tr> <th> ifos </th> <td> {{object.ifos}} </td> </tr> -->
<tr>
<th>
End Time
</th>
<td>
{{object|end_time:4}}
</td>
</tr>
<!--<tr> <th> end_time_ns </th> <td> {{object.end_time_ns}} </td> </tr> -->
<tr>
<th>
Total Mass
</th>
<td>
{{object.mass|floatformat:"-4"}}
</td>
</tr>
<tr>
<th>
Chirp Mass
</th>
<td>
{{object.mchirp|floatformat:"-4"}}
</td>
</tr>
<!--<tr> <th> minimum_duration </th> <td> {{object.minimum_duration|scientific}} </td> </tr>-->
<tr>
<th>
SNR
</th>
<td>
{{object.snr|floatformat:"-4"}}
</td>
</tr>
<tr>
<th>
False Alarm Probability
</th>
<td>
{{object.false_alarm_rate|scientific }}
</td>
</tr>
<!--<tr> <th> combined_far </th> <td> {{object.combined_far|scientific}} </td> </tr>-->
</table>
<!-- </tbody> </table> -->
</div>
{% if single_inspiral_events %}
<!-- Single Inspiral Data -->
<div
id=
"single_inspiral_tables"
<!-- 13 rows here. -->
<div
style=
"display:table-cell;float:right;width:65%"
>
<h3>
Single Inspiral Tables
</h3>
<!--<div id="single_inspiral_tables"> -->
<!-- <div id="single_inspiral_tables"
data-dojo-type="dijit/TitlePane"
data-dojo-props=
"title: 'Single Inspiral Tables', open: false"
>
data-dojo-props="title: 'Single Inspiral Tables', open: false"> -->
<!--<table class="analysis_specific_lm"> -->
<table>
<tr>
<th>
IFO
</th>
...
...
@@ -42,12 +44,12 @@
<th>
{{ e.ifo }}
</th>
{% endfor %}
</tr>
<tr>
<!--
<tr>
<th>Search</th>
{% for e in single_inspiral_events %}
<td>{{ e.search }}</td>
{% endfor %}
</tr>
</tr>
-->
<tr>
<th>
Channel
</th>
{% for e in single_inspiral_events %}
...
...
@@ -60,30 +62,30 @@
<td>
{{ e.end_time_full }}
</td>
{% endfor %}
</tr>
<tr>
<!--
<tr>
<th>Impulse Time</th>
{% for e in single_inspiral_events %}
<td>{{ e.impulse_time_full }}</td>
{% endfor %}
</tr>
</tr>
-->
<tr>
<th>
Template Duration
</th>
{% for e in single_inspiral_events %}
<td>
{{ e.template_duration }}
</td>
{% endfor %}
</tr>
<tr>
<!--
<tr>
<th>Event Duration</th>
{% for e in single_inspiral_events %}
<td>{{ e.event_duration }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>Amplitude</th>
{% for e in single_inspiral_events %}
<td>{{ e.amplitude }}</td>
{% endfor %}
</tr>
</tr>
-->
<tr>
<th>
Effective Distance
</th>
{% for e in single_inspiral_events %}
...
...
@@ -108,132 +110,132 @@
<td>
{{ e.mass2 }}
</td>
{% endfor %}
</tr>
<tr>
<!--
<tr>
<th>MChirp</th>
{% for e in single_inspiral_events %}
<td>{{ e.mchirp }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>MTotal</th>
{% for e in single_inspiral_events %}
<td>{{ e.mtotal }}</td>
{% endfor %}
</tr>
</tr>
-->
<tr>
<th>
η
</th>
{% for e in single_inspiral_events %}
<td>
{{ e.eta }}
</td>
{% endfor %}
</tr>
<tr>
<!--
<tr>
<th>κ</th>
{% for e in single_inspiral_events %}
<td>{{ e.kappa }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>χ</th>
{% for e in single_inspiral_events %}
<td>{{ e.chi }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>τ<sub>0</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.tau0 }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>τ<sub>2</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.tau2 }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>τ<sub>3</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.tau3 }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>τ<sub>4</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.tau4 }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>τ<sub>5</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.tau5 }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>τ<sub>Total</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.ttotal }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>Ψ<sub>0</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.psi0 }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>Ψ<sub>3</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.psi3 }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>α</th>
{% for e in single_inspiral_events %}
<td>{{ e.alpha }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>α<sub>1</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.alpha1 }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>α<sub>2</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.alpha2 }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>α<sub>3</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.alpha3 }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>α<sub>4</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.alpha4 }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>α<sub>5</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.alpha5 }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>α<sub>6</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.alpha6 }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>β</th>
{% for e in single_inspiral_events %}
<td>{{ e.beta }}</td>
{% endfor %}
</tr>
</tr>
-->
<tr>
<th>
F Final
</th>
{% for e in single_inspiral_events %}
...
...
@@ -258,104 +260,108 @@
<td>
{{ e.chisq_dof }}
</td>
{% endfor %}
</tr>
<tr>
<!--
<tr>
<th>Bank χ<sup>2</sup></th>
{% for e in single_inspiral_events %}
<td>{{ e.bank_chisq }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>Bank χ<sup>2</sup> DOF</th>
{% for e in single_inspiral_events %}
<td>{{ e.bank_chisq_dof }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>Cont χ<sup>2</sup></th>
{% for e in single_inspiral_events %}
<td>{{ e.cont_chisq }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>Cont χ<sup>2</sup> DOF</th>
{% for e in single_inspiral_events %}
<td>{{ e.cont_chisq_dof }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>Σ<sup>2</sup></th>
{% for e in single_inspiral_events %}
<td>{{ e.sigmasq }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>RSQ Veto Duration</th>
{% for e in single_inspiral_events %}
<td>{{ e.rsqveto_duration }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>Γ<sub>0</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.gamma0 }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>Γ<sub>1</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.gamma1 }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>Γ<sub>2</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.gamma2 }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>Γ<sub>3</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.gamma3 }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>Γ<sub>4</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.gamma4 }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>Γ<sub>5</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.gamma5 }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>Γ<sub>6</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.gamma6 }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>Γ<sub>7</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.gamma7 }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>Γ<sub>8</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.gamma8 }}</td>
{% endfor %}
</tr>
<tr>
</tr>
-->
<!--
<tr>
<th>Γ<sub>9</sub></th>
{% for e in single_inspiral_events %}
<td>{{ e.gamma9 }}</td>
{% endfor %}
</tr>
</tr>
-->
</table>
</div>
</div>
</div>
<!-- container -->
{% endif %}
{% endblock %}
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