Commit 336c3720 authored by Tanner Prestegard's avatar Tanner Prestegard Committed by GraceDB
Browse files

Renaming LIB and gstlal-spiir pipelines

Renaming LIB -> oLIB and gstlal-spiir -> spiir, at the request of
the pipelines.
parent b538795d
......@@ -139,7 +139,7 @@ BLESSED_TAGS = [
# Lists of pipelines used for selecting templates to serve
COINC_PIPELINES = [
'gstlal',
'gstlal-spiir',
'spiir',
'MBTAOnline',
'pycbc',
]
......@@ -177,7 +177,7 @@ REPORT_INFO_URL_PREFIX = "/report_info/"
REPORT_IFAR_IMAGE_DIR = GRACEDB_PATHS["latency"]
# Stuff for the new rates plot
BINNED_COUNT_PIPELINES = ['gstlal', 'MBTAOnline', 'CWB', 'LIB', 'gstlal-spiir']
BINNED_COUNT_PIPELINES = ['gstlal', 'MBTAOnline', 'CWB', 'oLIB', 'spiir']
BINNED_COUNT_FILE = join(GRACEDB_PATHS["data"], "binned_counts.json")
# Defaults for RSS feed
......
......@@ -91,7 +91,7 @@ statement here that creates a new event object instance according to the
pipeline. We'll need to add our new one::
# Create Event
if pipeline.name in ['gstlal', 'gstlal-spiir', 'MBTAOnline', 'pycbc',]:
if pipeline.name in ['gstlal', 'spiir', 'MBTAOnline', 'pycbc',]:
event = CoincInspiralEvent()
elif pipeline.name in ['Fermi', 'Swift', 'SNEWS']:
event = GrbEvent()
......@@ -99,7 +99,7 @@ pipeline. We'll need to add our new one::
event = MultiBurstEvent()
elif pipeline.name in ['HardwareInjection',]:
event = SimInspiralEvent()
elif pipeline.name in ['LIB',]:
elif pipeline.name in ['oLIB',]:
event = LalInferenceBurstEvent()
### BEHOLD, a new case:
elif pipeline.name in ['newpipeline',]:
......@@ -171,8 +171,8 @@ we'll need to add something to the control structure that chooses the template::
templates.insert(0, 'gracedb/event_detail_CWB.html')
elif event.pipeline.name in ['HardwareInjection',]:
templates.insert(0, 'gracedb/event_detail_injection.html')
elif event.pipeline.name in ['LIB',]:
templates.insert(0, 'gracedb/event_detail_LIB.html')
elif event.pipeline.name in ['oLIB',]:
templates.insert(0, 'gracedb/event_detail_oLIB.html')
elif event.pipeline.name in ['newpipeline',]:
templates.insert(0, 'gracedb/event_detail_newpipeline.html')
......
......@@ -11,9 +11,9 @@ the pipeline object itself is the easy part. The hard part is figuring out
what kind of data file the group will be uploading, and how to ingest the values.
The directions below will focus on the easiest possible case--in which the
new pipeline's data files have the same format and information as those
of an existing pipeline. (For example, the ``gstlal-spiir`` group uploads
of an existing pipeline. (For example, the `spiir`` group uploads
the same type of data file as the ``gstlal`` group, and this made adding the
``gstlal-spiir`` pipeline relatively easy.)
``spiir`` pipeline relatively easy.)
Adding a new ``Search`` is simpler, but the steps relating to LVAlert are similar.
.. NOTE::
......
......@@ -10,7 +10,7 @@ The different types of events in GraceDB are distinguished by the following para
- ``Group``: the working group responsible for finding the candidate
- values: ``CBC``, ``Burst``, ``External``, ``Test``
- ``Pipeline``: the data analysis software tool used make the detection
- values: ``MBTAOnline``, ``CWB``, ``gstlal``, ``gstlal-spiir``, ``HardwareInjection``, ``Fermi``, ``Swift``, ``SNEWS``, ``LIB``
- values: ``MBTAOnline``, ``CWB``, ``gstlal``, ``spiir``, ``HardwareInjection``, ``Fermi``, ``Swift``, ``SNEWS``, ``oLIB``
- ``Search``: the search activity which led to the detection
- values: ``AllSky``, ``AllSkyLong``, ``LowMass``, ``HighMass``, ``GRB``, ``Supernova``, ``MDC``
......
# -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2018-09-17 19:46
from __future__ import unicode_literals
from django.db import migrations
PIPELINES = [
{
'old_name': 'LIB',
'new_name': 'oLIB',
},
{
'old_name': 'gstlal-spiir',
'new_name': 'spiir',
},
]
def rename_pipelines(apps, schema_editor):
Pipeline = apps.get_model('events', 'Pipeline')
# Rename pipelines
for p in PIPELINES:
pipeline = Pipeline.objects.get(name=p['old_name'])
pipeline.name = p['new_name']
pipeline.save(update_fields=['name'])
def unrename_pipelines(apps, schema_editor):
Pipeline = apps.get_model('events', 'Pipeline')
# Rename pipelines
for p in PIPELINES:
pipeline = Pipeline.objects.get(name=p['new_name'])
pipeline.name = p['old_name']
pipeline.save(update_fields=['name'])
class Migration(migrations.Migration):
dependencies = [
('events', '0016_delete_old_tag_event_logs_table'),
]
operations = [
migrations.RunPython(rename_pipelines, unrename_pipelines),
]
......@@ -70,7 +70,7 @@ def handle_uploaded_data(event, datafilename,
pipeline = event.pipeline.name
if pipeline in [ 'gstlal', 'gstlal-spiir', 'pycbc', ] or (pipeline=='MBTAOnline' and '.xml' in datafilename):
if pipeline in [ 'gstlal', 'spiir', 'pycbc', ] or (pipeline=='MBTAOnline' and '.xml' in datafilename):
log_comment = "Log File Created"
# Wildly speculative wrt HM
......@@ -399,7 +399,7 @@ def handle_uploaded_data(event, datafilename,
issuer=event.submitter,
comment=error)
log.save()
elif pipeline == 'LIB':
elif pipeline == 'oLIB':
# lambda function for converting to a type if not None
typecast = lambda t, v: t(v) if v is not None else v
n_int = lambda v: typecast(int, v)
......
......@@ -52,7 +52,7 @@ def _createEventFromForm(request, form):
else:
search = None
# Create Event
if pipeline.name in ['gstlal', 'gstlal-spiir', 'MBTAOnline', 'pycbc',]:
if pipeline.name in ['gstlal', 'spiir', 'MBTAOnline', 'pycbc',]:
event = CoincInspiralEvent()
elif pipeline.name in ['Fermi', 'Swift', 'SNEWS']:
event = GrbEvent()
......@@ -60,7 +60,7 @@ def _createEventFromForm(request, form):
event = MultiBurstEvent()
elif pipeline.name in ['HardwareInjection',]:
event = SimInspiralEvent()
elif pipeline.name in ['LIB',]:
elif pipeline.name in ['oLIB',]:
event = LalInferenceBurstEvent()
else:
event = Event()
......
......@@ -462,8 +462,8 @@ def view(request, event):
templates.insert(0, 'gracedb/event_detail_CWB.html')
elif event.pipeline.name in ['HardwareInjection',]:
templates.insert(0, 'gracedb/event_detail_injection.html')
elif event.pipeline.name in ['LIB',]:
templates.insert(0, 'gracedb/event_detail_LIB.html')
elif event.pipeline.name in ['oLIB',]:
templates.insert(0, 'gracedb/event_detail_oLIB.html')
return render(request, templates, context=context)
......
......@@ -12,7 +12,7 @@
<li><a href="latest/burst/">Burst</a></li>
<ul>
<li><a href="latest/burst/cwb">CWB</a></li>
<li><a href="latest/burst/lib">LIB</a></li>
<li><a href="latest/burst/olib">oLIB</a></li>
</ul>
</ul>
......@@ -20,7 +20,7 @@
<li><a href="latest/cbc/">CBC</a></li>
<ul>
<li><a href="latest/cbc/gstlal">gstlal</a></li>
<li><a href="latest/cbc/gstlal-spiir">gstlal-spiir</a></li>
<li><a href="latest/cbc/spiir">spiir</a></li>
<!-- <li><a href="latest/cbc/grb">GRB</a></li> -->
<li><a href="latest/cbc/mbtaonline">MBTAOnline</a></li>
</ul>
......
......@@ -157,14 +157,14 @@ x.domain(d3.extent(data, function(d) { return d.created; }));
// I suspect there is a better and less annoying way of doing all this.
// But I don't really know what it is. We specify the ordering of the
// pipelines and the color for each pipeline that may be present.
var PIPELINE_ORDER = [ 'gstlal', 'MBTAOnline', 'CWB', 'LIB', 'Fermi', 'Swift', 'SNEWS', 'HardwareInjection'];
var PIPELINE_ORDER = [ 'gstlal', 'MBTAOnline', 'CWB', 'oLIB', 'Fermi', 'Swift', 'SNEWS', 'HardwareInjection'];
// These are the first 8 colors of category 10
var COLOR_HASH = {};
COLOR_HASH['gstlal'] = '#1f77b4';
COLOR_HASH['MBTAOnline'] = '#ff7f0e';
COLOR_HASH['CWB'] = '#2ca02c';
COLOR_HASH['LIB'] = '#d62728';
COLOR_HASH['oLIB'] = '#d62728';
COLOR_HASH['Fermi'] = '#9467bd';
COLOR_HASH['Swift'] = '#8c564b';
COLOR_HASH['SNEWS'] = '#e377c2';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment