Skip to content

Commit c255eff

Browse files
committed
update spec to v1.2.3
1 parent edccc81 commit c255eff

File tree

4 files changed

+402
-453
lines changed

4 files changed

+402
-453
lines changed

sigmf/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# version of this python module
88
__version__ = "1.2.5"
99
# matching version of the SigMF specification
10-
__specification__ = "1.2.0"
10+
__specification__ = "1.2.3"
1111

1212
from . import archive, archivereader, error, schema, sigmffile, utils, validate
1313
from .archive import SigMFArchive

sigmf/schema-collection.json

Lines changed: 116 additions & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -1,171 +1,126 @@
11
{
2-
"$id": "https://github.com/sigmf/SigMF",
3-
"$schema": "http://json-schema.org/draft-07/schema",
4-
"default": {},
5-
"required": [
6-
"collection"
7-
],
8-
"type": "object",
9-
"properties": {
10-
"collection": {
11-
"$id": "#/properties/collection",
12-
"default": {},
13-
"description": "This field is used to indicate that this Recording is part of a SigMF Collection (described later in this document). It is strongly RECOMMENDED that if you are building a Collection, that each Recording referenced by that Collection use this field to associate up to the relevant sigmf-collection file.",
14-
"required": [
15-
"core:version"
16-
],
17-
"type": "object",
18-
"properties": {
19-
"core:version": {
20-
"$id": "#/properties/collection/properties/core%3Aversion",
21-
"description": "The version of the SigMF specification used to create the Collection file.",
22-
"examples": [
23-
"1.2.0"
24-
],
25-
"type": "string"
26-
},
27-
"core:description": {
28-
"$id": "#/properties/collection/properties/core%3Adescription",
29-
"default": "",
30-
"description": "A text description of the SigMF Collection.",
31-
"type": "string"
32-
},
33-
"core:author": {
34-
"$id": "#/properties/collection/properties/core%3Aauthor",
2+
"$id": "https://github.com/sigmf/SigMF/spec/1.2.0/collection-schema",
3+
"$schema": "https://json-schema.org/draft/2020-12/schema",
4+
"default": {},
5+
"required": ["collection"],
6+
"type": "object",
7+
"properties": {
8+
"collection": {
9+
"default": {},
10+
"description": "The `sigmf-collection` file contains metadata in a single top-level Object called a `collection`. The Collection Object contains key/value pairs that describe relationships between SigMF Recordings.\\nn The Collection Object associates SigMF Recordings together by specifying `SigMF Recording Objects` in the `core:streams` JSON array. Each Object describes a specific associated SigMF Recording.\\nn The following rules apply to SigMF Collections:\n\n 1. The Collection Object MUST be the only top-level Object in the file.\n\n 2. Keys in the Collection Object SHOULD use SigMF Recording Objects when referencing SigMF Recordings.\n\n 3. SigMF Recording Objects MUST contain both a `name` field, which is the base-name of a SigMF Recording, and a `hash` which is the SHA512 hash of the Recording Metadata file `[base-name].sigmf-meta`.\n\n 4. SigMF Recording Objects MUST appear in a JSON array.\\nn Example `top-level.sigmf-collection` file:\\begin{verbatim}{\n\"collection\": {\n \"core:version\": \"1.2.0\",\n \"core:extensions\" : [\n {\n \"name\": \"antenna\",\n \"version\": \"1.0.0\",\n \"optional\": true\n }\n ],\n \"antenna:hagl\": 120,\n \"antenna:azimuth_angle\": 98,\n \"core:streams\": [\n {\n \"name\": \"example-channel-0-basename\",\n \"hash\": \"b4071db26f5c7b0c70f5066eb9bc3a8b506df0f5af09991ba481f63f97f7f48e9396584bc1c296650cd3d47bc4ad2c5b72d2561078fb6eb16151d2898c9f84c4\"\n },\n {\n \"name\": \"example-channel-1-basename\",\n \"hash\": \"7132aa240e4d8505471cded716073141ae190f763bfca3c27edd8484348d6693d0e8d3427d0bf1990e687a6a40242d514e5d1995642bc39384e9a37a211655d7\"\n }\n ]\n }\n}\\end{verbatim}",
11+
"required": ["core:version"],
12+
"type": "object",
13+
"properties": {
14+
"core:version": {
15+
"description": "The version of the SigMF specification used to create the Collection file.",
16+
"examples": ["1.2.0"],
17+
"type": "string"
18+
},
19+
"core:description": {
20+
"default": "",
21+
"description": "A text description of the SigMF Collection.",
22+
"type": "string"
23+
},
24+
"core:author": {
25+
"default": "",
26+
"description": "A text identifier for the author potentially including name, handle, email, and/or other ID like Amateur Call Sign.",
27+
"examples": ["Bruce Wayne bruce@waynetech.com", "Bruce (K3X)"],
28+
"type": "string"
29+
},
30+
"core:collection_doi": {
31+
"default": "",
32+
"description": "The registered DOI (ISO 26324) for a Collection.",
33+
"type": "string"
34+
},
35+
"core:license": {
36+
"default": "",
37+
"description": "A URL for the license document under which this Collection metadata is offered.",
38+
"examples": ["https://creativecommons.org/licenses/by-sa/4.0/"],
39+
"type": "string"
40+
},
41+
"core:extensions": {
42+
"default": [],
43+
"description": "The `core:extensions` field in the Global Object is an array of extension objects that describe SigMF extensions. Extension Objects MUST contain the three key/value pairs defined in Table (FIX REF), and MUST NOT contain any other fields.",
44+
"type": "array",
45+
"additionalItems": true,
46+
"items": {
47+
"anyOf": [
48+
{
49+
"type": "object",
50+
"title": "The first anyOf schema",
51+
"description": "An explanation about the purpose of this instance.",
52+
"default": {},
53+
"examples": [
54+
{
55+
"name": "capture_details",
56+
"version": "1.0.0",
57+
"optional": false
58+
}
59+
],
60+
"required": ["name", "version", "optional"],
61+
"properties": {
62+
"name": {
3563
"default": "",
36-
"description": "A text identifier for the author potentially including name, handle, email, and/or other ID like Amateur Call Sign.",
37-
"examples": [
38-
"Bruce Wayne bruce@waynetech.com",
39-
"Bruce (K3X)"
40-
],
64+
"description": "The name of the SigMF extension namespace.",
4165
"type": "string"
42-
},
43-
"core:collection_doi": {
44-
"$id": "#/properties/collection/properties/core%3Acollection_doi",
66+
},
67+
"version": {
4568
"default": "",
46-
"description": "The registered DOI (ISO 26324) for a Collection.",
69+
"description": "The version of the extension namespace specification used.",
4770
"type": "string"
71+
},
72+
"optional": {
73+
"default": false,
74+
"description": "If this field is `true`, the extension is REQUIRED to parse this Recording.",
75+
"type": "boolean"
76+
}
4877
},
49-
"core:license": {
50-
"$id": "#/properties/collection/properties/core%3Alicense",
51-
"default": "",
52-
"description": "A URL for the license document under which this Collection metadata is offered.",
53-
"examples": [
54-
"https://creativecommons.org/licenses/by-sa/4.0/"
55-
],
56-
"type": "string"
57-
},
58-
"core:extensions": {
59-
"$id": "#/properties/collection/properties/core%3Aextensions",
60-
"default": [],
61-
"description": "The `core:extensions` field in the Global Object is an array of extension objects that describe SigMF extensions. Extension Objects MUST contain the three key/value pairs defined below, and MUST NOT contain any other fields.",
62-
"type": "array",
63-
"additionalItems": true,
64-
"items": {
65-
"$id": "#/properties/collection/properties/core%3Aextensions/items",
66-
"anyOf": [
67-
{
68-
"$id": "#/properties/collection/properties/core%3Aextensions/items/anyOf/0",
69-
"type": "object",
70-
"title": "The first anyOf schema",
71-
"description": "An explanation about the purpose of this instance.",
72-
"default": {},
73-
"examples": [
74-
{
75-
"name": "capture_details",
76-
"version": "1.0.0",
77-
"optional": false
78-
}
79-
],
80-
"required": [
81-
"name",
82-
"version",
83-
"optional"
84-
],
85-
"properties": {
86-
"name": {
87-
"$id": "#/properties/collection/properties/core%3Aextensions/items/anyOf/0/properties/name",
88-
"default": "",
89-
"description": "The name of the SigMF extension namespace.",
90-
"type": "string"
91-
},
92-
"version": {
93-
"$id": "#/properties/collection/properties/core%3Aextensions/items/anyOf/0/properties/version",
94-
"default": "",
95-
"description": "The version of the extension namespace specification used.",
96-
"type": "string"
97-
},
98-
"optional": {
99-
"$id": "#/properties/collection/properties/core%3Aextensions/items/anyOf/0/properties/optional",
100-
"default": false,
101-
"description": "If this field is `true`, the extension is REQUIRED to parse this Recording.",
102-
"type": "boolean"
103-
}
104-
},
105-
"additionalProperties": true
106-
}
107-
]
78+
"additionalProperties": true
79+
}
80+
]
81+
}
82+
},
83+
"core:streams": {
84+
"default": [],
85+
"description": "An ordered array of SigMF Recording Tuples, indicating multiple recorded streams of data (e.g., channels from a phased array).",
86+
"type": "array",
87+
"additionalItems": true,
88+
"items": {
89+
"anyOf": [
90+
{
91+
"default": [],
92+
"examples": [["example-channel-0-basename", "hash"]],
93+
"type": "array",
94+
"additionalItems": true,
95+
"items": {
96+
"anyOf": [
97+
{
98+
"default": "",
99+
"type": "string"
108100
}
109-
},
110-
"core:streams": {
111-
"$id": "#/properties/collection/properties/core%3Astreams",
112-
"default": [],
113-
"description": "An ordered array of SigMF Recording Tuples, indicating multiple recorded streams of data (e.g., channels from a phased array).",
114-
"type": "array",
115-
"additionalItems": true,
116-
"items": {
117-
"$id": "#/properties/collection/properties/core%3Astreams/items",
118-
"anyOf": [
119-
{
120-
"$id": "#/properties/collection/properties/core%3Astreams/items/anyOf/0",
121-
"default": [],
122-
"examples": [
123-
[
124-
"example-channel-0-basename",
125-
"hash"
126-
]
127-
],
128-
"type": "array",
129-
"additionalItems": true,
130-
"items": {
131-
"$id": "#/properties/collection/properties/core%3Astreams/items/anyOf/0/items",
132-
"anyOf": [
133-
{
134-
"$id": "#/properties/collection/properties/core%3Astreams/items/anyOf/0/items/anyOf/0",
135-
"default": "",
136-
"type": "string"
137-
}
138-
]
139-
}
140-
},
141-
{
142-
"$id": "#/properties/collection/properties/core%3Astreams/items/anyOf/1",
143-
"default": [],
144-
"examples": [
145-
[
146-
"example-channel-1-basename",
147-
"hash"
148-
]
149-
],
150-
"type": "array",
151-
"additionalItems": true,
152-
"items": {
153-
"$id": "#/properties/collection/properties/core%3Astreams/items/anyOf/1/items",
154-
"anyOf": [
155-
{
156-
"$id": "#/properties/collection/properties/core%3Astreams/items/anyOf/1/items/anyOf/0",
157-
"default": "",
158-
"type": "string"
159-
}
160-
]
161-
}
162-
}
163-
]
101+
]
102+
}
103+
},
104+
{
105+
"default": [],
106+
"examples": [["example-channel-1-basename", "hash"]],
107+
"type": "array",
108+
"additionalItems": true,
109+
"items": {
110+
"anyOf": [
111+
{
112+
"default": "",
113+
"type": "string"
164114
}
115+
]
165116
}
166-
},
167-
"additionalProperties": true
117+
}
118+
]
119+
}
168120
}
169-
},
170-
"additionalProperties": true
171-
}
121+
},
122+
"additionalProperties": true
123+
}
124+
},
125+
"additionalProperties": true
126+
}

0 commit comments

Comments
 (0)