forked from ivoa-std/SODA
-
Notifications
You must be signed in to change notification settings - Fork 1
/
SODA.tex
1256 lines (984 loc) · 45.7 KB
/
SODA.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\documentclass[11pt,a4paper]{ivoa}
\input tthdefs
\newcommand{\xtype}[1]{\texttt{#1}}
\newcommand{\ucd}[1]{\texttt{#1}}
\usepackage{listings}
\lstloadlanguages{XML,sh}
\lstset{flexiblecolumns=true,basicstyle=\small,tagstyle=\ttfamily}
\usepackage[utf8]{inputenc}
\usepackage{todonotes}
\title{IVOA Server-side Operations for Data Access}
\ivoagroup{Data Access Layer Working Group}
\author{Fran\c cois Bonnarel}
\author{Markus Demleitner}
\author{Patrick Dowler}
\author{Douglas Tody}
\author{James Dempsey}
\editor{Fran\c cois Bonnarel, Patrick Dowler}
\previousversion{PR-SODA-1.0-20160429}
\previousversion{WD-SODA-1.0-20151221}
\previousversion{WD-AccessData-1.0-20151021}
\previousversion{WD-AccessData-1.0-20140730}
\previousversion{WD-AccessData-1.0-20140312}
\SVN$Rev: 4112 $
\SVN$Date: 2017-06-02 18:50:37 +0200 (ven. 02 juin 2017) $
\SVN$URL: https://volute.g-vo.org/svn/trunk/projects/dal/SODA/SODA.tex $
\begin{document}
\begin{abstract}
This document describes the Server-side Operations for Data Access
(SODA) web service capability. SODA is a low-level data access
capability or server side data processing that can act upon the data
files, performing various kinds of operations: filtering/subsection,
transformations, pixel operations, and applying functions to the data.
\end{abstract}
\section*{Acknowledgments}
The authors would like to thank all the participants in DAL-WG discussions for
their ideas, critical
reviews, and contributions to this document.
Fran\c cois Bonnarel acknowledges support from the Astronomy ESFRI and Research Infrastructure Cluster – ASTERICS project, funded by the European Commission under the Horizon 2020 Programme (GA 653477).
\section*{Conformance-related definitions}
The words ``MUST'', ``SHALL'', ``SHOULD'', ``MAY'', ``RECOMMENDED'', and
``OPTIONAL'' (in upper or lower case) used in this document are to be
interpreted as described in IETF standard RFC2119 \citep{std:RFC2119}.
The \emph{Virtual Observatory (VO)} is a
general term for a collection of federated resources that can be used
to conduct astronomical research, education, and outreach.
The \href{http://www.ivoa.net}{International
Virtual Observatory Alliance (IVOA)} is a global
collaboration of separately funded projects to develop standards and
infrastructure that enable VO applications.
\section{Introduction}
The SODA web service interface defines a RESTful web service for
performing server-side operations and processing on data before
transfer.
\subsection{The Role in the IVOA Architecture}
\begin{figure}
\centering
\includegraphics[width=0.9\textwidth]{archdiag.png}
\caption{SODA in the global VO architecture}
\label{fig:architecture}
\end{figure}
Figure~\ref{fig:architecture} shows how SODA fits into the IVOA architecture.
SODA services conform to the Data Access Layer Interface (DALI,
\citet{2013ivoa.spec.1129D}) specification,
including the Virtual Observatory Support Interfaces (VOSI,
\citet{2011ivoa.spec.0531G}) resources.
Within the IVOA architecture, SODA services could be found and used in
several ways. First, a SODA service could be found in the IVOA Registry
and used directly. A description of a SODA service may be found along
with specific dataset metadata at either the data discovery phase using
Simple Image Access (SIA, \citet{2015ivoa.spec.1223D}) or Table Access Protocol
(TAP, \citet{2010ivoa.spec.0327D}) and the ObsCore data model \citep{2011ivoa.spec.1028T} or
via a DataLink \citep{2015ivoa.spec.0617D} service. The service descriptors and
three-factor semantics rely on UCDs \citep{2005ivoa.spec.1231D} and the VO Unit
specification \citep{2014ivoa.spec.0523D}. Since the discovery of SODA services
makes use of DataLink service descriptor(s) to provide parameter
metadata, the VOSI-capabilities specified in
Section~\ref{sec:capabilities} do not make use of a registry extension.
\subsubsection{SODA Service in the Registry}
Resources in the IVOA Registry may include SODA capabilities. In order to
use such services, clients require prior knowledge of suitable
identifiers that are usable with a registered SODA service. This
scenario is described in more detail below in
Section~\ref{sec:reg-soda}.
\subsubsection{SODA Service from Data Discovery}
In the simplest case, the identifiers found via data discovery can be
used directly with an associated SODA service. The query response (from
SIA or TAP) would include one or more service descriptor(s)
that describe the available SODA capabilities. This scenario is described
in detail in Section~\ref{sec:disc-soda}.
\subsubsection{SODA Service from DataLink}
In the general case, data discovery responses may direct clients to an
associated DataLink service where access details can be obtained. The
DataLink output will in turn provide service descriptor(s) of the
associated SODA service(s). Service providers may choose this approach
for several reasons; for example, one entry from data discovery may lead
to multiple files or resources, or access via services such as SODA may
be considered the primary access mode and direct download is not
available or discouraged. This scenario is described in detail in
Section~\ref{sec:disc-links-soda}.
\subsection{Motivating Use Cases}
Below are some of the more common use cases that have motivated the
development of the SODA specification. While this is not complete, it
helps to understand the problem area covered by this specification.
\begin{itemize}
\item{Retrieve Subsection of a Datacube}
\label{sec:use-cube}
Cutout a subsection using coordinate axis values. The input to the
cutout operation will include one or more of the following:
\begin{itemize}
\item a region on the sky
\item an energy value or range
\item a time value or range
\item one or more polarization states
\end{itemize}
The region on the sky should be something simple: a circle,
a range of coordinate values, or a polygon.
\item{Retrieve subsection of a 2D Image}
This is a special case of retrieving a subsection of a datacube,
where the cutout is only in the spatial axes.
\item{Retrieve subsection of a Spectrum}
This is a special case of retrieving a subsection of a datacube,
where the cutout is only in the spectral axis.
\item{Anticipated Future Use Cases. These use cases were taken into
account in the general design but remain to be developed and supported
in later versions of SODA.}
\begin{itemize}
\item{Provide the data in different formats}
Examples are images in PNG, or JPEG instead of FITS and spectra in csv,
FITS or VOTable.
\item{Flatten a Datacube into a 2D Image}
\item{Reduce a Datacube into a 1D Spectrum}
\item{Rebin Data by a Fixed Factor}
\item{Reproject Data onto a Specified Grid}
\item{Compute Aggregate Functions over the Data}
\item{Apply Standard Function to Data Values}
It could be
``denoising'' with standard methods or ``on the fly'' recalibration.
\item{Apply Arbitrary User-Specified Function to Data Values}
\item{Run Arbitrary User-Supplied Code on the Data}
\end{itemize}
\end{itemize}
\section{Resources}
\label{sec:resources}
SODA services are implemented as HTTP REST \citep{richardson07} web
services with a \{sync\} resource that conforms to the DALI-
sync resource description.
\begin{table}[ht]
\begin{tabular}{lll}
\sptablerule
\textbf{resource type}&\textbf{resource name}&\textbf{required}\cr
\sptablerule
\{sync\}&service specific&\tiny{(only one of \{sync\} or \{async\} required})\cr
\{async\}&service specific&\tiny{(only one of \{sync\} or \{async\} required})\cr
{DALI-examples}&/examples&no\cr
{VOSI-availability}&service specific&yes\cr
{VOSI-capabilities}&/capabilities&yes\cr
\sptablerule
\end{tabular}
\caption{Endpoints for SODA services}
\end{table}
A stand-alone SODA service may have one or both of the \{sync\} and
\{async\} resources. For either type, it could have multiple resources
(e.g. to support alternate authentication schemes). The SODA service may
also include other custom or supporting resources.
Either the \{sync\} or \{async\} SODA capability may be included as part
of other web services. For example, a single web service could contain
the SIA-2.0 \{query\} capability, the DataLink-1.0 \{links\} capability,
and the SODA \{sync\} capability. Such a service must also have the
VOSI-availability and VOSI-capabilities resources to report on and
describe all the implemented capabilities.
\subsection{\{sync\} resource}
\label{sec:sync}
The \{sync\} resource is a synchronous web service resource
that conforms to the DALI-sync description. Implementors
are free to name this resource however
they like, except that the name must consist of one URI segment only (i.e.,
contain no slash). This is to allow clients, given the access URL,
to reliably find out the URL of the capabilities endpoint.
Clients, in turn, can find the resource path using the
VOSI-capabilities resource, but will in general be provided the access
URLs through a previous data discovery query or through direct user
input.
The \{sync\} resource performs the data access as specified by
the input parameters and returns the data directly in the
output stream. Synchronous data access is suitable when the
operations can be quickly performed and the data stream can
be setup and written to (by the service) in a short period
of time (e.g. before any timeouts).
\subsection{\{async\} resource}
\label{sec:async}
The \{async\} resource is an asynchronous web service resource
that conforms to the DALI-async description. The considerations on
naming the resource given in sect.~\ref{sec:sync} apply here as well.
The \{async\} resource performs the data access as specified
by the input parameters and either (i) stores the results
for later transfer or (ii) pushes the results to a specified
destination (e.g. to a VOSpace location). Asynchronous data
access usually introduces resource constraints on the
service (which may be limited) and usually imposes a higher
latency before any results can be seen because the location
of results does not have to be valid until the data access
job is complete. Asynchronous data access is intended for
(but not limited to) use when the operations take
considerable time and results must be staged (e.g. some
multi-pass algorithms or operations that result in multiple
outputs).
\subsection{Examples: DALI-examples}
\label{sec:examples}
SODA services should provide a DALI-examples resource
with one example invocation that shows the variety of
operations the service can perform. Example operations using
the \{sync\} resource and that output a small data stream are
preferred, as the examples may be used by automatic validators doing
relatively frequent (of order daily) queries.
Parameters to be passed to the service must be given using the DALI
\texttt{generic-parameter} term.
\subsection{Availability: VOSI-availability}
\label{sec:availability}
A SODA web service must have a VOSI-availability
resource as described in DALI.
\subsection{Capabilities: VOSI-capabilities}
\label{sec:capabilities}
A web service that includes SODA capabilities must
have a VOSI-capabilities resource as described in DALI.
The standardID for the \{sync\} resource is
$$\hbox{\texttt{ivo://ivoa.net/std/SODA\#sync-1.0}}$$
The standardID for the \{async\} resource is
$$\hbox{\texttt{ivo://ivoa.net/std/SODA\#async-1.0}}$$
All DAL services must implement the \texttt{/capabilities} resource.
The following capabilities document shows the minimal
metadata for a stand-alone SODA service and does not
require a registry extension schema:
\begin{lstlisting}[language=XML]
<?xml version="1.0"?>
<capabilities
xmlns:vosi="http://www.ivoa.net/xml/VOSICapabilities/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:vod="http://www.ivoa.net/xml/VODataService/v1.1">
<capability standardID="ivo://ivoa.net/std/VOSI#capabilities">
<interface xsi:type="vod:ParamHTTP" version="1.0">
<accessURL use="full">http://example.com/data/capabilities</accessURL>
</interface>
</capability>
<capability standardID="ivo://ivoa.net/std/VOSI#availability">
<interface xsi:type="vod:ParamHTTP" version="1.0">
<accessURL use="full">
http://example.com/data/availability
</accessURL>
</interface>
</capability>
<capability standardid="ivo://ivoa.net/std/SODA#sync-1.0">
<interface xsi:type="vod:ParamHTTP" role="std" version="1.0">
<accessURL use="full">
http://example.com/data/sync
</accessURL>
</interface>
</capability>
<capability standardid="ivo://ivoa.net/std/SODA#async-1.0">
<interface xsi:type="vod:ParamHTTP" role="std" version="1.0">
<accessURL use="full">
http://example.com/data/async
</accessURL>
</interface>
</capability>
</capabilities>
\end{lstlisting}
Note that the \{sync\} and \{async\} resources do not have to be
named as shown in the accessURL(s) above. Multiple
interface elements within the \{sync\} and the \{async\} capabilities
may be included; this is typically used if they differ in
protocol (http vs. https) and/or authentication
requirements.
\section{Parameters for SODA \{sync\} and \{async\}}
\label{sec:parameters}
The \{sync\} and \{async\} resources accept the same set of
parameters.
\subsection{Parameter multiplicity}
Common methods of passing parameters to
HTTP services allow passing the same parameter multiple times.
In the following, we call a parameter that is specified multiple times
in either way as having multiple values.
POL is a special case for multiplicity (see below)
For all other parameters, support for multiple values of parameters is optional.
If a request includes multiple values for a parameter and the
service does not support multiple values for that parameter, the
request must fail with the MultiValuedParamNotSupported error listed
below (\ref{sec:error-codes}). For example, a service may
allow only single values for ID but multiple values for cutout parameters.
Supported multiplicity may also differ between {sync} and {async} requests.
\enlargethispage{\baselineskip}
In general, services would support multi-valued parameters as they may be
able to provide more efficient access to data files. Clients may attempt to use
multi-valued parameters, but must be prepared to fall back to multiple requests
if the service indicates this is not supported. A future version of
DataLink should provide a mechanism to describe parameter
multiplicity.
\subsection{Common Parameters}
\subsubsection{ID}
\label{sec:ID}
The ID parameter is used to specify the dataset or file to
be accessed. The values for the ID parameter are generally
discovered from data discovery requests. The
values must be treated as opaque identifiers that are used
as-is. The DataLink specification describes mechanisms
for conveying opaque parameters and values in service
descriptor resources that can be used by clients to set the
ID parameter.
The UCD describing the ID parameter is
\ucd{meta.ref.url;meta.curation}.SODA
\subsection{Filtering Parameters}
Filtering parameters are used to extract subsets of large
datasets or data files. The extraction uses a best possible match to the requested subset. In case the parameter values excede the size of the archived dataset the service operates a reduction of these values to the archived dataset size.
\subsubsection{MOC}
The MOC parameter defines a subset of space using the \xtype{moc} defined in DALI. The parameter syntax is defined as in the MOC specification \citep{MOC2}
Examples :
\begin{itemize}
\item Extracting cells 1 and 2 at order 1 will read this way MOC = 1/1 2
\item Extracting cells 1 at order 1 and cells 1 to 6 at order 2 will read MOC = 1/1 2/1-6
\end{itemize}
At the time of writing there is no possibility to extend this ascii syntax to TMOC or STMOC
\subsubsection{POS}
\label{sec:POS}
The POS parameter defines the positional region(s) to be
extracted from the data. The value is made up of a shape
keyword followed by coordinate values. The
allowed shapes are given in Table~\ref{tab:shapetypes}.
\begin{table}[h]
\begin{tabular}{ll}
\sptablerule
\textbf{Shape}&\textbf{Coordinate values}\cr
\sptablerule
\texttt{CIRCLE}&\texttt{<longitude> <latitude> <radius>}\cr
\texttt{RANGE}&\texttt{<longitude1> <longitude2> <latitude1> <latitude2>}\cr
\texttt{POLYGON}&\texttt{<longitude1> <latitude1> ... (at least 3 pairs)}\cr
\sptablerule
\end{tabular}
\caption{POS Values in Spherical Coordinates}
\label{tab:shapetypes}
\end{table}
As in DALI intervals, open ranges use -Inf or +Inf as one limit.
\goodbreak
Examples for POS values:
\begin{itemize}
\item A circle at (12,34) with radius 0.5:
\begin{lstlisting}
POS=CIRCLE 12 34 0.5
\end{lstlisting}
\item A range of [12,14] in longitude and [34,36] in latitude:
\begin{lstlisting}
POS=RANGE 12 14 34 36
\end{lstlisting}
\item A polygon from (12,34) to (14,34) to (14,36) to (12,36) and
(implicitly) back to (12,34):
\begin{lstlisting}
POS=POLYGON 12 34 14 34 14 36 12 36
\end{lstlisting}
\item A band around the equator:
\begin{lstlisting}
POS=RANGE 0 360 -2 2
\end{lstlisting}
\item The north pole:
\begin{lstlisting}
POS=RANGE 0 360 89 90
\end{lstlisting}
\end{itemize}
All longitude and latitude values (plus the radius of the
CIRCLE) are expressed in degrees in ICRS.\footnote{A future
version of this specification may allow the use of other
reference systems (specifically the native system of the
data).}
The UCD describing the POS parameter is \ucd{pos.outline;obs}.
Since it is string-valued, POS is unitless; however, the numeric values
contained in the string are all in decimal degrees. In VOTable, the
POS parameter has \verb|datatype="char"| and \verb|arraysize="*"|.
POS is included in SODA for consistency with the SIA-2.0
query parameter of the same name. Note that use of the
POS parameter with shape keyword ``CIRCLE'' provides the equivalent
spatial region as the CIRCLE parameter and POS with the shape keyword
``POLYGON'' is equivalent to the POLYGON parameter. There is no
type-specific parameter that is equivalent to the ``RANGE'' shape
keyword. There is no way for a service provider to declare support for a
subset of the POS shape keywords in a DataLink
service descriptor; either POS is included or not and if included then
all keywords must be supported.
\subsubsection{CIRCLE}
\label{sec:CIRCLE}
The CIRCLE parameter defines a spatial region using the \xtype{circle}
xtype defined in DALI.
Example: a circle at (12,34) with radius 0.5:
\begin{lstlisting}
CIRCLE=12 34 0.5
\end{lstlisting}
The UCD describing the CIRCLE parameter is
\ucd{pos.outline;obs}.
CIRCLE is equivalent in functionality to \texttt{POS=CIRCLE ...}. Data type and unit metadata are unambiguously defined.
\subsubsection{POLYGON}
\label{sec:POLYGON}
The POLYGON parameter defines a spatial region using the \xtype{polygon}
xtype defined in DALI.
Example: a polygon from (12,34) to (14,34) to (14,36) to (12,36) and
(implicitly) back to (12,34):
\begin{lstlisting}
POLYGON=12 34 14 34 14 36 12 36
\end{lstlisting}
The UCD describing the POLYGON parameter is
\ucd{pos.outline;obs}.
POLYGON is equivalent in functionality to \texttt{POS=POLYGON ...}. Data type and unit metadata are unambiguously defined.
\subsubsection{BAND}
\label{sec:BAND}
The BAND parameter defines the wavelength interval(s) to be extracted from
the data using a floating point interval (\verb|xtype="interval"|) as
defined in DALI. The value is an open or closed numeric
interval with numeric values interpreted as wavelength(s) in metres. As
in DALI, open intervals use -Inf or +Inf as one limit.
\begin{itemize}
\item The closed interval [500,550]:
\begin{lstlisting}
BAND=500 550
\end{lstlisting}
\item The open interval (-inf,300]:
\begin{lstlisting}
BAND=-Inf 300
\end{lstlisting}
\item The open interval [750,inf):
\begin{lstlisting}
BAND=750 +Inf
\end{lstlisting}
\item The scalar value 550, equivalent to [550,550]:
\begin{lstlisting}
BAND=550 550
\end{lstlisting}
\end{itemize}
Extracting using a scalar value should normally extract a
single pixel along the energy axis of the data; extracting
using an interval should extract one or more pixels.
All energy values are expressed as barycentric wavelength in
meters.\footnote{A future version of this specification may allow the
use of other reference systems (specifically the native
system of their data).}
The UCD describing the BAND parameter is \ucd{em.wl;stat.interval}.
\subsubsection{TIME}
\label{sec:TIME}
The BAND parameter defines the time interval(s) to be extracted from the
data using a floating point interval (\verb|xtype="interval"|) as
defined in DALI. The value is an open or closed
interval with numeric values interpreted as Modified Julian Date(s) in
UTC. As in DALI, open intervals use -Inf or +Inf as one limit.
\begin{itemize}
\item An open interval from the MJD 55100.0 and all later times:
\begin{lstlisting}
TIME= 55100.0 +Inf
\end{lstlisting}
\item A range of MJD values:
\begin{lstlisting}
TIME=55123.456 55123.466
\end{lstlisting}
\item An instant in time using Modified Julian Date:
\begin{lstlisting}
TIME=55678.123456 55678.123456
\end{lstlisting}
\end{itemize}
The UCD describing the TIME parameter is
\ucd{time.interval;obs.exposure}.
\subsubsection{POL}
\label{sec:POL}
The POL parameter defines the polarization state(s) (Stokes)
to be extracted from the data.
\begin{itemize}
\item Extract the unpolarized intensity:
\begin{lstlisting}
POL=I
\end{lstlisting}
\item Extract the standard circular polarization:
\begin{lstlisting}
POL=V
\end{lstlisting}
\item Extract only the IQU components:
\begin{lstlisting}
POL=I
POL=Q
POL=U
\end{lstlisting}
\end{itemize}
As shown in the example above, the POL parameter must support multiple values
for both \{sync\} and \{async\} requests. Unlike general filtering parameters,
all values of POL are combined into a single filter; for example, if the request
includes the three values above, the job would generate one result with
some or all of these polarization states (per combination of ID and
other filtering parameters).
The UCD describing the POL parameter is
\ucd{meta.code;phys.polarization}.
\subsection{Filtering parameters and ObsCore data model}
Filtering parameters drive the generation of virtual datasets. The ObsCore model is perfectly valid to describe virtual data that SODA is able to generate. Hence all SODA filtering parameters are coupled with some Obscore model concepts.
The spatial parameters (CIRCLE, POLYGON and POS) constrain the spatial support of the output virtual dataset.
The TIME parameter constrains the time bounds of the SODA output virtual dataset.
The BAND parameter constrains the spectral bounds of the SODA output virtual
dataset.
Support and bounds of the output datasets for each parameter are included in support and bounds of the archived dataset.
The POL parameter constrain the list of polarization states in the output virtual dataset. The
valid values for this param are included in the list given by the value
of the pol\_states attribute of the archived dataset.
\begin{table}[ht]
\begin{tabular}{l l l}
\sptablerule
\textbf{SODA}&\textbf{ObsCore utypes}&\textbf{ObsCore}\cr
\textbf{parameters}&&\textbf{attribute names}\cr
\sptablerule
\tiny{POS|CIRCLE|POLYGON}&obscore:Char.SpatialAxis.Coverage.Support.Area&s\_region\cr
BAND&obscore:Char.spectralAxis.Coverage.Bounds.Limits&\cr
TIME&obscore:Char.TimeAxis.Coverage.Bounds.Limits&\cr
POL&obscore:Char.PolarizationAxis.stateList&pol\_states\cr
\sptablerule
\end{tabular}
\caption{ObsCore utypes correspondance with standard SODA parameters}
\end{table}
\subsection{Three-Factor Semantics}
Parameters in SODA are uniquely defined by the triple of name, UCD, and unit. Data services are free to
support as many such parameters as is appropriate for their datasets, in
addition to supporting standard parameters. With the three factors, it
is unlikely that two service providers will by accident use the same
three factors for parameters of differing semantics.
To identify parameters, clients must use the three factors
name, UCD, and unit. This is true for both the standard parameters
defined here and custom parameters introduced by services. For
instance, a BAND parameter that is missing the em.wl;stat.interval UCD or has a
unit that is not meter must not be treated as the SODA BAND
parameter.
With standard parameters as defined in this document, clients can rely
on certain semantics and exploit that knowledge in the provision of
special UIs or APIs.
Standard parameters defined so far are given
in table~\ref{table:standardpars}.
For the time being, instructions for how to propose
additional parameters will be given on the landing page of the IVOA
DAL working group\footnote{At the time of writing, this is\\
\url{http://wiki.ivoa.net/twiki/bin/view/IVOA/DefiningServiceParameters}}
Table~\ref{table:freepars} is an exemple of definition of additional custom non-standard parameters.
\begin{table}[ht]
\begin{tabular}{l l l l}
\sptablerule
\textbf{Name}&\textbf{UCD}&\textbf{Unit}&\textbf{Semantics} \cr
\sptablerule
ID&meta.ref.url;meta.curation&&cf.~sect.~\ref{sec:ID} \cr
CIRCLE&pos.outline;obs°&cf.~sect.~\ref{sec:CIRCLE} \cr
POLYGON&pos.outline;obs°&cf.~sect.~\ref{sec:POLYGON} \cr
POS&pos.outline;obs&&cf.~sect.~\ref{sec:POS} \cr
BAND&em.wl;stat.interval&m&cf.~sect.~\ref{sec:BAND} \cr
TIME&time.interval;obs.exposure&d&cf.~sect.~\ref{sec:TIME} \cr
POL&meta.code;phys.polarization&&cf.~sect.~\ref{sec:POL} \cr
\sptablerule
\end{tabular}
\caption{Three-Factor Semantics for standard SODA parameters}
\label{table:standardpars}
\end{table}
\begin{table}[ht]
\begin{tabular}{l l l l}
\sptablerule
\textbf{Name}&\textbf{UCD}&\textbf{Unit}&\textbf{Semantics} \cr
\sptablerule
ID&meta.ref.url;meta.curation&& dataset identifier \cr
KERNSIZE&phys.size.radius&pixel& convolution kernel radius\cr
KERNTYPE&meta.code.class&&convolution kernel type \cr
&&& (Gaussian, Airy, etc...) \cr
\sptablerule
\end{tabular}
\caption{Example three-factor semantics for convolution-related custom parameters}
\label{table:freepars}
\end{table}
Both standard and non-standard parameters should follow DALI conventions
if at all possible. Roughly, float-valued target fields should be accessed or
constrained via interval-valued parameters (i.e., do not split up
minimum and maximum into separate parameters). Depending on their
semantics, integer parameters should either be intervals or enumerated
parameters (which typically can be repeated in the manner of POL).
Geometry fields should be
accessed or constrained using geometry values (circle and polygon xtypes
from DALI), following the examples of CIRCLE
(\ref{sec:CIRCLE}) and POLYGON (\ref{sec:POLYGON}).
Parameter metadata, including three-factor semantics, is conveyed to
clients via DataLink service descriptor(s) as
described in Section~\ref{sec:integration}.
\section{Integration of Service Capabilities}
\label{sec:integration}
Finding and using SODA services depends on several other standards;
service providers can follow one or more strategies in integrating a
range of standard and custom services with their SODA implementation.
Here we describe these strategies and show how to use the standards
together.
Within the IVOA architecture, SODA services could be found and used in two
ways. First, a SODA service could be found in the IVOA Registry and used
directly. Second, a description of a SODA service may be found along
with specific dataset metadata; this is the primary anticipated usage:
clients discover applicable SODA services while doing data discovery
queries.
The DataLink recommendation provides a mechanism
to include ``a description of a SODA service'' using a standard resource
called a service descriptor. The service descriptor can be included in any
VOTable \citep{2013ivoa.spec.0920O} output and can describe the parameters for
use with a DALI-sync or DALI-async compliant capability which may be a standard
service or a custom service. Since the service descriptor can describe all input parameters,
it can declare available standard parameters, extensions (custom
parameters in standard services), and parameters for custom services.
This mechanism is expected to be the primary means for finding and using
a SODA service.
A generic SODA sync service descriptor describing the standard
parameters (see sect.~\ref{sec:parameters}):
\begin{lstlisting}[language=XML]
<RESOURCE type="meta" ID="soda-sync" utype="adhoc:service">
<PARAM name="standardID" datatype="char" arraysize="*"
value="ivo://ivoa.net/std/SODA#sync-1.0" >
<DESCRIPTION>service protocol standard id</DESCRIPTION>
</PARAM>
<PARAM name="accessURL" datatype="char" arraysize="*"
value="http://example.com/soda/sync" >
<DESCRIPTION>access url of the service</DESCRIPTION>
</PARAM>
<GROUP name="inputParams">
<PARAM name="ID" ucd="meta.ref.url;meta.curation"
ref="idcolumn-ref"
datatype="char" arraysize="*" value="" >
<DESCRIPTION>The publisher DID of the dataset of interest</DESCRIPTION>
</PARAM>
<PARAM name="POS" ucd="pos.outline;obs"
datatype="char" arraysize="*" value="" >
<DESCRIPTION>Region to cut out, as Circle, Box, or Polygon</DESCRIPTION>
</PARAM>
<PARAM name="CIRCLE" unit="deg" ucd="pos.outline;obs"
datatype="double" arraysize="3"
xtype="circle" value="" >
<DESCRIPTION>A circle that should be covered by the cutout.</DESCRIPTION>
</PARAM>
<PARAM name="POLYGON" unit="deg" ucd="pos.outline;obs"
datatype="double" arraysize="*"
xtype="polygon" value="" >
<DESCRIPTION>A polygon that should be covered by the cutout.</DESCRIPTION>
</PARAM>
<PARAM name="BAND" unit="m" ucd="em.wl;stat.interval"
datatype="double" arraysize="2"
xtype="interval" value="" >
<DESCRIPTION>The wavelength intervals to be extracted</DESCRIPTION>
</PARAM>
<PARAM name="TIME" ucd="time.interval;obs.exposure" unit="d"
datatype="double" arraysize="2"
xtype="interval" value="" >
<DESCRIPTION>TIME Interval to be extracted in MJD</DESCRIPTION>
</PARAM>
<PARAM name="POL" ucd="meta.code;phys.polarization"
datatype="char" arraysize="*" value="" >
<DESCRIPTION> Polarization states list to be extracted</DESCRIPTION>
</PARAM>
</GROUP>
</RESOURCE>
\end{lstlisting}
This service descriptor is generic because the ID parameter uses a
\xmlel{ref} attribute to specify that identifier values come from
elsewhere in the document (usually this refers to a FIELD element that
describes a table column within another RESOURCE element). Thus, this
descriptor can be used with any ID values in that column.
The PARAM with \verb|name="standardID"| specifies that this service is
a SODA sync service. The standardID values for SODA are specified in
Section~\ref{sec:capabilities}.
The GROUP with \verb|name="inputParams"| shows the standard
description of the standard SODA parameters as defined in
Section~\ref{sec:parameters}. Services should only include parameter
descriptions for supported parameters; in a generic service descriptor
``supported'' means supported by the implementation and does not imply
that use of that parameter is applicable to all data (e.g. to all
possible identifier values).
All PARAMs in the descriptor may include a \xmlel{VALUES} subelement. This
element is providing \xmlel{PARAMETER} domain limits or list of admitted
values. See section \ref{sec:disc-links-soda} for a full description of the usage of this feature.
\subsection{SODA Service Descriptor from Data Discovery}
\label{sec:disc-soda}
In the simplest case, the identifiers found via data discovery (e.g. the
\texttt{obs\_publisher\_did} in ObsCore) can be
used directly with an associated SODA service. Then the query response from
SIAv2 or TAP should include one or
more DataLink service descriptors that describe the
SODA capabilities. These would have a \texttt{standardID} parameter
specifying SODA \{async\} or SODA \{sync\} as specified in
Section~\ref{sec:capabilities} and an appropriate \texttt{accessURL}
parameter for the service. If the service is registered, the provider
can include a \texttt{resourceIdentifier} parameter which will contain
the registered identifier of the service.
The supported SODA
service parameters (standard and custom) would be declared in the
inputParams group of the service descriptor.
The declaration of the ID parameter will specify which column in the
data discovery response contains the suitable identifier; although this
is usually the obs\_publisher\_did from the ObsCore data model, this is
not required and the provider may have the ID parameter reference
another (possibly custom) column.
The data discovery response will in general contain metadata the client
can use to determine the values of SODA filtering parameters that will
yield valid subsets of the data. For example, standard data discovery
using either SIAv2 or TAP and ObsCore will provide metadata for
specifying POS, CIRCLE, and POLYGON (s\_region, s\_ra, s\_dec, s\_fov),
BAND (em\_min, em\_max), TIME (t\_min, t\_max), and POL (pol\_states)
parameters.
When a service descriptor for a SODA service is provided in the data
discovery response, it should be a generic descriptor (see above) for
use with multiple ID values. Thus, there will normally be a single
service descriptor for each available service.
\subsection{SODA Service Descriptor from DataLink}
\label{sec:disc-links-soda}
The alternative scenario has the discovery service return Datalink
documents (see DataLink for the two ways to do that: via the
access\_url or via a DataLink ``service descriptor'' in
the query response). These
Datalink documents can then contain one or more SODA descriptor(s),
most typically one per dataset described. To allow SODA clients
the inference of parameter ranges and the presentation of useful
user interfaces, data providers SHOULD communicate the admissable
ranges of the parameters in question using the VOTable
\xmlel{VALUES} element.
For float-valued intervals (e.g., the standard BAND and TIME
parameters), \xmlel{VALUES/MIN} and \xmlel{VALUES/MAX} should be used to
communicate the range of values for which clients can expect to
receive data. Example:
\begin{lstlisting}[language=XML]
<PARAM name="BAND" unit="m" ucd="em.wl;stat.interval"
datatype="double" arraysize="2"
xtype="interval" value="">
<DESCRIPTION>The wavelength intervals to be extracted</DESCRIPTION>
<VALUES>
<MIN value="3e-7"/>
<MAX value="8e-7"/>
</VALUE>
</PARAM>
\end{lstlisting}
Enumerated values, both for integral and textual types, use
\xmlel{VALUES}/\xmlel{OP\-TION} elements unless there are too many possible
values. Again, only values for which nonempty responses can be
expected for the described dataset should be listed. Example:
\begin{lstlisting}[language=XML]
<PARAM name="POL" ucd="meta.code;phys.polarization"
datatype="char" arraysize="*" value="">
<DESCRIPTION>Polarization states to be extracted.</DESCRIPTION>
<VALUES>
<OPTION>I</OPTION>
<OPTION>V</OPTION>
</VALUE>
</PARAM>
\end{lstlisting}
In case the option enumeration becomes too large, the description
of the parameter should carefully describe what values are
admissable, e.g., by providing a link to an enumeration in the
\xmlel{DESCRIPTION}.
Intervals of integers are described analogous to float-valued
intervals, i.e., using \xmlel{MIN} and \xmlel{MAX} elements.
Standard VOTable semantics are insufficient for the metadata of the SODA
POLYGON and CIRCLE parameters. We therefore define special cases for
the \xmlel{xtype}s \emph{circle} and \emph{polygon} at least until such
time when a proper data model for space-time coordinates will define a
different way to communicate such coverages within VOTables.
For CIRCLE, only a \xmlel{MAX} is given. It contains three
floating point values, separated by whitespace. These correspond
to the RA and Dec of the center of a spherical circle covering the
dataset, and a radius of such a covering circle. Data providers
SHOULD make sure they choose the center and radius such that the
covering circle is close to the minimal one of the dataset.
Example:
\begin{lstlisting}[language=XML]
<PARAM name="CIRCLE" unit="deg" ucd="pos.outline;obs"
datatype="double" arraysize="3"
xtype="circle" value="">
<DESCRIPTION>
A spherical circle to be contained by the cutout
</DESCRIPTION>
<VALUES> <MAX value="12.0 34.0 0.5"/> </VALUES>
</PARAM>
\end{lstlisting}
For POLYGON, again only a \xmlel{MAX} is given. It consists of