Debian Codegraph @

gavo/resources/src/template-epntap.rd_

raw
1 <!-- A template for a DaCHS EPN-TAP 2.0 service.
2 To fill it out, search and replace %.*%
3
4 Note that this assumes you want to publish files on your local disk.
5 If that's not true, you will probably want to remove the localfile mixin
6 and cut down on optional columns.
7
8 Note that this doesn't expose all features of DaCHS. For advanced
9 projects, you'll still have to read documentation... -->
10 \tpldesc{Solar system data via EPN-TAP 2.0}
11
12 <resource schema="\resdir" resdir=".">
13 <meta name="creationDate">\now</meta>
14
15 <!-- for subject below, please note that all EPN-TAP services have
16 to give at least one of exoplanet-astronomy, solar-physics,
17 solar-system-astronomy, and planetary-science -->
18 \commonmeta
19 <table id="epn_core" onDisk="True" adql="True">
20 <publish sets="local,ivo_managed"/>
21
22 <!-- See http://docs.g-vo.org/DaCHS/ref.html#the-epntap2-table-2-0-mixin
23 for a complete list of optional_columns -->
24 <mixin
25 spatial_frame_type="%one of celestial, body, cartesian, cylindrical, spherical, healpix, none%"
26 optional_columns="%add/remove optional columns here; %
27 access_url access_format access_estsize access_md5
28 thumbnail_url file_name species filter alt_target_name target_region
29 feature_name bib_reference publisher spatial_coordinate_description
30 spatial_origin time_scale"
31 >//epntap2#table-2_0</mixin>
32 <mixin>//epntap2#localfile-2_0</mixin>
33 <!-- add non-standard columns here, like this:
34
35 <column name="width" type="double precision"
36 unit="m" ucd="phys.size"
37 tablehead="Width"
38 description="Object width in its rest frame, measured with the
39 researcher's child's ruler."/> -->
40 </table>
41
42 <data id="import">
43 <sources pattern="%resdir-relative pattern, like data/*.txt%"/>
44
45 <!-- the grammar really depends on your input material. See
46 http://docs.g-vo.org/DaCHS/ref.html#grammars-available,
47 in particular cdfHeaderGrammar, fitsProdGrammar, or pdsGrammar.
48 If nothing else fits, try a customGrammar.
49
50 If parsing from files, do not forget to use the products#define
51 rowfilter (http://docs.g-vo.org/DaCHS/ref.html#products-define)
52 as shown below. -->
53
54 <fitsProdGrammar>
55 <rowfilter procDef="//products#define">
56 <bind key="table">'\\schema.epn_core'</bind>
57 </rowfilter>
58 </fitsProdGrammar>
59
60 <make table="epn_core">
61 <rowmaker idmaps="*">
62 <!-- in the following, you can write python expressions (e.g., strings
63 are in single or double quotes), and/or pull things from the
64 records your grammar spits out with @key
65
66 Just delete bind elements you can't fill.
67
68 Refer to http://docs.g-vo.org/DaCHS/ref.html#epntap2-populate-2-0
69 for more information on the parameters.
70 -->
71
72 <apply procDef="//epntap2#populate-2_0" name="fillepn">
73 <bind key="c1_resol_max">%upper limit of spatial resolution in coordinate 1%</bind>
74 <bind key="c1_resol_min">%lower limit of spatial resolution in coordinate 1%</bind>
75 <bind key="c1min">%coverage, lower limit in the first coordinate%</bind>
76 <bind key="c1max">%coverage, upper limit in the first coordinate%</bind>
77 <bind key="c2_resol_max">%upper limit of spatial resolution in coordinate 2%</bind>
78 <bind key="c2_resol_min">%lower limit of spatial resolution in coordinate 2%</bind>
79 <bind key="c2min">%coverage, lower limit in the second coordinate%</bind>
80 <bind key="c2max">%coverage, upper limit in the second coordinate%</bind>
81 <bind key="c3_resol_max">%upper limit of spatial resolution in coordinate 3%</bind>
82 <bind key="c3_resol_min">%lower limit of spatial resolution in coordinate 3%</bind>
83 <bind key="c3min">%coverage, lower limit in the third coordinate%</bind>
84 <bind key="c3max">%coverage, upper limit in the third coordinate%</bind>
85
86 <bind key="creation_date">%Date of first entry of this granule; perhaps: datetime.datetime.now()%</bind>
87 <bind key="dataproduct_type">%'im' for image, 'sp' for spectrum; see http://dc.g-vo.org/tableinfo/mpc.epn_core#note-et_prod for what values are defined here.%</bind>
88 <bind key="emergence_max">%Emergence angle during data acquisition, upper limit%</bind>
89 <bind key="emergence_min">%Emergence angle during data acquisition, lower limit.%</bind>
90 <bind key="granule_gid">%set to equal values to group related granules; make it a constant string if you don't have groups%</bind>
91 <bind key="granule_uid">%Unique id for this thing (within this table; use \\srcstem if publishing files)%</bind>
92 <bind key="incidence_max">%Incidence angle (solar zenithal angle) during data acquisition, upper limit%</bind>
93 <bind key="incidence_min">%Incidence angle (solar zenithal angle) during data acquisition, lower limit.%</bind>
94 <bind key="instrument_host_name">%see http://www.minorplanetcenter.net/iau/lists/ObsCodesF.html or http://nssdc.gsfc.nasa.gov/nmc/ for terms to use here%</bind>
95 <bind key="instrument_name">%use complete name + usual acronym, as in 'VISIBLE AND INFRARED THERMAL IMAGING SPECTROMETER VIRTIS'%</bind>
96 <bind key="measurement_type">%UCD(s) defining the data, with multiple entries separated by hash (#) characters.%</bind>
97 <bind key="modification_date">%Date of last modification (used to handle mirroring; have a datetime instance or an ISO string here)%</bind>
98 <bind key="obs_id">%Should be identical for granules resulting from the same observation; put in the file name if you have nothing else.%</bind>
99 <bind key="phase_max">%Phase angle during data acquisition, upper limit%</bind>
100 <bind key="phase_min">%Phase angle during data acquisition, lower limit.%</bind>
101 <bind key="processing_level">%CODMAC calibration level; see http://dc.g-vo.org/tableinfo/titan.epn_core#note-et_cal for what values are defined here.%</bind>
102 <bind key="release_date">%Start of public access period%</bind>
103 <bind key="s_region">%A spatial footprint of a dataset located on a spherical coordinate system%</bind>
104 <bind key="service_title">%An acronym helpful when combining rows from multiple services%</bind>
105 <bind key="spectral_range_max">%Spectral range, upper limit, in Hz%</bind>
106 <bind key="spectral_range_min">%Spectral range, lower limit, in Hz%</bind>
107 <bind key="spectral_resolution_max">%Spectral resolution, upper limit, as nu/delta nu%</bind>
108 <bind key="spectral_resolution_min">%Spectral resolution, lower limit, as nu/delta nu%</bind>
109 <bind key="spectral_sampling_step_max">%Spectral sampling step, upper limit, in Hz%</bind>
110 <bind key="spectral_sampling_step_min">%Spectral sampling step, lower limit, in Hz%</bind>
111 <bind key="target_class">%Choose from asteroid, dwarf_planet, planet, satellite, comet, exoplanet, interplanetary_medium, ring, sample, sky, spacecraft, spacejunk, star, UNKNOWN%</bind>
112 <bind key="target_name">%Name of the target object, preferably according to the official IAU nomenclature. As appropriate, take these from the exoplanet encyclopedia http://exoplanet.eu, the meteor catalog at http://www.lpi.usra.edu/meteor/, the catalog of stardust samples at http://curator.jsc.nasa.gov/stardust/catalog/%</bind>
113 <bind key="target_region">%Substructure observed (e.g., Atmosphere, Surface). Take terms from them Spase dictionary at http://www.spase-group.org/docs/dictionary%</bind>
114
115 <!-- for times, use dateTimeToJdn() to turn datetime instances
116 into the JD values required by epn-tap. -->
117 <bind key="time_exp_max">%Integration time of the measurement, upper limit, in s%</bind>
118 <bind key="time_exp_min">%Integration time of the measurement, lower limit, in s%</bind>
119 <bind key="time_max">%Acquisition stop time (in JD)%</bind>
120 <bind key="time_min">%Acquisition start time (in JD)%</bind>
121 <bind key="time_sampling_step_max">%Sampling time for measurements of dynamical phenomena, upper limit, in s%</bind>
122 <bind key="time_sampling_step_min">%Sampling time for measurements of dynamical phenomena, lower limit, in s%</bind>
123 <bind key="time_scale">%Time scale used for the various times. Choose from TT, TDB, TOG, TOB, TAI, UTC, GPS, UNKNOWN%</bind>
124 <bind key="time_refposition">%Reference position used for the various times. The standard is a bit vague at this time. Remove this if unsure.%</bind>
125 </apply>
126
127 <apply procDef="//epntap2#populate-localfile-2_0"/>
128
129 <!-- fill your custom columns with elements like
130 <map dest="my_col_name">"foo"+@bar+"quux"</map>
131 -->
132 </rowmaker>
133 </make>
134 </data>
135
136
137
138 <regSuite title="\resdir regression">
139 <regTest title="\resdir EPN-TAP serves some data">
140 <url parSet="TAP" QUERY="SELECT * from \resdir.epn_core
141 WHERE granule_uid='foo/bar'"
142 >/tap/sync</url>
143 <code>
144 rec = self.getFirstVOTableRow()
145 print(rec)
146 self.fail("write some assertions about the record just shown")
147 </code>
148 </regTest>
149 </regSuite>
150 </resource>