Open Gregg140 opened 10 years ago
@Gregg140
Sorry, this is indeed a documentation error and the OrbitPoint
and ManvrSeq
models are not kadi events which can be queried using the usual mechanism. These are not "events" because they have no duration and instead correspond to points in time. (Yes the English is a bit ambiguous, but for kadi an "event" is something with a distinct start and stop time). You can still work with these models, but directly using the Django query mechanism. For example:
>>> from kadi.events import models
>>> models.<TAB>
models.AsciiTableEvent models.Dump models.LoadSegment models.Obsid models.Scs107 models.get_event_models models.np
models.BaseEvent models.Dwell models.LttBad models.Orbit models.TlmEvent models.get_manvr_templates models.operator
models.BaseModel models.Eclipse models.MAX_GAP models.OrbitPoint models.TscMove models.import_ska models.os
models.CAP models.Event models.MajorEvent models.Pad models.Update models.interpolate models.pyyaks
models.DarkCal models.FaMove models.Manvr models.PassPlan models.ZERO_DT models.izip models.table
models.DarkCalReplica models.GratingMove models.ManvrSeq models.Quat models.count models.logger models.utils
models.DateTime models.IFotEvent models.MyManager models.RadZone models.fetch models.models
models.DsnComm models.IntervalPad models.NormalSun models.SafeSun models.fuzz_states models.msidset_interpolate
>>> models.OrbitPoint?
Type: ModelBase
String Form:<class 'kadi.events.models.OrbitPoint'>
File: /proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/kadi-0.10-py2.7.egg/kadi/events/models.py
Docstring:
Orbit point
**Fields**
=========== ============ ===========
Field Type Description
=========== ============ ===========
orbit ForeignKey
date Char(21)
name Char(9)
orbit_num Integer
descr Char(50)
=========== ============ ===========
Constructor information:
Definition:models.OrbitPoint(self, *args, **kwargs)
>>> orbit_points = models.OrbitPoint.objects.filter(date__gte='2010:001:00:00:00',
date__lte='2010:003:00:00:00')
>>> for orbit_point in orbit_points:
... print orbit_point.date, orbit_point.orbit_num, orbit_point.name, ':', orbit_point.descr
...
2010:001:03:39:30.249 1437 EAPOGEE : ORBIT APOGEE
2010:001:22:38:25.449 1437 EALT1 : ALTITUDE ZONE ENTRY 1
2010:001:22:38:27.669 1437 XALT1 : ALTITUDE ZONE EXIT 1
2010:002:04:43:55.919 1437 EQF003M : PROTON FLUX ENTRY FOR ENERGY 0 LEVEL 0 KP 3 MEAN
2010:002:04:43:55.919 1437 EQF013M : PROTON FLUX ENTRY FOR ENERGY 0 LEVEL 1 KP 3 MEAN
2010:002:04:43:56.035 1437 OORMPDS : RADMON DISABLE
2010:002:06:52:08.035 1437 EEF1000 : ELECTRON 1 RADIATION ENTRY 0
2010:002:09:52:45.649 1437 EALT0 : ALTITUDE ZONE ENTRY0
2010:002:09:52:46.498 1437 XALT0 : ALTITUDE ZONE EXIT 0
2010:002:11:22:03.666 1437 EPERIGEE : ORBIT PERIGEE
2010:002:12:51:20.520 1437 EALT0 : ALTITUDE ZONE ENTRY0
2010:002:12:51:21.380 1437 XALT0 : ALTITUDE ZONE EXIT 0
2010:002:12:57:36.182 1437 XASCNCR : ORBIT ASCENDING NODE CROSSING EXIT
2010:002:12:57:36.182 1438 EASCNCR : ORBIT ASCENDING NODE CROSSING
2010:002:15:42:08.035 1438 XEF1000 : ELECTRON 1 RADIATION EXIT 0
2010:002:17:23:55.035 1438 OORMPEN : RADMON ENABLE
2010:002:17:23:55.919 1438 XQF013M : PROTON FLUX EXIT FOR ENERGY 0 LEVEL 1 KP 3 MEAN
2010:002:19:17:55.919 1438 XQF003M : PROTON FLUX EXIT FOR ENERGY 0 LEVEL 0 KP 3 MEAN
As an action from this I will update the docs to reflect the correct list of query-able events and show this example for using OrbitPoints
.
According to the Kadi documentation,
http://cxc.cfa.harvard.edu/mta/ASPECT/tool_doc/kadi/index.html
an available event is "orbit_points". When I try to use that, I get the following failure:
Other events work fine. For example:
succeeds:
Please let me know if my usage is incorrect.
thanks