small fix
This commit is contained in:
parent
a260856297
commit
0e1c88486d
1 changed files with 7 additions and 5 deletions
|
@ -7,7 +7,7 @@ from astropy.units import (
|
||||||
)
|
)
|
||||||
from astropy.units.physical import time
|
from astropy.units.physical import time
|
||||||
from gwpy.time import Time, from_gps
|
from gwpy.time import Time, from_gps
|
||||||
from numpy import array, where
|
from numpy import array, where, diff
|
||||||
|
|
||||||
from ..component import Component
|
from ..component import Component
|
||||||
from ..lockingstate import LockingState
|
from ..lockingstate import LockingState
|
||||||
|
@ -101,9 +101,11 @@ class MeasurementFactory:
|
||||||
frame="trend",
|
frame="trend",
|
||||||
force_virgotools=force_virgotools,
|
force_virgotools=force_virgotools,
|
||||||
)
|
)
|
||||||
state_data = data["V1:META_ITF_LOCK_index"].data.astype(int)
|
state_data = array(data["V1:META_ITF_LOCK_index"].data).astype(
|
||||||
if sum(state_data.diff().abs()) != 0:
|
int
|
||||||
indexes = where(array(state_data.diff().data) != 0)[0]
|
)
|
||||||
|
if sum(abs(diff(state_data))) != 0:
|
||||||
|
indexes = where(diff(state_data) != 0)[0]
|
||||||
times_change = (
|
times_change = (
|
||||||
data["V1:META_ITF_LOCK_index"].t0
|
data["V1:META_ITF_LOCK_index"].t0
|
||||||
+ indexes * data["V1:META_ITF_LOCK_index"].dt
|
+ indexes * data["V1:META_ITF_LOCK_index"].dt
|
||||||
|
@ -122,7 +124,7 @@ class MeasurementFactory:
|
||||||
LockingState(state_data[index + 1]).name,
|
LockingState(state_data[index + 1]).name,
|
||||||
)
|
)
|
||||||
raise Exception(message)
|
raise Exception(message)
|
||||||
state = LockingState(data["V1:META_ITF_LOCK_index"].data[0])
|
state = LockingState(state_data[0])
|
||||||
injection_power = data["V1:INJ_IMC_TRA_DC_mean"].mean()
|
injection_power = data["V1:INJ_IMC_TRA_DC_mean"].mean()
|
||||||
dark_fringe_power = data["V1:DET_B1p_DC_mean"].mean()
|
dark_fringe_power = data["V1:DET_B1p_DC_mean"].mean()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue