Skip to content

Commit

Permalink
Merge pull request #68 from acisops/namespace_and_answers
Browse files Browse the repository at this point in the history
Change namespace package imports and update answers after updated sun position calculation
  • Loading branch information
jzuhone committed Jan 10, 2024
2 parents ebefc28 + 8b66296 commit bec69d0
Show file tree
Hide file tree
Showing 177 changed files with 40,328 additions and 40,330 deletions.
2 changes: 1 addition & 1 deletion acis_thermal_check/apps/acisfp_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import matplotlib
from astropy.table import Table
from cxotime import CxoTime
from Ska.Matplotlib import cxctime2plotdate
from ska_matplotlib import cxctime2plotdate

from acis_thermal_check import ACISThermalCheck, get_options, mylog

Expand Down
2 changes: 1 addition & 1 deletion acis_thermal_check/apps/cea_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import sys

import matplotlib
from Ska.Matplotlib import pointpair
from ska_matplotlib import pointpair

from acis_thermal_check import ACISThermalCheck, get_options, mylog
from acis_thermal_check.utils import PredictPlot
Expand Down
13 changes: 6 additions & 7 deletions acis_thermal_check/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@
from pathlib import Path, PurePath
from pprint import pformat

import cheta.fetch_sci as fetch
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import Ska.DBI
import Ska.engarchive.fetch_sci as fetch
import Ska.Numpy
import ska_numpy
from astropy.io import ascii
from astropy.table import Table
from cxotime import CxoTime
from kadi import events
from Ska.Matplotlib import cxctime2plotdate, plot_cxctime, pointpair
from ska_matplotlib import cxctime2plotdate, plot_cxctime, pointpair
from xija.get_model_spec import get_xija_model_spec

import acis_thermal_check
Expand Down Expand Up @@ -280,7 +279,7 @@ def get_ephemeris(self, start, stop, times):
e = fetch.MSIDset(msids, start - 2000.0, stop + 2000.0)
ephem = {}
for msid in msids:
ephem[msid] = Ska.Numpy.interpolate(e[msid].vals, e[msid].times, times)
ephem[msid] = ska_numpy.interpolate(e[msid].vals, e[msid].times, times)
return ephem

def get_states(self, tlm, T_init):
Expand Down Expand Up @@ -940,7 +939,7 @@ def make_validation_plots(self, tlm, model_spec, outdir):
pred["roll"] = model.comp["roll"].mvals

# Interpolate the model and data to a consistent set of times
idxs = Ska.Numpy.interpolate(
idxs = ska_numpy.interpolate(
np.arange(len(tlm)),
tlm["date"],
model.times,
Expand Down Expand Up @@ -1541,7 +1540,7 @@ def get_telem_values(self, tstart, days=14):
outnames = ["date"] + [name_map.get(x, x) for x in telem_msids]
vals = {name_map.get(x, x): msidset[x].vals for x in telem_msids}
vals["date"] = msidset.times
out = Ska.Numpy.structured_array(vals, colnames=outnames)
out = ska_numpy.structured_array(vals, colnames=outnames)

# tscpos needs to be converted to steps and must be in the right direction
out["tscpos"] *= -397.7225924607
Expand Down
1,278 changes: 639 additions & 639 deletions acis_thermal_check/tests/acisfp/answers/APR0217B/states.dat

Large diffs are not rendered by default.

Binary file not shown.
350 changes: 175 additions & 175 deletions acis_thermal_check/tests/acisfp/answers/AUG2517C/states.dat

Large diffs are not rendered by default.

Binary file not shown.
510 changes: 255 additions & 255 deletions acis_thermal_check/tests/acisfp/answers/AUG3017A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
572 changes: 286 additions & 286 deletions acis_thermal_check/tests/acisfp/answers/JUL2717A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
902 changes: 451 additions & 451 deletions acis_thermal_check/tests/acisfp/answers/JUL3117B/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,156 changes: 578 additions & 578 deletions acis_thermal_check/tests/acisfp/answers/MAR0617A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
848 changes: 424 additions & 424 deletions acis_thermal_check/tests/acisfp/answers/MAR0817B/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,312 changes: 656 additions & 656 deletions acis_thermal_check/tests/acisfp/answers/MAR1117A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
718 changes: 359 additions & 359 deletions acis_thermal_check/tests/acisfp/answers/MAR1517B/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,128 changes: 564 additions & 564 deletions acis_thermal_check/tests/acisfp/answers/MAR2017E/states.dat

Large diffs are not rendered by default.

Binary file not shown.
936 changes: 468 additions & 468 deletions acis_thermal_check/tests/acisfp/answers/SEP0417A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,400 changes: 700 additions & 700 deletions acis_thermal_check/tests/acisfp/answers/SEP0917C/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,278 changes: 639 additions & 639 deletions acis_thermal_check/tests/bep_pcb/answers/APR0217B/states.dat

Large diffs are not rendered by default.

Binary file not shown.
350 changes: 175 additions & 175 deletions acis_thermal_check/tests/bep_pcb/answers/AUG2517C/states.dat

Large diffs are not rendered by default.

Binary file not shown.
510 changes: 255 additions & 255 deletions acis_thermal_check/tests/bep_pcb/answers/AUG3017A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
572 changes: 286 additions & 286 deletions acis_thermal_check/tests/bep_pcb/answers/JUL2717A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
902 changes: 451 additions & 451 deletions acis_thermal_check/tests/bep_pcb/answers/JUL3117B/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,156 changes: 578 additions & 578 deletions acis_thermal_check/tests/bep_pcb/answers/MAR0617A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
848 changes: 424 additions & 424 deletions acis_thermal_check/tests/bep_pcb/answers/MAR0817B/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,312 changes: 656 additions & 656 deletions acis_thermal_check/tests/bep_pcb/answers/MAR1117A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
718 changes: 359 additions & 359 deletions acis_thermal_check/tests/bep_pcb/answers/MAR1517B/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,128 changes: 564 additions & 564 deletions acis_thermal_check/tests/bep_pcb/answers/MAR2017E/states.dat

Large diffs are not rendered by default.

Binary file not shown.
936 changes: 468 additions & 468 deletions acis_thermal_check/tests/bep_pcb/answers/SEP0417A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,400 changes: 700 additions & 700 deletions acis_thermal_check/tests/bep_pcb/answers/SEP0917C/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,620 changes: 810 additions & 810 deletions acis_thermal_check/tests/cea/answers/SEP1922A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,238 changes: 619 additions & 619 deletions acis_thermal_check/tests/cea/answers/SEP2622A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,278 changes: 639 additions & 639 deletions acis_thermal_check/tests/dea/answers/APR0217B/states.dat

Large diffs are not rendered by default.

Binary file not shown.
350 changes: 175 additions & 175 deletions acis_thermal_check/tests/dea/answers/AUG2517C/states.dat

Large diffs are not rendered by default.

Binary file not shown.
510 changes: 255 additions & 255 deletions acis_thermal_check/tests/dea/answers/AUG3017A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
572 changes: 286 additions & 286 deletions acis_thermal_check/tests/dea/answers/JUL2717A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
902 changes: 451 additions & 451 deletions acis_thermal_check/tests/dea/answers/JUL3117B/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,156 changes: 578 additions & 578 deletions acis_thermal_check/tests/dea/answers/MAR0617A/states.dat

Large diffs are not rendered by default.

Binary file modified acis_thermal_check/tests/dea/answers/MAR0617A/validation_data.pkl
Binary file not shown.
848 changes: 424 additions & 424 deletions acis_thermal_check/tests/dea/answers/MAR0817B/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,312 changes: 656 additions & 656 deletions acis_thermal_check/tests/dea/answers/MAR1117A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
718 changes: 359 additions & 359 deletions acis_thermal_check/tests/dea/answers/MAR1517B/states.dat

Large diffs are not rendered by default.

Binary file modified acis_thermal_check/tests/dea/answers/MAR1517B/validation_data.pkl
Binary file not shown.
1,128 changes: 564 additions & 564 deletions acis_thermal_check/tests/dea/answers/MAR2017E/states.dat

Large diffs are not rendered by default.

Binary file not shown.
936 changes: 468 additions & 468 deletions acis_thermal_check/tests/dea/answers/SEP0417A/states.dat

Large diffs are not rendered by default.

Binary file modified acis_thermal_check/tests/dea/answers/SEP0417A/validation_data.pkl
Binary file not shown.
1,400 changes: 700 additions & 700 deletions acis_thermal_check/tests/dea/answers/SEP0917C/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,278 changes: 639 additions & 639 deletions acis_thermal_check/tests/dpa/answers/APR0217B/states.dat

Large diffs are not rendered by default.

Binary file not shown.
350 changes: 175 additions & 175 deletions acis_thermal_check/tests/dpa/answers/AUG2517C/states.dat

Large diffs are not rendered by default.

Binary file not shown.
510 changes: 255 additions & 255 deletions acis_thermal_check/tests/dpa/answers/AUG3017A/states.dat

Large diffs are not rendered by default.

Binary file modified acis_thermal_check/tests/dpa/answers/AUG3017A/validation_data.pkl
Binary file not shown.
572 changes: 286 additions & 286 deletions acis_thermal_check/tests/dpa/answers/JUL2717A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
902 changes: 451 additions & 451 deletions acis_thermal_check/tests/dpa/answers/JUL3117B/states.dat

Large diffs are not rendered by default.

Binary file modified acis_thermal_check/tests/dpa/answers/JUL3117B/validation_data.pkl
Binary file not shown.
1,156 changes: 578 additions & 578 deletions acis_thermal_check/tests/dpa/answers/MAR0617A/states.dat

Large diffs are not rendered by default.

Binary file modified acis_thermal_check/tests/dpa/answers/MAR0617A/validation_data.pkl
Binary file not shown.
848 changes: 424 additions & 424 deletions acis_thermal_check/tests/dpa/answers/MAR0817B/states.dat

Large diffs are not rendered by default.

Binary file modified acis_thermal_check/tests/dpa/answers/MAR0817B/validation_data.pkl
Binary file not shown.
1,312 changes: 656 additions & 656 deletions acis_thermal_check/tests/dpa/answers/MAR1117A/states.dat

Large diffs are not rendered by default.

Binary file modified acis_thermal_check/tests/dpa/answers/MAR1117A/validation_data.pkl
Binary file not shown.
718 changes: 359 additions & 359 deletions acis_thermal_check/tests/dpa/answers/MAR1517B/states.dat

Large diffs are not rendered by default.

Binary file modified acis_thermal_check/tests/dpa/answers/MAR1517B/validation_data.pkl
Binary file not shown.
1,128 changes: 564 additions & 564 deletions acis_thermal_check/tests/dpa/answers/MAR2017E/states.dat

Large diffs are not rendered by default.

Binary file not shown.
936 changes: 468 additions & 468 deletions acis_thermal_check/tests/dpa/answers/SEP0417A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,400 changes: 700 additions & 700 deletions acis_thermal_check/tests/dpa/answers/SEP0917C/states.dat

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
1,278 changes: 639 additions & 639 deletions acis_thermal_check/tests/fep1_actel/answers/APR0217B/states.dat

Large diffs are not rendered by default.

Binary file not shown.
350 changes: 175 additions & 175 deletions acis_thermal_check/tests/fep1_actel/answers/AUG2517C/states.dat

Large diffs are not rendered by default.

Binary file not shown.
510 changes: 255 additions & 255 deletions acis_thermal_check/tests/fep1_actel/answers/AUG3017A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
572 changes: 286 additions & 286 deletions acis_thermal_check/tests/fep1_actel/answers/JUL2717A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
902 changes: 451 additions & 451 deletions acis_thermal_check/tests/fep1_actel/answers/JUL3117B/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,156 changes: 578 additions & 578 deletions acis_thermal_check/tests/fep1_actel/answers/MAR0617A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
848 changes: 424 additions & 424 deletions acis_thermal_check/tests/fep1_actel/answers/MAR0817B/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,312 changes: 656 additions & 656 deletions acis_thermal_check/tests/fep1_actel/answers/MAR1117A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
718 changes: 359 additions & 359 deletions acis_thermal_check/tests/fep1_actel/answers/MAR1517B/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,128 changes: 564 additions & 564 deletions acis_thermal_check/tests/fep1_actel/answers/MAR2017E/states.dat

Large diffs are not rendered by default.

Binary file not shown.
936 changes: 468 additions & 468 deletions acis_thermal_check/tests/fep1_actel/answers/SEP0417A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,400 changes: 700 additions & 700 deletions acis_thermal_check/tests/fep1_actel/answers/SEP0917C/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,278 changes: 639 additions & 639 deletions acis_thermal_check/tests/fep1_mong/answers/APR0217B/states.dat

Large diffs are not rendered by default.

Binary file not shown.
350 changes: 175 additions & 175 deletions acis_thermal_check/tests/fep1_mong/answers/AUG2517C/states.dat

Large diffs are not rendered by default.

Binary file not shown.
510 changes: 255 additions & 255 deletions acis_thermal_check/tests/fep1_mong/answers/AUG3017A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
572 changes: 286 additions & 286 deletions acis_thermal_check/tests/fep1_mong/answers/JUL2717A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
902 changes: 451 additions & 451 deletions acis_thermal_check/tests/fep1_mong/answers/JUL3117B/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,156 changes: 578 additions & 578 deletions acis_thermal_check/tests/fep1_mong/answers/MAR0617A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
848 changes: 424 additions & 424 deletions acis_thermal_check/tests/fep1_mong/answers/MAR0817B/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,312 changes: 656 additions & 656 deletions acis_thermal_check/tests/fep1_mong/answers/MAR1117A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
718 changes: 359 additions & 359 deletions acis_thermal_check/tests/fep1_mong/answers/MAR1517B/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,128 changes: 564 additions & 564 deletions acis_thermal_check/tests/fep1_mong/answers/MAR2017E/states.dat

Large diffs are not rendered by default.

Binary file not shown.
936 changes: 468 additions & 468 deletions acis_thermal_check/tests/fep1_mong/answers/SEP0417A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,400 changes: 700 additions & 700 deletions acis_thermal_check/tests/fep1_mong/answers/SEP0917C/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,278 changes: 639 additions & 639 deletions acis_thermal_check/tests/psmc/answers/APR0217B/states.dat

Large diffs are not rendered by default.

Binary file not shown.
350 changes: 175 additions & 175 deletions acis_thermal_check/tests/psmc/answers/AUG2517C/states.dat

Large diffs are not rendered by default.

Binary file not shown.
510 changes: 255 additions & 255 deletions acis_thermal_check/tests/psmc/answers/AUG3017A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
572 changes: 286 additions & 286 deletions acis_thermal_check/tests/psmc/answers/JUL2717A/states.dat

Large diffs are not rendered by default.

Binary file not shown.
902 changes: 451 additions & 451 deletions acis_thermal_check/tests/psmc/answers/JUL3117B/states.dat

Large diffs are not rendered by default.

Binary file modified acis_thermal_check/tests/psmc/answers/JUL3117B/validation_data.pkl
Binary file not shown.
1,156 changes: 578 additions & 578 deletions acis_thermal_check/tests/psmc/answers/MAR0617A/states.dat

Large diffs are not rendered by default.

Binary file modified acis_thermal_check/tests/psmc/answers/MAR0617A/validation_data.pkl
Binary file not shown.
848 changes: 424 additions & 424 deletions acis_thermal_check/tests/psmc/answers/MAR0817B/states.dat

Large diffs are not rendered by default.

Binary file not shown.
1,312 changes: 656 additions & 656 deletions acis_thermal_check/tests/psmc/answers/MAR1117A/states.dat

Large diffs are not rendered by default.

Binary file modified acis_thermal_check/tests/psmc/answers/MAR1117A/validation_data.pkl
Binary file not shown.
718 changes: 359 additions & 359 deletions acis_thermal_check/tests/psmc/answers/MAR1517B/states.dat

Large diffs are not rendered by default.

Binary file modified acis_thermal_check/tests/psmc/answers/MAR1517B/validation_data.pkl
Binary file not shown.
1,128 changes: 564 additions & 564 deletions acis_thermal_check/tests/psmc/answers/MAR2017E/states.dat

Large diffs are not rendered by default.

Binary file modified acis_thermal_check/tests/psmc/answers/MAR2017E/validation_data.pkl
Binary file not shown.
936 changes: 468 additions & 468 deletions acis_thermal_check/tests/psmc/answers/SEP0417A/states.dat

Large diffs are not rendered by default.

Binary file modified acis_thermal_check/tests/psmc/answers/SEP0417A/validation_data.pkl
Binary file not shown.
1,400 changes: 700 additions & 700 deletions acis_thermal_check/tests/psmc/answers/SEP0917C/states.dat

Large diffs are not rendered by default.

Binary file not shown.
13 changes: 6 additions & 7 deletions acis_thermal_check/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@

import matplotlib.pyplot as plt
import numpy as np
import Ska.Numpy
import Ska.Sun
from Ska.Matplotlib import cxctime2plotdate
import ska_numpy
from ska_matplotlib import cxctime2plotdate, set_time_ticks
from xija.limits import get_limit_color

TASK_DATA = Path(PurePath(__file__).parent / "..").resolve()
Expand All @@ -19,7 +18,7 @@
def calc_pitch_roll(times, ephem, states):
"""
Calculate the normalized sun vector in body coordinates.
Shamelessly copied from Ska.engarchive.derived.pcad but
Shamelessly copied from cheta.derived.pcad but
modified to use commanded states quaternions
Parameters
Expand All @@ -35,9 +34,9 @@ def calc_pitch_roll(times, ephem, states):
-------
3 NumPy arrays: time, pitch and roll
"""
from Ska.engarchive.derived.pcad import arccos_clip, qrotate
from cheta.derived.pcad import arccos_clip, qrotate

idxs = Ska.Numpy.interpolate(
idxs = ska_numpy.interpolate(
np.arange(len(states)),
states["tstart"],
times,
Expand Down Expand Up @@ -231,7 +230,7 @@ def __init__(
# Add a vertical line to mark the start time of the load
ax.axvline(load_start, linestyle="-", color="g", zorder=2, linewidth=2.0)

Ska.Matplotlib.set_time_ticks(ax)
set_time_ticks(ax)
for label in ax.xaxis.get_ticklabels():
label.set_rotation_mode("anchor")
label.set_rotation(30)
Expand Down

0 comments on commit bec69d0

Please sign in to comment.