Skip to content

Commit c18ff00

Browse files
committed
Adding hrc_15v state, updating default states, updating acisfp test thermal model, updating tests
1 parent 35591e1 commit c18ff00

File tree

6 files changed

+2188
-1539
lines changed

6 files changed

+2188
-1539
lines changed

acispy/states.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import requests
33
from acispy.units import get_units
44
from acispy.utils import ensure_list, find_load, calc_off_nom_rolls, \
5-
dict_to_array
5+
dict_to_array, default_state_keys
66
from acispy.units import APQuantity, APStringArray, Quantity
77
from acispy.time_series import TimeSeriesData
88
import numpy as np
@@ -83,6 +83,8 @@ def from_kadi_states(cls, tstart, tstop, state_keys=None):
8383
tstop = CxoTime(tstop).date
8484
if state_keys is not None:
8585
state_keys = ensure_list(state_keys)
86+
else:
87+
state_keys = default_state_keys
8688
t = states.get_states(tstart, tstop, state_keys=state_keys,
8789
merge_identical=True).as_array()
8890
return cls(t)
@@ -112,6 +114,10 @@ def from_load_file(cls, states_file):
112114
@classmethod
113115
def from_commands(cls, cmds, state_keys=None):
114116
from kadi.commands import states
117+
if state_keys is not None:
118+
state_keys = ensure_list(state_keys)
119+
else:
120+
state_keys = default_state_keys
115121
t = states.get_states(cmds=cmds, state_keys=state_keys,
116122
merge_identical=True).as_array()
117123
return cls(t)

0 commit comments

Comments
 (0)