1 """
2 Support for the IVOA Space-Time-Coordinate data model.
3
4 We're dealing with a huge data model here that probably can't be
5 fully implemented in any sense of the word.
6
7 So, we have a stripped down data model in the form of an abstract syntax
8 tree here (defined in the dm submodule). This can be built directly or
9 from various input formats (XXXast submodules). From the AST, you can
10 also build various output formats (XXXgen submodules).
11
12 All other operations should be performed on the AST.
13
14 Note that this is slow as a dog. I doubt we'll ever see performant STC
15 implementations. This is really intended for one-shot transformations,
16 e.g. into functions or a query language. Don't do any transformations
17 in serious loops.
18 """
19
20
21
22
23
24
25
26
27
28 import sys
29
30 from gavo.stc.common import (STCError, STCSParseError, STCLiteralError,
31 STCValueError, STCNotImplementedError, STCUnitError,
32 STCNamespace, stcSpaceRefFrames, stcRefPositions, ColRef)
33
34 from gavo.stc.times import (parseISODT,
35 jYearToDateTime, dateTimeToJYear,
36 bYearToDateTime, dateTimeToBYear,
37 jdnToDateTime, dateTimeToJdn,
38 mjdToDateTime, dateTimeToMJD,
39 JD_MJD,
40 datetimeMapperFactory)
41
42
43 if sys.version_info[0]>=2 and sys.version_info[1]>4:
44 from gavo.stc.conform import conform as conformTo, getSimple2Converter
45
46 from gavo.stc.dm import fromPgSphere
47
48 from gavo.stc.eq import EquivalencePolicy, defaultPolicy
49
50 from gavo.stc.stcsast import parseSTCS, parseQSTCS
51
52 from gavo.stc.stcsgen import getSTCS, getSpatialSystem
53
54 from gavo.stc.stcx import STC
55
56 from gavo.stc.stcxast import parseSTCX, parseFromETree
57
58 from gavo.stc.stcxgen import astToStan, getSTCXProfile, nodeToStan
59
60 from gavo.stc.syslib import getLibrarySystem
61
62 from gavo.stc.tapstc import (TAP_SYSTEMS, getTAPSTC, getSimpleSTCSParser,
63 parseSimpleSTCS, simpleSTCSToPolygon, getPGSphereTrafo)
64
65 from gavo.stc.utypegen import getUtypes
66
67 from gavo.stc.utypeast import parseFromUtypes
68
71