Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add code to support and test computed MSIDs #191

Merged
merged 19 commits into from
Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Ska/engarchive/derived/base.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst

from Chandra.Time import DateTime
from .. import fetch, fetch_eng
import Ska.Numpy
import numpy as np
from .. import cache
Expand Down Expand Up @@ -35,6 +34,8 @@ def calc(self, data):
raise NotImplementedError

def fetch(self, start, stop):
from .. import fetch

unit_system = fetch.get_units() # cache current units and restore after fetch
fetch.set_units(self.unit_system)
dataset = fetch.MSIDset(self.rootparams, start, stop)
Expand Down Expand Up @@ -89,6 +90,7 @@ def fetch(self, start, stop):
return dataset

def __call__(self, start, stop):
from .. import fetch_eng
dataset = fetch_eng.MSIDset(self.rootparams, start, stop, filter_bad=True)

# Translate state codes "ON" and "OFF" to 1 and 0, respectively.
Expand Down
Loading