The Constellations database on the backing MongoDB server is called
constellations
by default. The database contains the following collections:
handles
images
scenes
events
Each document in the handles
collection may have the following fields:
_id
: the ObjectID of the handle documenthandle
: a string giving the short form of the handle that will appear in URLs. This field is associated with a unique index. We should limit these to something like lowercase alphanumerics and simple punctuationdisplay_name
: a longer, display name associated with the handle. This can contain spaces, accents, etc. but is still just plain text. We should specify a maximum length.creation_date
: the ISODate when this handle was createdowner_accounts
: an array of strings giving the Keycloak account IDs that have full ownership control of this handle.
Each document in the images
collection may have the following fields:
_id
: the ObjectID of the imagehandle_id
: the ObjectID of the handle that owns this imagecreation_date
: the ISODate when this image was createdwwt
: imageset parameters understood by WWT; see WWT docs for specificationsbase_degrees_per_tile
(float)bottoms_up
(boolean)center_x
(float)center_y
(float)file_type
(string)offset_x
(float)offset_y
(float)projection
(string)quad_tree_map
(string)rotation
(number)tile_levels
(integer)width_factor
(int)thumbnail_url
(string)
storage
: information about the data storage for this imagelegacy_url_template
(string?) - if present, the image is a WWT "legacy" image with data stored somewhere outside of Constellations- Other mechanisms will be added for data uploaded directly to Constellations
note
(string): a short freeform description of the image; currently intended only to be shown to its owning user(s).alt_text
(string): a textual description of the image intended for visually impaired users. Free-form plain text.permissions
: information about image permissions (license, credits, etc.)copyright
(string): A string describing the image's copyright statementcredits
(optional string): An HTML string describing image credits; HTML to allow for e.g. hyperlinks. Sanitized to prevent XSS.license
(string): A valid SPDX expression describing the image license
builtin_background_sort_key
(integer): if present and non-negative, the image is one of the built-in options suitable for use as wide-area backgrounds. The options are presented to the user sorted by increasing values of this key. This value is manually set for a small number of special images.
The following WWT parameters are currently assumed to be fixed at the following values:
BandPass = Visible
BaseTileLevel = 0
DataSetType = Sky
ElevationModel = False
Generic = False
Sparse = True
StockSet = False
To-do:
- Other storage mechanisms
Each document in the scenes
collection may have the following fields:
_id
: the ObjectID of the scenehandle_id
: the ObjectID of the handle that owns this scenecreation_date
: the ISODate when this scene was createdplace
: WWT "Place" informationra_rad
(number) target camera RA in radiansdec_rad
(number) target camera declination in radiansroll_rad
(number) target camera roll angle in radiansroi_height_deg
(number) the height of the region of interest, in degreesroi_aspect_ratio
(number) the aspect ratio of the rectangle defining the region of interest. This value is used to tune the WWT zoom level depending on the aspect ratio of the user's viewport.
impressions
(number) the number of impressions this scene haslikes
(number) the number of likes this scene hasclicks
(number) the number of clicks to a scene'soutgoing_url
in the frontendshares
(number) the number of times this scene has been sharedtext
(string) The human-readable text associated with the sceneoutgoing_url
(optional string) a URL that viewers of the scene should be encouraged to clickcontent
: information about the actual contents of the sceneimage_layers
: optional array of ImageLayer records (see below).background_id
: (optional ObjectID) The ObjectID of the scene's background image
previews
: information about different preview typesvideo
: (optional string) The basename of the video preview in its blob container, if one existsthumbnail
: (optional string) The basename of the preview thumbnail image in the blob container, if one exists
published
(boolean): Whether or not the scene has been published. This affects whether it will appear in timelines.home_timeline_sort_key
(integer): if present and non-negative, the scene is included in the global home timeline, with its position set by the ordering of these values.astropix
: information associating this scene with an AstroPix recordpublisher_id
: (string) the publisher ID of the AstroPix recordimage_id
: (string) the image ID of the AstroPix record
An ImageLayer record may have the following fields:
image_id
: the ObjectID of the imageopacity
: the opacity with which the image should be drawn, between 0 and 1
To-do:
- "Publication date" or other mechanism to not immediately publish
- Clarify semantics of the "text" item
Each document in the events
collection may have the following fields:
kind
: the kind of eventsid
: the frontend session ID associated with the eventdate
: the ISODate of this event
If kind
is "click"
:
scene_id
: the ObjectId of the scene that was clicked
If kind
is "impression"
:
scene_id
: the ObjectId of the scene that had an impression
If kind
is "like"
:
scene_id
: the ObjectId of the scene that was likeddelta
(number): either +1 (indicating a like) or -1 (indicating an un-like)
Each document in the tessellations
collection has the following fields:
_id
: the ObjectID of the tessellationname
: a human-readable name for the tessellationneighbors
: a list of neighbors for each point in the tessellation. The i-th entry in the list is itself a list which gives the index numbers of the neighbors for the i-th scene in the tessellationpolygons
: a list of polygons describing the tessellation cells. The i-th entry in the list is a list of points (in spherical coordinates, using radians) which specify the vertices of the polygonpoints
: a list of the locations (RA/Dec, in radians) of the relevant scenesscene_ids
: a list of the IDs of the scenes used in the tessellationslast_updated
: a timestamp of when the tessellation was last updated