Example #1
0
 def __init__(self, tstart, tstop, msids, recent_source="maude",
              filter_bad=False, stat='5min', user=None, password=None, 
              get_states=True, state_keys=None):
     msids = ensure_list(msids)
     tstart = get_time(tstart, fmt='secs')
     tstop = get_time(tstop, fmt='secs')
     tmid = 1.0e99
     for msid in msids:
         tm = fetch.get_time_range(msid, format="secs")[-1]
         tmid = min(tmid, tm)
     tmid = get_time(tmid, fmt='secs')
     if tmid < tstop:
         msids1 = MSIDs.from_database(msids, tstart, tstop=tmid,
                                      filter_bad=filter_bad, stat=stat)
         if recent_source == "maude":
             msids2 = MSIDs.from_maude(msids, tmid, tstop=tstop, user=user,
                                       password=password)
         elif recent_source == "tracelog":
             msids2 = _parse_tracelogs(tmid, tstop,
                                       ["/data/acis/eng_plots/acis_eng_10day.tl",
                                        "/data/acis/eng_plots/acis_dea_10day.tl"],
                                       None)
         msids = ConcatenatedMSIDs(msids1, msids2)
     else:
         msids = MSIDs.from_database(msids, tstart, tstop=tstop,
                                     filter_bad=filter_bad, stat=stat)
     if get_states:
         states = States.from_kadi_states(tstart, tstop,
                                          state_keys=state_keys)
     else:
         states = EmptyTimeSeries()
     model = EmptyTimeSeries()
     super(TelemData, self).__init__(msids, states, model)
Example #2
0
 def from_kadi(cls, name, tstart, tstop, T_init, get_msids=True, dt=328.0,
               model_spec=None, mask_bad_times=False, ephem_file=None,
               no_eclipse=False, compute_model=None):
     tstart = get_time(tstart)
     tstop = get_time(tstop)
     states = States.from_kadi_states(tstart, tstop)
     return cls(name, tstart, tstop, states=states, T_init=T_init, dt=dt,
                model_spec=model_spec, mask_bad_times=mask_bad_times,
                ephem_file=ephem_file, get_msids=get_msids, no_eclipse=no_eclipse,
                compute_model=compute_model)
Example #3
0
 def __init__(self, filenames, tbegin=None, tend=None,
              other_msids=None, get_states=True, state_keys=None):
     msids = _parse_tracelogs(tbegin, tend, filenames, other_msids)
     tmin = 1.0e55
     tmax = -1.0e55
     for v in msids.values():
         tmin = min(v.times[0].value, tmin)
         tmax = max(v.times[-1].value, tmax)
     if get_states:
         states = States.from_kadi_states(tmin, tmax,
                                          state_keys=state_keys)
     else:
         states = EmptyTimeSeries()
     model = EmptyTimeSeries()
     super(TracelogData, self).__init__(msids, states, model)
Example #4
0
 def __init__(self, tstart, tstop, msids, get_states=True, 
              filter_bad=False, stat='5min', state_keys=None, 
              interpolate=None, interpolate_times=None):
     tstart = get_time(tstart)
     tstop = get_time(tstop)
     msids = MSIDs.from_database(msids, tstart, tstop=tstop,
                                 filter_bad=filter_bad, stat=stat,
                                 interpolate=interpolate,
                                 interpolate_times=interpolate_times)
     if get_states:
         states = States.from_kadi_states(tstart, tstop, 
                                          state_keys=state_keys)
     else:
         states = EmptyTimeSeries()
     model = EmptyTimeSeries()
     super(EngArchiveData, self).__init__(msids, states, model)
Example #5
0
 def __init__(self, tstart, tstop, msids, get_states=True, 
              user=None, password=None, other_msids=None, 
              state_keys=None):
     tstart = get_time(tstart)
     tstop = get_time(tstop)
     msids = MSIDs.from_maude(msids, tstart, tstop=tstop, user=user,
                              password=password)
     if other_msids is not None:
         msids2 = MSIDs.from_database(other_msids, tstart, tstop)
         msids = CombinedMSIDs([msids, msids2])
     if get_states:
         states = States.from_kadi_states(tstart, tstop,
                                          state_keys=state_keys)
     else:
         states = EmptyTimeSeries()
     model = EmptyTimeSeries()
     super(MaudeData, self).__init__(msids, states, model)