{ "$id": "https://example.com/anatomical.echosms.schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "EchoSMs anatomical datastore schema", "description": "This schema defines a structure for storing fish and plankton acoustic scattering model data, mainly for input to the echoSMs anatomical datastore.\n\nThe reference version of the schema (formatted as a JSON-schema file) will always be available in the echoSMs github [repository](https://github.com/ices-tools-dev/echoSMs/tree/main/data_store/schema).", "type": "object", "required": [ "uuid", "specimen_name", "version_number", "version_time", "version_note", "description", "anatomical_category", "aphia_id", "date_collection", "date_image", "imaging_method", "shape_method", "dataset_size", "dataset_size_units", "specimen_condition", "shapes", "length", "length_units", "length_type", "shape_type" ], "additionalProperties": false, "dependentRequired": { "latitude": [ "latitude_units" ], "longitude": [ "longitude_units" ], "depth": [ "depth_units" ], "weight": [ "weight_units" ] }, "properties": { "uuid": { "description": "A Universally Unique IDentifier for this specimen as per [RFC9562](https://datatracker.ietf.org/doc/rfc9562). Generated by the datastore.", "type": "string" }, "version_number": { "description": "A version number that increments whenever this specimen is updated. Generated and updated by the datastore.", "type": "integer", "minimum": 1 }, "version_time": { "type": "string", "format": "date-time", "description": "The timestamp when this specimen dataset was last modified, in [RFC9557](https://datatracker.ietf.org/doc/rfc9557) format, including the timezone. Generated and updated by the datastore." }, "version_note": { "description": "A note about the changes in this version.", "type": "string" }, "version_investigators": { "description": "Names or identifying descriptions of persons or organisations that updated or created this dataset.", "type": "array", "items": { "type": "string" } }, "dataset_uuid": { "description": "A Universally Unique IDentifier for a dataset as [RFC9562](https://datatracker.ietf.org/doc/rfc9562). Datasets are used only to group multiple specimens together. They contain no information that is not already in the specimen metadata.", "type": "string", "format": "uuid" }, "dataset_name": { "description": "A name for the dataset.", "type": "string" }, "description": { "description": "A description of the specimen.", "type": "array", "items": { "type": "string" } }, "anatomical_category": { "description": "The type of anatomy that this dataset contains.", "type": "string", "enum": [ "tissue", "organ", "organ system", "organism", "other" ] }, "aphia_id": { "type": "integer", "minimum": 1, "description": "The WoRMS [aphiaID](https://www.marinespecies.org/aphia.php) of the species in this dataset." }, "class": { "type": "string", "description": "Taxonomical hierarchy level of class that is consistent with WoRMS." }, "order": { "description": "Taxonomical hierarchy level of order that is consistent with WoRMS.", "type": "string" }, "family": { "description": "Taxonomical hierarchy level of family that is consistent with WoRMS.", "type": "string" }, "genus": { "description": "Taxonomical hierarchy level of genus that is consistent with WoRMS.", "type": "string" }, "species": { "description": "Taxonomical hierarchy level of species that is consistent with WoRMS.", "type": "string" }, "vernacular_names": { "description": "Vernacular names for the organism.", "type": "array", "items": { "type": "string" } }, "reference": { "description": "A literature reference for the dataset. If available, a DOI or URI is recommended.", "type": "string" }, "activity_name": { "description": "Name of the data collection activity (if any), such as voyage code, project name, etc.", "type": "string" }, "location": { "description": "Name or description of the location where organism was collected.", "type": "string" }, "latitude": { "description": "Latitude of location where organism was collected.", "type": "number", "minimum": -90, "maximum": 90 }, "latitude_units": { "description": "Units for latitude. Positive values indicate north of the equator.", "type": "string", "enum": [ "degrees_north" ] }, "longitude": { "description": "Longitude of location where organism was collected.", "type": "number", "minimum": -180, "maximum": 180 }, "longitude_units": { "description": "Units for longitude. Positive values indicate east of the prime meridian.", "type": "string", "enum": [ "degrees_east" ] }, "depth": { "description": "Depth below surface of organism collection location.", "type": "number", "minimum": 0 }, "depth_units": { "description": "Units for depth.", "type": "string", "enum": [ "m" ] }, "date_collection": { "description": "The date or date range when the dataset was collected, in [RFC9557](https://datatracker.ietf.org/doc/rfc9557) format.", "type": "string", "format": "date" }, "date_image": { "description": "The date when the dataset was imaged, in [RFC9557](https://datatracker.ietf.org/doc/rfc9557) format.", "type": "string", "format": "date" }, "data_collection_description": { "description": "Description of data collection details.", "type": "string" }, "notes": { "description": "Explanatory notes about the shape data.", "type": "array", "items": { "type": "string" } }, "imaging_method": { "description": "Method used to obtain the raw image data.", "type": "string", "enum": [ "radiograph", "CT", "MRI", "photograph", "3D scanner", "unknown", "other", "not applicable" ] }, "shape_method": { "description": "Method used to obtain the specimen shape.", "type": "string", "enum": [ "manual outline of image(s)", "automated outline of images(s)", "3D scan of object", "not applicable", "unknown", "other" ] }, "shape_method_processing": { "description": "Description of processing used to convert raw images into shapes, including any manipulation of image data (for example, smoothing, edge enhancement, rotation, etc).", "type": "string" }, "model_type": { "description": "Original scattering model type.", "type": "string", "enum": [ "KRM", "KA", "DWBA", "PTDWBA", "FEM", "BEM", "MFS", "other", "unknown", "none" ] }, "sound_speed_method": { "description": "Method used to obtain sound speed in the feature.", "type": "string", "enum": [ "density to sound speed relationship", "time-of-flight", "literature", "unknown", "other" ] }, "mass_density_method": { "description": "Method used to obtain density in the feature.", "type": "string", "enum": [ "CT density", "liquid displacement", "literature", "unknown", "other" ] }, "dataset_size": { "description": "Size of the entire dataset (including raw data). Generated by the datastore server.", "type": "number", "minimum": 0 }, "dataset_size_units": { "description": "Units for dataset_size. Generated by the datastore server.", "type": "string", "enum": [ "megabyte" ] }, "radiograph_perspective": { "description": "The viewpoint of the imaging x-ray machine to the anatomical feature.", "type": "object", "enum": [ "lateral", "dorsal", "other" ] }, "radiograph_exposure_time": { "description": "The exposure time setting of the imaging x-ray machine.", "type": "string" }, "radiograph_exposure_time_unit": { "description": "Unit of exposure time.", "type": "string", "enum": [ "s" ] }, "radiograph_focal_length": { "description": "Focal length setting of the imaging x-ray machine.", "type": "string" }, "radiograph_focal_length_unit": { "description": "Unit of focal length.", "type": "string", "enum": [ "m" ] }, "radiograph_kVp": { "description": "The kilovoltage peak setting of the imaging x-ray machine.", "type": "number" }, "radiograph_mA": { "description": "The milliamperage setting of the imaging x-ray machine.", "type": "number" }, "specimen_name": { "description": "A name that identifies the specimen.", "type": "string" }, "specimen_condition": { "description": "Condition of the specimen when it was imaged.", "type": "string", "enum": [ "fresh", "frozen", "thawed", "unknown", "other" ] }, "length": { "description": "Length of the specimen.", "type": "number", "minimum": 0 }, "length_units": { "$ref": "#/$defs/length_units" }, "weight": { "description": "Weight of the specimen.", "type": "number", "minimum": 0 }, "weight_units": { "description": "Units for weight.", "type": "string", "enum": [ "kg" ] }, "sex": { "description": "Sex of specimen", "type": "string", "enum": [ "female", "male", "immature", "unknown" ] }, "length_type": { "description": "Type of length measurement.", "type": "string", "enum": [ "total length", "fork length", "standard length", "lower jaw fork length", "total width", "carapace length", "curved fork length", "disc width", "stretched total length", "CCAMLR krill - front of eye to tip of telson", "unknown", "other" ] }, "shape_type": { "description": "Type of shape data used for this specimen.", "type": "string", "enum": [ "outline", "surface", "voxels", "categorised voxels", "geometric" ] }, "shapes": { "description": "Shape data.", "type": "array", "minItems": 1, "items": { "type": "object", "required": [ "anatomical_feature" ], "properties": { "name": { "description": "Name for the shape.", "type": "string" }, "anatomical_feature": { "description": "Type of anatomical feature represented by this shape.", "type": "string", "enum": [ "body", "swimbladder", "backbone", "bone", "muscle", "head", "eye", "organs", "appendages", "inclusion", "other" ] }, "straightened": { "description": "Was the shape straightened during the processing.", "type": "boolean", "default": "false" }, "smoothed": { "description": "Was the shape smoothed during the processing.", "type": "boolean", "default": "false" }, "rotated": { "description": "Was the shape rotated during the processing.", "type": "boolean", "default": "false" }, "notes": { "description": "Explanatory notes about the straightening, smoothing, and rotation of the shape.", "type": "array", "items": { "type": "string" } } }, "unevaluatedProperties": false, "oneOf": [ { "title": "Outline", "description": "Represents a three-dimensional shape using a dorsal and lateral outline.", "required": [ "shape_units", "x", "y", "z", "height", "width", "boundary" ], "dependentRequired": { "mass_density": [ "mass_density_units" ], "sound_speed_compressional": [ "sound_speed_compressional_units" ], "sound_speed_shear": [ "sound_speed_shear_units" ], "youngs_modulus": [ "youngs_modulus_units" ] }, "properties": { "shape_type": { "const": "outline" }, "shape_units": { "$ref": "#/$defs/length_units" }, "boundary": { "$ref": "#/$defs/boundary" }, "x": { "description": "x-coordinate of shape centreline.", "type": "array", "minItems": 1, "items": { "type": "number" } }, "y": { "description": "y-coordinate of shape centreline.", "type": "array", "minItems": 1, "items": { "type": "number" } }, "z": { "description": "z-coordinate of shape centreline.", "type": "array", "minItems": 1, "items": { "type": "number" } }, "height": { "description": "Height of the shape at each centreline point.", "type": "array", "minItems": 1, "items": { "type": "number", "minimum": 0 } }, "width": { "description": "Width of the shape at each centreline point.", "type": "array", "minItems": 1, "items": { "type": "number", "minimum": 0 } }, "mass_density": { "description": "Mass density of shape.", "type": "array", "minItems": 1, "items": { "type": "number", "minimum": 0 } }, "mass_density_units": { "$ref": "#/$defs/mass_density_units" }, "sound_speed_compressional": { "description": "Compressional sound speed in shape.", "type": "array", "minItems": 1, "items": { "type": "number", "minimum": 0 } }, "sound_speed_compressional_units": { "$ref": "#/$defs/sound_speed_units" }, "sound_speed_shear": { "description": "Transversal (shear) sound speed in shape.", "type": "array", "minItems": 1, "items": { "type": "number", "minimum": 0 } }, "sound_speed_shear_units": { "$ref": "#/$defs/sound_speed_units" }, "mass_density_ratio": { "description": "Ratio of mass densities of the shape and the surrounding material or shape.", "type": "array", "minItems": 1, "items": { "type": "number", "minimum": 0 } }, "sound_speed_ratio": { "description": "Ratio of compressional sound speed of the and the surrounding material or shape.", "type": "array", "minItems": 1, "items": { "type": "number", "minimum": 0 } }, "youngs_modulus": { "description": "Young's modulus, E, of the shape.", "type": "array", "minItems": 1, "items": { "type": "number", "minimum": 0 } }, "youngs_modulus_units": { "$ref": "#/$defs/youngs_modulus_units" } } }, { "title": "Surface", "description": "Represents a three-dimensional shape using a triangulated mesh.", "required": [ "shape_units", "x", "y", "z", "facets_0", "facets_1", "facets_2", "boundary" ], "dependentRequired": { "mass_density": [ "mass_density_units" ], "sound_speed_compressional": [ "sound_speed_compressional_units" ], "sound_speed_shear": [ "sound_speed_shear_units" ], "youngs_modulus": [ "youngs_modulus_units" ] }, "properties": { "shape_type": { "const": "surface" }, "shape_units": { "$ref": "#/$defs/length_units" }, "boundary": { "$ref": "#/$defs/boundary" }, "x": { "description": "x-coordinates of surface nodes.", "type": "array", "minItems": 1, "items": { "type": "number" } }, "y": { "description": "y-coordinates of surface nodes.", "type": "array", "minItems": 1, "items": { "type": "number" } }, "z": { "description": "z-coordinates of surface nodes.", "type": "array", "minItems": 1, "items": { "type": "number" } }, "facets_0": { "description": "Zero-based indices into x, y, and z that define node 0 of a surface triangle.", "type": "array", "minItems": 1, "items": { "type": "integer", "minimum": 0 } }, "facets_1": { "description": "Zero-based indices into x, y, and z that define node 1 of a surface triangle.", "type": "array", "minItems": 1, "items": { "type": "integer", "minimum": 0 } }, "facets_2": { "description": "Zero-based indices into x, y, and z that define node 2 of a surface triangle.", "type": "array", "minItems": 1, "items": { "type": "integer", "minimum": 0 } }, "normals_x": { "description": "x-component of outward-pointing normal vector for each facet.", "type": "array", "minItems": 1, "items": { "type": "number" } }, "normals_y": { "description": "y-component of outward-pointing normal vector for each facet.", "type": "array", "minItems": 1, "items": { "type": "number" } }, "normals_z": { "description": "z-component of outward-pointing normal vector for each facet.", "type": "array", "minItems": 1, "items": { "type": "number" } }, "mass_density": { "description": "Mass density of shape.", "type": "number", "minimum": 0 }, "mass_density_units": { "$ref": "#/$defs/mass_density_units" }, "sound_speed_compressional": { "description": "Compressional sound speed in shape.", "type": "number", "minimum": 0 }, "sound_speed_compressional_units": { "$ref": "#/$defs/sound_speed_units" }, "sound_speed_shear": { "description": "Transversal (shear) sound speed in shape.", "type": "number", "minimum": 0 }, "sound_speed_shear_units": { "$ref": "#/$defs/sound_speed_units" }, "mass_density_ratio": { "description": "Ratio of mass densities of the shape and the surrounding material or shape.", "type": "number", "minimum": 0 }, "sound_speed_ratio": { "description": "Ratio of compressional sound speed of the and the surrounding material or shape.", "type": "number", "minimum": 0 }, "youngs_modulus": { "description": "Young's modulus, E, of the shape.", "type": "number", "minimum": 0 }, "youngs_modulus_units": { "$ref": "#/$defs/youngs_modulus_units" } } }, { "title": "Voxel", "description": "Represents a three-dimensional shape using voxels.", "required": [ "voxel_size", "voxel_size_units", "mass_density", "mass_density_units", "sound_speed_compressional", "sound_speed_compressional_units" ], "properties": { "shape_type": { "const": "voxels" }, "voxel_size": { "description": "Voxel size, ordered x, y, z.", "type": "array", "minItems": 3, "maxItems": 3, "items": { "type": "number", "minimum": 0 } }, "voxel_size_units": { "$ref": "#/$defs/length_units" }, "mass_density": { "description": "Mass density of voxels.", "type": "array", "minItems": 1, "items": { "type": "array", "minItems": 1, "items": { "type": "array", "minItems": 1, "items": { "type": "number", "minimum": 0 } } } }, "mass_density_units": { "$ref": "#/$defs/mass_density_units" }, "sound_speed_compressional": { "description": "Compressional sound speed of voxels.", "type": "array", "minItems": 1, "items": { "type": "array", "minItems": 1, "items": { "type": "array", "minItems": 1, "items": { "type": "number", "minimum": 0 } } } }, "sound_speed_compressional_units": { "$ref": "#/$defs/sound_speed_units" } } }, { "title": "Categorised voxel", "description": "Represents a three-dimensional shape using categorised voxels.", "required": [ "voxel_size", "voxel_size_units", "categories", "mass_density", "mass_density_units", "sound_speed_compressional", "sound_speed_compressional_units" ], "properties": { "shape_type": { "const": "categorised voxels" }, "voxel_size": { "description": "Voxel size, ordered x, y, z.", "type": "array", "minItems": 3, "maxItems": 3, "items": { "type": "number", "minimum": 0 } }, "voxel_size_units": { "$ref": "#/$defs/length_units" }, "categories": { "description": "Voxel categories", "type": "array", "minItems": 1, "items": { "type": "array", "minItems": 1, "items": { "type": "array", "minItems": 1, "items": { "type": "integer" } } } }, "mass_density": { "description": "Mass density of voxels categories.", "type": "array", "minItems": 1, "items": { "type": "number", "minimum": 0 } }, "mass_density_units": { "$ref": "#/$defs/mass_density_units" }, "sound_speed_compressional": { "description": "Compressional sound speed of voxel categories.", "type": "array", "minItems": 1, "items": { "type": "number", "minimum": 0 } }, "sound_speed_compressional_units": { "$ref": "#/$defs/sound_speed_units" } } }, { "title": "Geometric", "description": "Represents a three-dimensional shape using the combination of one or more geometric shapes.", "required": [ "geometric_form", "origin_location", "origin_location_units", "shape_units" ], "additionalProperties": false, "dependentRequired": { "pitch": [ "orientation_units" ], "roll": [ "orientation_units" ], "yaw": [ "orientation_units" ], "mass_density": [ "mass_density_units" ], "sound_speed_compressional": [ "sound_speed_compressional_units" ], "sound_speed_shear": [ "sound_speed_shear_units" ] }, "properties": { "shape_type": { "const": "geometric" }, "geometric_form": { "description": "Geometric form of this shape", "type": "string", "enum": [ "cylinder", "spheroid" ] }, "shape_units": { "description": "The units of the shape dimensions.", "type": "string", "enum": [ "m" ] }, "orientation_units": { "$ref": "#/$defs/orientation_units" }, "pitch": { "$ref": "#/$defs/pitch" }, "roll": { "$ref": "#/$defs/roll" }, "yaw": { "$ref": "#/$defs/yaw" }, "mass_density": { "description": "Mass density of the shape.", "type": "number", "minimum": 0 }, "mass_density_units": { "$ref": "#/$defs/mass_density_units" }, "sound_speed_compressional": { "description": "Compressional sound speed of the shape.", "type": "number", "minimum": 0 }, "sound_speed_compressional_units": { "$ref": "#/$defs/sound_speed_units" }, "sound_speed_shear": { "description": "Transversal (shear) sound speed in shape.", "type": "number", "minimum": 0 }, "sound_speed_shear_units": { "$ref": "#/$defs/sound_speed_units" }, "origin_location": { "$ref": "#/$defs/origin_location" }, "origin_location_units": { "$ref": "#/$defs/origin_location_units" } }, "unevaluatedProperties": false, "oneOf": [ { "title": "Cylinder", "description": "The centre of the cylinder for application of the origin, roll, pitch, and yaw is at radius=0 and halfway along the cylinder length.", "required": [ "radius", "length" ], "additionalProperties": false, "properties": { "geometric_form": { "const": "cylinder" }, "radius": { "description": "Radius of the cylinder.", "type": "number", "minimum": 0 }, "length": { "description": "Length of the cylinder.", "type": "number", "minimum": 0 } } }, { "title": "Spheroid", "description": "A sphere, prolate spheroid, or oblate spheroid. The polar axis of the spheroids lies along the x-axis of the echoSMs coordinate system (prior to application of any tilt, roll, and yaw). An oblate spheroid occurs when the equatorial radius is greater than the polar radius and a prolate spheroid when the polar radius is greater than the equatorial radius. A sphere is generated when the polar and equatorial radii are the same.", "required": [ "equatorial_radius", "polar_radius" ], "additionalProperties": false, "properties": { "geometric_form": { "const": "spheroid" }, "equatorial_radius": { "description": "The equatorial radius of the spheroid. In the echoSMs coordinate system the equatorial radius is along the y- and z-axes.", "type": "number", "minimum": 0 }, "polar_radius": { "description": "The polar radius of the spheroid. In the echoSMs coordinate system the polar axis is the x-axis.", "type": "number", "minimum": 0 } } } ] } ] } } }, "$defs": { "boundary": { "description": "Type of reflecting boundary for this shape.", "type": "string", "enum": [ "fixed-rigid", "pressure-release", "fluid-filled", "elastic" ] }, "length_units": { "description": "Units for lengths, dimensions, and sizes.", "type": "string", "enum": [ "m" ] }, "mass_density_units": { "description": "Units for mass density.", "type": "string", "enum": [ "kg/m^3" ] }, "sound_speed_units": { "description": "Units for sound speed.", "type": "string", "enum": [ "m/s" ] }, "youngs_modulus_units": { "description": "Units for Young's modulus.", "type": "string", "enum": [ "Pa" ] }, "orientation_units": { "description": "The units used for pitch, roll, and yaw attributes", "type": "string", "enum": [ "degrees" ] }, "pitch": { "description": "The pitch of the shape in the echoSMs coordinate system.", "type": "number", "minimum": 0.0, "maximum": 180.0, "default": 0.0 }, "roll": { "description": "The roll of the shape in the echoSMs coordinate system.", "type": "number", "minimum": -90.0, "maximum": 90.0, "default": 0.0 }, "yaw": { "description": "The yaw of the shape in the echoSMs coordinate system.", "type": "number", "minimum": -180.0, "maximum": 180.0, "default": 0.0 }, "origin_location": { "description": "The location of the shape's centre, ordered (x, y, z) as per the echoSMs coordinate system.", "minItems": 3, "maxItems": 3, "type": "array", "items": { "type": "number" } }, "origin_location_units": { "description": "The units of the origin coordinates.", "type": "string", "enum": [ "m" ] } } }