Range and Duty Cycle

Displays inspiral range and duty cycle of S5. All time plots start on 8:00AM PST. Weekly plots typically start on a Tuesday morning, 8:00AM PST.

Setup

Needs["Graphics`Graphics`"]
Needs["Graphics`Legend`"]
Needs["Graphics`MultipleListPlot`"]
Needs["Statistics`DataManipulation`"]
Needs["LIGO`nds`"]

Off[General::spell];
Off[General::spell1];

NDSClose[]

$TextStyle = {FontFamily -> "Helvetica", 
          FontSize -> 13};

\(\(plotopt = 
        PlotStyle -> {{Thickness\ [0.007], \ 
              RGBColor\ [1, 0, 0]}, 
			\ \ \ \ {Thickness\ [0.007], \ 
              RGBColor\ [0, 0, 1]}, 
			\ \ \ \ {Thickness\ [0.007], \ 
              RGBColor\ [0.1, 0.7, 0.2]}, 
			\ \ \ \ {Thickness\ [
                0.007], \ RGBColor\ [0.5, 0.5, 0.2]}};\)\)

\(\(textoptsmall = {TextStyle -> {FontFamily -> "Helvetica", FontSize -> 11}};\)\)

Parameters

IFO: H1 - Hanford 4K, H2 - Hanford 2K and L1 - Livingston 4K
rchnIFO: channel name of inspiral range for IFO (minute trend)
schnIFO: channel name of lock state for IFO (minute trend); 
	0 - nothing locked, 1 - mode cleaner lockec, 2 - ifo locked, 3 - ifo in power up, 4 - ifo in science mode
S5startLHO: used S5 start time for Hanford (for convenience we start on a Tuesday, 8:00am PST)
S5startLHOGPS: GPS time at start of S5 at Hanford
S5startLLO: used S5 start time for Livingston
now: current date (rounded down to closest 8:00am PST)
untilnowLHO: seconds since start of S5 at Hanford
untilnowLLO: seconds since start of S5 at Livingston
S5startShift: shift in seconds between Livingston and Hanford start times
S5IFOCalV1: start time of official version 1 calibration for IFO
S5IFOCalV1diff: time in seconds of official version 1 calibration from start of S5 run
S5IFOCalV1shift: calibration correction for inspiral range prior to version 1 calibration

rchnH1 = "H1:DMT-SNSM_EFFECTIVE_RANGE_MPC";
rchnH2 = "H2:DMT-SNSM_EFFECTIVE_RANGE_MPC";
rchnL1 = "L1:DMT-SNSM_EFFECTIVE_RANGE_MPC";

schnH1 = "H1:DMT-LCKL_STATE_VECTOR";
schnH2 = "H2:DMT-LCKL_STATE_VECTOR";
schnL1 = "L1:DMT-LCKL_STATE_VECTOR";

S5startLHO = {2005, 11, 4, 16, 0, 0};

      
S5startLHO = {2005, 11, 8, 16, 0, 0};
S5startLHOGPS = 815500813  -  13;
S5startLLO = {2005, 11, 14, 18, 0, 0};

      
now = 
      ToDate[24*3600*
            IntegerPart[(FromDate[Date[0]] - 
                    FromDate[S5startLHO])/(24. *3600)] + 
          FromDate[S5startLHO]]

      
untilnowLHO = 
        FromDate[now] - FromDate[S5startLHO];
untilnowLLO = 
        FromDate[now] - FromDate[S5startLLO];
S5startShift = 
        FromDate[S5startLLO] - FromDate[S5startLHO];

S5H1CalV1 = {2005, 11, 22, 18, 0, 0};
S5H1CalV1diff = 
        FromDate[S5H1CalV1] - 
          FromDate[S5startLHO];
S5H1CalV1shift = 0.95;
S5H2CalV1 = {2005, 12, 6, 17, 0, 0};
S5H2CalV1diff = 
        FromDate[S5H2CalV1] - 
          FromDate[S5startLHO];
S5H2CalV1shift = 1.12;
S5L1CalV1 = {2005, 12, 6, 17, 0, 0};
S5L1CalV1diff = 
        FromDate[S5L1CalV1] - FromDate[S5startLLO];
S5L1CalV1shift = 1.025;

Functions

Day

Function: dayname
Description: Return the name of a day
Arguments:
	t: time in seconds from start date
	start: start date in list format {yy, MM, dd, hh, mm, ss}
Return: Name of day in format "Month Day", Example: "Jan 13"

\(dayname[t_?NumberQ, start_List:  S5startLHO] := 
      Block[{d, 
          mn}, 
mn = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; 
d = 
          ToDate[FromDate[start] + 
              t]; 
mn[[
            d[[2]]]] <> " " <> ToString[
            d[[3]]]
]\)

Bining

Function: Binning
Description: Bin an array of data points or an array of (t, Y) data
Arguments:
	l: Vector of numbers or a Nx2 matrix of (t, Y) data
	n: binning factor
Return: binned array with averaged Y values and optional the first of t value of the averaged Y values

bin[l_List /; VectorQ[l, NumberQ], 
        n_ /; IntegerQ[n]] := Plus @@ # & /@ Partition[l, n]/
        N[n]
bin[l_List /; MatrixQ[l, NumberQ], n_ /; IntegerQ[n]] := 
      Transpose[{First /@ 
            Partition[Transpose[
                  l][[1]], n], 
          bin[Transpose[l][[2]], 
            n]}]

Calibration Correction

Function: calShiftIFO
Description: Compute the calibration correction at a specified time 
Arguments:
	t: time
Return: calibration correction at time t

Function: calCorrIFO
Description: Compute the calibrated range 
Arguments:
	l: Nx2 matrix of (t, Y) data
Return: calibration corrected Nx2 array of (t, Y) data

calShiftH1[t_] := 
      If[t < S5H1CalV1diff, S5H1CalV1shift, 1. ]
calShiftH2[t_] := 
      If[t < S5H2CalV1diff, S5H2CalV1shift, 1. ]
calShiftL1[t_] := 
      If[t < S5L1CalV1diff, S5L1CalV1shift, 1. ]

calCorrH1[
        l_List] := {#[[1]], 
            calShiftH1[#[[1]]] #[[2]]} & /@ 
        l
calCorrH2[
        l_List] := {#[[1]], 
            calShiftH2[#[[1]]] #[[2]]} & /@ 
        l
calCorrL1[
        l_List] := {#[[1]], 
            calShiftL1[#[[1]]] #[[2]]} & /@ l

Duty Cycle

Function: dutyCycle
Description: Compute the duty cycle in science mode
Arguments:
	start: start time in seconds
	stop: end time in seconds
	delta: time interval width
	state: Nx2 array of (t, Y) data with Y being the lock state
	shift: time offset of data relative to start 
Return: array of duty cycle in state 4 (>3.9). 
The duty cycle is calculated in the bins (start, start+delta), ... (stop-delta,stop)

dutyCycleOld[start_, stop_, delta_, state_, 
        shift_:  0] := 
Block[{t, 
          ret = {}}, 
For[t = start, t < stop, 
          t += delta, 
AppendTo[
            ret, {t/delta, 
              Count[state,  
                  x_ /; x[[1]] + 
                          shift ≥ t && 
                      x[[1]] + shift < 
                        t + delta && 
                      x[[2]] > 
                        3.9]/(delta/
                    60. )}]
]; 
ret
]

dCycle = 
Compile[{{start,  _Real}, {stop, _Real}, {delta,  _Real}, {state,  _Real, 
              2}, {shift, _Real}}, 
Block[{t, 
              ret = {{0. , 0. }}, n, i}, 
For[t = start, 
              t < stop, 
              t += delta, 
For[i = 1; n = 0, 
                i ≤ Length[state], ++i, 
If[
                  state[[i, 1]] + 
                        shift ≥ t && 
                    state[[i, 1]] + 
                        shift < t + delta && 
                    state[[i, 2]] > 
                      3.9, ++n]
]; 
AppendTo[
                ret, {t/delta, 
                  n/(delta/
                        60)}]
]; 
Drop[
              ret, 1]
]
];

dutyCycle[start_, stop_, delta_, state_, shift_:  0] := 
      dCycle[start, stop, delta, state, shift]

Select by days

Function: SelectByTime
Description: Select data based on a start and stop time 
Arguments:
	start: start time in seconds
	stop: end time in seconds
	state: Nx2 array of (t, Y) data with Y being the lock state
	shift: time offset of data relative to start
Return: Mx2 array of (t+shift, Y) data with start ≤ t < stop

SelectByTimeOld[start_, stop_, l_List, 
        shift_:  0] := 
Block[{ll = l, 
          i}, 
For[i = 1, i ≤ Length[l], i += 1, 
          ll[[i, 1]] = 
            ll[[i, 1]] + 
              shift]; 
Select[
          ll, (#[[1]] ≥ 
                  start && #[[1]] < 
                  stop) &]
]

SByTime = 
Compile[{{start, _Real}, {stop, _Real}, {l, _Real, 2}, {shift, _Real}}, 
Block[{ll = l, 
              i}, 
For[i = 1, i ≤ Length[l], 
              i += 1, ll[[i, 1]] = 
                ll[[i, 1]] + 
                  shift]; 
Select[
              ll, (#[[1]] ≥ start && #[[1]] < 
                      stop) &]
]
];

SelectByTime[start_, stop_, l_List, 
        shift_:  0] := 
SByTime[start, stop, l, 
        shift]

Partition by days

Function: PartitionByDays
Description: Partition data into segements covering a day each 
Arguments:
	start: start time in seconds
	stop: end time in seconds
	delta: time interval width in seconds (usually a day)
	l: Nx2 array of (t, Y) data with Y being the lock state
	shift: time offset of data relative to start
Return: List of Mx2 arrays of form (t+shift, Y) with start+i delta ≤ t < start+(i+1) delta and i going from 0 to stop/delta-1.

PartitionByDaysOld[start_, stop_, delta_, l_, 
        shift_:  0] := 
Block[{ll = l, t, i, 
          ret = {}}, 
For[i = 1, i ≤ Length[l], 
          i += 1, ll[[i, 1]] = 
            ll[[i, 1]] + 
              shift]; 
For[t = start, t < stop, 
          t += delta, 
AppendTo[ret, 
              Select[ll, (#[[1]] ≥ t && #[[1]] < 
                        t + delta) &]];
]; 
ret
]

PByDaysHelper = 
Compile[{{start, _Real}, {stop, _Real}, {l, _Real, 2}}, 
Select[
            l, (#[[1]] ≥ 
                    start && #[[1]] < 
                    stop) &]
];

PartitionByDays[start_, stop_, delta_, l_, 
        shift_:  0] := 
Block[{ll = l, t, i, 
          ret = {}}, 
For[i = 1, i ≤ Length[l], 
          i += 1, ll[[i, 1]] = 
            ll[[i, 1]] + 
              shift]; 
Off[
          CompiledFunction::cfnlts]; 
For[t = start, 
          t < stop, 
          t += delta, 
AppendTo[ret, 
              PByDaysHelper[t, t + delta, 
                ll]];
]; 
On[
          CompiledFunction::cfnlts]; 
ret
]

TripleCoincidence

Function: TripleCoincidence
Description: Returns a list of none, single, double and triple coincidences.
Arguments:
	l1: Nx2 array of (t, Y) data of first ifo with Y being the lock state
	l2: Nx2 array of (t, Y) data of second ifo with Y being the lock state
	l3: Nx2 array of (t, Y) data of third ifo with Y being the lock state
Return: Vector of 4 numbers describing the fraction of coincidences for nothing locked, only 1 ifo locked, exactly 2 ifos locked and all 3 ifos locked, respectively.

TripleCoincidence[l1_, l2_, 
        l3_] := 
Block[{l, i, 
          indx, 
start = 
            l1[[1, 1]], 
          stop = l1[[-1, 1]], 
          delta = l1[[2, 1]] - 
              l1[[1, 
                1]]}, 
l = 
          Table[0, {i, start, stop, delta}]; 
For[i = 1, 
          i ≤ Length[l1], 
          i += 1, 
indx = 
            Quotient[l1[[i, 1]] - start, 
                delta] + 
              1; 
If[(indx ≥ 
                  1) && (indx ≤ 
                  Length[l]) && (l1[[i, 
                    2]] > 
                  3.9), 
l[[
                indx]] += 
              1];
]; 
For[i = 1, 
          i ≤ Length[l2], 
          i += 1, 
indx = 
            Quotient[l2[[i, 1]] - start, 
                delta] + 
              1; 
If[(indx ≥ 
                  1) && (indx ≤ 
                  Length[l]) && (l2[[i, 
                    2]] > 
                  3.9), 
l[[
                indx]] += 
              1];
]; 
For[i = 1, 
          i ≤ Length[l3], 
          i += 1, 
indx = 
            Quotient[l3[[i, 1]] - start, 
                delta] + 
              1; 
If[(indx ≥ 
                  1) && (indx ≤ 
                  Length[l]) && (l3[[i, 
                    2]] > 
                  3.9), 
l[[
                indx]] += 
              1];
]; 
{Count[l, 
              x_ /; x === 0], Count[l, x_ /; x === 1], 
            Count[l, x_ /; x === 2], Count[l, x_ /; x === 3]}/
          N[Length[l]]
]

HLCoincidence

Function: HLCoincidence
Description: Returns a list of coincidences between LLO and any LHO detector.
Arguments:
	l1: Nx2 array of (t, Y) data of first ifo with Y being the lock state; H1
	l2: Nx2 array of (t, Y) data of second ifo with Y being the lock state; H2
	l3: Nx2 array of (t, Y) data of third ifo with Y being the lock state; L1
Return: Fraction of HL coincidence in the provided data stretch

HLCoincidence[l1_, l2_, 
        l3_] := 
Block[{l, i, 
          indx, 
start = 
            l1[[1, 1]], 
          stop = l1[[-1, 1]], 
          delta = l1[[2, 1]] - 
              l1[[1, 
                1]]}, 
l = 
          Table[0, {i, start, stop, delta}]; 
For[i = 1, 
          i ≤ Length[l1], 
          i += 1, 
indx = 
            Quotient[l1[[i, 1]] - start, 
                delta] + 
              1; 
If[(indx ≥ 
                  1) && (indx ≤ 
                  Length[l]) && (l1[[i, 
                    2]] > 
                  3.9), 
l[[
                indx]] = 
              1];
]; 
For[i = 1, 
          i ≤ Length[l2], 
          i += 1, 
indx = 
            Quotient[l2[[i, 1]] - start, 
                delta] + 
              1; 
If[(indx ≥ 
                  1) && (indx ≤ 
                  Length[l]) && (l2[[i, 
                    2]] > 
                  3.9), 
l[[
                indx]] = 
              1];
]; 
For[i = 1, 
          i ≤ Length[l3], 
          i += 1, 
indx = 
            Quotient[l3[[i, 1]] - start, 
                delta] + 
              1; 
If[(indx ≥ 
                  1) && (indx ≤ 
                  Length[l]) && (l3[[i, 
                    2]] > 
                  3.9), 
l[[
                indx]] += 
              1];
]; 
Count[l, 
            x_ /; x === 2]/N[Length[l]]
]

Triple Coincidence Segments

Function: TripleCoincidenceSegments
Description: Returns a list of triple coincidence lock segments.
Arguments:
	l1: Nx2 array of (t, Y) data of first ifo with Y being the lock state
	l2: Nx2 array of (t, Y) data of second ifo with Y being the lock state
	l3: Nx2 array of (t, Y) data of third ifo with Y being the lock state
	shift2: start time offset of second ifo data relative to start of first
	shift3: start time offset of third ifo data relative to start of first
Return: Vector of (tstart, tstop) describing a triple coincidence lock segment each.

TripleCoincidenceSegments[l1_, l2_, l3_, shift2_:  0, 
        shift3_:  0] := 
Block[{l, i, indx, state, 
          ret, 
start = 
            l1[[1, 1]], 
          stop = l1[[-1, 1]], 
          delta = l1[[2, 1]] - 
              l1[[1, 
                1]]}, 
l = 
          Table[0, {i, start, stop, delta}]; 
For[i = 1, 
          i ≤ Length[l1], 
          i += 1, 
indx = 
            Quotient[l1[[i, 1]] - start, 
                delta] + 
              1; 
If[(indx ≥ 
                  1) && (indx ≤ 
                  Length[l]) && (l1[[i, 
                    2]] > 
                  3.9), 
l[[
                indx]] += 
              1];
]; 
For[i = 1, 
          i ≤ Length[l2], 
          i += 1, 
indx = 
            Quotient[
                l2[[i, 1]] - start + 
                  shift2, delta] + 
              1; 
If[(indx ≥ 
                  1) && (indx ≤ 
                  Length[l]) && (l2[[i, 
                    2]] > 
                  3.9), 
l[[
                indx]] += 
              1];
]; 
For[i = 1, 
          i ≤ Length[l3], 
          i += 1, 
indx = 
            Quotient[
                l3[[i, 1]] - start + 
                  shift3, delta] + 
              1; 
If[(indx ≥ 
                  1) && (indx ≤ 
                  Length[l]) && (l3[[i, 
                    2]] > 
                  3.9), 
l[[
                indx]] += 
              1];
]; 
state = 
          0; 
ret = {}; 
For[i = 1, 
          i ≤ Length[l], 
          i += 1, 
Which[
state === 0 && 
              l[[i]] === 
                3, 
   state = 
              i, 
state =!= 0 && 
              l[[i]] =!= 
                3, 
   AppendTo[
              ret, {Round[delta*(state - 1)], Round[delta*(i - 1)]}]; 
            state = 0
]]; 
ret
]

HL Coincidence Segments

Function: HLCoincidenceSegments
Description: Returns a list of triple coincidence lock segments.
Arguments:
	l1: Nx2 array of (t, Y) data of first ifo with Y being the lock state
	l2: Nx2 array of (t, Y) data of second ifo with Y being the lock state
	l3: Nx2 array of (t, Y) data of third ifo with Y being the lock state
	shift2: start time offset of second ifo data relative to start of first
	shift3: start time offset of third ifo data relative to start of first
Return: Vector of (tstart, tstop) describing a HL coincidence lock segment each.

HLCoincidenceSegments[l1_, l2_, l3_, shift2_:  0, 
        shift3_:  0] := 
Block[{l, i, indx, state, 
          ret, 
start = 
            l1[[1, 1]], 
          stop = l1[[-1, 1]], 
          delta = l1[[2, 1]] - 
              l1[[1, 
                1]]}, 
l = 
          Table[0, {i, start, stop, delta}]; 
For[i = 1, 
          i ≤ Length[l1], 
          i += 1, 
indx = 
            Quotient[l1[[i, 1]] - start, 
                delta] + 
              1; 
If[(indx ≥ 
                  1) && (indx ≤ 
                  Length[l]) && (l1[[i, 
                    2]] > 
                  3.9), 
l[[
                indx]] = 
              1];
]; 
For[i = 1, 
          i ≤ Length[l2], 
          i += 1, 
indx = 
            Quotient[
                l2[[i, 1]] - start + 
                  shift2, delta] + 
              1; 
If[(indx ≥ 
                  1) && (indx ≤ 
                  Length[l]) && (l2[[i, 
                    2]] > 
                  3.9), 
l[[
                indx]] = 
              1];
]; 
For[i = 1, 
          i ≤ Length[l3], 
          i += 1, 
indx = 
            Quotient[
                l3[[i, 1]] - start + 
                  shift3, delta] + 
              1; 
If[(indx ≥ 
                  1) && (indx ≤ 
                  Length[l]) && (l3[[i, 
                    2]] > 
                  3.9), 
l[[
                indx]] += 
              1];
]; 
state = 
          0; 
ret = {}; 
For[i = 1, 
          i ≤ Length[l], 
          i += 1, 
Which[
state === 0 && 
              l[[i]] === 
                2, 
   state = 
              i, 
state =!= 0 && 
              l[[i]] =!= 
                2, 
   AppendTo[
              ret, {Round[delta*(state - 1)], Round[delta*(i - 1)]}]; 
            state = 0
]]; 
ret
]

Step Histogram

Function: StepHistogram
Description: Makes a step histogram. The result can be used in ListPlot. 
Arguments:
	data: data to be histogramed
	FrequencyData->True|False: If true, data is already in histogram format
	HistogramCategories->opt: Same options as RangeCounts[]
Return: Step histogram, array of (x, y) data

Options[StepHistogram] = {FrequencyData -> False, 
          HistogramCategories -> Automatic};

    
StepHistogram[data_, 
        opts___] := 
Block[{hist, fdata, cat, m, mm, i, x, 
          y}, 
fdata = FrequencyData /. {opts} /. 
            Options[StepHistogram]; 
cat = HistogramCategories /. {opts} /. 
            Options[StepHistogram]; 
If[
          cat === Automatic, 
cat = 
              If[fdata === True, 
Range[
                  Length[data] + 1], 
m = Min[data]; 
                mm = Max[data]; 
Table[
                  i, {i, m, 
                    mm, (mm - m)/
                      20}]
];
]; 
hist = 
          If[fdata === True, 
            data, 
Rest[
              Most[RangeCounts[data, cat]]]]; 
x = 
          Flatten[{#, #} & /@ cat]; 
y = 
          Append[Prepend[Flatten[{#, #} & /@ hist], 0], 
            0]; 
Transpose[{x, 
            y}]
]

Get Data

AbsoluteTiming[channelsLHO = 
          NDSGetChannel[Site -> LHO];]
Length[channelsLHO]

Select[
      channelsLHO, # == schnH1 || # == rchnH1 || # == 
            schnH2 || # == rchnH2 &]

AbsoluteTiming[channelsLLO = 
          NDSGetChannel[Site -> LLO];]
Length[channelsLLO]

Select[
      channelsLLO, # == schnL1 || # == rchnL1 &]

Read Cache

Read cache

cacheTimeLHO = S5startLHO;
cacheTimeLLO = S5startLLO;
rH1 = rH2 = rL1 = sH1 = sH2 = sL1 = {};
<<  "C:/User/Daniel/S5/RangeDutyCycle.mx";
readLHO = 
        FromDate[now] - FromDate[cacheTimeLHO];
readLLO = 
        FromDate[now] - FromDate[cacheTimeLLO];
offsetLHO = 
        FromDate[cacheTimeLHO] - 
          FromDate[S5startLHO];
offsetLLO = 
        FromDate[cacheTimeLLO] - FromDate[S5startLLO];

Range

AbsoluteTiming[rH1ext = 
          Select[NDSGetTrend[rchnH1, cacheTimeLHO, readLHO, 
                Site -> LHO, 
                DataRate -> 
                  (1. /60)][[1]], 
            VectorQ[#, NumberQ] &];]
\(\(If[
        Dimensions[Dimensions[rH1ext]] === {2}, 
\(rH1 = 
            Join[rH1, \({#[[1]] + 
                      offsetLHO, #[[2]]} &\) /@ rH1ext];\), \(Print["Failed"];\)];\)\)

AbsoluteTiming[rH2ext = 
          Select[NDSGetTrend[rchnH2, cacheTimeLHO, readLHO, 
                Site -> LHO, 
                DataRate -> 
                  (1. /60)][[1]], 
            VectorQ[#, NumberQ] &];]
\(\(If[
        Dimensions[Dimensions[rH2ext]] === {2}, 
\(rH2 = 
            Join[rH2, \({#[[1]] + 
                      offsetLHO, #[[2]]} &\) /@ rH2ext];\), \(Print["Failed"];\)];\)\)

AbsoluteTiming[rL1ext = 
          Select[NDSGetTrend[rchnL1, cacheTimeLLO, readLLO, 
                Site -> LLO, 
                DataRate -> 
                  (1. /60)][[1]], 
            VectorQ[#, NumberQ] &];]
\(\(If[
        Dimensions[Dimensions[rL1ext]] === {2}, \(rL1 = 
            Join[rL1, \({#[[1]] + 
                      offsetLLO, #[[2]]} &\) /@ rL1ext];\), \(Print["Failed"];\)];\)\)

AbsoluteTiming[
rH1cal = 
        calCorrH1[rH1]; 
rH2cal = 
        calCorrH2[rH2]; 
rL1cal = 
        calCorrL1[rL1];]

fullDays = 
        IntegerPart[(untilnowLHO/(24 3600))] 24 3600;

AbsoluteTiming[
      rDaysH1 = 
        PartitionByDays[0, fullDays, 24*3600, 
          rH1cal]; 
rDaysH2 = 
        PartitionByDays[0, fullDays, 24*3600, 
          rH2cal]; 
rDaysL1 = 
PartitionByDays[0, fullDays, 24*3600, rL1cal, 
          S5startShift];]

AbsoluteTiming[
      rWeeksH1 = 
        PartitionByDays[0, fullDays, 7*24*3600, 
          rH1cal]; 
rWeeksH2 = 
        PartitionByDays[0, fullDays, 7*24*3600, 
          rH2cal]; 
rWeeksL1 = 
        PartitionByDays[0, fullDays, 7*24*3600, rL1cal, 
          S5startShift];]

State

AbsoluteTiming[sH1ext = 
          Select[NDSGetTrend[schnH1, cacheTimeLHO, readLHO, 
                Site -> LHO, 
                DataRate -> 
                  (1. /60)][[1]], 
            VectorQ[#, NumberQ] &];]
\(\(If[
        Dimensions[Dimensions[sH1ext]] === {2}, 
\(sH1 = 
            Join[sH1, \({#[[1]] + 
                      offsetLHO, #[[2]]} &\) /@ sH1ext];\), \(Print["Failed"];\)];\)\)

AbsoluteTiming[sH2ext = 
          Select[NDSGetTrend[schnH2, cacheTimeLHO, readLHO, 
                Site -> LHO, 
                DataRate -> 
                  (1. /60)][[1]], 
            VectorQ[#, NumberQ] &];]
\(\(If[
        Dimensions[Dimensions[sH2ext]] === {2}, 
\(sH2 = 
            Join[sH2, \({#[[1]] + 
                      offsetLHO, #[[2]]} &\) /@ sH2ext];\), \(Print["Failed"];\)];\)\)

AbsoluteTiming[sL1ext = 
          Select[NDSGetTrend[schnL1, cacheTimeLLO, readLLO, 
                Site -> LLO, 
                DataRate -> 
                  (1. /60)][[1]], 
            VectorQ[#, NumberQ] &];]
\(\(If[
        Dimensions[Dimensions[sL1ext]] === {2}, \(sL1 = 
            Join[sL1, \({#[[1]] + 
                      offsetLLO, #[[2]]} &\) /@ sL1ext];\), \(Print["Failed"];\)];\)\)

fullDays = 
        IntegerPart[(untilnowLHO/(24 3600))] 24 3600;

AbsoluteTiming[dutyH1 = 
          dutyCycle[0, fullDays, 24*3600, sH1];]

AbsoluteTiming[dutyH2 = 
          dutyCycle[0, fullDays, 24*3600, sH2];]

AbsoluteTiming[dutyL1 = 
          dutyCycle[0, fullDays, 24*3600, sL1, S5startShift];]

AbsoluteTiming[sDays = 
          Transpose[{PartitionByDays[0, fullDays, 24*3600, 
                sH1], 
PartitionByDays[0, fullDays, 
                24*3600, sH2], 
PartitionByDays[0, 
                fullDays, 24*3600, sL1, S5startShift]}];]

Write Cache

Read cache

writeCache = False;

AbsoluteTiming[If[
          writeCache, 
cacheTimeLHO = 
            now; 
cacheTimeLLO = 
            now; 
DumpSave["C:/User/Daniel/S5/\
RangeDutyCycle.mx", {cacheTimeLHO, cacheTimeLLO, rH1, rH2, rL1, sH1, sH2, 
              sL1}];];]

Coincidences

Units are days

AbsoluteTiming[coinc = TripleCoincidence @@ # & /@ 
            sDays;]

coincAcc = 
        Drop[Transpose[FoldList[Plus, 0, #] & /@ Transpose[coinc]], 
          1];

coincTotal = Plus @@ # & /@ 
        Transpose[coinc]
(coincTotal/Plus) @@ coincTotal
Plus @@ coincTotal

AbsoluteTiming[coincHL = HLCoincidence @@ # & /@ 
            sDays;]

coincHLAcc = Drop[FoldList[Plus, 0, coincHL], 1];

coincHLTotal = Plus @@ coincHL
(coincHLTotal/Plus) @@ coincTotal

coinc3Segments = 
        TripleCoincidenceSegments[sH1, sH2, sL1, 0, 
          S5startShift];
coinc3SegmentsDays = 
        PartitionByDays[0, untilnowLHO, 24*3600, 
          coinc3Segments];
coinc3SegmentsDaysCount = 
        Length /@ coinc3SegmentsDays;
Plus @@ coinc3SegmentsDaysCount

coincHLSegments = 
        HLCoincidenceSegments[sH1, sH2, sL1, 0, 
          S5startShift];
coincHLSegmentsDays = 
        PartitionByDays[0, untilnowLHO, 24*3600, 
          coincHLSegments];
coincHLSegmentsDaysCount = 
        Length /@ coincHLSegmentsDays;
Plus @@ coincHLSegmentsDaysCount

coinc3SegmentsEx = 
        Transpose[
          Append[Transpose[
              coinc3Segments + S5startLHOGPS], -Subtract @@ # & /@ 
              coinc3Segments]];

coincHLSegmentsEx = 
        Transpose[
          Append[Transpose[
              coincHLSegments + S5startLHOGPS], -Subtract @@ # & /@ 
              coincHLSegments]];

Apply corrections to the triple coicnidence data due to underestimation of segment lengths. 
1. Due to 1 minute granularity we loose an average of 1 minute for each segment
2. Due to averaging in the LockLoss monitor we loose in average another 13.5s per segment.

fixLockLoss = {2006, 3, 7, 16, 0, 0};
fixLockLossDiff = 
        FromDate[fixLockLoss] - 
          FromDate[S5startLHO];
fixLockLossDiffDays = 
        Round[(fixLockLossDiff/(24 3600))];
missingTripleCoinc =  
        Table[coinc3SegmentsDaysCount[[
              i]]
 
            If[i ≤ 
                fixLockLossDiffDays, (( 60  +   13.5)/(24 3600)), (( 60.)/(24 3600))], {i, 1, 
            Length[coinc3SegmentsDaysCount]}];
tripleCoinc = (Last /@ coinc) + 
          missingTripleCoinc;
tripleCoincAcc = 
        Drop[FoldList[Plus, 0, tripleCoinc], 1];
tripleCoincTotal = Last[tripleCoincAcc]

missingHLCoinc =  
        Table[coincHLSegmentsDaysCount[[
              i]]
 
            If[i ≤ 
                fixLockLossDiffDays, (( 60  +   13.5)/(24 3600)), (( 60.)/(24 3600))], {i, 1, 
            Length[coincHLSegmentsDaysCount]}];
HLCoinc = coincHL + missingHLCoinc;
HLCoincAcc = 
        Drop[FoldList[Plus, 0, HLCoinc], 1];
HLCoincTotal = Last[HLCoincAcc]

cummTriple = 
      Last /@ Partition[Transpose[
              coincAcc][[4]], 
          7]
cummTriple = Last /@ Partition[tripleCoincAcc, 7]

cummHL = Last /@ Partition[coincHLAcc, 7]
cummHL = Last /@ Partition[HLCoincAcc, 7]

Predict total run time from previous data using simple linear prediciton of triple coincidence data.

predict365from1Week = (7/(Last[tripleCoincAcc] - 
                  tripleCoincAcc[[-8]])) (365 - 
                tripleCoincAcc[[-8]]) + (Length[tripleCoincAcc] - 7);
predict365from2Week = (14/(Last[tripleCoincAcc] - 
                  tripleCoincAcc[[-15]])) (365 - 
                tripleCoincAcc[[-15]]) + (Length[tripleCoincAcc] - 14);
predict365from1Month = (30/(Last[tripleCoincAcc] - 
                  tripleCoincAcc[[-31]])) (365 - 
                tripleCoincAcc[[-31]]) + (Length[tripleCoincAcc] - 30);
predict365from2Month = 
        60/((Last[tripleCoincAcc] - 
                  tripleCoincAcc[[-61]])/(365 - 
                  tripleCoincAcc[[-61]])) + (Length[tripleCoincAcc] - 
              60);
predict365fromTotal = Length[tripleCoincAcc]/Last[
                tripleCoincAcc] 365;
predictEndOfRun = {predict365from1Week, predict365from2Week, 
        predict365from1Month, predict365from2Month, 
        predict365fromTotal}
predictEndOfRunLegend = {"1 week",  "2 weeks",  "1 \
month",  "2 months", "whole run"}
\(predictEndOfRunDate = \(dayname[0, #] <> ", " <> 
            ToString[#[[1]]] &\) /@ \((ToDate /@ \((24\ 3600  predictEndOfRun + 
                FromDate[S5startLHO])\))\)\)

Predict total run time from previous data using simple linear prediciton of LHO/LLO coincidence data.

HLpredict365from1Week = (7/(Last[HLCoincAcc] - 
                  HLCoincAcc[[-8]])) (365 - 
                HLCoincAcc[[-8]]) + (Length[HLCoincAcc] - 7);
HLpredict365from2Week = (14/(Last[HLCoincAcc] - 
                  HLCoincAcc[[-15]])) (365 - 
                HLCoincAcc[[-15]]) + (Length[HLCoincAcc] - 14);
HLpredict365from1Month = (30/(Last[HLCoincAcc] - 
                  HLCoincAcc[[-31]])) (365 - 
                HLCoincAcc[[-31]]) + (Length[HLCoincAcc] - 30);
HLpredict365from2Month = (60/(Last[HLCoincAcc] - 
                  HLCoincAcc[[-61]])) (365 - 
                HLCoincAcc[[-61]]) + (Length[HLCoincAcc] - 60);
HLpredict365fromTotal = Length[HLCoincAcc]/Last[HLCoincAcc] 
          365;
HLpredictEndOfRun = {HLpredict365from1Week, HLpredict365from2Week, 
        HLpredict365from1Month, HLpredict365from2Month, 
        HLpredict365fromTotal}
HLpredictEndOfRunLegend = {"1 week",  "2 weeks",  "1 \
month",  "2 months", "whole run"}
\(HLpredictEndOfRunDate = \(dayname[0, #] <> ", " <> 
            ToString[#[[1]]] &\) /@ \((ToDate /@ \((24\ 3600  HLpredictEndOfRun + 
                FromDate[S5startLHO])\))\)\)

coinc3SegmentsEx // TableForm;

Export["c:/seglist.txt", coinc3SegmentsEx, "Table"]

Plus @@ (((-Subtract @@ # & /@ coinc3Segments))/(3600 24. ))

H1

Range Trend

\(\(pltH1 = 
        ListPlot\ [
          bin[\({#[[1]]\/\(24\ 3600. \), #[[2]]} &\) /@ rH1cal, 120], 
          FrameLabel -> {"run time (2w)", "Inspiral Range (Mpc)"}, Frame -> True, PlotRange -> {0, 17}, 
          GridLines -> {Table[
                14\ i, {i, 0, 
                  1 + \(Last[rH1cal]\)[[1]]\/\(14\ 24\ 3600. \)}], Automatic}, 
          FrameTicks -> {Table[{2\ 42\ i, 
                  dayname[2\ 42\ 24\ 3600\ i]}, {i, 0, 
                  1 + \(Last[rH1cal]\)[[1]]\/\(2\ 42\ 24\ 3600. \)}], 
              Automatic}, 
PlotJoined -> False, 
          PlotStyle -> {Thickness\ [0.001], \ 
              RGBColor\ [1, 0, 0]}];\)\)

Range Trend over past 3-4 Weeks

dropdaysfront = 
        7 (IntegerPart[Last[rH1cal][[1]]/(7 24 3600. )] - 
              3);
\(\(pltH1short = 
        ListPlot\ [
          bin[\({#[[1]]\/\(24\ 3600. \), #[[2]]} &\) /@ 
              SelectByTime[
                24\ 3600.  
                  dropdaysfront, \(Last[
                    rH1cal]\)[[1]], 
                rH1cal], 5], 
          FrameLabel -> {"run time (d)", "Inspiral Range (Mpc)"}, Frame -> True, PlotRange -> All, 
          GridLines -> {Table[
                i, {i, 0, 
                  1 + \(Last[rH1cal]\)[[1]]\/\(24\ 3600. \)}], Automatic}, 
          FrameTicks -> {Table[{7\ i, dayname[7\ 24\ 3600\ i]}, {i, 0, 
                  1 + \(Last[rH1cal]\)[[1]]\/\(7\ 24\ 3600. \)}], 
              Automatic}, 
PlotJoined -> False, 
          PlotStyle -> {Thickness\ [0.007], \ 
              RGBColor\ [1, 0, 0]}];\)\)

Range Trend over past 7 Days

dropdaysfront = 
        IntegerPart[Last[rH1cal][[1]]/(24 3600. )] - 7;
\(\(pltH1recent = 
        ListPlot\ [
          bin[\({#[[1]]\/\(24\ 3600. \), #[[2]]} &\) /@ 
              SelectByTime[
                24\ 3600.  
                  dropdaysfront, \(Last[
                    rH1cal]\)[[1]], 
                rH1cal], 2], 
          FrameLabel -> {"run time (d)", "Inspiral Range (Mpc)"}, Frame -> True, PlotRange -> All, 
          GridLines -> {Table[
                i, {i, 0, 
                  1 + \(Last[rH1cal]\)[[1]]\/\(24\ 3600. \)}], Automatic}, 
          FrameTicks -> {Table[{2\ i, dayname[2\ 24\ 3600\ i]}, {i, 0, 
                  1 + \(Last[rH1cal]\)[[1]]\/\(2\ 24\ 3600. \)}], 
              Automatic}, 
PlotJoined -> False, 
          PlotStyle -> {Thickness\ [0.007], \ 
              RGBColor\ [1, 0, 0]}];\)\)

Accumulated Histogram

histH1 = 
        Histogram[#[[2]] & /@ 
            rH1cal, HistogramRange -> {6, 
              17}, 
HistogramCategories -> 
            Range[2, 18, 0.1], 
          FrameLabel -> {"Inspiral Range (Mpc)", "Count"}, 
          Frame -> True, GridLines -> Automatic, 
          BarStyle -> {RGBColor [1, 0, 0]}];

\(\(histH1alt = 
        ListPlot[
          StepHistogram[\(#[[2]] &\) /@ 
              rH1cal, HistogramCategories -> Range[2, 18, 0.1]], 
          PlotJoined -> True, PlotRange -> {{6, 17}, All}, 
          PlotStyle -> {Thickness\ [0.007], \ RGBColor\ [1, 0, 0]}, 
          FrameLabel -> {"Inspiral Range (Mpc)", "Count"}, 
Frame -> True, GridLines -> Automatic, 
          DisplayFunction -> Identity];\)\)

Daily Histograms over past 9 Days

dropdaysfront = Length[rDaysH1] - 9;
stepDailyH1 = StepHistogram[Transpose[#][[2]], HistogramCategories -> Range[2, 18, 0.1]] & /@ 
          Drop[rDaysH1, dropdaysfront];

    
\(\(histDailyH1 = 
        Show[
GraphicsArray[

Partition[
Table[
ListPlot[stepDailyH1[[i]], 
                    PlotJoined -> True, 
                    PlotRange -> {{7, 17}, All}, 
                    PlotStyle -> {Thickness\ [0.016], \ 
                        RGBColor\ [1, 0, 0]}, 
                    FrameLabel -> {"Inspiral Range (Mpc)", "Count"}, 
PlotLabel -> 
                      dayname[
                        24\ 3600 \((dropdaysfront + \ i - 
                              1)\)], 
Frame -> True, 
                    GridLines -> Automatic, AspectRatio -> 1, 
                    textoptsmall, 
                    DisplayFunction -> Identity], 
{i, 
                    1, 9}], 
3] // 
              Transpose, 

GraphicsSpacing -> 
              0
]
];\)\)

Weekly Histograms over past 4 Weeks

dropweeksfront = Length[rWeeksH1] - 4;
stepWeeklyH1 = StepHistogram[Transpose[#][[2]], 
              HistogramCategories -> Range[2, 17, 0.1]] & /@ 
          Drop[rWeeksH1, dropweeksfront];

    
\(\(histWeeklyH1 = 
        Show[
GraphicsArray[

Partition[
Table[
ListPlot[stepWeeklyH1[[i]], 
                    PlotJoined -> True, 
                    PlotRange -> {{7, 17}, All}, 
                    PlotStyle -> {Thickness\ [0.016], \ 
                        RGBColor\ [1, 0, 0]}, 
                    FrameLabel -> {"Inspiral Range (Mpc)", "Count"}, 
PlotLabel -> 
                      dayname[
                        7\ 24\ 3600 \((dropweeksfront + \ i - 
                              1)\)], 
Frame -> True, 
                    GridLines -> Automatic, AspectRatio -> 1, 
                    textoptsmall, 
                    DisplayFunction -> Identity], 
{i, 
                    1, 4}], 
2] // 
              Transpose, 

GraphicsSpacing -> 
              0
]
];\)\)

Duty Cycle Trend

dutyH1avrg = 
        Transpose[{Drop[Transpose[
                  dutyH1][[1]], 
              6], 
Plus @@ #/7 & /@ 
              Partition[Transpose[
                    dutyH1][[2]], 7, 
                1]}];
\(\(pltH1avrg = 
        ListPlot[dutyH1avrg, 
          FrameLabel -> {"run time (2w)", "Duty Cycle", "1 week running average", ""}, AspectRatio -> 0.5, 
          Frame -> True, PlotRange -> {0, 1}, 
          PlotJoined -> True, 
          GridLines -> {Table[
                14\ i, {i, 0, 
                  1 + \(Last[rH1cal]\)[[1]]\/\(14\ 24\ 3600. \)}], Automatic}, 
          FrameTicks -> {Table[{84\ i, dayname[84\ 24\ 3600\ i]}, {i, 0, 
                  1 + \(Last[rH1cal]\)[[1]]\/\(84\ 24\ 3600. \)}], Automatic}, 
          PlotStyle -> {Thickness\ [0.007], \ 
              RGBColor\ [1, 0, 0]}];\)\)

Accumulated Daily Duty Cycle Histogram

hsH1 = 
        Histogram[Last /@ dutyH1, 
          HistogramRange -> {0, 
              1}, 
HistogramCategories -> 
            Range[0, 1, 0.05], 
          FrameLabel -> {"Duty Cycle", "Count"}, 
          Frame -> True, GridLines -> Automatic, 
          BarStyle -> {RGBColor [1, 0, 0]}];

H2

Range Trend

\(\(pltH2 = 
        ListPlot\ [
          bin[\({#[[1]]\/\(24\ 3600. \), #[[2]]} &\) /@ rH2cal, 120], 
          FrameLabel -> {"run time (2w)", "Inspiral Range (Mpc)"}, Frame -> True, PlotRange -> {0, 8}, 
          GridLines -> {Table[
                14\ i, {i, 0, 
                  1 + \(Last[rH2cal]\)[[1]]\/\(14\ 24\ 3600. \)}], Automatic}, 
          FrameTicks -> {Table[{2\ 42\ i, 
                  dayname[2\ 42\ 24\ 3600\ i]}, {i, 0, 
                  1 + \(Last[rH2cal]\)[[1]]\/\(2\ 42\ 24\ 3600. \)}], 
              Automatic}, 
PlotJoined -> False, 
          PlotRange -> {0, 6}, 
          PlotStyle -> {Thickness\ [0.001], \ 
              RGBColor\ [0, 0, 1]}];\)\)

Range Trend over past 3-4 Weeks

dropdaysfront = 
        7 (IntegerPart[Last[rH2cal][[1]]/(7 24 3600. )] - 
              3);
\(\(pltH2short = 
        ListPlot\ [
          bin[\({#[[1]]\/\(24\ 3600. \), #[[2]]} &\) /@ 
              SelectByTime[
                24\ 3600.  
                  dropdaysfront, \(Last[
                    rH2cal]\)[[1]], 
                rH2cal], 5], 
          FrameLabel -> {"run time (d)", "Inspiral Range (Mpc)"}, Frame -> True, PlotRange -> All, 
          GridLines -> {Table[
                i, {i, 0, 
                  1 + \(Last[rH2cal]\)[[1]]\/\(24\ 3600. \)}], Automatic}, 
          FrameTicks -> {Table[{7\ i, dayname[7\ 24\ 3600\ i]}, {i, 0, 
                  1 + \(Last[rH2cal]\)[[1]]\/\(7\ 24\ 3600. \)}], 
              Automatic}, 
PlotJoined -> False, 
          PlotStyle -> {Thickness\ [0.007], \ 
              RGBColor\ [0, 0, 1]}];\)\)

Range Trend over past 7 Days

dropdaysfront = 
        IntegerPart[Last[rH2cal][[1]]/(24 3600. )] - 7;
\(\(pltH2recent = 
        ListPlot\ [
          bin[\({#[[1]]\/\(24\ 3600. \), #[[2]]} &\) /@ 
              SelectByTime[
                24\ 3600.  
                  dropdaysfront, \(Last[
                    rH2cal]\)[[1]], 
                rH2cal], 2], 
          FrameLabel -> {"run time (d)", "Inspiral Range (Mpc)"}, Frame -> True, PlotRange -> All, 
          GridLines -> {Table[
                i, {i, 0, 
                  1 + \(Last[rH2cal]\)[[1]]\/\(24\ 3600. \)}], Automatic}, 
          FrameTicks -> {Table[{2\ i, dayname[2\ 24\ 3600\ i]}, {i, 0, 
                  1 + \(Last[rH2cal]\)[[1]]\/\(2\ 24\ 3600. \)}], 
              Automatic}, 
PlotJoined -> False, 
          PlotStyle -> {Thickness\ [0.007], \ 
              RGBColor\ [0, 0, 1]}];\)\)

Accumulated Histogram

histH2 = 
        Histogram[#[[2]] & /@ 
            rH2cal, HistogramRange -> {3, 
              8}, 
HistogramCategories -> 
            Range[2, 15, 0.05], 
          FrameLabel -> {"Inspiral Range (Mpc)", "Count"}, 
          Frame -> True, GridLines -> Automatic, 
          BarStyle -> {RGBColor [0, 0, 1]}];

\(\(histH2alt = 
        ListPlot[
          StepHistogram[\(#[[2]] &\) /@ 
              rH2cal, HistogramCategories -> Range[2, 16, 0.05]], 
          PlotJoined -> True, PlotRange -> {{3, 8}, All}, 
          PlotStyle -> {Thickness\ [0.007], \ RGBColor\ [0, 0, 1]}, 
          FrameLabel -> {"Inspiral Range (Mpc)", "Count"}, 
Frame -> True, GridLines -> Automatic, 
          DisplayFunction -> Identity];\)\)

Daily Histograms over past 9 Days

dropdaysfront = Length[rDaysH2] - 9;
stepDailyH2 = StepHistogram[Transpose[#][[2]], HistogramCategories -> Range[2, 15, 0.05]] & /@ 
          Drop[rDaysH2, dropdaysfront];

    
\(\(histDailyH2 = 
        Show[
GraphicsArray[

Partition[
Table[
ListPlot[stepDailyH2[[i]], 
                    PlotJoined -> True, PlotRange -> {{3, 8}, All}, 
                    PlotStyle -> {Thickness\ [0.016], \ 
                        RGBColor\ [0, 0, 1]}, 
                    FrameLabel -> {"Inspiral Range (Mpc)", "Count"}, 
PlotLabel -> 
                      dayname[
                        24\ 3600 \((dropdaysfront + \ i - 
                              1)\)], 
Frame -> True, 
                    GridLines -> Automatic, AspectRatio -> 1, 
                    textoptsmall, 
                    DisplayFunction -> Identity], 
{i, 
                    1, 9}], 
3] // 
              Transpose, 

GraphicsSpacing -> 
              0
]
];\)\)

Weekly Histograms over past 4 Weeks

dropweeksfront = Length[rWeeksH2] - 4;
stepWeeklyH2 = StepHistogram[Transpose[#][[2]], 
              HistogramCategories -> Range[2, 15, 0.05]] & /@ 
          Drop[rWeeksH2, dropweeksfront];

    
\(\(histWeeklyH2 = 
        Show[
GraphicsArray[

Partition[
Table[
ListPlot[stepWeeklyH2[[i]], 
                    PlotJoined -> True, PlotRange -> {{3, 8}, All}, 
                    PlotStyle -> {Thickness\ [0.016], \ 
                        RGBColor\ [0, 0, 1]}, 
                    FrameLabel -> {"Inspiral Range (Mpc)", "Count"}, 
PlotLabel -> 
                      dayname[
                        7\ 24\ 3600 \((dropweeksfront + \ i - 
                              1)\)], 
Frame -> True, 
                    GridLines -> Automatic, AspectRatio -> 1, 
                    textoptsmall, 
                    DisplayFunction -> Identity], 
{i, 
                    1, 4}], 
2] // 
              Transpose, 

GraphicsSpacing -> 
              0
]
];\)\)

Duty Cycle Trend

dutyH2avrg = 
        Transpose[{Drop[Transpose[
                  dutyH2][[1]], 
              6], 
Plus @@ #/7 & /@ 
              Partition[Transpose[
                    dutyH2][[2]], 7, 
                1]}];
\(\(pltH2avrg = 
        ListPlot[dutyH2avrg, 
          FrameLabel -> {"run time (2w)", "Duty Cycle", "1 week running average", ""}, AspectRatio -> 0.5, 
          Frame -> True, PlotRange -> {0, 1}, 
          PlotJoined -> True, 
          GridLines -> {Table[
                14\ i, {i, 0, 
                  1 + \(Last[rH1cal]\)[[1]]\/\(14\ 24\ 3600. \)}], Automatic}, 
          FrameTicks -> {Table[{84\ i, dayname[84\ 24\ 3600\ i]}, {i, 0, 
                  1 + \(Last[rH1cal]\)[[1]]\/\(84\ 24\ 3600. \)}], Automatic}, 
          PlotStyle -> {Thickness\ [0.007], \ 
              RGBColor\ [0, 0, 1]}];\)\)

Accumulated Daily Duty Cycle Histogram

hsH2 = 
        Histogram[Last /@ dutyH2, 
          HistogramRange -> {0, 
              1}, 
HistogramCategories -> 
            Range[0, 1, 0.05], 
          FrameLabel -> {"Duty Cycle", "Count"}, 
          Frame -> True, GridLines -> Automatic, 
          BarStyle -> {RGBColor [0, 0, 1]}];

L1

Range Trend

\(\(pltL1 = 
        ListPlot\ [
          bin[\({\(#[[1]] + S5startShift\)\/\(24\ 3600. \), #[[2]]} &\) /@ 
              rL1cal, 120], PlotRange -> {0, 16}, 
          FrameLabel -> {"run time (2w)", "Inspiral Range (Mpc)"}, Frame -> True, 
          GridLines -> {Table[
                14\ i, {i, 0, 
                  1 + \(\(Last[rL1cal]\)[[1]] + S5startShift\)\/\(14\ 24\ 3600. \)}], Automatic}, 
          FrameTicks -> {Table[{2\ 42\ i, 
                  dayname[2\ 42\ 24\ 3600\ i]}, {i, 0, 
                  1 + \(\(Last[rH1cal]\)[[1]] + S5startShift\)\/\(2\ 42\ 24\ 3600. \)}], 
              Automatic}, 
PlotJoined -> False, 
          PlotStyle -> {Thickness\ [0.001], \ 
              RGBColor\ [0, 0.6, 0]}];\)\)

Range Trend over past 3-4 Weeks

dropdaysfront = 
        7 (IntegerPart[((Last[rL1cal][[1]] + S5startShift)/(7 24 3600. ))] - 
              3);
\(\(pltL1short = 
        ListPlot\ [
          bin[\({#[[1]]\/\(24\ 3600. \), #[[2]]} &\) /@ 
              SelectByTime[
                24\ 3600.  
                  dropdaysfront, \(Last[
                      rL1cal]\)[[1]] + 
                  S5startShift, rL1cal, S5startShift], 5], 
          PlotRange -> {0, 16}, 
          FrameLabel -> {"run time (d)", "Inspiral Range (Mpc)"}, Frame -> True, PlotRange -> All, 
          GridLines -> {Table[
                i, {i, 0, 
                  1 + \(\(Last[rL1cal]\)[[1]] + S5startShift\)\/\(24\ 3600. \)}], Automatic}, 
          FrameTicks -> {Table[{7\ i, dayname[7\ 24\ 3600\ i]}, {i, 0, 
                  1 + \(\(Last[rL1cal]\)[[1]] + S5startShift\)\/\(7\ 24\ 3600. \)}], 
              Automatic}, 
PlotJoined -> False, 
          PlotStyle -> {Thickness\ [0.007], \ 
              RGBColor\ [0, 0.6, 0]}];\)\)

Range Trend over past 7 Days

dropdaysfront = 
        IntegerPart[((Last[rL1cal][[1]] + S5startShift)/(24 3600. ))] - 
          7;
\(\(pltL1recent = 
        ListPlot\ [
          bin[\({#[[1]]\/\(24\ 3600. \), #[[2]]} &\) /@ 
              SelectByTime[
                24\ 3600.  
                  dropdaysfront, \(Last[
                      rL1cal]\)[[1]] + 
                  S5startShift, rL1cal, S5startShift], 2], 
          PlotRange -> {0, 16}, 
          FrameLabel -> {"run time (d)", "Inspiral Range (Mpc)"}, Frame -> True, PlotRange -> All, 
          GridLines -> {Table[
                i, {i, 0, 
                  1 + \(\(Last[rL1cal]\)[[1]] + S5startShift\)\/\(24\ 3600. \)}], Automatic}, 
          FrameTicks -> {Table[{2\ i, dayname[2\ 24\ 3600\ i]}, {i, 0, 
                  1 + \(\(Last[rL1cal]\)[[1]] + S5startShift\)\/\(2\ 24\ 3600. \)}], 
              Automatic}, 
PlotJoined -> False, 
          PlotStyle -> {Thickness\ [0.007], \ 
              RGBColor\ [0, 0.6, 0]}];\)\)

Accumulated Histogram

histL1 = 
        Histogram[#[[2]] & /@ 
            rL1cal, HistogramRange -> {6, 
              16}, 
HistogramCategories -> 
            Range[2, 16, 0.1], 
          FrameLabel -> {"Inspiral Range (Mpc)", "Count"}, 
          Frame -> True, GridLines -> Automatic, 
          BarStyle -> {RGBColor [0, 0.6, 0]}];

\(\(histL1alt = 
        ListPlot[
          StepHistogram[\(#[[2]] &\) /@ 
              rL1cal, HistogramCategories -> Range[2, 16, 0.1]], 
          PlotJoined -> True, PlotRange -> {{7, 16}, All}, 
          PlotStyle -> {Thickness\ [0.007], \ RGBColor\ [0, 0.6, 0]}, 
          FrameLabel -> {"Inspiral Range (Mpc)", "Count"}, 
Frame -> True, GridLines -> Automatic, 
          DisplayFunction -> Identity];\)\)

Daily Histograms over past 9 Days

dropdaysfront = Length[rDaysL1] - 9;
stepDailyL1 = StepHistogram[Transpose[#][[2]], HistogramCategories -> Range[2, 18, 0.1]] & /@ 
          Drop[rDaysL1, dropdaysfront];

    
\(\(histDailyL1 = 
        Show[
GraphicsArray[

Partition[
Table[
ListPlot[stepDailyL1[[i]], 
                    PlotJoined -> True, 
                    PlotRange -> {{7, 16}, All}, 
                    PlotStyle -> {Thickness\ [0.016], \ 
                        RGBColor\ [0, 0.6, 0]}, 
                    FrameLabel -> {"Inspiral Range (Mpc)", "Count"}, 
PlotLabel -> 
                      dayname[
                        24\ 3600 \((dropdaysfront + \ i - 
                              1)\)], 
Frame -> True, 
                    GridLines -> Automatic, AspectRatio -> 1, 
                    textoptsmall, 
                    DisplayFunction -> Identity], 
{i, 
                    1, 9}], 
3] // 
              Transpose, 

GraphicsSpacing -> 
              0
]
];\)\)

Weekly Histograms over past 4 Weeks

dropweeksfront = Length[rWeeksL1] - 4;
stepWeeklyL1 = StepHistogram[Transpose[#][[2]], 
              HistogramCategories -> Range[2, 18, 0.1]] & /@ 
          Drop[rWeeksL1, dropweeksfront];

    
\(\(histWeeklyL1 = 
        Show[
GraphicsArray[

Partition[
Table[
ListPlot[stepWeeklyL1[[i]], 
                    PlotJoined -> True, 
                    PlotRange -> {{7, 16}, All}, 
                    PlotStyle -> {Thickness\ [0.016], \ 
                        RGBColor\ [0, 0.6, 0]}, 
                    FrameLabel -> {"Inspiral Range (Mpc)", "Count"}, 
PlotLabel -> 
                      dayname[
                        7\ 24\ 3600 \((dropweeksfront + \ i - 
                              1)\)], 
Frame -> True, 
                    GridLines -> Automatic, AspectRatio -> 1, 
                    textoptsmall, 
                    DisplayFunction -> Identity], 
{i, 
                    1, 4}], 
2] // 
              Transpose, 

GraphicsSpacing -> 
              0
]
];\)\)

Duty Cycle Trend

dutyL1avrg = 
        Transpose[{Drop[Transpose[
                  dutyL1][[1]], 
              6], 
Plus @@ #/7 & /@ 
              Partition[Transpose[
                    dutyL1][[2]], 7, 
                1]}];
\(\(pltL1avrg = 
        ListPlot[dutyL1avrg, 
          FrameLabel -> {"run time (2w)", "Duty Cycle", "1 week running average", ""}, AspectRatio -> 0.5, 
          Frame -> True, PlotRange -> {0, 1}, 
          PlotJoined -> True, 
          GridLines -> {Table[
                14\ i, {i, 0, 
                  1 + \(Last[rH1cal]\)[[1]]\/\(14\ 24\ 3600. \)}], Automatic}, 
          FrameTicks -> {Table[{84\ i, dayname[84\ 24\ 3600\ i]}, {i, 0, 
                  1 + \(Last[rH1cal]\)[[1]]\/\(84\ 24\ 3600. \)}], Automatic}, 
          PlotStyle -> {Thickness\ [0.007], \ 
              RGBColor\ [0, 0.6, 0]}];\)\)

Accumulated Daily Duty Cycle Histogram

hsL1 = 
        Histogram[Drop[Last /@ dutyL1, 10], 
          HistogramRange -> {0, 
              1}, 
HistogramCategories -> 
            Range[0, 1, 0.05], 
          FrameLabel -> {"Duty Cycle", "Count"}, 
          Frame -> True, GridLines -> Automatic, 
          BarStyle -> {RGBColor [0, 0.6, 0]}];

Combined

Range Trend

pltHHL = 
        ShowLegend[
          Show[{pltH1, pltH2, pltL1}, PlotRange -> {All, {0, 17}}, 
            DisplayFunction -> 
              Identity], {{{RGBColor[1, 0, 0], "H1"}, {RGBColor[0, 0, 
                  1], "H2"}, {RGBColor[0, 0.6, 0], "L1"}}, 
            LegendPosition -> { .6, - .42}, 
            LegendSize -> {0.3, 0.2}, 
            LegendShadow -> {0.02, -0.02}}];

Range Trend over past 3-4 Weeks

pltHHLshort = 
        ShowLegend[
          Show[{pltH1short, pltH2short, pltL1short}, 
            PlotRange -> {All, {0, 17}}, 
            DisplayFunction -> 
              Identity], {{{RGBColor[1, 0, 0], "H1"}, {RGBColor[0, 0, 
                  1], "H2"}, {RGBColor[0, 0.6, 0], "L1"}}, 
            LegendPosition -> { .6, - .42}, 
            LegendSize -> {0.3, 0.2}, 
            LegendShadow -> {0.02, -0.02}}];

Range Trend over past 7 Days

pltHHLrecent = 
        ShowLegend[
          Show[{pltH1recent, pltH2recent, pltL1recent}, 
            PlotRange -> {All, {0, 17}}, 
            DisplayFunction -> 
              Identity], {{{RGBColor[1, 0, 0], "H1"}, {RGBColor[0, 0, 
                  1], "H2"}, {RGBColor[0, 0.6, 0], "L1"}}, 
            LegendPosition -> { .6, - .42}, 
            LegendSize -> {0.3, 0.2}, 
            LegendShadow -> {0.02, -0.02}}];

Accumulated Histogram

histHHL = 
        ShowLegend[
          Show[{histH1alt, histH2alt, histL1alt}, 
            PlotRange -> {{3, 17}, All}, 
            DisplayFunction -> 
              Identity], {{{RGBColor[1, 0, 0], "H1"}, {RGBColor[0, 0, 
                  1], "H2"}, {RGBColor[0, 0.6, 0], "L1"}}, 
            LegendPosition -> {- .7,  .285}, 
            LegendSize -> {0.4, 0.3}, 
            LegendShadow -> {0.02, -0.02}}];

Weekly Histograms over past 4 Weeks

\(\(histWeekly = 
        Show[
GraphicsArray[

Partition[
Table[
MultipleListPlot[stepWeeklyL1[[i]], 
                    stepWeeklyH2[[i]], 
                    stepWeeklyH1[[i]], 
                    PlotJoined -> True, 
                    PlotRange -> {{3.999, 18}, 
                        All}, 
SymbolShape -> None, 
                    PlotStyle -> {{Thickness\ [0.016], \ 
                          RGBColor\ [0, 0.6, 0]}, {Thickness\ [0.016], \ 
                          RGBColor\ [0, 0, 1]}, {Thickness\ [0.016], \ 
                          RGBColor\ [1, 0, 0]}}, 
                    FrameLabel -> {"Inspiral Range (Mpc)", "Count"}, 
PlotLabel -> 
                      dayname[
                        7\ 24\ 3600 \((dropweeksfront + \ i - 
                              1)\)], 
Frame -> True, 
                    GridLines -> Automatic, AspectRatio -> 1, 
                    textoptsmall, 
                    DisplayFunction -> Identity], 
{i, 
                    1, 4}], 
2] // 
              Transpose, 

GraphicsSpacing -> 
              0
]
];\)\)

Duty Cycle Trend

histHHL = 
        ShowLegend[
          Show[{pltH1avrg, pltH2avrg, pltL1avrg}, 
            DisplayFunction -> 
              Identity], {{{RGBColor[1, 0, 0], "H1"}, {RGBColor[0, 0, 
                  1], "H2"}, {RGBColor[0, 0.6, 0], "L1"}}, 
            LegendPosition -> {- .9, - .45}, 
            LegendSize -> {0.4, 0.3}, 
            LegendShadow -> {0.02, -0.02}}];

Daily Duty Cycle over Past 2-3 Weeks

dropdaysfront = 
        7 (IntegerPart[Length[dutyH1]/7. ] - 
              2);
dutyHHLshort = 
        BarChart[Drop[Last /@ dutyH2, dropdaysfront], 
          Drop[Last /@ dutyH1, dropdaysfront], 
          Drop[Last /@ dutyL1, dropdaysfront], 
          FrameLabel -> {"run time (d)", "Duty Cycle"}, 
          Frame -> True, 
          GridLines -> {Table[i + 1.2, {i, 0, Length[dutyH1] - 1, 7}], 
              Automatic}, 
          BarStyle -> {RGBColor[0, 0, 1], RGBColor[1, 0, 0], 
              RGBColor[0, 0.7, 0]}, BarSpacing -> -0.3, 
          BarGroupSpacing -> 0.5, 
          BarLabels -> 
            Table[If[Mod[i, 7] === 0, 
                dayname[(i + dropdaysfront)*24*3600], ""], {i, 0, 
                Length[dutyH1] - 1}]];

Weekly Duty Cycle over Past 4 Months

dropweekfront = 
        Max[IntegerPart[Length[dutyH1]/7. ] - 20, 
          0];
dutyHHLweekly = 
        BarChart[Drop[bin[Last /@ dutyH2, 7], dropweekfront], 
          Drop[bin[Last /@ dutyH1, 7], dropweekfront], 
          Drop[bin[Last /@ dutyL1, 7], dropweekfront], 
          FrameLabel -> {"run time (w)", "Duty Cycle"}, 
          PlotRange -> {0, 1}, Frame -> True, 
          GridLines -> {Table[i + 1.2, {i, 0, Length[dutyH1] - 1, 5}], 
              Automatic}, 
          BarStyle -> {RGBColor[0, 0, 1], RGBColor[1, 0, 0], 
              RGBColor[0, 0.7, 0]}, BarSpacing -> -0.3, 
          BarGroupSpacing -> 0.5, 
          BarLabels -> 
            Table[If[Mod[i, 5] === 0, 
                dayname[(i + dropweekfront)*7*24*3600], ""], {i, 0, 
                Length[dutyH1] - 1}]];

Accumulated Daily Duty Cycle Histogram

dutyHistHHL = 
        BarChart[BinCounts[Last /@ dutyH2, {0, 1, 0.05}], 
          BinCounts[Last /@ dutyH1, {0, 1, 0.05}], 
          BinCounts[Last /@ dutyL1, {0, 1, 0.05}], 
          FrameLabel -> {"Duty Cycle", "Count"}, 
          Frame -> True, 
          GridLines -> {Table[i + 0.7, {i, 0, Length[dutyH1] - 1, 5}], 
              Automatic}, 
          BarStyle -> {RGBColor[0, 0, 1], RGBColor[1, 0, 0], 
              RGBColor[0, 0.7, 0]}, BarSpacing -> -0.3, 
          BarGroupSpacing -> 0.5, BarLabels -> None];

bin[#[[4]] & /@ coinc, 
      2]

Daily Coincidence Chart

binC = 2;
coincHHL = 
        ShowLegend[

StackedBarChart[
            bin[#[[4]] & /@ coinc, 
              binC], bin[#[[3]] & /@ 
                coinc, binC], 
            bin[#[[2]] & /@ coinc, 
              binC], bin[#[[1]] & /@ 
                coinc, binC], 
PlotRange -> {0, 
                1}, 
FrameLabel -> {"run time \
(2d)", "Duty Cycle"}, Frame -> True, 
            GridLines -> {Table[i + 1.2, {i, 0, Length[dutyH1] - 1, 7}], 
                Automatic}, 
            BarStyle -> {RGBColor[1, 0, 0], RGBColor[0, 0, 1], 
                RGBColor[0, 0.7, 0], RGBColor[1, 1, 0]}, 
            BarSpacing -> 0, BarGroupSpacing -> 1.0, 
            BarLabels -> 
              Table[If[Mod[i, 84/binC] === 0, 
                  dayname[binC*i*24*3600], ""], {i, 0, 
                  Length[dutyH1]/binC - 
                    1}], 
DisplayFunction -> 
              Identity], 

{{{RGBColor[1, 
                  0, 0], "Triple"}, {RGBColor[0, 0, 
                  1], "Double"}, {RGBColor[0, 0.6, 
                  0], "Single"}, {RGBColor[1, 1, 0], "None"}}, 
            LegendPosition -> {-0.9, - .4}, 
            LegendSize -> {0.35, 0.26}, 
            LegendShadow -> {0.02, -0.02}}];

binC = 7;
coincHHL = 
        ShowLegend[

StackedBarChart[
            bin[#[[4]] & /@ coinc, 
              binC], bin[#[[3]] & /@ 
                coinc, binC], 
            bin[#[[2]] & /@ coinc, 
              binC], bin[#[[1]] & /@ 
                coinc, binC], 
PlotRange -> {0, 
                1}, 
FrameLabel -> {"run time \
(w)", "Duty Cycle"}, Frame -> True, 
            GridLines -> {Table[i + 1.2, {i, 0, Length[dutyH1] - 1, 7}], 
                Automatic}, 
            BarStyle -> {RGBColor[1, 0, 0], RGBColor[0, 0, 1], 
                RGBColor[0, 0.7, 0], RGBColor[1, 1, 0]}, 
            BarSpacing -> 0, BarGroupSpacing -> 1.0, 
            BarLabels -> 
              Table[If[Mod[i, 84/binC] === 0, 
                  dayname[binC*i*24*3600], ""], {i, 0, 
                  Length[dutyH1]/binC - 
                    1}], 
DisplayFunction -> 
              Identity], 

{{{RGBColor[1, 
                  0, 0], "Triple"}, {RGBColor[0, 0, 
                  1], "Double"}, {RGBColor[0, 0.6, 
                  0], "Single"}, {RGBColor[1, 1, 0], "None"}}, 
            LegendPosition -> {-0.9, - .4}, 
            LegendSize -> {0.35, 0.26}, 
            LegendShadow -> {0.02, -0.02}}];

Daily Coincidence Chart over Past 2-3 Weeks

dropdaysfront = 
        7 (IntegerPart[Length[dutyH1]/7. ] - 
              2);
coincHHLshort = 
        ShowLegend[

StackedBarChart[
            Drop[#[[4]] & /@ coinc, 
              dropdaysfront], 
            Drop[#[[3]] & /@ coinc, 
              dropdaysfront], 
            Drop[#[[2]] & /@ coinc, 
              dropdaysfront], 
            Drop[#[[1]] & /@ coinc, 
              dropdaysfront], 
PlotRange -> {0, 
                1}, 
FrameLabel -> {"run time \
(d)", "Duty Cycle"}, Frame -> True, 
            GridLines -> {Table[i + 1, {i, 0, Length[dutyH1] - 1, 7}], 
                Automatic}, 
            BarStyle -> {RGBColor[1, 0, 0], RGBColor[0, 0, 1], 
                RGBColor[0, 0.7, 0], RGBColor[1, 1, 0]}, 
            BarLabels -> 
              Table[If[Mod[i, 7] === 0, 
                  dayname[(i + dropdaysfront)*24*3600], ""], {i, 0, 
                  Length[dutyH1] - 
                    1}], 
DisplayFunction -> 
              Identity], 

{{{RGBColor[1, 
                  0, 0], "Triple"}, {RGBColor[0, 0, 
                  1], "Double"}, {RGBColor[0, 0.6, 
                  0], "Single"}, {RGBColor[1, 1, 0], "None"}}, 
            LegendPosition -> {-0.9, - .4}, 
            LegendSize -> {0.35, 0.26}, 
            LegendShadow -> {0.02, -0.02}}];

Daily LHO/LLO Coincidence Chart over Past 2-3 Weeks

This coincidence requires the Livingston detector and at least one of the Hanford detectors in science mode

dropdaysfront = 
        7 (IntegerPart[Length[dutyH1]/7. ] - 
              2);
\(\(coincHLshort = 
        BarChart[
          Drop[coincHL, 
            dropdaysfront], 
PlotRange -> {\(-1*^-5\), 
              1}, 
FrameLabel -> {"run time (d)", "LHO/LLO Duty Cycle"}, Frame -> True, 
          GridLines -> {Table[i + 1, {i, 0, Length[dutyH1] - 1, 7}], 
              Automatic}, BarStyle -> {RGBColor\ [0.7, 0.6, 0.1]}, 
          BarLabels -> 
            Table[If[Mod[i, 7] === 0, 
                dayname[\((i + dropdaysfront)\)*24*3600], ""], {i, 0, 
                Length[dutyH1] - 1}]];\)\)

Weekly Triple Coincidence Chart over Past 4 Months

dropweekfront = Max[IntegerPart[Length[dutyH1]/7. ] - 20, 0]; 
    Drop[bin[#[[4]] & /@ coinc, 7], 
      dropweekfront]

coincHHLweekly = 
        ShowLegend[

StackedBarChart[
            Drop[bin[#[[4]] & /@ 
                  coinc, 7], dropweekfront], 
            Drop[bin[#[[3]] & /@ 
                  coinc, 7], dropweekfront], 
            Drop[bin[#[[2]] & /@ 
                  coinc, 7], dropweekfront], 
            Drop[bin[#[[1]] & /@ 
                  coinc, 7], 
              dropweekfront], 
PlotRange -> {0, 
                1}, 
FrameLabel -> {"run time \
(w)", "Duty Cycle"}, Frame -> True, 
            GridLines -> {Table[i + 1, {i, 0, Length[dutyH1] - 1, 5}], 
                Automatic}, 
            BarStyle -> {RGBColor[1, 0, 0], RGBColor[0, 0, 1], 
                RGBColor[0, 0.7, 0], RGBColor[1, 1, 0]}, 
            BarLabels -> 
              Table[If[Mod[i, 5] === 0, 
                  dayname[(i + dropweekfront)*7*24*3600], ""], {i, 0, 
                  Length[dutyH1] - 
                    1}], 
DisplayFunction -> 
              Identity], 

{{{RGBColor[1, 
                  0, 0], "Triple"}, {RGBColor[0, 0, 
                  1], "Double"}, {RGBColor[0, 0.6, 
                  0], "Single"}, {RGBColor[1, 1, 0], "None"}}, 
            LegendPosition -> {-0.9, - .4}, 
            LegendSize -> {0.35, 0.26}, 
            LegendShadow -> {0.02, -0.02}}];

Weekly LHO/LLO Coincidence Chart over Past 4 Months

This coincidence requires the Livingston detector and at least one of the Hanford detectors in science mode
This numbers include a 2.4% correction factor due to the 4h maintenance periods each week.

maintenanceCorr = 1 + (4. /(24*7)); 
    dropweekfront = 
      Max[IntegerPart[Length[dutyH1]/7. ] - 20, 
        0];
concHLweekly = 
      maintenanceCorr Drop[bin[coincHL, 7], dropweekfront]

\(\(coincHLweekly = 
        BarChart[
          concHLweekly, 
PlotRange -> {\(-1*^-5\), 
              1}, 
FrameLabel -> {"run time (w)", "LHO/LLO Duty Cycle"}, Frame -> True, 
          GridLines -> {Table[i + 1, {i, 0, Length[dutyH1] - 1, 5}], 
              Automatic}, BarStyle -> {RGBColor\ [0.7, 0.6, 0.1]}, 
          BarLabels -> 
            Table[If[Mod[i, 5] === 0, 
                dayname[\((i + dropweekfront)\)*7*24*3600], ""], {i, 0, 
                Length[dutyH1] - 1}]];\)\)

Predicted End of 1 Year of Triple Coincidence

BarChart[predictEndOfRun, BarOrientation -> Horizontal, 
        BarStyle -> {RGBColor [0.4, 0.3, 0.4]}, Frame -> True, 
        GridLines -> {Automatic, None}, 
        PlotLabel -> "Predicted End of 1 Year of Triple \
Coincidence", 
        FrameLabel -> {"predicted run time (d)", "From"}, 
        FrameTicks -> {Automatic, 
            Transpose[{{1, 2, 3, 4, 5}, predictEndOfRunLegend}], None, 
            Transpose[{{1, 2, 3, 4, 5}, predictEndOfRunDate}]}];

Overall Progress towards 1 Year of Triple Coincidence

cummTriple = Last /@ Partition[tripleCoincAcc, 7]

BarChart[cummTriple, BarStyle -> {RGBColor [0.7, 0.6, 0.1]}, 
        GridLines -> {Table[i, {i, 1, Length[cummTriple], 4}], 
            Automatic}, 
        FrameLabel -> {"run time (w)", "Accumulated Triple \
Coincidence (d)"}, Frame -> True, GridLines -> Automatic, 
        BarSpacing -> -0.2, 
        BarLabels -> 
          Table[If[Mod[i, 12] === 0, dayname[i*7*24*3600], ""], {i, 0, 
              Length[dutyH1] - 1}]
];

BarChart[100*cummTriple/365. , 
        BarStyle -> {RGBColor [0.7, 0.6, 0.1]}, 
        GridLines -> {Table[i, {i, 1, Length[cummTriple], 4}], 
            Automatic}, 
        FrameLabel -> {"run time (w)", "Accumulated Triple \
Coincidence (%y)"}, Frame -> True, GridLines -> Automatic, 
        BarSpacing -> -0.2, 
        BarLabels -> 
          Table[If[Mod[i, 12] === 0, dayname[i*7*24*3600], ""], {i, 0, 
              Length[dutyH1] - 1}]
];

\(\(Show[

Plot[
          1, {x, \(-1*^-3\), 365}, Frame -> True, 
          GridLines -> {Automatic, None}, 
          PlotRange -> {{\(-1*^-3\), 365}, {0, 1}}, 
          AspectRatio -> 0.2, FrameTicks -> {Automatic, None}, 
          FrameStyle -> {Thickness[0.01]}, 
          DisplayFunction -> 
            Identity], 

Graphics[{RGBColor[0, 1, 0], 
            Rectangle[{2, 0.018}, {tripleCoincTotal, 
                1 - 0.022}]}], 

Graphics[{RGBColor[0, 0.5, 0], 
            Text[Round[1000  tripleCoincTotal\/365. ]/10.  "%", {200, 
                0.5}, TextStyle -> {FontFamily -> "Helvetica", 
                  FontSize -> 40, 
                  FontWeight -> 
                    Bold}]}], 

DisplayFunction -> $DisplayFunction
];\)\)

Predicted End of 1 Year of LHO/LLO Coincidence

This coincidence requires the Livingston detector and at least one of the Hanford detectors in science mode

BarChart[HLpredictEndOfRun, BarOrientation -> Horizontal, 
        BarStyle -> {RGBColor [0.4, 0.3, 0.4]}, Frame -> True, 
        GridLines -> {Automatic, None}, 
        PlotLabel -> "Predicted End of 1 Year of LHO/LLO \
Coincidence", 
        FrameLabel -> {"predicted run time (d)", "From"}, 
        FrameTicks -> {Automatic, 
            Transpose[{{1, 2, 3, 4, 5}, HLpredictEndOfRunLegend}], None, 
            Transpose[{{1, 2, 3, 4, 5}, 
                HLpredictEndOfRunDate}]}];

Overall Progress towards 1 Year of LHO/LLO Coincidence

This coincidence requires the Livingston detector and at least one of the Hanford detectors in science mode

cummHL = Last /@ Partition[HLCoincAcc, 7]

BarChart[cummHL, BarStyle -> {RGBColor [0.7, 0.6, 0.1]}, 
        GridLines -> {Table[i, {i, 1, Length[cummHL], 4}], Automatic}, 
        FrameLabel -> {"run time (w)", "Accumulated LHO/LLO \
Coincidence (d)"}, Frame -> True, GridLines -> Automatic, 
        BarSpacing -> -0.2, 
        BarLabels -> 
          Table[If[Mod[i, 12] === 0, dayname[i*7*24*3600], ""], {i, 0, 
              Length[dutyH1] - 1}]
];

BarChart[100*cummHL/365. , 
        BarStyle -> {RGBColor [0.7, 0.6, 0.1]}, 
        GridLines -> {Table[i, {i, 1, Length[cummHL], 4}], Automatic}, 
        FrameLabel -> {"run time (w)", "Accumulated LHO/LLO \
Coincidence (%y)"}, Frame -> True, GridLines -> Automatic, 
        BarSpacing -> -0.2, 
        BarLabels -> 
          Table[If[Mod[i, 12] === 0, dayname[i*7*24*3600], ""], {i, 0, 
              Length[dutyH1] - 1}]
];

\(\(Show[

Plot[
          1, {x, \(-1*^-3\), 365}, Frame -> True, 
          GridLines -> {Automatic, None}, 
          PlotRange -> {{\(-1*^-3\), 365}, {0, 1}}, 
          AspectRatio -> 0.2, FrameTicks -> {Automatic, None}, 
          FrameStyle -> {Thickness[0.01]}, 
          DisplayFunction -> 
            Identity], 

Graphics[{RGBColor[0, 1, 0], 
            Rectangle[{2, 0.018}, {HLCoincTotal, 
                1 - 0.022}]}], 

Graphics[{RGBColor[0, 0.5, 0], 
            Text[Round[1000  HLCoincTotal\/365. ]/10.  "%", {200, 0.5}, 
              TextStyle -> {FontFamily -> "Helvetica", 
                  FontSize -> 40, 
                  FontWeight -> 
                    Bold}]}], 

DisplayFunction -> $DisplayFunction
];\)\)