Debian Codegraph @

gavo/resources/inputs/__system__/epntap2.rd

raw
1 <resource schema="__system">
2 <meta name="creationDate">2017-02-08T11:00:00</meta>
3 <meta name="description">Definitions dealing with the EPN-TAP2 table
4 schema used to describe solar system observations.</meta>
5 <meta name="subject">solar-system-astronomy</meta>
6
7 <STREAM id="_minmax">
8 <doc>
9 Generates a pair of minimum/maximum column pairs. You must
10 fill out basename, baseucd, basedescr, unit.
11 </doc>
12 <column name="\basename\+_min" type="double precision"
13 ucd="\baseucd;stat.min" unit="\unit"
14 description="\basedescr, lower limit.">
15 <property key="std">1</property>
16 </column>
17 <column name="\basename\+_max" type="double precision"
18 ucd="\baseucd;stat.max" unit="\unit"
19 description="\basedescr, upper limit">
20 <property key="std">1</property>
21 </column>
22 </STREAM>
23 <STREAM id="_c_minmax">
24 <doc>
25 Generates a pair of minimum/maximum column pairs. You must
26 fill out basename, baseucd, basedescr, unit.
27 </doc>
28 <column name="\basename\+min" type="double precision"
29 ucd="\baseucd;stat.min" unit="\unit"
30 description="\basedescr, lower limit.">
31 <property key="std">1</property>
32 </column>
33 <column name="\basename\+max" type="double precision"
34 ucd="\baseucd;stat.max" unit="\unit"
35 description="\basedescr, upper limit">
36 <property key="std">1</property>
37 </column>
38 </STREAM>
39
40 <table id="optional_columns">
41 <!-- to get this list (for, e.g., allepn), run in vi:
42 :.,/<.table/!grep "<column" | sed -e 's/.*name="\([^"]*\)".*/\1/'
43 -->
44 <column name="access_url" type="text"
45 ucd="meta.ref.url;meta.file"
46 description="URL of the data file, case sensitive. If present,
47 then access_format and access_estsize are mandatory."
48 displayHint="type=url">
49 <property key="std">1</property>
50 <property key="extsect">common</property>
51 </column>
52
53 <column name="access_format" type="text"
54 ucd="meta.code.mime"
55 description="File format type (RFC 6838 Media Type a.k.a. MIME type)">
56 <property key="std">1</property>
57 <property key="extsect">common</property>
58 </column>
59
60 <column name="access_estsize" type="integer"
61 ucd="phys.size;meta.file" unit="kbyte"
62 description="Estimated file size in kbyte.">
63 <property key="std">1</property>
64 <values nullLiteral="-1"/>
65 <property key="extsect">common</property>
66 </column>
67
68 <column name="access_md5" type="text"
69 ucd="meta.checksum;meta.file"
70 description="MD5 Hash for the file">
71 <property key="std">1</property>
72 <property key="extsect">common</property>
73 </column>
74
75 <column name="thumbnail_url" type="text"
76 ucd="meta.ref.url;meta.preview"
77 description="URL of a thumbnail image with predefined size (png ~200
78 pix, for use in a client only)"
79 displayHint="type=url">
80 <property key="std">1</property>
81 <property key="extsect">common</property>
82 </column>
83
84 <column name="file_name" type="text"
85 ucd="meta.id;meta.file"
86 description="Name of the data file only, case sensitive"
87 displayHint="type=url">
88 <property key="std">1</property>
89 <property key="extsect">common</property>
90 </column>
91
92 <column name="processing_level_desc" type="text"
93 ucd="meta.note"
94 description="Describes specificities of the processing level">
95 <property key="std">1</property>
96 <property key="extsect">common</property>
97 </column>
98
99 <column name="datalink_url" type="text"
100 ucd="meta.ref.url"
101 tablehead="Datalink"
102 description="Link to a datalink document for this dataset"
103 displayHint="type=url">
104 <property key="std">1</property>
105 <property key="extsect">common</property>
106 </column>
107
108 <column name="species" type="text"
109 ucd="meta.id;phys.atmol"
110 description="Identifies a chemical species, case sensitive">
111 <property key="std">1</property>
112 <property key="extsect">common</property>
113 </column>
114
115 <column name="messenger" type="text"
116 ucd="instr.bandpass"
117 tablehead="Messenger"
118 description="Vector of measured signal, including electromagnetic
119 band, from http://www.ivoa.net/rdf/messenger">
120 <property key="std">1</property>
121 <property key="extsect">common</property>
122 </column>
123
124 <column name="alt_target_name" type="text"
125 ucd="meta.id;src"
126 description="Provides alternative target name if more
127 common (e.g. comets); multiple identifiers can be separated
128 by hashes">
129 <property key="std">1</property>
130 <property key="extsect">common</property>
131 </column>
132 <column name="target_region" type="text"
133 ucd="meta.id;src;obs.field"
134 description="Type of region or feature of interest">
135 <property key="std">1</property>
136 <property key="extsect">common</property>
137 </column>
138 <column name="feature_name" type="text"
139 ucd="meta.id;src;obs.field"
140 description="Secondary name (can be standard name of region of
141 interest)">
142 <property key="std">1</property>
143 <property key="extsect">common</property>
144 </column>
145
146 <column name="publisher" type="text"
147 ucd="meta.curation"
148 description="A short string identifying the entity running
149 the data service used">
150 <property key="std">1</property>
151 <property key="extsect">common</property>
152 </column>
153 <column name="bib_reference" type="text"
154 ucd="meta.bib"
155 description="Bibcode or DOI preferred if available,
156 or other bibliographic identifier or URL">
157 <property key="std">1</property>
158 <property key="extsect">common</property>
159 </column>
160
161 <column name="internal_reference" type="text"
162 ucd="meta.id.cross"
163 tablehead="Related"
164 description="Related granule_uid(s) in the current service;
165 hash-separated">
166 <property key="std">1</property>
167 <property key="extsect">common</property>
168 </column>
169
170 <column name="external_link" type="text"
171 ucd="meta.ref.url"
172 tablehead="See also"
173 description="Web page providing more details on this granule"
174 displayHint="type=url">
175 <property key="std">1</property>
176 <property key="extsect">common</property>
177 </column>
178
179 <column name="coverage" type="smoc"
180 ucd="pos.outline;obs.field" unit=""
181 description="(ST)MOC footprint, valid for celestial,
182 spherical, or body-fixed frames + time coverage">
183 <property key="std">1</property>
184 <property key="extsect">common</property>
185 </column>
186
187 <column name="spatial_coordinate_description" type="text"
188 ucd="meta.code.class;pos.frame"
189 description="ID of specific coordinate system and version or
190 properties.">
191 <property key="std">1</property>
192 <property key="extsect">common</property>
193 </column>
194 <column name="spatial_origin" type="text"
195 ucd="meta.ref;pos.frame"
196 description="Defines the frame origin">
197 <property key="std">1</property>
198 <property key="extsect">common</property>
199 </column>
200
201 <column name="time_refposition" type="text"
202 ucd="meta.ref;time.scale"
203 description="Defines where the time is measured (e.g., ground vs.
204 spacecraft). Defaults to the observer's frame">
205 <property key="std">1</property>
206 <property key="extsect">common</property>
207 </column>
208 <column name="time_scale" type="text"
209 ucd="time.scale"
210 description="Defaults to UTC in data services; takes values
211 from http://www.ivoa.net/rdf/time_scale otherwise">
212 <property key="std">1</property>
213 <property key="extsect">common</property>
214 </column>
215
216 <column name="subsolar_longitude_min" type="double precision"
217 unit="deg" ucd="pos.bodyrc.lon;stat.min"
218 description="Minimum sub-solar point longitude">
219 <property key="std">1</property>
220 <property key="extsect">common</property>
221 </column>
222 <column name="subsolar_longitude_max" type="double precision"
223 unit="deg" ucd="pos.bodyrc.lon;stat.max"
224 description="Maximum sub-solar point longitude">
225 <property key="std">1</property>
226 <property key="extsect">common</property>
227 </column>
228 <column name="subsolar_latitude_min" type="double precision"
229 unit="deg" ucd="pos.bodyrc.lat;stat.min"
230 description="Minimum sub-solar point latitude">
231 <property key="std">1</property>
232 <property key="extsect">common</property>
233 </column>
234 <column name="subsolar_latitude_max" type="double precision"
235 unit="deg" ucd="pos.bodyrc.lat;stat.max"
236 description="Maximum sub-solar point latitude">
237 <property key="std">1</property>
238 <property key="extsect">common</property>
239 </column>
240
241 <column name="subobserver_longitude_min" type="double precision"
242 unit="deg" ucd="pos.bodyrc.lon;stat.min"
243 description="Minimum sub-observer point longitude (sub-Earth for ground based observations)">
244 <property key="std">1</property>
245 <property key="extsect">common</property>
246 </column>
247 <column name="subobserver_longitude_max" type="double precision"
248 unit="deg" ucd="pos.bodyrc.lon;stat.max"
249 description="Maximum sub-observer point longitude (sub-Earth for ground based observations)">
250 <property key="std">1</property>
251 <property key="extsect">common</property>
252 </column>
253 <column name="subobserver_latitude_min" type="double precision"
254 unit="deg" ucd="pos.bodyrc.lat;stat.min"
255 description="Minimum sub-observer point latitude (sub-Earth for ground based observations)">
256 <property key="std">1</property>
257 <property key="extsect">common</property>
258 </column>
259 <column name="subobserver_latitude_max" type="double precision"
260 unit="deg" ucd="pos.bodyrc.lat;stat.max"
261 description="Maximum sub-observer point latitude (sub-Earth for ground based observations)">
262 <property key="std">1</property>
263 <property key="extsect">common</property>
264 </column>
265
266 <column name="ra" type="double precision"
267 unit="deg" ucd="pos.eq.ra;meta.main"
268 description="Right ascension">
269 <property key="std">1</property>
270 <property key="extsect">common</property>
271 </column>
272 <column name="dec" type="double precision"
273 unit="deg" ucd="pos.eq.dec;meta.main"
274 description="Declination">
275 <property key="std">1</property>
276 <property key="extsect">common</property>
277 </column>
278
279 <column name="radial_distance_min" type="double precision"
280 unit="km" ucd="pos.distance;pos.bodyrc;stat.min"
281 description="Min distance from observed area to body center">
282 <property key="std">1</property>
283 <property key="extsect">common</property>
284 </column>
285 <column name="radial_distance_max" type="double precision"
286 unit="km" ucd="pos.distance;pos.bodyrc;stat.max"
287 description="Max distance from observed area to body center">
288 <property key="std">1</property>
289 <property key="extsect">common</property>
290 </column>
291
292 <column name="altitude_fromshape_min" type="double precision"
293 unit="km" ucd="pos.bodyrc.alt;stat.min"
294 description="Min altitude of observed area above shape model / DTM">
295 <property key="std">1</property>
296 <property key="extsect">common</property>
297 </column>
298 <column name="altitude_fromshape_max" type="double precision"
299 unit="km" ucd="pos.bodyrc.alt;stat.max"
300 description="Max altitude of observed area above shape model / DTM">
301 <property key="std">1</property>
302 <property key="extsect">common</property>
303 </column>
304
305 <column name="solar_longitude_min" type="double precision"
306 unit="deg" ucd="pos.ecliptic.lon;pos.heliocentric;stat.min"
307 description="Min Solar longitude Ls (location on orbit / season)">
308 <property key="std">1</property>
309 <property key="extsect">common</property>
310 </column>
311 <column name="solar_longitude_max" type="double precision"
312 unit="deg" ucd="pos.ecliptic.lon;pos.heliocentric;stat.max"
313 description="Max Solar longitude Ls (location on orbit / season)">
314 <property key="std">1</property>
315 <property key="extsect">common</property>
316 </column>
317
318 <column name="local_time_min" type="double precision"
319 unit="h" ucd="time.phase;time.period.rotation;stat.min"
320 description="Min local time at observed region">
321 <property key="std">1</property>
322 <property key="extsect">common</property>
323 </column>
324 <column name="local_time_max" type="double precision"
325 unit="h" ucd="time.phase;time.period.rotation;stat.max"
326 description="Max local time at observed region">
327 <property key="std">1</property>
328 <property key="extsect">common</property>
329 </column>
330 <column name="target_distance_min" type="double precision"
331 unit="km" ucd="pos.distance;stat.min"
332 description="Min observer-target distance">
333 <property key="std">1</property>
334 <property key="extsect">common</property>
335 </column>
336 <column name="target_distance_max" type="double precision"
337 unit="km" ucd="pos.distance;stat.max"
338 description="Max observer-target distance">
339 <property key="std">1</property>
340 <property key="extsect">common</property>
341 </column>
342 <column name="target_time_min" type="timestamp"
343 ucd="time.start;src"
344 description="Min observing time in target frame">
345 <property key="std">1</property>
346 <property key="extsect">common</property>
347 </column>
348 <column name="target_time_max" type="timestamp"
349 ucd="time.end;src"
350 description="Max observing time in target frame">
351 <property key="std">1</property>
352 <property key="extsect">common</property>
353 </column>
354
355 <column name="earth_distance_min" type="double precision"
356 unit="AU" ucd="pos.distance;stat.min"
357 description="Min Earth-target distance">
358 <property key="std">1</property>
359 <property key="extsect">common</property>
360 </column>
361 <column name="earth_distance_max" type="double precision"
362 unit="AU" ucd="pos.distance;stat.max"
363 description="Max Earth-target distance">
364 <property key="std">1</property>
365 <property key="extsect">common</property>
366 </column>
367
368 <column name="sun_distance_min" type="double precision"
369 unit="AU" ucd="pos.distance;stat.min"
370 description="Min Sun-target distance">
371 <property key="std">1</property>
372 <property key="extsect">common</property>
373 </column>
374 <column name="sun_distance_max" type="double precision"
375 unit="AU" ucd="pos.distance;stat.max"
376 description="Max Sun-target distance">
377 <property key="std">1</property>
378 <property key="extsect">common</property>
379 </column>
380
381
382 <column name="filter" type="text"
383 ucd="meta.id;instr.filter"
384 description="Identifies filter in use, typically for images">
385 <property key="std">1</property>
386 <property key="extsect">common</property>
387 </column>
388
389 <column name="instrument_type" type="text"
390 ucd="meta.id;instr"
391 description="type of instrument">
392 <property key="std">1</property>
393 <property key="extsect">common</property>
394 </column>
395
396 <column name="acquisition_id" type="text"
397 ucd="meta.id"
398 description="ID of the data file/acquisition in the original archive">
399 <property key="std">1</property>
400 <property key="extsect">common</property>
401 </column>
402 <column name="proposal_id" type="text"
403 ucd="meta.id;obs.proposal"
404 description="Proposal identifier">
405 <property key="std">1</property>
406 <property key="extsect">common</property>
407 </column>
408 <column name="proposal_pi" type="text"
409 ucd="meta.id.PI;obs.proposal"
410 description="Proposal principal investigator">
411 <property key="std">1</property>
412 <property key="extsect">common</property>
413 </column>
414 <column name="proposal_title" type="text"
415 ucd="meta.title;obs.proposal"
416 description="Proposal title">
417 <property key="std">1</property>
418 <property key="extsect">common</property>
419 </column>
420 <column name="campaign" type="text"
421 ucd="meta.id;obs.proposal"
422 description="Name of the observational campaign">
423 <property key="std">1</property>
424 <property key="extsect">common</property>
425 </column>
426 <column name="target_description" type="text"
427 ucd="meta.note;src"
428 description="Original target keywords">
429 <property key="std">1</property>
430 <property key="extsect">common</property>
431 </column>
432 <column name="proposal_target_name" type="text"
433 ucd="meta.note;obs.proposal"
434 description="target name as in proposal title">
435 <property key="std">1</property>
436 <property key="extsect">common</property>
437 </column>
438 <column name="target_apparent_radius" type="double precision"
439 unit="arcsec" ucd="phys.angSize;src"
440 description="Apparent radius of the target">
441 <property key="std">1</property>
442 <property key="extsect">common</property>
443 </column>
444
445 <!-- Solar System Objects extension -->
446
447 <column name="mean_radius" type="double precision"
448 unit="km" ucd="phys.size.radius"
449 description="Mean radius of a solar system object.">
450 <property key="std">1</property>
451 <property key="extsect">solar system objects</property>
452 </column>
453 <column name="equatorial_radius" type="double precision"
454 unit="km" ucd="phys.size.radius"
455 description="Equatorial radius of a solar system object.">
456 <property key="std">1</property>
457 <property key="extsect">solar system objects</property>
458 </column>
459 <column name="polar_radius" type="double precision"
460 unit="km" ucd="phys.size.radius"
461 description="Polar radius of a solar system object.">
462 <property key="std">1</property>
463 <property key="extsect">solar system objects</property>
464 </column>
465 <column name="mass" type="double precision"
466 unit="kg" ucd="phys.mass"
467 description="Mass of object">
468 <property key="std">1</property>
469 <property key="extsect">solar system objects</property>
470 </column>
471 <column name="diameter" type="double precision"
472 unit="km" ucd="phys.size.diameter"
473 description="Target diameter, or equivalent diameter for binary objects">
474 <property key="std">1</property>
475 <property key="extsect">solar system objects</property>
476 </column>
477 <column name="sidereal_rotation_period" type="double precision"
478 unit="h" ucd="time.period.rotation"
479 description="Object rotation rate">
480 <property key="std">1</property>
481 <property key="extsect">solar system objects</property>
482 </column>
483 <column name="dynamical_class" type="text"
484 ucd="meta.code.class;src"
485 description="Class of small body, from a controlled vocabulary (see
486 the EPN-TAP specification)">
487 <property key="std">1</property>
488 <property key="extsect">solar system objects</property>
489 </column>
490 <column name="dynamical_type" type="text"
491 ucd="meta.code.class;src"
492 description="Subdivision of the dynamical class, from a controlled
493 vocabulary">
494 <property key="std">1</property>
495 <property key="extsect">solar system objects</property>
496 </column>
497 <column name="taxonomy_code" type="text"
498 ucd="src.class.color"
499 description="Code for target taxonomy">
500 <property key="std">1</property>
501 <property key="extsect">solar system objects</property>
502 </column>
503
504 <!-- Maps extension -->
505
506 <column name="map_projection" type="text"
507 ucd="pos.projection"
508 description="The map projection, preferably as a FITS name or code,
509 or parameters as a free string">
510 <property key="std">1</property>
511 <property key="extsect">maps</property>
512 </column>
513 <column name="map_height" type="double precision"
514 unit="pixel" ucd="phys.size"
515 description="Map size in px">
516 <property key="std">1</property>
517 <property key="extsect">maps</property>
518 </column>
519 <column name="map_width" type="double precision"
520 unit="pixel" ucd="phys.size"
521 description="Map size in px">
522 <property key="std">1</property>
523 <property key="extsect">maps</property>
524 </column>
525 <column name="map_scale" type="text"
526 ucd="pos.wcs.scale"
527 description="Format TBD">
528 <property key="std">1</property>
529 <property key="extsect">maps</property>
530 </column>
531 <column name="pixelscale_min" type="double precision"
532 unit="km/pixel" ucd="instr.scale;stat.min"
533 description="Min pixel size at a surface">
534 <property key="std">1</property>
535 <property key="extsect">maps</property>
536 </column>
537 <column name="pixelscale_max" type="double precision"
538 unit="km/pixel" ucd="instr.scale;stat.max"
539 description="Max pixel size at a surface">
540 <property key="std">1</property>
541 <property key="extsect">maps</property>
542 </column>
543
544 <!-- contributive works -->
545 <column name="original_publisher" type="text"
546 ucd="meta.note"
547 description="Refers to the source of the data, e. g., in
548 compilations of experimental data">
549 <property key="std">1</property>
550 <property key="extsect">contributive works</property>
551 </column>
552 <column name="observer_name" type="text"
553 ucd="meta.id.PI;obs.observer"
554 description="Observer name">
555 <property key="std">1</property>
556 <property key="extsect">contributive works</property>
557 </column>
558 <column name="observer_institute" type="text"
559 ucd="meta.note"
560 description="Observer institute">
561 <property key="std">1</property>
562 <property key="extsect">contributive works</property>
563 </column>
564 <column name="observer_id" type="integer"
565 ucd="meta.id.PI"
566 description="Image observer numeric identifier in service">
567 <property key="std">1</property>
568 <values nullLiteral="-1"/>
569 <property key="extsect">contributive works</property>
570 </column>
571 <column name="observer_code" type="text"
572 ucd="meta.id.PI"
573 description="Image observer's username in service">
574 <property key="std">1</property>
575 <property key="extsect">contributive works</property>
576 </column>
577 <column name="observer_location" type="text"
578 ucd="pos;obs.observer"
579 description="Broad, free-text location and geographic position of the
580 observer or telescope. Can be used when the exact location cannot be
581 released">
582 <property key="std">1</property>
583 <property key="extsect">contributive works</property>
584 </column>
585
586 <column name="observer_country" type="text"
587 ucd="meta.note;obs.observer"
588 description="Image observer's country of residence">
589 <property key="std">1</property>
590 <property key="extsect">contributive works</property>
591 </column>
592 <column name="observer_lon" type="double precision"
593 ucd="obs.observer;pos.earth.lon"
594 description="Observer's approximate longitude">
595 <property key="std">1</property>
596 <property key="extsect">contributive works</property>
597 </column>
598 <column name="observer_lat" type="double precision"
599 ucd="obs.observer;pos.earth.lat"
600 description="Observer's approximate latitude">
601 <property key="std">1</property>
602 <property key="extsect">contributive works</property>
603 </column>
604 <column name="producer_name" type="text"
605 ucd="meta.note"
606 description="Data producer name, especially in compilations
607 of experimental data">
608 <property key="std">1</property>
609 <property key="extsect">contributive works</property>
610 </column>
611 <column name="producer_institute" type="text"
612 ucd="meta.note"
613 description="Data producer institute, e. g., in compilations
614 of experimental data">
615 <property key="std">1</property>
616 <property key="extsect">contributive works</property>
617 </column>
618
619 <column name="magnitude" type="double precision"
620 unit="mag" ucd="phys.magAbs"
621 description="Absolute magnitude. For small bodies, from HG
622 magnitude system">
623 <property key="std">1</property>
624 <property key="extsect">common</property>
625 </column>
626 <column name="flux" type="double precision"
627 unit="mJy" ucd="phot.flux.density"
628 description="Target flux">
629 <property key="std">1</property>
630 <property key="extsect">common</property>
631 </column>
632 <column name="albedo" type="double precision"
633 ucd="phys.albedo"
634 description="Target albedo">
635 <property key="std">1</property>
636 <property key="extsect">common</property>
637 </column>
638
639
640 <!-- Particle spectroscopy -->
641
642 <column name="particle_spectral_type" type="text"
643 ucd="meta.id;phys.particle"
644 description="The type of axis in use; this is one of ``energy`` (which
645 is then in eV), ``mass`` (amu) or ``mass/charge`` (in amu/e). If you
646 use any of this, please contact the DaCHS authors; this
647 needs more work">
648 <property key="std">1</property>
649 <property key="extsect">particle spectroscopy</property>
650 </column>
651 <column name="particle_spectral_range_min" type="double precision"
652 ucd="phys.mass;phys.particle;stat.min"
653 description="Lower bound of the mass/energy of the particles">
654 <property key="std">1</property>
655 <property key="extsect">particle spectroscopy</property>
656 </column>
657 <column name="particle_spectral_range_max" type="double precision"
658 ucd="phys.mass;phys.particle;stat.max"
659 description="Upper bound of the mass/energy of the particles">
660 <property key="std">1</property>
661 <property key="extsect">particle spectroscopy</property>
662 </column>
663 <column name="particle_spectral_sampling_step_min" type="double precision"
664 ucd="spect.resolution;phys.particle;stat.min"
665 description="Minimal separation of different values in the spectral
666 range">
667 <property key="std">1</property>
668 <property key="extsect">particle spectroscopy</property>
669 </column>
670 <column name="particle_spectral_sampling_step_max" type="double precision"
671 ucd="spect.resolution;phys.particle;stat.max"
672 description="Maximal separation of different values in the spectral
673 range">
674 <property key="std">1</property>
675 <property key="extsect">particle spectroscopy</property>
676 </column>
677 <column name="particle_spectral_resolution_min" type="double precision"
678 ucd="spect.resolution;phys.particle;stat.min"
679 description="Best resolution of the spectral range">
680 <property key="std">1</property>
681 <property key="extsect">particle spectroscopy</property>
682 </column>
683 <column name="particle_spectral_resolution_max" type="double precision"
684 ucd="spect.resolution;phys.particle;stat.max"
685 description="Worst resolution of the spectral range">
686 <property key="std">1</property>
687 <property key="extsect">particle spectroscopy</property>
688 </column>
689
690 <!-- Experimental spectroscopy -->
691
692 <column name="sample_id" type="text"
693 ucd="meta.id;src"
694 description="Additional ID of the sample, e.g., a specific fraction of a
695 meteorite (in addition to target_name). Intended to refer to a
696 pre-existing catalogue of a collection, will therefore contain
697 a name/id mainly for local use">
698 <property key="std">1</property>
699 <property key="extsect">experimental spectroscopy</property>
700 </column>
701 <column name="sample_classification" type="text"
702 ucd="meta.note;phys.composition"
703 description="Information related to class, sub-class, species… as hash
704 list">
705 <property key="std">1</property>
706 <property key="extsect">experimental spectroscopy</property>
707 </column>
708 <column name="species_inchikey" type="text"
709 ucd="meta.id;phys.atmol"
710 description="Machine-readable description of the species involved.
711 Can be a hash list">
712 <property key="std">1</property>
713 <property key="extsect">experimental spectroscopy</property>
714 </column>
715 <column name="grain_size_min" type="double precision"
716 unit="um" ucd="phys.size;stat.min"
717 description="Min sample particle size">
718 <property key="std">1</property>
719 <property key="extsect">experimental spectroscopy</property>
720 </column>
721 <column name="grain_size_max" type="double precision"
722 unit="um" ucd="phys.size;stat.max"
723 description="Max sample particle size">
724 <property key="std">1</property>
725 <property key="extsect">experimental spectroscopy</property>
726 </column>
727 <column name="azimuth_min" type="double precision"
728 unit="deg" ucd="pos.azimuth;stat.min"
729 description="Min azimuth angle for illumination">
730 <property key="std">1</property>
731 <property key="extsect">experimental spectroscopy</property>
732 </column>
733 <column name="azimuth_max" type="double precision"
734 unit="deg" ucd="pos.azimuth;stat.max"
735 description="Max azimuth angle for illumination">
736 <property key="std">1</property>
737 <property key="extsect">experimental spectroscopy</property>
738 </column>
739 <column name="pressure" type="double precision"
740 unit="1e5Pa" ucd="phys.pressure"
741 description="Ambient pressure">
742 <property key="std">1</property>
743 <property key="extsect">experimental spectroscopy</property>
744 </column>
745 <column name="temperature" type="double precision"
746 unit="K" ucd="phys.temperature"
747 description="Ambient temperature">
748 <property key="std">1</property>
749 <property key="extsect">experimental spectroscopy</property>
750 </column>
751 <column name="sample_desc" type="text"
752 ucd="meta.note"
753 description="Describes the sample, its origin, and possible preparation.
754 Can be a hash list">
755 <property key="std">1</property>
756 <property key="extsect">experimental spectroscopy</property>
757 </column>
758 <column name="setup_desc" type="text"
759 ucd="meta.note"
760 description="Describes the experimental setup. Can be a hash list">
761 <property key="std">1</property>
762 <property key="extsect">experimental spectroscopy</property>
763 </column>
764 <column name="data_calibration_desc" type="text"
765 ucd="meta.note"
766 description="Provides information on post-processing. Can be a hash list">
767 <property key="std">1</property>
768 <property key="extsect">experimental spectroscopy</property>
769 </column>
770 <column name="geometry_type" type="text"
771 ucd="meta.note;instr.setup"
772 description="Type of observation, from a controlled vocabulary (cf.
773 EPN-TAP specification). Can be a hash list">
774 <property key="std">1</property>
775 <property key="extsect">experimental spectroscopy</property>
776 </column>
777 <column name="spectrum_type" type="text"
778 ucd="meta.note;instr.setup"
779 description="Type of spectral observation, from a controlled vocabulary
780 (under construction). Can be a hash list">
781 <property key="std">1</property>
782 <property key="extsect">experimental spectroscopy</property>
783 </column>
784 <column name="measurement_atmosphere" type="text"
785 ucd="meta.note;phys.pressure"
786 description="Describes experimental conditions. ``vacuum`` for
787 measurements under vacuum">
788 <property key="std">1</property>
789 <property key="extsect">experimental spectroscopy</property>
790 </column>
791
792 <!-- APIS extension -->
793
794 <column name="obs_mode" type="text"
795 ucd="meta.code;instr.setup"
796 description="Observing mode">
797 <property key="std">1</property>
798 <property key="extsect">APIS</property>
799 </column>
800 <column name="detector_name" type="text"
801 ucd="meta.id;instr.det"
802 description="Detector name">
803 <property key="std">1</property>
804 <property key="extsect">APIS</property>
805 </column>
806 <column name="opt_elem" type="text"
807 ucd="meta.id;instr.param"
808 description="Optical element name">
809 <property key="std">1</property>
810 <property key="extsect">APIS</property>
811 </column>
812 <column name="north_pole_position" type="double precision"
813 unit="deg" ucd="pos.posAng"
814 description="North pole position angle with respect to celestial north
815 pole">
816 <property key="std">1</property>
817 <property key="extsect">APIS</property>
818 </column>
819 <column name="target_primary_hemisphere" type="text"
820 ucd="meta.id;obs.field"
821 description="Primary observed hemisphere">
822 <property key="std">1</property>
823 <property key="extsect">APIS</property>
824 </column>
825 <column name="target_secondary_hemisphere" type="text"
826 ucd="meta.id;obs.field"
827 description="Secondary observed hemisphere">
828 <property key="std">1</property>
829 <property key="extsect">APIS</property>
830 </column>
831 <column name="orientation" type="double precision"
832 ucd="pos.posAng" unit="deg"
833 description="Position angle of an image y-axis, in direct sense from
834 north">
835 <property key="std">1</property>
836 <property key="extsect">APIS</property>
837 </column>
838 <column name="platesc" type="double precision"
839 unit="arcsec/pixel" ucd="instr.scale"
840 description="pixel angular size or platescale (on sky only)">
841 <property key="std">1</property>
842 <property key="extsect">APIS</property>
843 </column>
844 <column name="measurement_unit" type="text"
845 ucd="meta.unit"
846 description="Physical unit (FITS: BUNIT)">
847 <property key="std">1</property>
848 <property key="extsect">APIS</property>
849 </column>
850
851 <!-- Events extension -->
852
853 <column name="event_type" type="text"
854 ucd="meta.code.class"
855 description="Type of event from a controlled vocabulary (meteor_shower,
856 fireball, lunar_flash, comet_tail_crossing...)">
857 <property key="std">1</property>
858 <property key="extsect">events</property>
859 </column>
860 <column name="event_status" type="text"
861 ucd="meta.code.status"
862 description="One of prediction, observation, or utility">
863 <property key="std">1</property>
864 <property key="extsect">events</property>
865 </column>
866 <column name="event_cite" type="text"
867 ucd="meta.code.status"
868 description="Following VOEvent, this is one of followup,
869 supersedes, retraction">
870 <property key="std">1</property>
871 <property key="extsect">events</property>
872 </column>
873
874 <!-- Orbital Elements extension -->
875 <column name="semi_major_axis" type="double precision"
876 unit="AU" ucd="phys.size.smajAxis"
877 description="">
878 <property key="std">1</property>
879 <property key="extsect">orbital elements</property>
880 </column>
881 <column name="inclination" type="double precision"
882 unit="deg" ucd="src.orbital.inclination"
883 description="Orbit inclination">
884 <property key="std">1</property>
885 <property key="extsect">orbital elements</property>
886 </column>
887 <column name="eccentricity" type="double precision"
888 ucd="src.orbital.eccentricity"
889 description="Orbit eccentricity">
890 <property key="std">1</property>
891 <property key="extsect">orbital elements</property>
892 </column>
893 <column name="long_asc" type="double precision"
894 unit="deg" ucd="src.orbital.node"
895 description="Longitude of ascending node, J2000.0">
896 <property key="std">1</property>
897 <property key="extsect">orbital elements</property>
898 </column>
899 <column name="arg_perihel" type="double precision"
900 unit="deg" ucd="src.orbital.periastron"
901 description="Argument of Perihelion, J2000.0">
902 <property key="std">1</property>
903 <property key="extsect">orbital elements</property>
904 </column>
905 <column name="mean_anomaly" type="double precision"
906 unit="deg" ucd="src.orbital.meanAnomaly"
907 description="Mean anomaly at the epoch">
908 <property key="std">1</property>
909 <property key="extsect">orbital elements</property>
910 </column>
911 <column name="epoch" type="double precision"
912 unit="d" ucd="time.epoch"
913 description="Epoch of interest">
914 <property key="std">1</property>
915 <property key="extsect">orbital elements</property>
916 </column>
917 </table>
918
919 <mixinDef id="table-2_0">
920
921 <!-- the lower part of the documentation is produced by the following
922 piece of python:
923
924 import textwrap
925 from gavo import api
926
927 accum, sects = [], {}
928
929 for col in api.resolveCrossId("//epntap2#optional_columns"):
930 sects.setdefault(col.getProperty("extsect"), []).append(col)
931
932 for sectName, cols in sorted(sects.items()):
933 sectName = f"The {sectName} extension"
934 accum.append("\n"+sectName+"\n"+("."*len(sectName)))
935 for col in sorted(cols, key=lambda c: c.name):
936 accum.append(f":{col.name}:")
937 accum.append(textwrap.indent(textwrap.fill(col.description), " "))
938
939 print(textwrap.indent("\n".join(accum), "\t\t\t"))
940 -->
941
942
943 <doc><![CDATA[
944 This mixin defines a table suitable for publication via the
945 `EPN-TAP protocol`_.
946
947 According to the standard definition, tables mixing this in
948 should be called ``epn_core``. The mixin already arranges
949 for the table to be accessible by ADQL and be on disk.
950
951 If you absolutely cannot use //products#define, you will have
952 to manually provide the prodtblFsize (file size in *bytes*),
953 prodtblAccref (product URL), and prodtblPreview (thumbnail image
954 or None) keys in what's coming from your grammar.
955
956 Use the `//epntap2#populate-2_0`_ apply in rowmakers
957 feeding tables mixing this in.
958
959 .. _EPN-TAP protocol: https://ivoa.net/documents/EPNTAP/
960
961 The mixin has a parameter ``optional_columns``, which accepts
962 space-separated columns from the following extensions:
963
964 The APIS extension
965 ..................
966 :detector_name:
967 Detector name
968 :north_pole_position:
969 North pole position angle with respect to celestial north pole
970 :obs_mode:
971 Observing mode
972 :opt_elem:
973 Optical element name
974 :orientation:
975 Position angle of an image y-axis, in direct sense from north
976 :platesc:
977 pixel angular size or platescale (on sky only)
978 :target_primary_hemisphere:
979 Primary observed hemisphere
980 :target_secondary_hemisphere:
981 Secondary observed hemisphere
982
983 The common extension
984 ....................
985 :access_estsize:
986 Estimated file size in kbyte.
987 :access_format:
988 File format type (RFC 6838 Media Type a.k.a. MIME type)
989 :access_md5:
990 MD5 Hash for the file
991 :access_url:
992 URL of the data file, case sensitive. If present, then access_format
993 and access_estsize are mandatory.
994 :acquisition_id:
995 ID of the data file/acquisition in the original archive
996 :albedo:
997 Target albedo
998 :alt_target_name:
999 Provides alternative target name if more common (e.g. comets);
1000 multiple identifiers can be separated by hashes
1001 :altitude_fromshape_max:
1002 Max altitude of observed area above shape model / DTM
1003 :altitude_fromshape_min:
1004 Min altitude of observed area above shape model / DTM
1005 :bib_reference:
1006 Bibcode or DOI preferred if available, or other bibliographic
1007 identifier or URL
1008 :campaign:
1009 Name of the observational campaign
1010 :datalink_url:
1011 Link to a datalink document for this dataset
1012 :dec:
1013 Declination
1014 :earth_distance_max:
1015 Max Earth-target distance
1016 :earth_distance_min:
1017 Min Earth-target distance
1018 :external_link:
1019 Web page providing more details on this granule
1020 :feature_name:
1021 Secondary name (can be standard name of region of interest)
1022 :file_name:
1023 Name of the data file only, case sensitive
1024 :filter:
1025 Identifies filter in use, typically for images
1026 :flux:
1027 Target flux
1028 :instrument_type:
1029 type of instrument
1030 :internal_reference:
1031 Related granule_uid(s) in the current service; hash-separated
1032 :local_time_max:
1033 Max local time at observed region
1034 :local_time_min:
1035 Min local time at observed region
1036 :magnitude:
1037 Absolute magnitude. For small bodies, from HG magnitude system
1038 :messenger:
1039 Vector of measured signal, including electromagnetic band, from
1040 http://www.ivoa.net/rdf/messenger
1041 :processing_level_desc:
1042 Describes specificities of the processing level
1043 :proposal_id:
1044 Proposal identifier
1045 :proposal_pi:
1046 Proposal principal investigator
1047 :proposal_target_name:
1048 target name as in proposal title
1049 :proposal_title:
1050 Proposal title
1051 :publisher:
1052 A short string identifying the entity running the data service used
1053 :ra:
1054 Right ascension
1055 :radial_distance_max:
1056 Max distance from observed area to body center
1057 :radial_distance_min:
1058 Min distance from observed area to body center
1059 :coverage:
1060 (ST)MOC footprint, valid for celestial, spherical, or body-fixed
1061 frames + time coverage
1062 :solar_longitude_max:
1063 Max Solar longitude Ls (location on orbit / season)
1064 :solar_longitude_min:
1065 Min Solar longitude Ls (location on orbit / season)
1066 :spatial_coordinate_description:
1067 ID of specific coordinate system and version or properties.
1068 :spatial_origin:
1069 Defines the frame origin
1070 :species:
1071 Identifies a chemical species, case sensitive
1072 :subobserver_latitude_max:
1073 Maximum sub-observer point latitude (sub-Earth for ground based
1074 observations)
1075 :subobserver_latitude_min:
1076 Minimum sub-observer point latitude (sub-Earth for ground based
1077 observations)
1078 :subobserver_longitude_max:
1079 Maximum sub-observer point longitude (sub-Earth for ground based
1080 observations)
1081 :subobserver_longitude_min:
1082 Minimum sub-observer point longitude (sub-Earth for ground based
1083 observations)
1084 :subsolar_latitude_max:
1085 Maximum sub-solar point latitude
1086 :subsolar_latitude_min:
1087 Minimum sub-solar point latitude
1088 :subsolar_longitude_max:
1089 Maximum sub-solar point longitude
1090 :subsolar_longitude_min:
1091 Minimum sub-solar point longitude
1092 :sun_distance_max:
1093 Max Sun-target distance
1094 :sun_distance_min:
1095 Min Sun-target distance
1096 :target_apparent_radius:
1097 Apparent radius of the target
1098 :target_description:
1099 Original target keywords
1100 :target_distance_max:
1101 Max observer-target distance
1102 :target_distance_min:
1103 Min observer-target distance
1104 :target_region:
1105 Type of region or feature of interest
1106 :target_time_max:
1107 Max observing time in target frame
1108 :target_time_min:
1109 Min observing time in target frame
1110 :thumbnail_url:
1111 URL of a thumbnail image with predefined size (png ~200 pix, for use
1112 in a client only)
1113 :time_refposition:
1114 Defines where the time is measured (e.g., ground vs. spacecraft).
1115 Defaults to the observer's frame
1116 :time_scale:
1117 Defaults to UTC in data services; takes values from
1118 http://www.ivoa.net/rdf/time_scale otherwise
1119
1120 The contributive works extension
1121 ................................
1122 :observer_code:
1123 Image observer's username in service
1124 :observer_country:
1125 Image observer's country of residence
1126 :observer_id:
1127 Image observer numeric identifier in service
1128 :observer_institute:
1129 Observer institute
1130 :observer_lat:
1131 Observer's approximate latitude
1132 :observer_location:
1133 Broad, free-text location and geographic position of the observer or
1134 telescope. Can be used when the exact location cannot be released
1135 :observer_lon:
1136 Observer's approximate longitude
1137 :observer_name:
1138 Observer name
1139 :original_publisher:
1140 Refers to the source of the data, e. g., in compilations of
1141 experimental data
1142 :producer_institute:
1143 Data producer institute, e. g., in compilations of experimental data
1144 :producer_name:
1145 Data producer name, especially in compilations of experimental data
1146
1147 The events extension
1148 ....................
1149 :event_cite:
1150 Following VOEvent, this is one of followup, supersedes, retraction
1151 :event_status:
1152 One of prediction, observation, or utility
1153 :event_type:
1154 Type of event from a controlled vocabulary (meteor_shower, fireball,
1155 lunar_flash, comet_tail_crossing...)
1156
1157 The experimental spectroscopy extension
1158 .......................................
1159 :azimuth_max:
1160 Max azimuth angle for illumination
1161 :azimuth_min:
1162 Min azimuth angle for illumination
1163 :data_calibration_desc:
1164 Provides information on post-processing. Can be a hash list
1165 :geometry_type:
1166 Type of observation, from a controlled vocabulary (cf. EPN-TAP
1167 specification). Can be a hash list
1168 :grain_size_max:
1169 Max sample particle size
1170 :grain_size_min:
1171 Min sample particle size
1172 :measurement_atmosphere:
1173 Describes experimental conditions. ``vacuum`` for measurements under
1174 vacuum
1175 :pressure:
1176 Ambient pressure
1177 :sample_classification:
1178 Information related to class, sub-class, species… as hash list
1179 :sample_desc:
1180 Describes the sample, its origin, and possible preparation. Can be a
1181 hash list
1182 :sample_id:
1183 Additional ID of the sample, e.g., a specific fraction of a meteorite
1184 (in addition to target_name). Intended to refer to a pre-existing
1185 catalogue of a collection, will therefore contain a name/id mainly for
1186 local use
1187 :species_inchikey:
1188 Machine-readable description of the species involved. Can be a hash
1189 list
1190 :setup_desc:
1191 Describes the experimental setup. Can be a hash list
1192 :spectrum_type:
1193 Type of spectral observation, from a controlled vocabulary (under
1194 construction). Can be a hash list
1195 :temperature:
1196 Ambient temperature
1197
1198 The maps extension
1199 ..................
1200 :map_height:
1201 Map size in px
1202 :map_projection:
1203 The map projection, preferably as a FITS name or code, or parameters
1204 as a free string
1205 :map_scale:
1206 Format TBD
1207 :map_width:
1208 Map size in px
1209 :pixelscale_max:
1210 Max pixel size at a surface
1211 :pixelscale_min:
1212 Min pixel size at a surface
1213
1214 The orbital elements extension
1215 ..............................
1216 :arg_perihel:
1217 Argument of Perihelion, J2000.0
1218 :eccentricity:
1219 Orbit eccentricity
1220 :epoch:
1221 Epoch of interest
1222 :inclination:
1223 Orbit inclination
1224 :long_asc:
1225 Longitude of ascending node, J2000.0
1226 :mean_anomaly:
1227 Mean anomaly at the epoch
1228 :semi_major_axis:
1229
1230
1231 The particle spectroscopy extension
1232 ...................................
1233 :particle_spectral_range_max:
1234 Upper bound of the mass/energy of the particles
1235 :particle_spectral_range_min:
1236 Lower bound of the mass/energy of the particles
1237 :particle_spectral_resolution_max:
1238 Worst resolution of the spectral range
1239 :particle_spectral_resolution_min:
1240 Best resolution of the spectral range
1241 :particle_spectral_sampling_step_max:
1242 Maximal separation of different values in the spectral range
1243 :particle_spectral_sampling_step_min:
1244 Minimal separation of different values in the spectral range
1245 :particle_spectral_type:
1246 The type of axis in use; this is one of ``energy`` (which is then in
1247 eV), ``mass`` (amu) or ``mass/charge`` (in amu/e). If you use any of
1248 this, please contact the DaCHS authors; this needs more work
1249
1250 The solar system objects extension
1251 ..................................
1252 :diameter:
1253 Target diameter, or equivalent diameter for binary objects
1254 :dynamical_class:
1255 Class of small body, from a controlled vocabulary (see the EPN-TAP
1256 specification)
1257 :dynamical_type:
1258 Subdivision of the dynamical class, from a controlled vocabulary
1259 :equatorial_radius:
1260 Equatorial radius of a solar system object.
1261 :mass:
1262 Mass of object
1263 :mean_radius:
1264 Mean radius of a solar system object.
1265 :polar_radius:
1266 Polar radius of a solar system object.
1267 :sidereal_rotation_period:
1268 Object rotation rate
1269 :taxonomy_code:
1270 Code for target taxonomy
1271 ]]></doc>
1272
1273 <mixinPar key="spatial_frame_type" description="Flavour of the
1274 coordinate system. Since this determines the units of the
1275 coordinates columns, this must be set globally for the
1276 entire dataset. Values defined by EPN-TAP and understood
1277 by this mixin include celestial, body, cartesian, cylindrical,
1278 spherical, none." />
1279 <mixinPar key="optional_columns" description="Space-separated list
1280 of names of optional columns to include. For the column names
1281 available include see sect. 3 of the EPN-TAP specification or
1282 the list of the various sections above."
1283 >__EMPTY__</mixinPar>
1284
1285 <processEarly>
1286 <setup>
1287 <code>
1288 from gavo import base
1289 from gavo import rscdef
1290 from gavo.protocols import sdm
1291
1292 META_BY_FRAME_TYPE = {
1293 # (units, ucds, descriptions)
1294 "celestial": (
1295 ("deg", "deg", "AU"),
1296 ("pos.eq.ra", "pos.eq.dec", "pos.distance"),
1297 ( "Right Ascension (ICRS)",
1298 "Declination (ICRS)",
1299 "Distance from coordinate origin")),
1300
1301 "body": (
1302 ("deg", "deg", "km"),
1303 ("pos.bodyrc.lon", "pos.bodyrc.lat", "pos.bodyrc.alt"),
1304 ( "Longitude on body",
1305 "Latitude on body",
1306 "Altitude from reference surface")),
1307
1308 "cartesian": (
1309 ("km", "km", "km"),
1310 ("pos.cartesian.x", "pos.cartesian.y", "pos.cartesian.z"),
1311 ( "Cartesian coordinate in x direction",
1312 "Cartesian coordinate in y direction",
1313 "Cartesian coordinate in z direction")),
1314
1315 "spherical": (
1316 ("m", "deg", "deg"),
1317 ("pos.distance", "pos.az.zd", "pos.az.azi"),
1318 ( "Radial distance in spherical coordinates",
1319 "Polar angle or colatitude in spherical coordinates",
1320 "Azimuth in spherical coordinates")),
1321
1322 "cylindrical": (
1323 ("km", "deg", "km"),
1324 ("pos.distance", "pos.az.azi", "pos.distance"),
1325 ( "Radial distance in cylindrical coordinates",
1326 "Azimuth in cylindrical coordinates",
1327 "Height in cylindrical coordinates")),
1328
1329 "none": (
1330 ("", "", ""),
1331 ("", "", ""),
1332 ("", "", "")),
1333 }
1334
1335 # maps coordinate UCDs to resolution UCDs as per table note 2
1336 RESOLUTION_UCD = {
1337 "pos": "pos.resolution",
1338 "pos.az.ai": "pos.angResolution",
1339 "pos.distance": "pos.resolution",
1340 "pos.az.zd": "pos.angResolution",
1341 "pos.az.azi": "pos.angResolution",
1342 "pos.eq.ra": "pos.angResolution",
1343 "pos.eq.dec": "pos.angResolution",
1344 "pos.bodyrc.lon": "pos.angResolution",
1345 "pos.bodyrc.lat": "pos.angResolution",
1346 "pos.bodyrc.alt": "pos.resolution",
1347 "pos.cartesian.x": "pos.resolution",
1348 "pos.cartesian.y": "pos.resolution",
1349 "pos.cartesian.z": "pos.resolution",
1350 }
1351
1352 def setFrameMeta(tableDef, spatialFrameType):
1353 if spatialFrameType not in META_BY_FRAME_TYPE:
1354 raise base.StructureError("Unknown EPN-TAP frame type: %s."%
1355 spatialFrameType,
1356 hint="Known frame types are: %s"%(
1357 ", ".join(META_BY_FRAME_TYPE)))
1358
1359 units, ucds, descriptions = META_BY_FRAME_TYPE[spatialFrameType]
1360 for cooIndex in range(3):
1361 prefix = "c%d"%(cooIndex+1)
1362 for postfix in ["min", "max",
1363 "_resol_min", "_resol_max"]:
1364 col = tableDef.getColumnByName(prefix+postfix)
1365
1366 if units[cooIndex]:
1367 col.unit = col.unit.replace(
1368 "__replace_framed__", units[cooIndex])
1369 else:
1370 col.unit = ""
1371
1372 if ucds[cooIndex]:
1373 col.ucd = col.ucd.replace(
1374 "__replace_framed__", ucds[cooIndex])
1375 col.ucd = col.ucd.replace(
1376 "__replace_resolution_ucd__",
1377 RESOLUTION_UCD[ucds[cooIndex]])
1378 else:
1379 col.ucd = ""
1380
1381 if descriptions[cooIndex]:
1382 col.description = col.description.replace(
1383 "__replace_framed__", descriptions[cooIndex])
1384 else:
1385 col.description = ("(This data collection does not give"
1386 " coordinates)")
1387
1388 def addOptionalColumns(tableDef, columnNames):
1389 sourceTable = base.resolveCrossId("//epntap2#optional_columns")
1390 for columnName in columnNames.split():
1391 tableDef.columns.append(
1392 sourceTable.getColumnByName(columnName))
1393 </code>
1394 </setup>
1395 <code>
1396 setFrameMeta(substrate, mixinPars["spatial_frame_type"])
1397 substrate.setProperty("spatial_frame_type",
1398 mixinPars["spatial_frame_type"])
1399 if mixinPars["optional_columns"]:
1400 addOptionalColumns(substrate, mixinPars["optional_columns"])
1401 </code>
1402 </processEarly>
1403
1404 <events>
1405 <adql>True</adql>
1406 <onDisk>True</onDisk>
1407 <meta name="utype">ivo://ivoa.net/std/epntap#table-2.0</meta>
1408 <meta name="info" infoName="SERVICE_PROTOCOL"
1409 infoValue="2.0">EPN-TAP</meta>
1410
1411 <dm>
1412 (votable:Coords) {
1413 time: {
1414 frame: {
1415 timescale: @time_scale | UTC
1416 refPosition: @time_refposition | TOPOCENTER
1417 time0: 0
1418 }
1419 location: @time_min
1420 }
1421 }
1422 </dm>
1423 <dm>
1424 (votable:Coords) {
1425 time: {
1426 frame: {
1427 timescale: @time_scale | UTC
1428 refPosition: @time_refposition | TOPOCENTER
1429 time0: 0
1430 }
1431 location: @time_max
1432 }
1433 }
1434 </dm>
1435
1436 <column name="granule_uid" type="text" required="True"
1437 ucd="meta.id"
1438 description="Internal table row index,
1439 which must be unique within the table. Can be alphanumeric.">
1440 <property key="std">1</property>
1441 </column>
1442 <column name="granule_gid" type="text" required="True"
1443 ucd="meta.id"
1444 description="Common to granules of same type (e.g. same map projection,
1445 or geometry data products). Can be alphanumeric.">
1446 <property key="std">1</property>
1447 </column>
1448 <column name="obs_id" type="text" required="True"
1449 ucd="meta.id;obs"
1450 description="Associates granules derived from the same data (e.g.
1451 various representations/processing levels).
1452 Can be alphanumeric, may be the ID of original observation.">
1453 <property key="std">1</property>
1454 </column>
1455 <column name="dataproduct_type" type="text"
1456 ucd="meta.code.class"
1457 description="The high-level organization of the data product,
1458 from a controlled vocabulary (e.g., 'im' for image, sp for spectrum).
1459 Multiple terms may be used, separated by # characters."
1460 note="et_prod">
1461 <property key="std">1</property>
1462 <values>
1463 <option>im</option>
1464 <option>ma</option>
1465 <option>sp</option>
1466 <option>ds</option>
1467 <option>sc</option>
1468 <option>pr</option>
1469 <option>pf</option>
1470 <option>vo</option>
1471 <option>mo</option>
1472 <option>cu</option>
1473 <option>ts</option>
1474 <option>ca</option>
1475 <option>ci</option>
1476 <option>sv</option>
1477 <option>ev</option>
1478 </values>
1479 </column>
1480 <column name="target_name" type="text"
1481 ucd="meta.id;src"
1482 description="Standard IAU name of target (from a list related
1483 to target class), case sensitive">
1484 <property key="std">1</property>
1485 </column>
1486 <column name="target_class" type="text"
1487 ucd="src.class"
1488 description="Type of target, from a controlled vocabulary.">
1489 <property key="std">1</property>
1490 <values>
1491 <option>asteroid</option>
1492 <option>dwarf_planet</option>
1493 <option>planet</option>
1494 <option>satellite</option>
1495 <option>comet</option>
1496 <option>exoplanet</option>
1497 <option>interplanetary_medium</option>
1498 <option>sample</option>
1499 <option>sky</option>
1500 <option>spacecraft</option>
1501 <option>spacejunk</option>
1502 <option>star</option>
1503 <option>calibration</option>
1504 </values>
1505 </column>
1506
1507 <column name="time_min"
1508 ucd="time.start;obs" unit="d"
1509 type="double precision"
1510 description="Acquisition start time (in JD), as UTC at
1511 time_refposition"/>
1512 <column name="time_max"
1513 ucd="time.end;obs" unit="d"
1514 type="double precision"
1515 description="Acquisition stop time (in JD), as UTC at
1516 time_refposition"/>
1517
1518 <FEED source="_minmax"
1519 basename="time_sampling_step"
1520 baseucd="time.resolution" unit="s"
1521 basedescr="Sampling time for measurements of dynamical
1522 phenomena"/>
1523 <FEED source="_minmax"
1524 basename="time_exp"
1525 baseucd="time.duration;obs.exposure" unit="s"
1526 basedescr="Integration time of the measurement"/>
1527 <FEED source="_minmax"
1528 basename="spectral_range"
1529 baseucd="em.freq" unit="Hz"
1530 basedescr="Spectral range (frequency)"/>
1531
1532 <FEED source="_minmax"
1533 basename="spectral_sampling_step"
1534 baseucd="em.freq;spect.binSize" unit="Hz"
1535 basedescr="Spectral sampling step"/>
1536 <FEED source="_minmax"
1537 basename="spectral_resolution"
1538 baseucd="spect.resolution" unit=""
1539 basedescr="Spectral resolution"/>
1540
1541 <FEED source="_c_minmax"
1542 basename="c1"
1543 baseucd="__replace_framed__" unit="__replace_framed__"
1544 basedescr="__replace_framed__"/>
1545 <FEED source="_c_minmax"
1546 basename="c2"
1547 baseucd="__replace_framed__" unit="__replace_framed__"
1548 basedescr="__replace_framed__"/>
1549 <FEED source="_c_minmax"
1550 basename="c3"
1551 baseucd="__replace_framed__" unit="__replace_framed__"
1552 basedescr="__replace_framed__"/>
1553
1554 <column name="s_region" type="spoly" xtype="adql:REGION"
1555 ucd="pos.outline;obs.field" unit=""
1556 description="ObsCore-like footprint, valid for celestial,
1557 spherical, or body-fixed frames">
1558 <property key="std">1</property>
1559 </column>
1560 <FEED source="_minmax"
1561 basename="c1_resol"
1562 baseucd="__replace_resolution_ucd__" unit="__replace_framed__"
1563 basedescr="Resolution in the first coordinate"/>
1564 <FEED source="_minmax"
1565 basename="c2_resol"
1566 baseucd="__replace_resolution_ucd__" unit="__replace_framed__"
1567 basedescr="Resolution in the second coordinate"/>
1568 <FEED source="_minmax"
1569 basename="c3_resol"
1570 baseucd="__replace_resolution_ucd__" unit="__replace_framed__"
1571 basedescr="Resolution in the third coordinate"/>
1572
1573 <column name="spatial_frame_type" type="text"
1574 ucd="meta.code.class;pos.frame"
1575 description="Flavor of coordinate system,
1576 defines the nature of coordinates. From a controlled vocabulary,
1577 where 'none' means undefined.">
1578 <property key="std">1</property>
1579 <values default="\spatial_frame_type">
1580 <option>celestial</option>
1581 <option>body</option>
1582 <option>cartesian</option>
1583 <option>cylindrical</option>
1584 <option>spherical</option>
1585 <option>none</option>
1586 </values>
1587 </column>
1588 <FEED source="_minmax"
1589 basename="incidence"
1590 baseucd="pos.incidenceAng" unit="deg"
1591 basedescr="Incidence angle (solar zenithal angle) during
1592 data acquisition"/>
1593 <FEED source="_minmax"
1594 basename="emergence"
1595 baseucd="pos.emergenceAng" unit="deg"
1596 basedescr="Emergence angle during data acquisition"/>
1597 <FEED source="_minmax"
1598 basename="phase"
1599 baseucd="pos.phaseAng" unit="deg"
1600 basedescr="Phase angle during data acquisition"/>
1601 <column name="instrument_host_name" type="text"
1602 ucd="meta.id;instr.obsty"
1603 description="Standard name of the observatory or spacecraft">
1604 <property key="std">1</property>
1605 </column>
1606 <column name="instrument_name" type="text"
1607 ucd="meta.id;instr"
1608 description="Standard name of instrument">
1609 <property key="std">1</property>
1610 </column>
1611 <column name="measurement_type" type="text"
1612 ucd="meta.ucd"
1613 description="UCD(s) defining the data, with multiple entries
1614 separated by hash (#) characters.">
1615 <property key="std">1</property>
1616 </column>
1617
1618 <column name="processing_level" type="integer" required="True"
1619 ucd="meta.calibLevel"
1620 description="Dataset-related encoding, or simplified CODMAC
1621 calibration level"
1622 note="et_cal">
1623 <property key="std">1</property>
1624 </column>
1625
1626 <column name="creation_date" type="timestamp"
1627 ucd="time.creation" unit=""
1628 description="Date of first entry of this granule">
1629 <property key="std">1</property>
1630 </column>
1631 <column name="modification_date" type="timestamp"
1632 ucd="time.processing" unit=""
1633 description="Date of last modification (used to handle mirroring)">
1634 <property key="std">1</property>
1635 </column>
1636 <column name="release_date" type="timestamp"
1637 ucd="time.release" unit=""
1638 description="Start of public access period">
1639 <property key="std">1</property>
1640 </column>
1641
1642 <column name="service_title" type="text"
1643 ucd="meta.title"
1644 description="Title of resource (an acronym really,
1645 will be used to handle multiservice results)">
1646 <property key="std">1</property>
1647 </column>
1648
1649
1650 <meta name="note" tag="et_prod">
1651 The following values are defined for this field:
1652
1653 im -- image
1654 associated scalar fields with two spatial axes, e.g., images with
1655 multiple color planes like from multichannel or filter cameras.
1656 Preview images (e.g. map with axis and caption) also belong here.
1657 Conversely, all vectorial 2D fields are described as catalogue
1658 (see below).
1659 ma -- map
1660 scalar field/rasters with two spatial axes covering a large
1661 area and projected either on the sky or on a planetary body,
1662 associated to a Projection parameter (with a short enumerated
1663 list of possible values). This is mostly intended to identify
1664 complete coverages that can be used as reference basemaps.
1665 sp-- spectrum
1666 measurements organized primarily along a spectral axis, e.g.,
1667 radiance spectra. This includes spectral aggregates (series
1668 of related spectra with non-connected spectral ranges, e.g.,
1669 from several channels of the same instrument
1670 ds -- dynamic spectrum
1671 consecutive spectral measurements through time, organized
1672 as a time series. This typically implies successive spectra of
1673 the same target or field of view.
1674 sc -- spectral cube
1675 sets of spectral measurements with 1 or 2 D spatial coverage, e.g.,
1676 imaging spectroscopy. The choice between Image and spectral_cube is
1677 related to the characteristics of the instrument (which dimension
1678 is most resolved and which dimensions are acquired simultaneously).
1679 The choice between dynamic_spectrum and spectral_cube is related
1680 to the uniformity of the field of view.
1681 pr -- profile
1682 scalar or vectorial measurements along 1 spatial dimension, e.g.,
1683 atmospheric profiles, atmospheric paths, sub-surface profiles,
1684 traverses…
1685 pf -- photometric profile
1686 scalar or vectorial measurements along 1 angular dimension, e.g.,
1687 phase or polarization curves, phase functions, emission-phase
1688 function sequences… typically associated to variations in
1689 illumination angle parameters.
1690 vo -- volume
1691 other measurements with 3 spatial dimensions, e.g., internal or
1692 atmospheric structures, including shells/shape models (3D surfaces).
1693 mo -- movie
1694 sets of chronological 2 D spatial measurements.
1695 cu -- cube
1696 multidimensional data with 3 or more axes, e.g., all that is not
1697 described by other 3 D data types such as spectral cubes or volume.
1698 This is mostly intended to accommodate unusual data with multiple
1699 dimensions.
1700 ts -- time series
1701 measurements organized primarily as a function of time (with
1702 exception of dynamical spectra and movies, i.e. usually a scalar
1703 quantity). Typical examples of time series include space-borne
1704 dust detector measurements, daily or seasonal curves measured at
1705 a given location (e.g., a lander), and light curves.
1706 ca -- catalog
1707 applies to a single granule providing a list of events, a catalog
1708 of object parameters, a list of features… It is good practice to
1709 describe the type of data included in the catalogue using a
1710 hash-separated-list (e.g., a table of spectra should be described
1711 by ca#sp, so that it will respond to a query for spectra).
1712 ci -- catalogue item
1713 applies when the service itself provides a catalogue, with entries
1714 described as individual granules. The service can be, e.g., a list
1715 of asteroid properties or spectral lines. Catalogue_item can be
1716 limited to scalar quantities (including strings), and possibly to
1717 a single element. This organization allows the user to search inside
1718 the catalogue from the TAP query interface.
1719 sv -- spatial vector
1720 vector information associated to localization, such as spatial
1721 footprints or a GIS-related element. This could contain a kml
1722 or geojson file (STC-S strings are provided though the s_region
1723 parameter, though). This includes maps of vectors, e.g., wind maps.
1724 ev -- event
1725 individual events, typically formatted in VOEvent. Characteristics
1726 are provided via the event_* parameters.
1727 </meta>
1728
1729 <meta name="note" tag="et_cal">
1730 CODMAC levels are:
1731
1732 1 -- raw
1733
1734 2 -- edited
1735
1736 3 -- calibrated
1737
1738 4 -- resampled
1739
1740 5 -- derived
1741
1742 6 -- ancillary
1743 </meta>
1744 </events>
1745
1746 </mixinDef>
1747
1748
1749 <mixinDef id="localfile-2_0">
1750 <doc>
1751 Use this mixin if your epntap table is filled with local products
1752 (i.e., sources matches files on your hard disk that DaCHS should
1753 hand out itself). This will arrange for your products to be
1754 entered into the products table, and it will automatically
1755 compute file size, etc.
1756
1757 This wants a `//products#define`_ rowfilter in your grammar
1758 and a `//epntap2#populate-localfile-2_0`_ apply in your rowmaker.
1759 </doc>
1760 <events>
1761 <FEED source="//products#tableRules"/>
1762 <index columns="accref"/>
1763 <column original="//products#products.accref" hidden="True"/>
1764 </events>
1765 <FEED source="//products#hackProductsData"/>
1766 </mixinDef>
1767
1768
1769 <procDef type="apply" id="populate-2_0">
1770 <doc><![CDATA[
1771 Sets metadata for an epntap data set, including its products definition.
1772
1773 The values are left in vars, so you need to do manual copying,
1774 e.g., using idmaps="*".
1775
1776 In some descriptions below, you will see __replace_framed__. This
1777 means that the actual descriptions, units, and UCDs will depend
1778 on the value of spatial_frame_type in `the //epntap2#table-2_0 mixin`_.
1779 After you have made a first (possibly severely incomplete) import
1780 of your table, you can see the actual metadata by opening
1781 http://localhost:8080/tableinfo/yourschema.epn_core.
1782 ]]></doc>
1783
1784 <setup>
1785 <par key="index_" description="A numeric reference for the
1786 item. By default, this is just the row number. As this will
1787 (usually) change when new data is added, you should override it
1788 with some unique integer number specific to the data product
1789 when there is such a thing." late="True">\rowsMade</par>
1790 <par key="target_name" description="Name of the target object,
1791 preferably according to the official IAU nomenclature.
1792 As appropriate, take these from the exoplanet encyclopedia
1793 http://exoplanet.eu, the meteor catalog at
1794 http://www.lpi.usra.edu/meteor/, the catalog of stardust
1795 samples at http://curator.jsc.nasa.gov/stardust/catalog/"
1796 late="True"/>
1797 <par key="time_scale" description="Time scale used for the
1798 various times, as given by IVOA's STC data model. Choose
1799 from TT, TDB, TOG, TOB, TAI, UTC, GPS, UNKNOWN"
1800 late="True">"UTC"</par>
1801 <par key="time_refposition" description="Indicates where the time is
1802 measured, can be a planet or a spacecraft."
1803 late="True">"TOPOCENTER"</par>
1804 <par key="instrument_host_name" description="Name of the observatory
1805 or spacecraft that the observation originated from; for
1806 ground-based data, use IAU observatory codes,
1807 http://www.minorplanetcenter.net/iau/lists/ObsCodesF.html,
1808 for space-borne instruments use
1809 http://nssdc.gsfc.nasa.gov/nmc/" late="True"/>
1810 <par key="instrument_name" description="Service providers are
1811 invited to include multiple values for instrument_name, e.g.,
1812 complete name + usual acronym. This will allow queries on either
1813 'VISIBLE AND INFRARED THERMAL IMAGING SPECTROMETER' or VIRTIS to
1814 produce the same reply." late="True">None</par>
1815 <par key="target_region" description="This is a complement to the
1816 target name to identify a substructure of the target that was
1817 being observed (e.g., Atmosphere, Surface). Preferably take terms
1818 from the UAT http://www.ivoa.net/rdf/uat." late="True">None</par>
1819 <par key="target_class" description="The type of the target;
1820 choose from asteroid, dwarf_planet, planet, satellite, comet,
1821 exoplanet, interplanetary_medium, ring, sample, sky, spacecraft,
1822 spacejunk, star" late="True">"UNKNOWN"</par>
1823 <par key="s_region" description="A spatial footprint
1824 of a dataset located on a spherical coordinate system.
1825 Currently, this is fixed to be a spherical polygon (fill it
1826 with something like
1827 pgsphere.SPoly.fromDALI([@long1, @lat1, @long2, @lat2,...], all
1828 coordinates in degrees)."
1829 late="True">None</par>
1830 <par key="processing_level" description="CODMAC calibration level;
1831 see the et_cal note
1832 http://dc.g-vo.org/tableinfo/titan.epn_core#note-et_cal for
1833 what values are defined here"
1834 late="True">None</par>
1835
1836 <!-- Note: only late parameters allowed in here. Also, don't
1837 define anything here unless you have to; we pick up the
1838 columns from the mixin's stream automatically. -->
1839
1840 <!-- if you add more manual parameters, make sure you list them
1841 in overridden below -->
1842
1843 <LOOP>
1844 <codeItems>
1845 # overridden is a set of column names for which the parameters
1846 # are manually defined above or which are set in some other way.
1847 overridden = set(["index_",
1848 "target_name", "time_scale", "time_refposition",
1849 "instrument_host_name", "instrument_name",
1850 "target_region", "target_class",
1851 "spatial_frame_type", "s_region", "processing_level"])
1852
1853 mixin = context.getById("table-2_0")
1854 colDict = {}
1855 for type, name, content, pos in mixin.events.events_:
1856 if type=="value":
1857 colDict[name] = content
1858 elif type=="end":
1859 if name=="column":
1860 if colDict.get("name") not in overridden:
1861 if colDict.get("required", False):
1862 colDict["default"] = ''
1863 else:
1864 colDict["default"] = 'None'
1865 yield colDict
1866 colDict = {}
1867 </codeItems>
1868 <events>
1869 <par key="\name" description="\description"
1870 late="True">\default</par>
1871 </events>
1872 </LOOP>
1873 <code>
1874 # find myself to get the list of my parameters
1875 for app in parent.apps:
1876 if app.procDef and app.procDef.id=='populate-2_0':
1877 break
1878 else:
1879 raise base.Error("Internal: epntap#populate-2_0 cannot find itself")
1880
1881 EPNTAP_KEYS = [p.key for p in app.procDef.setups[0].pars]
1882 del app
1883 </code>
1884 </setup>
1885
1886 <code>
1887 l = locals()
1888 for key in EPNTAP_KEYS:
1889 vars[key] = l[key]
1890 vars["spatial_frame_type"] = targetTable.tableDef.getProperty(
1891 "spatial_frame_type", None)
1892 </code>
1893 </procDef>
1894
1895 <procDef id="populate-localfile-2_0" type="apply">
1896 <doc><![CDATA[
1897 Use this apply when you use `the //epntap2#localfile-2_0 mixin`_.
1898 This will only (properly) work when you use a `//products#define`_
1899 rowfilter. At the very least, you need to say::
1900
1901 <rowfilter procDef="//products#define">
1902 <bind name="table">"\schema.epn_core"</bind>
1903 </rowfilter>
1904
1905 (and more if what you have isn't FITS files). If you have that, this
1906 will work without further configuration.
1907 ]]></doc>
1908 <setup>
1909 <par name="creation_date" late="True" description="A timestamp
1910 giving the dataset's creation time as a datetime object"
1911 >\sourceCDate</par>
1912 </setup>
1913 <code>
1914 # map things from products#define
1915 vars["access_estsize"] = vars["prodtblFsize"]/1024
1916 vars["access_url"] = makeProductLink(vars["prodtblAccref"])
1917 if @prodtblPreview:
1918 vars["thumbnail"] = @prodtblPreview
1919 vars["accref"] = vars["prodtblAccref"]
1920 vars["creation_date"] = creation_date
1921 </code>
1922 </procDef>
1923 </resource>