diff --git a/broker/cloud_functions/lsst/ps_to_storage/Dockerfile b/broker/cloud_functions/lsst/ps_to_storage/Dockerfile new file mode 100644 index 00000000..4d1b32e0 --- /dev/null +++ b/broker/cloud_functions/lsst/ps_to_storage/Dockerfile @@ -0,0 +1,21 @@ +# Use the official lightweight Python image. +# https://hub.docker.com/_/python +FROM python:3.12-slim + +# Allow statements and log messages to immediately appear in the Knative logs +ENV PYTHONUNBUFFERED True + +# Copy local code to the container image. +ENV APP_HOME /app +WORKDIR $APP_HOME +COPY . ./ + +# Install production dependencies. +RUN pip install --no-cache-dir -r requirements.txt + +# Run the web service on container startup. Here we use the gunicorn +# webserver, with one worker process and 8 threads. +# For environments with multiple CPU cores, increase the number of workers +# to be equal to the cores available. +# Timeout is set to 0 to disable the timeouts of the workers to allow Cloud Run to handle instance scaling. +CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 main:app diff --git a/broker/cloud_functions/lsst/ps_to_storage/cloudbuild.yaml b/broker/cloud_functions/lsst/ps_to_storage/cloudbuild.yaml new file mode 100644 index 00000000..e510f0e9 --- /dev/null +++ b/broker/cloud_functions/lsst/ps_to_storage/cloudbuild.yaml @@ -0,0 +1,29 @@ +# https://cloud.google.com/build/docs/deploying-builds/deploy-cloud-run +# containerize the module and deploy it to Cloud Run +steps: +# Build the image +- name: 'gcr.io/cloud-builders/docker' + args: ['build', '-t', '${_REGION}-docker.pkg.dev/${PROJECT_ID}/${_REPOSITORY}/${_MODULE_IMAGE_NAME}', '.'] +# Push the image to Artifact Registry +- name: 'gcr.io/cloud-builders/docker' + args: ['push', '${_REGION}-docker.pkg.dev/${PROJECT_ID}/${_REPOSITORY}/${_MODULE_IMAGE_NAME}'] +# Deploy image to Cloud Run +- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk' + entrypoint: gcloud + args: ['run', 'deploy', '${_MODULE_NAME}', '--image', '${_REGION}-docker.pkg.dev/${PROJECT_ID}/${_REPOSITORY}/${_MODULE_IMAGE_NAME}', '--region', '${_REGION}', '--set-env-vars', '${_ENV_VARS}'] +images: +- '${_REGION}-docker.pkg.dev/${PROJECT_ID}/${_REPOSITORY}/${_MODULE_IMAGE_NAME}' +substitutions: + _SURVEY: 'lsst' + _TESTID: 'testid' + _MODULE_NAME: '${_SURVEY}-alerts-to-storage-${_TESTID}' + _MODULE_IMAGE_NAME: 'gcr.io/${PROJECT_ID}/${_REPOSITORY}/${_MODULE_NAME}' + _REPOSITORY: 'cloud-run-services' + # cloud functions automatically sets the projectid env var using the name "GCP_PROJECT" + # use the same name here for consistency + # [TODO] PROJECT_ID is set in setup.sh. this is confusing and we should revisit the decision. + # i (Raen) think i didn't make it a substitution because i didn't want to set a default for it. + _ENV_VARS: 'GCP_PROJECT=${PROJECT_ID},SURVEY=${_SURVEY},TESTID=${_TESTID}' + _REGION: 'us-central1' +options: + dynamic_substitutions: true diff --git a/broker/cloud_functions/lsst/ps_to_storage/deploy.sh b/broker/cloud_functions/lsst/ps_to_storage/deploy.sh new file mode 100755 index 00000000..8fdbbe65 --- /dev/null +++ b/broker/cloud_functions/lsst/ps_to_storage/deploy.sh @@ -0,0 +1,91 @@ +#! /bin/bash +# Deploys or deletes broker Cloud Functions +# This script will not delete Cloud Functions that are in production + +# "False" uses production resources +# any other string will be appended to the names of all resources +testid="${1:-test}" +# "True" tearsdown/deletes resources, else setup +teardown="${2:-False}" +# name of the survey this broker instance will ingest +survey="${3:-lsst}" +region="${4:-us-central1}" +PROJECT_ID=$GOOGLE_CLOUD_PROJECT # get the environment variable + +MODULE_NAME="to-storage" # lower case required by cloud run +ROUTE_RUN="/" # url route that will trigger main.run() + +# function used to define GCP resources; appends testid if needed +define_GCP_resources() { + local base_name="$1" + local testid_suffix="" + + if [ "$testid" != "False" ]; then + testid_suffix="-${testid}" + fi + + echo "${base_name}${testid_suffix}" +} + +#--- GCP resources used in this script +artifact_registry_repo=$(define_GCP_resources "cloud-run-services") +avro_bucket=$(define_GCP_resources "${PROJECT_ID}-${survey}_alerts") +avro_topic=$(define_GCP_resources "projects/${PROJECT_ID}/topics/${survey}-alert_avros") +avro_subscription=$(define_GCP_resources "${survey}-alert_avros-counter") +cr_module_name=$(define_GCP_resources "${survey}-${MODULE_NAME}") # lower case required by cloud run +ps_input_subscrip=$(define_GCP_resources "${survey}-alerts_raw") # pub/sub subscription used to trigger cloud run module +runinvoker_svcact="cloud-run-invoker@${PROJECT_ID}.iam.gserviceaccount.com" +trigger_topic=$(define_GCP_resources "${survey}-alerts_raw") + + +if [ "${teardown}" = "True" ]; then + # ensure that we do not teardown production resources + if [ "${testid}" != "False" ]; then + gsutil rm -r "gs://${avro_bucket}" + gcloud pubsub topics delete "${avro_topic}" + gcloud pubsub subscriptions delete "${avro_subscription}" + gcloud pubsub subscriptions delete "${ps_input_subscrip}" + gcloud run services delete "${cr_module_name}" --region "${region}" + fi + +else # Deploy the Cloud Run service + + #--- Create the bucket that will store the alerts + gsutil mb -l "${region}" "gs://${avro_bucket}" + gsutil uniformbucketlevelaccess set on "gs://${avro_bucket}" + gsutil requesterpays set on "gs://${avro_bucket}" + gcloud storage buckets add-iam-policy-binding "gs://${avro_bucket}" \ + --member="allUsers" \ + --role="roles/storage.objectViewer" + + #--- Setup the Pub/Sub notifications on the Avro storage bucket + echo + echo "Configuring Pub/Sub notifications on GCS bucket..." + trigger_event=OBJECT_FINALIZE + format=json # json or none; if json, file metadata sent in message body + gsutil notification create \ + -t "$avro_topic" \ + -e "$trigger_event" \ + -f "$format" \ + "gs://${avro_bucket}" + gcloud pubsub subscriptions create "${avro_subscription}" --topic="${avro_topic}" + + +#--- Deploy Cloud Run + echo "Creating container image and deploying to Cloud Run..." + moduledir="." # assumes deploying what's in our current directory + config="${moduledir}/cloudbuild.yaml" + url=$(gcloud builds submit --config="${config}" \ + --substitutions="_SURVEY=${survey},_TESTID=${testid},_MODULE_NAME=${cr_module_name},_REPOSITORY=${artifact_registry_repo}" \ + "${moduledir}" | sed -n 's/^Step #2: Service URL: \(.*\)$/\1/p') + + echo "Creating trigger subscription for Cloud Run..." + # WARNING: This is set to retry failed deliveries. If there is a bug in main.py this will + # retry indefinitely, until the message is delete manually. + gcloud pubsub subscriptions create "${ps_input_subscrip}" \ + --topic "${trigger_topic}" \ + --topic-project "${PROJECT_ID}" \ + --ack-deadline=600 \ + --push-endpoint="${url}${ROUTE_RUN}" \ + --push-auth-service-account="${runinvoker_svcact}" +fi diff --git a/broker/cloud_functions/lsst/ps_to_storage/main.py b/broker/cloud_functions/lsst/ps_to_storage/main.py new file mode 100644 index 00000000..30615ef5 --- /dev/null +++ b/broker/cloud_functions/lsst/ps_to_storage/main.py @@ -0,0 +1,248 @@ +#!/usr/bin/env python3 +# -*- coding: UTF-8 -*- + +"""This module stores LSST alert data as an Avro file in Cloud Storage.""" + +import base64 +import io +import json +import math +import os +import struct +from typing import Optional +from astropy.time import Time + +import flask +import fastavro +import pittgoogle +from confluent_kafka.schema_registry import SchemaRegistryClient +from google.cloud import logging, storage, pubsub_v1 +from google.cloud.exceptions import PreconditionFailed + +# [FIXME] Make this helpful or else delete it. +# Connect the python logger to the google cloud logger. +# By default, this captures INFO level and above. +# pittgoogle uses the python logger. +# We don't currently use the python logger directly in this script, but we could. +logging.Client().setup_logging() +publisher = pubsub_v1.PublisherClient() + +PROJECT_ID = os.getenv("GCP_PROJECT") +TESTID = os.getenv("TESTID") +SURVEY = os.getenv("SURVEY") +VERSIONTAG = os.getenv("VERSIONTAG") + +# Variables for incoming data +# A url route is used in setup.sh when the trigger subscription is created. +# It is possible to define multiple routes in a single module and trigger them using different subscriptions. +ROUTE_RUN = "/" # HTTP route that will trigger run(). Must match deploy.sh + +# Variables for outgoing data +HTTP_204 = 204 # HTTP code: Success +HTTP_400 = 400 # HTTP code: Bad Request + +# GCP resources used in this module +ALERTS_TOPIC = pittgoogle.Topic.from_cloud( + "alerts", survey=SURVEY, testid=TESTID, projectid=PROJECT_ID +) +TOPIC_BIGQUERY_IMPORT = pittgoogle.Topic.from_cloud( + "bigquery-import", survey=SURVEY, testid=TESTID, projectid=PROJECT_ID +) +bucket_name = f"{PROJECT_ID}-{SURVEY}_alerts" +if TESTID != "False": + bucket_name = f"{bucket_name}-{TESTID}" + +client = storage.Client() +bucket = client.get_bucket(client.bucket(bucket_name, user_project=PROJECT_ID)) + +# define a binary data structure for packing and unpacking bytes +_ConfluentWireFormatHeader = struct.Struct(">bi") + +app = flask.Flask(__name__) + + +@app.route(ROUTE_RUN, methods=["POST"]) +def run(): + """Uploads alert data to a GCS bucket. Publishes a de-duplicated "alerts" stream and publishes valid JSON message + to a Pub/Sub topic. + + This module is intended to be deployed as a Cloud Run service. It will operate as an HTTP endpoint + triggered by Pub/Sub messages. This function will be called once for every message sent to this route. + It should accept the incoming HTTP request and return a response. + + Returns + ------- + response : tuple(str, int) + Tuple containing the response body (string) and HTTP status code (int). Flask will convert the + tuple into a proper HTTP response. Note that the response is a status message for the web server. + """ + + # extract the envelope from the request that triggered the endpoint + # this contains a single Pub/Sub message with the alert to be processed + envelope = flask.request.get_json() + + try: + store_alert_data(envelope) + # this is raised by blob.upload_from_file if the object already exists in the bucket + except PreconditionFailed: + # we'll simply pass, and the duplicate alert will go no further in our pipeline + pass + + return "", HTTP_204 + + +def store_alert_data(envelope) -> None: + """Uploads the msg data bytes to a GCP storage bucket.""" + + alert_bytes = base64.b64decode(envelope["message"]["data"]) # alert packet, bytes + attributes = envelope["message"].get("attributes", {}) + + # unpack the alert and read schema ID + header_bytes = alert_bytes[:5] + schema_id = deserialize_confluent_wire_header(header_bytes) + + # get and load schema + sr_client = SchemaRegistryClient({"url": "https://usdf-alert-schemas-dev.slac.stanford.edu"}) + schema = sr_client.get_schema(schema_id=schema_id) + parse_schema = json.loads(schema.schema_str) + schema_version = parse_schema["namespace"].split(".")[1] + content_bytes = io.BytesIO(alert_bytes[5:]) + + # deserialize the alert and create Alert object + alert_dict = fastavro.schemaless_reader(content_bytes, parse_schema) + filename = generate_alert_filename( + { + "schema_version": schema_version, + "objectId": alert_dict["diaObject"]["diaObjectId"], + "sourceId": alert_dict["diaSource"]["diaSourceId"], + "alert_date": alert_dict["diaSource"]["midpointMjdTai"], + "format": "avro", + } + ) + + blob = bucket.blob(filename) + blob.metadata = create_file_metadata(alert_dict, event_id=envelope["message"]["messageId"]) + + # raise a PreconditionFailed exception if filename already exists in the bucket using "if_generation_match=0" + # let it raise. the main function will catch it and then drop the message. + blob.upload_from_file(io.BytesIO(alert_bytes), if_generation_match=0) + + # Cloud Storage says this is not a duplicate, so now we publish the broker's main "alerts" stream + publish_alerts_stream( + topic_name=ALERTS_TOPIC.name, + message=alert_bytes, + attributes={ + "diaObjectId": str(alert_dict["diaObject"]["diaObjectId"]), + "diaSourceId": str(alert_dict["diaSource"]["diaSourceId"]), + "schema_version": schema_version, + **attributes, + }, + ) + + # publish the alert as a JSON message to the bigquery-import topic + TOPIC_BIGQUERY_IMPORT.publish( + _create_valid_json(alert_dict, attributes={"schema_version": schema_version}) + ) + + +def deserialize_confluent_wire_header(raw): + """Parses the byte prefix for Confluent Wire Format-style Kafka messages. + Parameters + ---------- + raw : `bytes` + The 5-byte encoded message prefix. + Returns + ------- + schema_version : `int` + A version number which indicates the Confluent Schema Registry ID + number of the Avro schema used to encode the message that follows this + header. + """ + _, version = _ConfluentWireFormatHeader.unpack(raw) + + return version + + +def generate_alert_filename(aname: dict) -> str: + """ + Generate the filename of an alert stored to a Cloud Storage bucket. + + Args: + aname: + Components to create the filename. Required key/value pairs are those needed to create a parsed filename. + Extra keys are ignored. + + Returns: + str: The formatted filename as "{schema_version}/{YYYY-MM-DD}/{objectId}/{sourceId}.{format}". + """ + + schema_version = aname["schema_version"] + alert_date = aname["alert_date"] + object_id = aname["objectId"] + source_id = aname["sourceId"] + file_format = aname["format"] + + # convert the MJD timestamp to "YYYY-MM-DD" + time_obj = Time(alert_date, format="mjd") + date_string = time_obj.datetime.strftime("%Y-%m-%d") + + return f"{schema_version}/{date_string}/{object_id}/{source_id}.{file_format}" + + +def create_file_metadata(alert_dict: dict, event_id: str) -> dict: + """Return key/value pairs to be attached to the file as metadata.""" + + metadata = {"file_origin_message_id": event_id} + metadata["diaObjectId"] = alert_dict["diaObject"]["diaObjectId"] + metadata["diaSourceId"] = alert_dict["diaSource"]["diaSourceId"] + metadata["ra"] = alert_dict["diaSource"]["ra"] + metadata["dec"] = alert_dict["diaSource"]["dec"] + + return metadata + + +def publish_alerts_stream( + topic_name: str, message: bytes, attributes: Optional[dict] = None +) -> str: + """Publish original alert bytes to a Pub/Sub topic.""" + + # enforce bytes type for message + if not isinstance(message, bytes): + raise TypeError("`message` must be bytes.") + + topic_path = publisher.topic_path(PROJECT_ID, topic_name) + future = publisher.publish(topic_path, data=message, **attributes) + + return future.result() + + +def _create_valid_json(alert_dict: dict, attributes: dict) -> pittgoogle.alert.Alert: + """Transforms alert data to a valid JSON message.""" + + # define and remove cutouts from message + cutouts = [ + "cutoutTemplate", + "cutoutScience", + "cutoutDifference", + ] + for key in cutouts: + alert_dict.pop(key, None) + + # replace NaN values with None + valid_json = _transform_nan_to_none(alert_dict) + + return pittgoogle.Alert.from_dict(payload=valid_json, attributes=attributes) + + +def _transform_nan_to_none(alert_dict: dict) -> dict: + """Recursively replace NaN values with None in a dictionary.""" + + # convert NaN to None + if isinstance(alert_dict, dict): + return {k: _transform_nan_to_none(v) for k, v in alert_dict.items()} + if isinstance(alert_dict, list): + return [_transform_nan_to_none(v) for v in alert_dict] + if isinstance(alert_dict, float) and math.isnan(alert_dict): + return None + + return alert_dict diff --git a/broker/cloud_functions/lsst/ps_to_storage/requirements.txt b/broker/cloud_functions/lsst/ps_to_storage/requirements.txt new file mode 100644 index 00000000..03c6c97a --- /dev/null +++ b/broker/cloud_functions/lsst/ps_to_storage/requirements.txt @@ -0,0 +1,19 @@ +# As explained here +# https://cloud.google.com/functions/docs/writing/specifying-dependencies-python +# dependencies for a Cloud Function must be specified in a `requirements.txt` +# file (or packaged with the function) in the same directory as `main.py` + +confluent-kafka>=2.6.0 +fastavro +google-cloud-logging +google-cloud-pubsub +google-cloud-storage +httpx # used by confluent-kafka +pittgoogle-client>=0.3.11 + +# for Cloud Run +# https://cloud.google.com/run/docs/quickstarts/build-and-deploy/deploy-python-service +# pinned following quickstart example. [TODO] consider un-pinning +Flask==3.0.3 +gunicorn==22.0.0 +Werkzeug==3.0.3 diff --git a/broker/consumer/rubin/README.md b/broker/consumer/lsst/README.md similarity index 79% rename from broker/consumer/rubin/README.md rename to broker/consumer/lsst/README.md index 13565e85..330edaa3 100644 --- a/broker/consumer/rubin/README.md +++ b/broker/consumer/lsst/README.md @@ -1,18 +1,18 @@ -# Start the Rubin consumer VM +# Start the LSST consumer VM -See `Pitt-Google-Broker/broker/setup_broker/rubin/README.md` for setup instructions. +See `Pitt-Google-Broker/broker/setup_broker/lsst/README.md` for setup instructions. To start the consumer VM: ```bash -survey="rubin" +survey="lsst" testid="mytest" consumerVM="${survey}-consumer-${testid}" zone="us-central1-a" # Set the VM metadata KAFKA_TOPIC="alerts-simulated" -PS_TOPIC="${survey}-alerts-${testid}" +PS_TOPIC="${survey}-alerts_raw-${testid}" gcloud compute instances add-metadata "${consumerVM}" --zone "${zone}" \ --metadata="PS_TOPIC_FORCE=${PS_TOPIC},KAFKA_TOPIC_FORCE=${KAFKA_TOPIC}" @@ -25,7 +25,7 @@ gcloud compute instances start ${consumerVM} --zone ${zone} To stop stop the consumer VM: ```bash -survey="rubin" +survey="lsst" testid="mytest" consumerVM="${survey}-consumer-${testid}" zone="us-central1-a" diff --git a/broker/consumer/rubin/admin.properties b/broker/consumer/lsst/admin.properties similarity index 100% rename from broker/consumer/rubin/admin.properties rename to broker/consumer/lsst/admin.properties diff --git a/broker/consumer/rubin/first_rubinstreamingtest_dec2021.md b/broker/consumer/lsst/first_rubinstreamingtest_dec2021.md similarity index 100% rename from broker/consumer/rubin/first_rubinstreamingtest_dec2021.md rename to broker/consumer/lsst/first_rubinstreamingtest_dec2021.md diff --git a/broker/consumer/rubin/ps-connector.properties b/broker/consumer/lsst/ps-connector.properties similarity index 100% rename from broker/consumer/rubin/ps-connector.properties rename to broker/consumer/lsst/ps-connector.properties diff --git a/broker/consumer/rubin/psconnect-worker.properties b/broker/consumer/lsst/psconnect-worker.properties similarity index 97% rename from broker/consumer/rubin/psconnect-worker.properties rename to broker/consumer/lsst/psconnect-worker.properties index 32ea98ae..529c74cf 100644 --- a/broker/consumer/rubin/psconnect-worker.properties +++ b/broker/consumer/lsst/psconnect-worker.properties @@ -36,7 +36,7 @@ sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule require # settings with `consumer.` prefixes are passed through to the Kafka consumer # for Rubin, consumer.group.id must begin with our username: pittgoogle-idfint -consumer.group.id=pittgoogle-idfint-kafka-pubsub-connector +consumer.group.id=GROUP_ID consumer.auto.offset.reset=earliest consumer.sasl.mechanism=SCRAM-SHA-512 consumer.sasl.kerberos.service.name=kafka diff --git a/broker/consumer/rubin/vm_install.sh b/broker/consumer/lsst/vm_install.sh similarity index 96% rename from broker/consumer/rubin/vm_install.sh rename to broker/consumer/lsst/vm_install.sh index 0c51bb04..73304f79 100644 --- a/broker/consumer/rubin/vm_install.sh +++ b/broker/consumer/lsst/vm_install.sh @@ -68,8 +68,8 @@ wget https://github.com/GoogleCloudPlatform/pubsub/releases/download/${CONNECTOR echo "Done installing the Kafka -> Pub/Sub connector" #--- Set the startup script and shutdown -startupscript="gs://${broker_bucket}/consumer/${survey}/vm_startup.sh" +startupscript="gs://${broker_bucket}/${survey}/vm_startup.sh" gcloud compute instances add-metadata "$consumerVM" --zone "$zone" \ --metadata startup-script-url="$startupscript" echo "vm_install.sh is complete. Shutting down." -shutdown -h now \ No newline at end of file +shutdown -h now diff --git a/broker/consumer/rubin/vm_shutdown.sh b/broker/consumer/lsst/vm_shutdown.sh similarity index 100% rename from broker/consumer/rubin/vm_shutdown.sh rename to broker/consumer/lsst/vm_shutdown.sh diff --git a/broker/consumer/rubin/vm_startup.sh b/broker/consumer/lsst/vm_startup.sh similarity index 91% rename from broker/consumer/rubin/vm_startup.sh rename to broker/consumer/lsst/vm_startup.sh index ae86d44c..a12a5ed3 100644 --- a/broker/consumer/rubin/vm_startup.sh +++ b/broker/consumer/lsst/vm_startup.sh @@ -23,7 +23,7 @@ fi #--- GCP resources used in this script broker_bucket="${PROJECT_ID}-${survey}-broker_files" -PS_TOPIC_DEFAULT="${survey}-alerts" +PS_TOPIC_DEFAULT="${survey}-alerts_raw" # use test resources, if requested if [ "$testid" != "False" ]; then broker_bucket="${broker_bucket}-${testid}" @@ -36,7 +36,7 @@ rm -r "${brokerdir}" # download fresh files mkdir "${brokerdir}" cd ${brokerdir} || exit -gsutil -m cp -r "gs://${broker_bucket}/consumer" . +gsutil -m cp -r "gs://${broker_bucket}/${survey}" . # wait. otherwise the script may continue before all files are downloaded, with adverse behavior. sleep 30s @@ -49,7 +49,7 @@ gcloud compute instances add-metadata "$consumerVM" --zone "$zone" \ --metadata="PS_TOPIC=${PS_TOPIC},KAFKA_TOPIC=${KAFKA_TOPIC}" #--- Files this script will write -workingdir="${brokerdir}/consumer/${survey}" +workingdir="${brokerdir}/${survey}" fout_run="${workingdir}/run-connector.out" fout_topics="${workingdir}/list.topics" @@ -57,6 +57,11 @@ fout_topics="${workingdir}/list.topics" # define Rubin-related parameters kafka_password="${survey}-${PROJECT_ID}-kafka-password" KAFKA_PASSWORD=$(gcloud secrets versions access latest --secret="${kafka_password}") +group_id="pittgoogle-idfint-kafka-pubsub-connector" +# use test resources, if requested +if [ "$testid" != "False" ]; then + group_id="${group_id}-${testid}" +fi cd "${workingdir}" || exit @@ -65,6 +70,7 @@ sed -i "s/KAFKA_PASSWORD/${KAFKA_PASSWORD}/g" ${fconfig} fconfig=psconnect-worker.properties sed -i "s/KAFKA_PASSWORD/${KAFKA_PASSWORD}/g" ${fconfig} +sed -i "s/GROUP_ID/${group_id}/g" ${fconfig} fconfig=ps-connector.properties sed -i "s/PROJECT_ID/${PROJECT_ID}/g" ${fconfig} diff --git a/broker/setup_broker/rubin/README.md b/broker/setup_broker/lsst/README.md similarity index 93% rename from broker/setup_broker/rubin/README.md rename to broker/setup_broker/lsst/README.md index 454798da..843d5d84 100644 --- a/broker/setup_broker/rubin/README.md +++ b/broker/setup_broker/lsst/README.md @@ -42,7 +42,7 @@ Create a secret for your access credential: ```bash # define parameters -survey="rubin" +survey="lsst" PROJECT_ID=$GOOGLE_CLOUD_PROJECT # define secret names @@ -74,22 +74,23 @@ Clone the repo and cd into the directory: ```bash git clone https://github.com/mwvgroup/Pitt-Google-Broker.git -cd Pitt-Google-Broker/broker/setup_broker/rubin +cd Pitt-Google-Broker/broker/setup_broker/lsst ``` Define the variables used below. ```bash -testid="enter testid value" +testid="mytest" teardown="False" -survey="rubin" +survey="lsst" region="us-central1" +schema_version="7.3" ``` Execute the `setup_broker.sh` script: ```bash -./setup_broker.sh "${testid}" "${teardown}" "${survey}" "${region}" +./setup_broker.sh "${testid}" "${teardown}" "${survey}" "${schema_version}" "${region}" ``` This will create all of the necessary GCP resources. Allow the consumer VM to finish its installation process. Once @@ -123,8 +124,9 @@ Initialize parameters and call the deployment script: ```bash testid="mytest" teardown="True" -survey="rubin" +survey="lsst" +schema_version="7.3" region="us-central1" -./setup_broker.sh "${testid}" "${teardown}" "${survey}" "${region}" +./setup_broker.sh "${testid}" "${teardown}" "${survey}" "${schema_version}" "${region}" ``` diff --git a/broker/setup_broker/rubin/create_vm.sh b/broker/setup_broker/lsst/create_vm.sh similarity index 70% rename from broker/setup_broker/rubin/create_vm.sh rename to broker/setup_broker/lsst/create_vm.sh index 8b7ad6e8..217dfc33 100755 --- a/broker/setup_broker/rubin/create_vm.sh +++ b/broker/setup_broker/lsst/create_vm.sh @@ -2,14 +2,15 @@ # Creates or deletes the GCP VM instances needed by the broker. # This script will not delete VMs that are in production - -broker_bucket=$1 # name of GCS bucket where broker files are staged +# name of GCS bucket where broker files are staged +broker_bucket=$1 +# "False" uses production resources +# any other string will be appended to the names of all resources testid="${2:-test}" -# "False" uses production resources -# any other string will be appended to the names of all resources -teardown="${3:-False}" # "True" tearsdown/deletes resources, else setup -survey="${4:-rubin}" +# "True" tearsdown/deletes resources, else setup +teardown="${3:-False}" # name of the survey this broker instance will ingest +survey="${4:-lsst}" zone="${5:-us-central1-a}" firewallrule="${6:-tcpport9094}" @@ -34,13 +35,12 @@ else machinetype=e2-standard-2 # metadata googlelogging="google-logging-enabled=true" - startupscript="startup-script-url=gs://${broker_bucket}/consumer/${survey}/vm_install.sh" - shutdownscript="shutdown-script-url=gs://${broker_bucket}/consumer/${survey}/vm_shutdown.sh" + startupscript="startup-script-url=gs://${broker_bucket}/${survey}/vm_install.sh" + shutdownscript="shutdown-script-url=gs://${broker_bucket}/${survey}/vm_shutdown.sh" gcloud compute instances create "${consumerVM}" \ --zone="${zone}" \ --machine-type="${machinetype}" \ --scopes=cloud-platform \ --metadata="${googlelogging},${startupscript},${shutdownscript}" \ --tags="${firewallrule}" - fi diff --git a/broker/setup_broker/lsst/setup_broker.sh b/broker/setup_broker/lsst/setup_broker.sh new file mode 100755 index 00000000..c7952d7a --- /dev/null +++ b/broker/setup_broker/lsst/setup_broker.sh @@ -0,0 +1,197 @@ +#! /bin/bash +# Create and configure GCP resources needed to run the nightly broker. + +# "False" uses production resources +# any other string will be appended to the names of all resources +testid="${1:-test}" +# "True" tearsdown/deletes resources, else setup +teardown="${2:-False}" +# name of the survey this broker instance will ingest +survey="${3:-lsst}" +schema_version="${4:-7.3}" +versiontag=v$(echo "${schema_version}" | tr . _) # 7.3 -> v7_3 +region="${5:-us-central1}" +zone="${region}-a" # just use zone "a" instead of adding another script arg + +PROJECT_ID=$GOOGLE_CLOUD_PROJECT # get the environment variable + +#--- Make the user confirm the settings +echo +echo "setup_broker.sh will run with the following configs: " +echo +echo "GOOGLE_CLOUD_PROJECT = ${PROJECT_ID}" +echo "survey = ${survey}" +echo "testid = ${testid}" +echo "schema_version = ${schema_version}" +echo "teardown = ${teardown}" +echo +echo "Continue? [y/(n)]: " + +read -r continue_with_setup +continue_with_setup="${continue_with_setup:-n}" +if [ "$continue_with_setup" != "y" ]; then + echo "Exiting setup." + echo + exit +fi + +# function used to define GCP resources; appends testid if needed +define_GCP_resources() { + local base_name="$1" + local testid_suffix="" + + if [ "$testid" != "False" ]; then + if [ "$base_name" = "$survey" ]; then + testid_suffix="_${testid}" # complies with BigQuery naming conventions + else + testid_suffix="-${testid}" + fi + fi + + echo "${base_name}${testid_suffix}" +} + +#--- GCP resources used directly in this script +artifact_registry_repo=$(define_GCP_resources "cloud-run-services") +broker_bucket=$(define_GCP_resources "${PROJECT_ID}-${survey}-broker_files") +bq_dataset=$(define_GCP_resources "${survey}") +topic_alerts_raw=$(define_GCP_resources "${survey}-alerts_raw") +topic_alerts=$(define_GCP_resources "${survey}-alerts") +subscription_reservoir=$(define_GCP_resources "${survey}-alerts-reservoir") +# topics and subscriptions involved in writing alert data to BigQuery +topic_bigquery_import=$(define_GCP_resources "${survey}-bigquery-import") +subscription_bigquery_import=$(define_GCP_resources "${survey}-bigquery-import-${versiontag}") # BigQuery subscription +deadletter_topic_bigquery_import=$(define_GCP_resources "${survey}-bigquery-import-deadletter-${versiontag}") +deadletter_subscription_bigquery_import="${deadletter_topic_bigquery_import}" + +alerts_table="alerts_${versiontag}" + +# function used to create (or delete) GCP resources +manage_resources() { + local mode="$1" # setup or teardown + local environment_type="production" + + if [ "$testid" != "False" ]; then + environment_type="testing" + fi + + if [ "$mode" = "setup" ]; then + # create BigQuery dataset and table + bq --location="${region}" mk --dataset "${bq_dataset}" + + cd templates || exit 5 + bq mk --table "${PROJECT_ID}:${bq_dataset}.${alerts_table}" "bq_${survey}_${alerts_table}_schema.json" || exit 5 + bq update --description "Alert data from LSST. This table is an archive of the lsst-alerts Pub/Sub stream. It has the same schema as the original alert bytes, including nested and repeated fields." "${PROJECT_ID}:${bq_dataset}.${alerts_table}" + cd .. || exit 5 + + # create broker bucket and upload files + echo + echo "Creating broker_bucket and uploading files..." + gsutil mb -b on -l "${region}" "gs://${broker_bucket}" + ./upload_broker_bucket.sh "${broker_bucket}" + + # create a firewall rule to open the port used by Kafka/Rubin LSST + # on any instance with the flag --tags=tcpport9094 + echo + echo "Configuring Rubin/Kafka firewall rule..." + firewallrule="tcpport9094" + gcloud compute firewall-rules create "${firewallrule}" \ + --allow=tcp:9094 \ + --description="Allow incoming traffic on TCP port 9094" \ + --direction=INGRESS \ + --enable-logging + + # create Pub/Sub + echo "Configuring Pub/Sub resources..." + gcloud pubsub topics create "${topic_alerts_raw}" + gcloud pubsub topics create "${topic_alerts}" + gcloud pubsub topics create "${topic_bigquery_import}" + gcloud pubsub topics create "${deadletter_topic_bigquery_import}" + gcloud pubsub subscriptions create "${subscription_reservoir}" --topic="${topic_alerts}" + gcloud pubsub subscriptions create "${deadletter_subscription_bigquery_import}" --topic="${deadletter_topic_bigquery_import}" + # in order to create BigQuery subscriptions, ensure that the following service account: + # service-@gcp-sa-pubsub.iam.gserviceaccount.com" has the + # bigquery.dataEditor role for each table + gcloud pubsub subscriptions create "${subscription_bigquery_import}" \ + --topic="${topic_bigquery_import}" \ + --bigquery-table="${PROJECT_ID}:${bq_dataset}.${alerts_table}" \ + --use-table-schema \ + --drop-unknown-fields \ + --dead-letter-topic="${deadletter_topic_bigquery_import}" \ + --max-delivery-attempts=5 \ + --dead-letter-topic-project="${PROJECT_ID}" \ + --message-filter='attributes.schema_version = "'"${versiontag}"'"' + # set IAM policies on resources + user="allUsers" + roleid="projects/${GOOGLE_CLOUD_PROJECT}/roles/userPublic" + gcloud pubsub topics add-iam-policy-binding "${topic_alerts}" --member="${user}" --role="${roleid}" + if [ "$testid" = "False" ]; then + # this allows dead-lettered messages to be forwarded from the BigQuery subscription to the dead letter topic + # and it allows dead-lettered messages to be published to the dead letter topic. + PUBSUB_SERVICE_ACCOUNT="service-${PROJECT_NUMBER}@gcp-sa-pubsub.iam.gserviceaccount.com" + gcloud pubsub topics add-iam-policy-binding "${deadletter_topic_bigquery_import}" \ + --member="serviceAccount:$PUBSUB_SERVICE_ACCOUNT"\ + --role="roles/pubsub.publisher" + gcloud pubsub subscriptions add-iam-policy-binding "${subscription_bigquery_import}" \ + --member="serviceAccount:$PUBSUB_SERVICE_ACCOUNT"\ + --role="roles/pubsub.subscriber" + fi + + #--- Create Artifact Registry Repository + echo + echo "Configuring Artifact Registry..." + gcloud artifacts repositories create "${artifact_registry_repo}" --repository-format=docker \ + --location="${region}" --description="Docker repository for Cloud Run services" \ + --project="${PROJECT_ID}" + gcloud auth configure-docker "${region}"-docker.pkg.dev # authenticate requests to Artifact Registry + + else + if [ "$environment_type" = "testing" ]; then + o="GSUtil:parallel_process_count=1" # disable multiprocessing for Macs + gsutil -m -o "${o}" rm -r "gs://${broker_bucket}" + bq rm -r -f "${PROJECT_ID}:${bq_dataset}" + gcloud pubsub topics delete "${topic_alerts_raw}" + gcloud pubsub topics delete "${topic_alerts}" + gcloud pubsub topics delete "${topic_bigquery_import}" + gcloud pubsub topics delete "${deadletter_topic_bigquery_import}" + gcloud pubsub subscriptions delete "${subscription_reservoir}" + gcloud pubsub subscriptions delete "${deadletter_subscription_bigquery_import}" + gcloud pubsub subscriptions delete "${subscription_bigquery_import}" + gcloud artifacts repositories delete "${artifact_registry_repo}" --location="${region}" + else + echo 'ERROR: No testid supplied.' + echo 'To avoid accidents, this script will not delete production resources.' + echo 'If that is your intention, you must delete them manually.' + echo 'Otherwise, please supply a testid.' + exit 1 + fi + fi +} + +#--- Create (or delete) BigQuery, GCS, Pub/Sub resources +echo +echo "Configuring BigQuery, GCS, Pub/Sub resources..." +if [ "$teardown" = "True" ]; then + manage_resources "teardown" +else + manage_resources "setup" +fi + +#--- Create VM instances +echo +echo "Configuring VMs..." +./create_vm.sh "${broker_bucket}" "${testid}" "${teardown}" "${survey}" "${zone}" "${firewallrule}" + +#--- Deploy Cloud Run (Functions) +echo +echo "Configuring Cloud Functions..." +cd .. && cd .. || exit +cd cloud_functions && cd lsst || exit + +#--- ps_to_storage cloud function +cd ps_to_storage || exit +./deploy.sh "$testid" "$teardown" "$survey" "$region" + +#--- return to setup_broker directory +cd .. && cd .. || exit +cd .. && cd setup_broker || exit diff --git a/broker/setup_broker/lsst/templates/bq_lsst_alerts_v7_1_schema.json b/broker/setup_broker/lsst/templates/bq_lsst_alerts_v7_1_schema.json new file mode 100644 index 00000000..714a3b83 --- /dev/null +++ b/broker/setup_broker/lsst/templates/bq_lsst_alerts_v7_1_schema.json @@ -0,0 +1,2576 @@ +[ + { + "description": "unique alert identifer", + "mode": "REQUIRED", + "name": "alertId", + "type": "INTEGER" + }, + { + "description": "diaSource", + "fields": [ + { + "description": "Unique identifier of this DiaSource.", + "mode": "REQUIRED", + "name": "diaSourceId", + "type": "INTEGER" + }, + { + "description": "Id of the visit where this diaSource was measured.", + "mode": "REQUIRED", + "name": "visit", + "type": "INTEGER" + }, + { + "description": "Id of the detector where this diaSource was measured. Datatype short instead of byte because of DB concerns about unsigned bytes.", + "mode": "REQUIRED", + "name": "detector", + "type": "INTEGER" + }, + { + "description": "Id of the diaObject this source was associated with, if any. If not, it is set to NULL (each diaSource will be associated with either a diaObject or ssObject).", + "mode": "NULLABLE", + "name": "diaObjectId", + "type": "INTEGER" + }, + { + "description": "Id of the ssObject this source was associated with, if any. If not, it is set to NULL (each diaSource will be associated with either a diaObject or ssObject).", + "mode": "NULLABLE", + "name": "ssObjectId", + "type": "INTEGER" + }, + { + "description": "Id of the parent diaSource this diaSource has been deblended from, if any.", + "mode": "NULLABLE", + "name": "parentDiaSourceId", + "type": "INTEGER" + }, + { + "description": "Effective mid-visit time for this diaSource, expressed as Modified Julian Date, International Atomic Time.", + "mode": "REQUIRED", + "name": "midpointMjdTai", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of the center of this diaSource.", + "mode": "REQUIRED", + "name": "ra", + "type": "FLOAT" + }, + { + "description": "Uncertainty of ra.", + "mode": "NULLABLE", + "name": "raErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of the center of this diaSource.", + "mode": "REQUIRED", + "name": "dec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dec.", + "mode": "NULLABLE", + "name": "decErr", + "type": "FLOAT" + }, + { + "description": "Covariance between ra and dec.", + "mode": "NULLABLE", + "name": "ra_dec_Cov", + "type": "FLOAT" + }, + { + "description": "x position computed by a centroiding algorithm.", + "mode": "REQUIRED", + "name": "x", + "type": "FLOAT" + }, + { + "description": "Uncertainty of x.", + "mode": "NULLABLE", + "name": "xErr", + "type": "FLOAT" + }, + { + "description": "y position computed by a centroiding algorithm.", + "mode": "REQUIRED", + "name": "y", + "type": "FLOAT" + }, + { + "description": "Uncertainty of y.", + "mode": "NULLABLE", + "name": "yErr", + "type": "FLOAT" + }, + { + "description": "Covariance between x and y.", + "mode": "NULLABLE", + "name": "x_y_Cov", + "type": "FLOAT" + }, + { + "description": "General centroid algorithm failure flag; set if anything went wrong when fitting the centroid. Another centroid flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "centroid_flag", + "type": "BOOLEAN" + }, + { + "description": "Flux in a 12 pixel radius aperture on the difference image.", + "mode": "NULLABLE", + "name": "apFlux", + "type": "FLOAT" + }, + { + "description": "Estimated uncertainty of apFlux.", + "mode": "NULLABLE", + "name": "apFluxErr", + "type": "FLOAT" + }, + { + "description": "General aperture flux algorithm failure flag; set if anything went wrong when measuring aperture fluxes. Another apFlux flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "apFlux_flag", + "type": "BOOLEAN" + }, + { + "description": "Aperture did not fit within measurement image.", + "mode": "NULLABLE", + "name": "apFlux_flag_apertureTruncated", + "type": "BOOLEAN" + }, + { + "description": "The signal-to-noise ratio at which this source was detected in the difference image.", + "mode": "NULLABLE", + "name": "snr", + "type": "FLOAT" + }, + { + "description": "Flux for Point Source model. Note this actually measures the flux difference between the template and the visit image.", + "mode": "NULLABLE", + "name": "psfFlux", + "type": "FLOAT" + }, + { + "description": "Uncertainty of psfFlux.", + "mode": "NULLABLE", + "name": "psfFluxErr", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of centroid for point source model.", + "mode": "NULLABLE", + "name": "psfRa", + "type": "FLOAT" + }, + { + "description": "Uncertainty of psfRa.", + "mode": "NULLABLE", + "name": "psfRaErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of centroid for point source model.", + "mode": "NULLABLE", + "name": "psfDec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of psfDec.", + "mode": "NULLABLE", + "name": "psfDecErr", + "type": "FLOAT" + }, + { + "description": "Covariance between psfFlux and psfRa.", + "mode": "NULLABLE", + "name": "psfFlux_psfRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance between psfFlux and psfDec.", + "mode": "NULLABLE", + "name": "psfFlux_psfDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance between psfRa and psfDec.", + "mode": "NULLABLE", + "name": "psfRa_psfDec_Cov", + "type": "FLOAT" + }, + { + "description": "Natural log likelihood of the observed data given the point source model.", + "mode": "NULLABLE", + "name": "psfLnL", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the point source model fit.", + "mode": "NULLABLE", + "name": "psfChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points (pixels) used to fit the point source model.", + "mode": "NULLABLE", + "name": "psfNdata", + "type": "INTEGER" + }, + { + "description": "Failure to derive linear least-squares fit of psf model. Another psfFlux flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "psfFlux_flag", + "type": "BOOLEAN" + }, + { + "description": "Object was too close to the edge of the image to use the full PSF model.", + "mode": "NULLABLE", + "name": "psfFlux_flag_edge", + "type": "BOOLEAN" + }, + { + "description": "Not enough non-rejected pixels in data to attempt the fit.", + "mode": "NULLABLE", + "name": "psfFlux_flag_noGoodPixels", + "type": "BOOLEAN" + }, + { + "description": "Flux for a trailed source model. Note this actually measures the flux difference between the template and the visit image.", + "mode": "NULLABLE", + "name": "trailFlux", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailFlux.", + "mode": "NULLABLE", + "name": "trailFluxErr", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of centroid for trailed source model.", + "mode": "NULLABLE", + "name": "trailRa", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailRa.", + "mode": "NULLABLE", + "name": "trailRaErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of centroid for trailed source model.", + "mode": "NULLABLE", + "name": "trailDec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailDec.", + "mode": "NULLABLE", + "name": "trailDecErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood fit of trail length.", + "mode": "NULLABLE", + "name": "trailLength", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailLength.", + "mode": "NULLABLE", + "name": "trailLengthErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood fit of the angle between the meridian through the centroid and the trail direction (bearing)", + "mode": "NULLABLE", + "name": "trailAngle", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailAngle.", + "mode": "NULLABLE", + "name": "trailAngleErr", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailRa.", + "mode": "NULLABLE", + "name": "trailFlux_trailRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailDec.", + "mode": "NULLABLE", + "name": "trailFlux_trailDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailLength", + "mode": "NULLABLE", + "name": "trailFlux_trailLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailAngle", + "mode": "NULLABLE", + "name": "trailFlux_trailAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailRa and trailDec.", + "mode": "NULLABLE", + "name": "trailRa_trailDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailRa and trailLength.", + "mode": "NULLABLE", + "name": "trailRa_trailLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailRa and trailAngle.", + "mode": "NULLABLE", + "name": "trailRa_trailAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailDec and trailLength.", + "mode": "NULLABLE", + "name": "trailDec_trailLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailDec and trailAngle.", + "mode": "NULLABLE", + "name": "trailDec_trailAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailLength and trailAngle", + "mode": "NULLABLE", + "name": "trailLength_trailAngle_Cov", + "type": "INTEGER" + }, + { + "description": "Natural log likelihood of the observed data given the trailed source model.", + "mode": "NULLABLE", + "name": "trailLnL", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the trailed source model fit.", + "mode": "NULLABLE", + "name": "trailChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points (pixels) used to fit the trailed source model.", + "mode": "NULLABLE", + "name": "trailNdata", + "type": "INTEGER" + }, + { + "description": "This flag is set if a trailed source extends onto or past edge pixels.", + "mode": "NULLABLE", + "name": "trail_flag_edge", + "type": "BOOLEAN" + }, + { + "description": "Maximum likelihood value for the mean absolute flux of the two lobes for a dipole model.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleMeanFlux.", + "mode": "NULLABLE", + "name": "dipoleMeanFluxErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood value for the difference of absolute fluxes of the two lobes for a dipole mode", + "mode": "NULLABLE", + "name": "dipoleFluxDiff", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleFluxDiff.", + "mode": "NULLABLE", + "name": "dipoleFluxDiffErr", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of centroid for dipole model.", + "mode": "NULLABLE", + "name": "dipoleRa", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleRa.", + "mode": "NULLABLE", + "name": "dipoleRaErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of centroid for dipole model.", + "mode": "NULLABLE", + "name": "dipoleDec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleDecErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood value for the lobe separation in dipole model.", + "mode": "NULLABLE", + "name": "dipoleLength", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleLengthErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood fit of the angle between the meridian through the centroid and the dipole direction (bearing, from negative to positive lobe).", + "mode": "NULLABLE", + "name": "dipoleAngle", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleAngleErr", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleFluxDiff.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleFluxDiff_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleRa.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleRa.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleRa and dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleRa_dipoleDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleRa and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleRa_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleRa and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleRa_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleDec and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleDec_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleDec and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleDec_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleLength and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleLength_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Natural log likelihood of the observed data given the dipole source model.", + "mode": "NULLABLE", + "name": "dipoleLnL", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the model fit.", + "mode": "NULLABLE", + "name": "dipoleChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points (pixels) used to fit the model.", + "mode": "NULLABLE", + "name": "dipoleNdata", + "type": "INTEGER" + }, + { + "description": "Forced PSF photometry on science image failed. Another forced_PsfFlux flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "forced_PsfFlux_flag", + "type": "BOOLEAN" + }, + { + "description": "Forced PSF flux on science image was too close to the edge of the image to use the full PSF model.", + "mode": "NULLABLE", + "name": "forced_PsfFlux_flag_edge", + "type": "BOOLEAN" + }, + { + "description": "Forced PSF flux not enough non-rejected pixels in data to attempt the fit.", + "mode": "NULLABLE", + "name": "forced_PsfFlux_flag_noGoodPixels", + "type": "BOOLEAN" + }, + { + "description": "Calibrated flux for Point Source model centered on radec but measured on the difference of snaps comprising this visit.", + "mode": "NULLABLE", + "name": "snapDiffFlux", + "type": "FLOAT" + }, + { + "description": "Estimated uncertainty of snapDiffFlux.", + "mode": "NULLABLE", + "name": "snapDiffFluxErr", + "type": "FLOAT" + }, + { + "description": "Estimated sky background at the position (centroid) of the object.", + "mode": "NULLABLE", + "name": "fpBkgd", + "type": "FLOAT" + }, + { + "description": "Estimated uncertainty of fpBkgd.", + "mode": "NULLABLE", + "name": "fpBkgdErr", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment of the source intensity.", + "mode": "NULLABLE", + "name": "ixx", + "type": "FLOAT" + }, + { + "description": "Uncertainty of ixx.", + "mode": "NULLABLE", + "name": "ixxErr", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment of the source intensity.", + "mode": "NULLABLE", + "name": "iyy", + "type": "FLOAT" + }, + { + "description": "Uncertainty of iyy.", + "mode": "NULLABLE", + "name": "iyyErr", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment of the source intensity.", + "mode": "NULLABLE", + "name": "ixy", + "type": "FLOAT" + }, + { + "description": "Uncertainty of ixy.", + "mode": "NULLABLE", + "name": "ixyErr", + "type": "FLOAT" + }, + { + "description": "Covariance of ixx and iyy.", + "mode": "NULLABLE", + "name": "ixx_iyy_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of ixx and ixy.", + "mode": "NULLABLE", + "name": "ixx_ixy_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of iyy and ixy.", + "mode": "NULLABLE", + "name": "iyy_ixy_Cov", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment for the PSF.", + "mode": "NULLABLE", + "name": "ixxPSF", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment for the PSF.", + "mode": "NULLABLE", + "name": "iyyPSF", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment for the PSF.", + "mode": "NULLABLE", + "name": "ixyPSF", + "type": "FLOAT" + }, + { + "description": "General source shape algorithm failure flag; set if anything went wrong when measuring the shape. Another shape flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "shape_flag", + "type": "BOOLEAN" + }, + { + "description": "No pixels to measure shape.", + "mode": "NULLABLE", + "name": "shape_flag_no_pixels", + "type": "BOOLEAN" + }, + { + "description": "Center not contained in footprint bounding box.", + "mode": "NULLABLE", + "name": "shape_flag_not_contained", + "type": "BOOLEAN" + }, + { + "description": "This source is a parent source; we should only be measuring on deblended children in difference imaging.", + "mode": "NULLABLE", + "name": "shape_flag_parent_source", + "type": "BOOLEAN" + }, + { + "description": "A measure of extendedness, Computed using a combination of available moments and model fluxes or from a likelihood ratio of point/trailed source models (exact algorithm TBD). extendedness = 1 implies a high degree of confidence that the source is extended. extendedness = 0 implies a high degree of confidence that the source is point-like.", + "mode": "NULLABLE", + "name": "extendedness", + "type": "FLOAT" + }, + { + "description": "A measure of reliability, computed using information from the source and image characterization, as well as the information on the Telescope and Camera system (e.g., ghost maps, defect maps, etc.).", + "mode": "NULLABLE", + "name": "reliability", + "type": "FLOAT" + }, + { + "description": "Filter band this source was observed with.", + "mode": "NULLABLE", + "name": "band", + "type": "STRING" + }, + { + "description": "General pixel flags failure; set if anything went wrong when setting pixels flags from this footprint's mask. This implies that some pixelFlags for this source may be incorrectly set to False.", + "mode": "NULLABLE", + "name": "pixelFlags", + "type": "BOOLEAN" + }, + { + "description": "Bad pixel in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_bad", + "type": "BOOLEAN" + }, + { + "description": "Cosmic ray in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_cr", + "type": "BOOLEAN" + }, + { + "description": "Cosmic ray in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_crCenter", + "type": "BOOLEAN" + }, + { + "description": "Some of the source footprint is outside usable exposure region (masked EDGE or NO_DATA, or centroid off image).", + "mode": "NULLABLE", + "name": "pixelFlags_edge", + "type": "BOOLEAN" + }, + { + "description": "Interpolated pixel in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_interpolated", + "type": "BOOLEAN" + }, + { + "description": "Interpolated pixel in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_interpolatedCenter", + "type": "BOOLEAN" + }, + { + "description": "DiaSource center is off image.", + "mode": "NULLABLE", + "name": "pixelFlags_offimage", + "type": "BOOLEAN" + }, + { + "description": "Saturated pixel in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_saturated", + "type": "BOOLEAN" + }, + { + "description": "Saturated pixel in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_saturatedCenter", + "type": "BOOLEAN" + }, + { + "description": "DiaSource's footprint includes suspect pixels.", + "mode": "NULLABLE", + "name": "pixelFlags_suspect", + "type": "BOOLEAN" + }, + { + "description": "Suspect pixel in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_suspectCenter", + "type": "BOOLEAN" + }, + { + "description": "Streak in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_streak", + "type": "BOOLEAN" + }, + { + "description": "Streak in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_streakCenter", + "type": "BOOLEAN" + }, + { + "description": "Injection in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_injected", + "type": "BOOLEAN" + }, + { + "description": "Injection in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_injectedCenter", + "type": "BOOLEAN" + }, + { + "description": "Template injection in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_injected_template", + "type": "BOOLEAN" + }, + { + "description": "Template injection in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_injected_templateCenter", + "type": "BOOLEAN" + } + ], + "mode": "REQUIRED", + "name": "diaSource", + "type": "RECORD" + }, + { + "description": "prvDiaSources", + "fields": [ + { + "description": "Unique identifier of this DiaSource.", + "mode": "REQUIRED", + "name": "diaSourceId", + "type": "INTEGER" + }, + { + "description": "Id of the visit where this diaSource was measured.", + "mode": "REQUIRED", + "name": "visit", + "type": "INTEGER" + }, + { + "description": "Id of the detector where this diaSource was measured. Datatype short instead of byte because of DB concerns about unsigned bytes.", + "mode": "REQUIRED", + "name": "detector", + "type": "INTEGER" + }, + { + "description": "Id of the diaObject this source was associated with, if any. If not, it is set to NULL (each diaSource will be associated with either a diaObject or ssObject).", + "mode": "NULLABLE", + "name": "diaObjectId", + "type": "INTEGER" + }, + { + "description": "Id of the ssObject this source was associated with, if any. If not, it is set to NULL (each diaSource will be associated with either a diaObject or ssObject).", + "mode": "NULLABLE", + "name": "ssObjectId", + "type": "INTEGER" + }, + { + "description": "Id of the parent diaSource this diaSource has been deblended from, if any.", + "mode": "NULLABLE", + "name": "parentDiaSourceId", + "type": "INTEGER" + }, + { + "description": "Effective mid-visit time for this diaSource, expressed as Modified Julian Date, International Atomic Time.", + "mode": "REQUIRED", + "name": "midpointMjdTai", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of the center of this diaSource.", + "mode": "REQUIRED", + "name": "ra", + "type": "FLOAT" + }, + { + "description": "Uncertainty of ra.", + "mode": "NULLABLE", + "name": "raErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of the center of this diaSource.", + "mode": "REQUIRED", + "name": "dec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dec.", + "mode": "NULLABLE", + "name": "decErr", + "type": "FLOAT" + }, + { + "description": "Covariance between ra and dec.", + "mode": "NULLABLE", + "name": "ra_dec_Cov", + "type": "FLOAT" + }, + { + "description": "x position computed by a centroiding algorithm.", + "mode": "REQUIRED", + "name": "x", + "type": "FLOAT" + }, + { + "description": "Uncertainty of x.", + "mode": "NULLABLE", + "name": "xErr", + "type": "FLOAT" + }, + { + "description": "y position computed by a centroiding algorithm.", + "mode": "REQUIRED", + "name": "y", + "type": "FLOAT" + }, + { + "description": "Uncertainty of y.", + "mode": "NULLABLE", + "name": "yErr", + "type": "FLOAT" + }, + { + "description": "Covariance between x and y.", + "mode": "NULLABLE", + "name": "x_y_Cov", + "type": "FLOAT" + }, + { + "description": "General centroid algorithm failure flag; set if anything went wrong when fitting the centroid. Another centroid flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "centroid_flag", + "type": "BOOLEAN" + }, + { + "description": "Flux in a 12 pixel radius aperture on the difference image.", + "mode": "NULLABLE", + "name": "apFlux", + "type": "FLOAT" + }, + { + "description": "Estimated uncertainty of apFlux.", + "mode": "NULLABLE", + "name": "apFluxErr", + "type": "FLOAT" + }, + { + "description": "General aperture flux algorithm failure flag; set if anything went wrong when measuring aperture fluxes. Another apFlux flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "apFlux_flag", + "type": "BOOLEAN" + }, + { + "description": "Aperture did not fit within measurement image.", + "mode": "NULLABLE", + "name": "apFlux_flag_apertureTruncated", + "type": "BOOLEAN" + }, + { + "description": "The signal-to-noise ratio at which this source was detected in the difference image.", + "mode": "NULLABLE", + "name": "snr", + "type": "FLOAT" + }, + { + "description": "Flux for Point Source model. Note this actually measures the flux difference between the template and the visit image.", + "mode": "NULLABLE", + "name": "psfFlux", + "type": "FLOAT" + }, + { + "description": "Uncertainty of psfFlux.", + "mode": "NULLABLE", + "name": "psfFluxErr", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of centroid for point source model.", + "mode": "NULLABLE", + "name": "psfRa", + "type": "FLOAT" + }, + { + "description": "Uncertainty of psfRa.", + "mode": "NULLABLE", + "name": "psfRaErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of centroid for point source model.", + "mode": "NULLABLE", + "name": "psfDec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of psfDec.", + "mode": "NULLABLE", + "name": "psfDecErr", + "type": "FLOAT" + }, + { + "description": "Covariance between psfFlux and psfRa.", + "mode": "NULLABLE", + "name": "psfFlux_psfRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance between psfFlux and psfDec.", + "mode": "NULLABLE", + "name": "psfFlux_psfDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance between psfRa and psfDec.", + "mode": "NULLABLE", + "name": "psfRa_psfDec_Cov", + "type": "FLOAT" + }, + { + "description": "Natural log likelihood of the observed data given the point source model.", + "mode": "NULLABLE", + "name": "psfLnL", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the point source model fit.", + "mode": "NULLABLE", + "name": "psfChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points (pixels) used to fit the point source model.", + "mode": "NULLABLE", + "name": "psfNdata", + "type": "INTEGER" + }, + { + "description": "Failure to derive linear least-squares fit of psf model. Another psfFlux flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "psfFlux_flag", + "type": "BOOLEAN" + }, + { + "description": "Object was too close to the edge of the image to use the full PSF model.", + "mode": "NULLABLE", + "name": "psfFlux_flag_edge", + "type": "BOOLEAN" + }, + { + "description": "Not enough non-rejected pixels in data to attempt the fit.", + "mode": "NULLABLE", + "name": "psfFlux_flag_noGoodPixels", + "type": "BOOLEAN" + }, + { + "description": "Flux for a trailed source model. Note this actually measures the flux difference between the template and the visit image.", + "mode": "NULLABLE", + "name": "trailFlux", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailFlux.", + "mode": "NULLABLE", + "name": "trailFluxErr", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of centroid for trailed source model.", + "mode": "NULLABLE", + "name": "trailRa", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailRa.", + "mode": "NULLABLE", + "name": "trailRaErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of centroid for trailed source model.", + "mode": "NULLABLE", + "name": "trailDec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailDec.", + "mode": "NULLABLE", + "name": "trailDecErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood fit of trail length.", + "mode": "NULLABLE", + "name": "trailLength", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailLength.", + "mode": "NULLABLE", + "name": "trailLengthErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood fit of the angle between the meridian through the centroid and the trail direction (bearing)", + "mode": "NULLABLE", + "name": "trailAngle", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailAngle.", + "mode": "NULLABLE", + "name": "trailAngleErr", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailRa.", + "mode": "NULLABLE", + "name": "trailFlux_trailRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailDec.", + "mode": "NULLABLE", + "name": "trailFlux_trailDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailLength", + "mode": "NULLABLE", + "name": "trailFlux_trailLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailAngle", + "mode": "NULLABLE", + "name": "trailFlux_trailAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailRa and trailDec.", + "mode": "NULLABLE", + "name": "trailRa_trailDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailRa and trailLength.", + "mode": "NULLABLE", + "name": "trailRa_trailLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailRa and trailAngle.", + "mode": "NULLABLE", + "name": "trailRa_trailAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailDec and trailLength.", + "mode": "NULLABLE", + "name": "trailDec_trailLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailDec and trailAngle.", + "mode": "NULLABLE", + "name": "trailDec_trailAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailLength and trailAngle", + "mode": "NULLABLE", + "name": "trailLength_trailAngle_Cov", + "type": "INTEGER" + }, + { + "description": "Natural log likelihood of the observed data given the trailed source model.", + "mode": "NULLABLE", + "name": "trailLnL", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the trailed source model fit.", + "mode": "NULLABLE", + "name": "trailChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points (pixels) used to fit the trailed source model.", + "mode": "NULLABLE", + "name": "trailNdata", + "type": "INTEGER" + }, + { + "description": "This flag is set if a trailed source extends onto or past edge pixels.", + "mode": "NULLABLE", + "name": "trail_flag_edge", + "type": "BOOLEAN" + }, + { + "description": "Maximum likelihood value for the mean absolute flux of the two lobes for a dipole model.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleMeanFlux.", + "mode": "NULLABLE", + "name": "dipoleMeanFluxErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood value for the difference of absolute fluxes of the two lobes for a dipole mode", + "mode": "NULLABLE", + "name": "dipoleFluxDiff", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleFluxDiff.", + "mode": "NULLABLE", + "name": "dipoleFluxDiffErr", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of centroid for dipole model.", + "mode": "NULLABLE", + "name": "dipoleRa", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleRa.", + "mode": "NULLABLE", + "name": "dipoleRaErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of centroid for dipole model.", + "mode": "NULLABLE", + "name": "dipoleDec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleDecErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood value for the lobe separation in dipole model.", + "mode": "NULLABLE", + "name": "dipoleLength", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleLengthErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood fit of the angle between the meridian through the centroid and the dipole direction (bearing, from negative to positive lobe).", + "mode": "NULLABLE", + "name": "dipoleAngle", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleAngleErr", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleFluxDiff.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleFluxDiff_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleRa.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleRa.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleRa and dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleRa_dipoleDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleRa and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleRa_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleRa and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleRa_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleDec and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleDec_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleDec and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleDec_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleLength and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleLength_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Natural log likelihood of the observed data given the dipole source model.", + "mode": "NULLABLE", + "name": "dipoleLnL", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the model fit.", + "mode": "NULLABLE", + "name": "dipoleChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points (pixels) used to fit the model.", + "mode": "NULLABLE", + "name": "dipoleNdata", + "type": "INTEGER" + }, + { + "description": "Forced PSF photometry on science image failed. Another forced_PsfFlux flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "forced_PsfFlux_flag", + "type": "BOOLEAN" + }, + { + "description": "Forced PSF flux on science image was too close to the edge of the image to use the full PSF model.", + "mode": "NULLABLE", + "name": "forced_PsfFlux_flag_edge", + "type": "BOOLEAN" + }, + { + "description": "Forced PSF flux not enough non-rejected pixels in data to attempt the fit.", + "mode": "NULLABLE", + "name": "forced_PsfFlux_flag_noGoodPixels", + "type": "BOOLEAN" + }, + { + "description": "Calibrated flux for Point Source model centered on radec but measured on the difference of snaps comprising this visit.", + "mode": "NULLABLE", + "name": "snapDiffFlux", + "type": "FLOAT" + }, + { + "description": "Estimated uncertainty of snapDiffFlux.", + "mode": "NULLABLE", + "name": "snapDiffFluxErr", + "type": "FLOAT" + }, + { + "description": "Estimated sky background at the position (centroid) of the object.", + "mode": "NULLABLE", + "name": "fpBkgd", + "type": "FLOAT" + }, + { + "description": "Estimated uncertainty of fpBkgd.", + "mode": "NULLABLE", + "name": "fpBkgdErr", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment of the source intensity.", + "mode": "NULLABLE", + "name": "ixx", + "type": "FLOAT" + }, + { + "description": "Uncertainty of ixx.", + "mode": "NULLABLE", + "name": "ixxErr", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment of the source intensity.", + "mode": "NULLABLE", + "name": "iyy", + "type": "FLOAT" + }, + { + "description": "Uncertainty of iyy.", + "mode": "NULLABLE", + "name": "iyyErr", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment of the source intensity.", + "mode": "NULLABLE", + "name": "ixy", + "type": "FLOAT" + }, + { + "description": "Uncertainty of ixy.", + "mode": "NULLABLE", + "name": "ixyErr", + "type": "FLOAT" + }, + { + "description": "Covariance of ixx and iyy.", + "mode": "NULLABLE", + "name": "ixx_iyy_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of ixx and ixy.", + "mode": "NULLABLE", + "name": "ixx_ixy_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of iyy and ixy.", + "mode": "NULLABLE", + "name": "iyy_ixy_Cov", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment for the PSF.", + "mode": "NULLABLE", + "name": "ixxPSF", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment for the PSF.", + "mode": "NULLABLE", + "name": "iyyPSF", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment for the PSF.", + "mode": "NULLABLE", + "name": "ixyPSF", + "type": "FLOAT" + }, + { + "description": "General source shape algorithm failure flag; set if anything went wrong when measuring the shape. Another shape flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "shape_flag", + "type": "BOOLEAN" + }, + { + "description": "No pixels to measure shape.", + "mode": "NULLABLE", + "name": "shape_flag_no_pixels", + "type": "BOOLEAN" + }, + { + "description": "Center not contained in footprint bounding box.", + "mode": "NULLABLE", + "name": "shape_flag_not_contained", + "type": "BOOLEAN" + }, + { + "description": "This source is a parent source; we should only be measuring on deblended children in difference imaging.", + "mode": "NULLABLE", + "name": "shape_flag_parent_source", + "type": "BOOLEAN" + }, + { + "description": "A measure of extendedness, Computed using a combination of available moments and model fluxes or from a likelihood ratio of point/trailed source models (exact algorithm TBD). extendedness = 1 implies a high degree of confidence that the source is extended. extendedness = 0 implies a high degree of confidence that the source is point-like.", + "mode": "NULLABLE", + "name": "extendedness", + "type": "FLOAT" + }, + { + "description": "A measure of reliability, computed using information from the source and image characterization, as well as the information on the Telescope and Camera system (e.g., ghost maps, defect maps, etc.).", + "mode": "NULLABLE", + "name": "reliability", + "type": "FLOAT" + }, + { + "description": "Filter band this source was observed with.", + "mode": "NULLABLE", + "name": "band", + "type": "STRING" + }, + { + "description": "General pixel flags failure; set if anything went wrong when setting pixels flags from this footprint's mask. This implies that some pixelFlags for this source may be incorrectly set to False.", + "mode": "NULLABLE", + "name": "pixelFlags", + "type": "BOOLEAN" + }, + { + "description": "Bad pixel in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_bad", + "type": "BOOLEAN" + }, + { + "description": "Cosmic ray in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_cr", + "type": "BOOLEAN" + }, + { + "description": "Cosmic ray in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_crCenter", + "type": "BOOLEAN" + }, + { + "description": "Some of the source footprint is outside usable exposure region (masked EDGE or NO_DATA, or centroid off image).", + "mode": "NULLABLE", + "name": "pixelFlags_edge", + "type": "BOOLEAN" + }, + { + "description": "Interpolated pixel in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_interpolated", + "type": "BOOLEAN" + }, + { + "description": "Interpolated pixel in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_interpolatedCenter", + "type": "BOOLEAN" + }, + { + "description": "DiaSource center is off image.", + "mode": "NULLABLE", + "name": "pixelFlags_offimage", + "type": "BOOLEAN" + }, + { + "description": "Saturated pixel in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_saturated", + "type": "BOOLEAN" + }, + { + "description": "Saturated pixel in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_saturatedCenter", + "type": "BOOLEAN" + }, + { + "description": "DiaSource's footprint includes suspect pixels.", + "mode": "NULLABLE", + "name": "pixelFlags_suspect", + "type": "BOOLEAN" + }, + { + "description": "Suspect pixel in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_suspectCenter", + "type": "BOOLEAN" + }, + { + "description": "Streak in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_streak", + "type": "BOOLEAN" + }, + { + "description": "Streak in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_streakCenter", + "type": "BOOLEAN" + }, + { + "description": "Injection in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_injected", + "type": "BOOLEAN" + }, + { + "description": "Injection in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_injectedCenter", + "type": "BOOLEAN" + }, + { + "description": "Template injection in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_injected_template", + "type": "BOOLEAN" + }, + { + "description": "Template injection in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_injected_templateCenter", + "type": "BOOLEAN" + } + ], + "mode": "REPEATED", + "name": "prvDiaSources", + "type": "RECORD" + }, + { + "description": "prvDiaForcedSources", + "fields": [ + { + "description": "Unique id.", + "mode": "REQUIRED", + "name": "diaForcedSourceId", + "type": "FLOAT" + }, + { + "description": "Id of the DiaObject that this DiaForcedSource was associated with.", + "mode": "REQUIRED", + "name": "diaObjectId", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of the position of the object at time radecMjdTai.", + "mode": "REQUIRED", + "name": "ra", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of the position of the object at time radecMjdTai.", + "mode": "REQUIRED", + "name": "dec", + "type": "FLOAT" + }, + { + "description": "Id of the visit where this forcedSource was measured.", + "mode": "REQUIRED", + "name": "visit", + "type": "INTEGER" + }, + { + "description": "Id of the detector where this forcedSource was measured. Datatype short instead of byte because of DB concerns about unsigned bytes.", + "mode": "REQUIRED", + "name": "detector", + "type": "INTEGER" + }, + { + "description": "Point Source model flux.", + "mode": "NULLABLE", + "name": "psfFlux", + "type": "FLOAT" + }, + { + "description": "Uncertainty of psfFlux.", + "mode": "NULLABLE", + "name": "psfFluxErr", + "type": "FLOAT" + }, + { + "description": "Effective mid-visit time for this diaForcedSource, expressed as Modified Julian Date, International Atomic Time.", + "mode": "REQUIRED", + "name": "midpointMjdTai", + "type": "FLOAT" + }, + { + "description": "Filter band this source was observed with.", + "mode": "NULLABLE", + "name": "band", + "type": "STRING" + } + ], + "mode": "REPEATED", + "name": "prvDiaForcedSources", + "type": "RECORD" + }, + { + "description": "prvDiaNondetectionLimits", + "fields": [ + { + "description": "", + "mode": "REQUIRED", + "name": "ccdVisitId", + "type": "FLOAT" + }, + { + "description": "", + "mode": "REQUIRED", + "name": "midpointMjdTai", + "type": "FLOAT" + }, + { + "description": "", + "mode": "REQUIRED", + "name": "band", + "type": "STRING" + }, + { + "description": "", + "mode": "REQUIRED", + "name": "diaNoise", + "type": "FLOAT" + } + ], + "mode": "REPEATED", + "name": "prvDiaNondetectionLimits", + "type": "RECORD" + }, + { + "description": "diaObject", + "fields": [ + { + "description": "Unique identifier of this DiaObject.", + "mode": "REQUIRED", + "name": "diaObjectId", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of the position of the object at time radecMjdTai.", + "mode": "REQUIRED", + "name": "ra", + "type": "FLOAT" + }, + { + "description": "raErr", + "mode": "NULLABLE", + "name": "raErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of the position of the object at time radecMjdTai.", + "mode": "REQUIRED", + "name": "dec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dec.", + "mode": "NULLABLE", + "name": "decErr", + "type": "FLOAT" + }, + { + "description": "Covariance between ra and dec.", + "mode": "NULLABLE", + "name": "ra_dec_Cov", + "type": "FLOAT" + }, + { + "description": "Time at which the object was at a position ra/dec, expressed as Modified Julian Date, International Atomic Time.", + "mode": "NULLABLE", + "name": "radecMjdTai", + "type": "FLOAT" + }, + { + "description": "Proper motion in right ascension.", + "mode": "NULLABLE", + "name": "pmRa", + "type": "FLOAT" + }, + { + "description": "Uncertainty of pmRa.", + "mode": "NULLABLE", + "name": "pmRaErr", + "type": "FLOAT" + }, + { + "description": "Proper motion of declination.", + "mode": "NULLABLE", + "name": "pmDec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of pmDec.", + "mode": "NULLABLE", + "name": "pmDecErr", + "type": "FLOAT" + }, + { + "description": "Parallax", + "mode": "NULLABLE", + "name": "Parallax", + "type": "FLOAT" + }, + { + "description": "Uncertainty of parallax.", + "mode": "NULLABLE", + "name": "parallaxErr", + "type": "FLOAT" + }, + { + "description": "Covariance of pmRa and pmDec.", + "mode": "NULLABLE", + "name": "pmRa_pmDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of pmRa and parallax.", + "mode": "NULLABLE", + "name": "pmRa_parallax_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of pmDec and parallax.", + "mode": "NULLABLE", + "name": "pmDec_parallax_Cov", + "type": "FLOAT" + }, + { + "description": "Natural log of the likelihood of the linear proper motion parallax fit.", + "mode": "NULLABLE", + "name": "pmParallaxLnL", + "type": "FLOAT" + }, + { + "description": "Chi^2 static of the model fit.", + "mode": "NULLABLE", + "name": "pmParallaxChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to fit the model.", + "mode": "NULLABLE", + "name": "pmParallaxNdata", + "type": "INTEGER" + }, + { + "description": "Weighted mean point-source model magnitude for u filter.", + "mode": "NULLABLE", + "name": "u_psfFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of u_psfFluxMean.", + "mode": "NULLABLE", + "name": "u_psfFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of u_psfFlux.", + "mode": "NULLABLE", + "name": "u_psfFluxSigma", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic for the scatter of u_psfFlux around u_psfFluxMean.", + "mode": "NULLABLE", + "name": "u_psfFluxChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to compute u_psfFluxChi2.", + "mode": "NULLABLE", + "name": "u_psfFluxNdata", + "type": "INTEGER" + }, + { + "description": "Weighted mean forced photometry flux for u filter.", + "mode": "NULLABLE", + "name": "u_fpFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of u_fpFluxMean.", + "mode": "NULLABLE", + "name": "u_fpFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of u_fpFlux.", + "mode": "NULLABLE", + "name": "u_fpFluxSigma", + "type": "FLOAT" + }, + { + "description": "Weighted mean point-source model magnitude for g filter.", + "mode": "NULLABLE", + "name": "g_psfFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of g_psfFluxMean.", + "mode": "NULLABLE", + "name": "g_psfFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of g_psfFlux.", + "mode": "NULLABLE", + "name": "g_psfFluxSigma", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic for the scatter of g_psfFlux around g_psfFluxMean.", + "mode": "NULLABLE", + "name": "g_psfFluxChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to compute g_psfFluxChi2.", + "mode": "NULLABLE", + "name": "g_psfFluxNdata", + "type": "INTEGER" + }, + { + "description": "Weighted mean forced photometry flux for g filter.", + "mode": "NULLABLE", + "name": "g_fpFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of g_fpFluxMean.", + "mode": "NULLABLE", + "name": "g_fpFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of g_fpFlux.", + "mode": "NULLABLE", + "name": "g_fpFluxSigma", + "type": "FLOAT" + }, + { + "description": "Weighted mean point-source model magnitude for r filter.", + "mode": "NULLABLE", + "name": "r_psfFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of r_psfFluxMean.", + "mode": "NULLABLE", + "name": "r_psfFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of r_psfFlux.", + "mode": "NULLABLE", + "name": "r_psfFluxSigma", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic for the scatter of r_psfFlux around r_psfFluxMean.", + "mode": "NULLABLE", + "name": "r_psfFluxChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to compute r_psfFluxChi2.", + "mode": "NULLABLE", + "name": "r_psfFluxNdata", + "type": "INTEGER" + }, + { + "description": "Weighted mean forced photometry flux for r filter.", + "mode": "NULLABLE", + "name": "r_fpFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of r_fpFluxMean.", + "mode": "NULLABLE", + "name": "r_fpFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of r_fpFlux.", + "mode": "NULLABLE", + "name": "r_fpFluxSigma", + "type": "FLOAT" + }, + { + "description": "Weighted mean point-source model magnitude for i filter.", + "mode": "NULLABLE", + "name": "i_psfFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of i_psfFluxMean.", + "mode": "NULLABLE", + "name": "i_psfFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of i_psfFlux.", + "mode": "NULLABLE", + "name": "i_psfFluxSigma", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic for the scatter of i_psfFlux around i_psfFluxMean.", + "mode": "NULLABLE", + "name": "i_psfFluxChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to compute i_psfFluxChi2.", + "mode": "NULLABLE", + "name": "i_psfFluxNdata", + "type": "INTEGER" + }, + { + "description": "Weighted mean forced photometry flux for i filter.", + "mode": "NULLABLE", + "name": "i_fpFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of i_fpFluxMean.", + "mode": "NULLABLE", + "name": "i_fpFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of i_fpFlux.", + "mode": "NULLABLE", + "name": "i_fpFluxSigma", + "type": "FLOAT" + }, + { + "description": "Weighted mean point-source model magnitude for z filter.", + "mode": "NULLABLE", + "name": "z_psfFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of z_psfFluxMean.", + "mode": "NULLABLE", + "name": "z_psfFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of z_psfFlux.", + "mode": "NULLABLE", + "name": "z_psfFluxSigma", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic for the scatter of z_psfFlux around z_psfFluxMean.", + "mode": "NULLABLE", + "name": "z_psfFluxChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to compute z_psfFluxChi2.", + "mode": "NULLABLE", + "name": "z_psfFluxNdata", + "type": "INTEGER" + }, + { + "description": "Weighted mean forced photometry flux for z filter.", + "mode": "NULLABLE", + "name": "z_fpFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of z_fpFluxMean.", + "mode": "NULLABLE", + "name": "z_fpFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of z_fpFlux.", + "mode": "NULLABLE", + "name": "z_fpFluxSigma", + "type": "FLOAT" + }, + { + "description": "Weighted mean point-source model magnitude for y filter.", + "mode": "NULLABLE", + "name": "y_psfFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of y_psfFluxMean.", + "mode": "NULLABLE", + "name": "y_psfFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of y_psfFlux.", + "mode": "NULLABLE", + "name": "y_psfFluxSigma", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic for the scatter of y_psfFlux around y_psfFluxMean.", + "mode": "NULLABLE", + "name": "y_psfFluxChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to compute y_psfFluxChi2.", + "mode": "NULLABLE", + "name": "y_psfFluxNdata", + "type": "INTEGER" + }, + { + "description": "Weighted mean forced photometry flux for y filter.", + "mode": "NULLABLE", + "name": "y_fpFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of y_fpFluxMean.", + "mode": "NULLABLE", + "name": "y_fpFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of y_fpFlux.", + "mode": "NULLABLE", + "name": "y_fpFluxSigma", + "type": "FLOAT" + }, + { + "description": "Id of the closest nearby object.", + "mode": "NULLABLE", + "name": "nearbyObj1", + "type": "FLOAT" + }, + { + "description": "Distance to nearbyObj1.", + "mode": "NULLABLE", + "name": "nearbyObj1Dist", + "type": "FLOAT" + }, + { + "description": "Natural log of the probability that the observed diaObject is the same as the nearbyObj1.", + "mode": "NULLABLE", + "name": "nearbyObj1LnP", + "type": "FLOAT" + }, + { + "description": "Id of the second-closest nearby object.", + "mode": "NULLABLE", + "name": "nearbyObj2", + "type": "FLOAT" + }, + { + "description": "Distance to nearbyObj2.", + "mode": "NULLABLE", + "name": "nearbyObj2Dist", + "type": "FLOAT" + }, + { + "description": "Natural log of the probability that the observed diaObject is the same as the nearbyObj2.", + "mode": "NULLABLE", + "name": "nearbyObj2LnP", + "type": "FLOAT" + }, + { + "description": "Id of the third-closest nearby object.", + "mode": "NULLABLE", + "name": "nearbyObj3", + "type": "FLOAT" + }, + { + "description": "Distance to nearbyObj3.", + "mode": "NULLABLE", + "name": "nearbyObj3Dist", + "type": "FLOAT" + }, + { + "description": "Natural log of the probability that the observed diaObject is the same as the nearbyObj3.", + "mode": "NULLABLE", + "name": "nearbyObj3LnP", + "type": "FLOAT" + }, + { + "description": "Mean of the u band flux errors.", + "mode": "NULLABLE", + "name": "u_psfFluxErrMean", + "type": "FLOAT" + }, + { + "description": "Mean of the g band flux errors.", + "mode": "NULLABLE", + "name": "g_psfFluxErrMean", + "type": "FLOAT" + }, + { + "description": "Mean of the r band flux errors.", + "mode": "NULLABLE", + "name": "r_psfFluxErrMean", + "type": "FLOAT" + }, + { + "description": "Mean of the i band flux errors.", + "mode": "NULLABLE", + "name": "i_psfFluxErrMean", + "type": "FLOAT" + }, + { + "description": "Mean of the z band flux errors.", + "mode": "NULLABLE", + "name": "z_psfFluxErrMean", + "type": "FLOAT" + }, + { + "description": "Mean of the y band flux errors.", + "mode": "NULLABLE", + "name": "y_psfFluxErrMean", + "type": "FLOAT" + } + ], + "mode": "NULLABLE", + "name": "diaObject", + "type": "RECORD" + }, + { + "description": "ssObject", + "fields": [ + { + "description": "Unique identifier.", + "mode": "REQUIRED", + "name": "ssObjectId", + "type": "INTEGER" + }, + { + "description": "The date the LSST first linked and submitted the discovery observations to the MPC. May be NULL if not an LSST discovery. The date format will follow general LSST conventions (MJD TAI, at the moment).", + "mode": "NULLABLE", + "name": "discoverySubmissionDate", + "type": "FLOAT" + }, + { + "description": "The time of the first LSST observation of this object (could be precovered) as Modified Julian Date, International Atomic Time.", + "mode": "NULLABLE", + "name": "firstObservationDate", + "type": "FLOAT" + }, + { + "description": "Arc of LSST observations.", + "mode": "NULLABLE", + "name": "arc", + "type": "FLOAT" + }, + { + "description": "Number of LSST observations of this object.", + "mode": "NULLABLE", + "name": "numObs", + "type": "INTEGER" + }, + { + "description": "Minimum orbit intersection distance to Earth.", + "mode": "NULLABLE", + "name": "MOID", + "type": "FLOAT" + }, + { + "description": "True anomaly of the MOID point.", + "mode": "NULLABLE", + "name": "MOIDTrueAnomaly", + "type": "FLOAT" + }, + { + "description": "Ecliptic longitude of the MOID point.", + "mode": "NULLABLE", + "name": "MOIDEclipticLongitude", + "type": "FLOAT" + }, + { + "description": "DeltaV at the MOID point.", + "mode": "NULLABLE", + "name": "MOIDDeltaV", + "type": "FLOAT" + }, + { + "description": "Best fit absolute magnitude (u band).", + "mode": "NULLABLE", + "name": "u_H", + "type": "FLOAT" + }, + { + "description": "Best fit G12 slope parameter (u band).", + "mode": "NULLABLE", + "name": "u_G12", + "type": "FLOAT" + }, + { + "description": "Uncertainty of H (u band).", + "mode": "NULLABLE", + "name": "u_HErr", + "type": "FLOAT" + }, + { + "description": "Uncertainty of G12 (u band).", + "mode": "NULLABLE", + "name": "u_G12Err", + "type": "FLOAT" + }, + { + "description": "H-G12 covariance (u band).", + "mode": "NULLABLE", + "name": "u_H_u_G12_Cov", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the phase curve fit (u band).", + "mode": "NULLABLE", + "name": "u_Chi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to fit the phase curve (u band).", + "mode": "NULLABLE", + "name": "u_Ndata", + "type": "INTEGER" + }, + { + "description": "Best fit absolute magnitude (g band).", + "mode": "NULLABLE", + "name": "g_H", + "type": "FLOAT" + }, + { + "description": "Best fit G12 slope parameter (g band).", + "mode": "NULLABLE", + "name": "g_G12", + "type": "FLOAT" + }, + { + "description": "Uncertainty of H (g band).", + "mode": "NULLABLE", + "name": "g_HErr", + "type": "FLOAT" + }, + { + "description": "Uncertainty of G12 (g band).", + "mode": "NULLABLE", + "name": "g_G12Err", + "type": "FLOAT" + }, + { + "description": "H-G12 covariance (g band).", + "mode": "NULLABLE", + "name": "g_H_g_G12_Cov", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the phase curve fit (g band).", + "mode": "NULLABLE", + "name": "g_Chi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to fit the phase curve (g band).", + "mode": "NULLABLE", + "name": "g_Ndata", + "type": "INTEGER" + }, + { + "description": "Best fit absolute magnitude (r band).", + "mode": "NULLABLE", + "name": "r_H", + "type": "FLOAT" + }, + { + "description": "Best fit G12 slope parameter (r band).", + "mode": "NULLABLE", + "name": "r_G12", + "type": "FLOAT" + }, + { + "description": "Uncertainty of H (r band).", + "mode": "NULLABLE", + "name": "r_HErr", + "type": "FLOAT" + }, + { + "description": "Uncertainty of G12 (r band).", + "mode": "NULLABLE", + "name": "r_G12Err", + "type": "FLOAT" + }, + { + "description": "H-G12 covariance (r band).", + "mode": "NULLABLE", + "name": "r_H_r_G12_Cov", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the phase curve fit (r band).", + "mode": "NULLABLE", + "name": "r_Chi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to fit the phase curve (r band).", + "mode": "NULLABLE", + "name": "r_Ndata", + "type": "INTEGER" + }, + { + "description": "Best fit absolute magnitude (i band).", + "mode": "NULLABLE", + "name": "i_H", + "type": "FLOAT" + }, + { + "description": "Best fit G12 slope parameter (i band).", + "mode": "NULLABLE", + "name": "i_G12", + "type": "FLOAT" + }, + { + "description": "Uncertainty of H (i band).", + "mode": "NULLABLE", + "name": "i_HErr", + "type": "FLOAT" + }, + { + "description": "Uncertainty of G12 (i band).", + "mode": "NULLABLE", + "name": "i_G12Err", + "type": "FLOAT" + }, + { + "description": "H-G12 covariance (i band).", + "mode": "NULLABLE", + "name": "i_H_i_G12_Cov", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the phase curve fit (i band).", + "mode": "NULLABLE", + "name": "i_Chi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to fit the phase curve (i band).", + "mode": "NULLABLE", + "name": "i_Ndata", + "type": "INTEGER" + }, + { + "description": "Best fit absolute magnitude (z band).", + "mode": "NULLABLE", + "name": "z_H", + "type": "FLOAT" + }, + { + "description": "Best fit G12 slope parameter (z band).", + "mode": "NULLABLE", + "name": "z_G12", + "type": "FLOAT" + }, + { + "description": "Uncertainty of H (z band).", + "mode": "NULLABLE", + "name": "z_HErr", + "type": "FLOAT" + }, + { + "description": "Uncertainty of G12 (z band).", + "mode": "NULLABLE", + "name": "z_G12Err", + "type": "FLOAT" + }, + { + "description": "H-G12 covariance (z band).", + "mode": "NULLABLE", + "name": "z_H_z_G12_Cov", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the phase curve fit (z band).", + "mode": "NULLABLE", + "name": "z_Chi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to fit the phase curve (z band).", + "mode": "NULLABLE", + "name": "z_Ndata", + "type": "INTEGER" + }, + { + "description": "Best fit absolute magnitude (y band).", + "mode": "NULLABLE", + "name": "y_H", + "type": "FLOAT" + }, + { + "description": "Best fit G12 slope parameter (y band).", + "mode": "NULLABLE", + "name": "y_G12", + "type": "FLOAT" + }, + { + "description": "Uncertainty of H (y band).", + "mode": "NULLABLE", + "name": "y_HErr", + "type": "FLOAT" + }, + { + "description": "Uncertainty of G12 (y band).", + "mode": "NULLABLE", + "name": "y_G12Err", + "type": "FLOAT" + }, + { + "description": "H-G12 covariance (y band).", + "mode": "NULLABLE", + "name": "y_H_y_G12_Cov", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the phase curve fit (y band).", + "mode": "NULLABLE", + "name": "y_Chi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to fit the phase curve (y band).", + "mode": "NULLABLE", + "name": "y_Ndata", + "type": "INTEGER" + }, + { + "description": "median `extendedness` value from the DIASource.", + "mode": "NULLABLE", + "name": "medianExtendedness", + "type": "FLOAT" + } + ], + "mode": "NULLABLE", + "name": "ssObject", + "type": "RECORD" + } +] diff --git a/broker/setup_broker/lsst/templates/bq_lsst_alerts_v7_2_schema.json b/broker/setup_broker/lsst/templates/bq_lsst_alerts_v7_2_schema.json new file mode 100644 index 00000000..b5ae2302 --- /dev/null +++ b/broker/setup_broker/lsst/templates/bq_lsst_alerts_v7_2_schema.json @@ -0,0 +1,2582 @@ +[ + { + "description": "unique alert identifer", + "mode": "REQUIRED", + "name": "alertId", + "type": "INTEGER" + }, + { + "description": "diaSource", + "fields": [ + { + "description": "Unique identifier of this DiaSource.", + "mode": "REQUIRED", + "name": "diaSourceId", + "type": "INTEGER" + }, + { + "description": "Id of the visit where this diaSource was measured.", + "mode": "REQUIRED", + "name": "visit", + "type": "INTEGER" + }, + { + "description": "Id of the detector where this diaSource was measured. Datatype short instead of byte because of DB concerns about unsigned bytes.", + "mode": "REQUIRED", + "name": "detector", + "type": "INTEGER" + }, + { + "description": "Id of the diaObject this source was associated with, if any. If not, it is set to NULL (each diaSource will be associated with either a diaObject or ssObject).", + "mode": "NULLABLE", + "name": "diaObjectId", + "type": "INTEGER" + }, + { + "description": "Id of the ssObject this source was associated with, if any. If not, it is set to NULL (each diaSource will be associated with either a diaObject or ssObject).", + "mode": "NULLABLE", + "name": "ssObjectId", + "type": "INTEGER" + }, + { + "description": "Id of the parent diaSource this diaSource has been deblended from, if any.", + "mode": "NULLABLE", + "name": "parentDiaSourceId", + "type": "INTEGER" + }, + { + "description": "Effective mid-visit time for this diaSource, expressed as Modified Julian Date, International Atomic Time.", + "mode": "REQUIRED", + "name": "midpointMjdTai", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of the center of this diaSource.", + "mode": "REQUIRED", + "name": "ra", + "type": "FLOAT" + }, + { + "description": "Uncertainty of ra.", + "mode": "NULLABLE", + "name": "raErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of the center of this diaSource.", + "mode": "REQUIRED", + "name": "dec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dec.", + "mode": "NULLABLE", + "name": "decErr", + "type": "FLOAT" + }, + { + "description": "Covariance between ra and dec.", + "mode": "NULLABLE", + "name": "ra_dec_Cov", + "type": "FLOAT" + }, + { + "description": "x position computed by a centroiding algorithm.", + "mode": "REQUIRED", + "name": "x", + "type": "FLOAT" + }, + { + "description": "Uncertainty of x.", + "mode": "NULLABLE", + "name": "xErr", + "type": "FLOAT" + }, + { + "description": "y position computed by a centroiding algorithm.", + "mode": "REQUIRED", + "name": "y", + "type": "FLOAT" + }, + { + "description": "Uncertainty of y.", + "mode": "NULLABLE", + "name": "yErr", + "type": "FLOAT" + }, + { + "description": "Covariance between x and y.", + "mode": "NULLABLE", + "name": "x_y_Cov", + "type": "FLOAT" + }, + { + "description": "General centroid algorithm failure flag; set if anything went wrong when fitting the centroid. Another centroid flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "centroid_flag", + "type": "BOOLEAN" + }, + { + "description": "Flux in a 12 pixel radius aperture on the difference image.", + "mode": "NULLABLE", + "name": "apFlux", + "type": "FLOAT" + }, + { + "description": "Estimated uncertainty of apFlux.", + "mode": "NULLABLE", + "name": "apFluxErr", + "type": "FLOAT" + }, + { + "description": "General aperture flux algorithm failure flag; set if anything went wrong when measuring aperture fluxes. Another apFlux flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "apFlux_flag", + "type": "BOOLEAN" + }, + { + "description": "Aperture did not fit within measurement image.", + "mode": "NULLABLE", + "name": "apFlux_flag_apertureTruncated", + "type": "BOOLEAN" + }, + { + "description": "The signal-to-noise ratio at which this source was detected in the difference image.", + "mode": "NULLABLE", + "name": "snr", + "type": "FLOAT" + }, + { + "description": "Flux for Point Source model. Note this actually measures the flux difference between the template and the visit image.", + "mode": "NULLABLE", + "name": "psfFlux", + "type": "FLOAT" + }, + { + "description": "Uncertainty of psfFlux.", + "mode": "NULLABLE", + "name": "psfFluxErr", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of centroid for point source model.", + "mode": "NULLABLE", + "name": "psfRa", + "type": "FLOAT" + }, + { + "description": "Uncertainty of psfRa.", + "mode": "NULLABLE", + "name": "psfRaErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of centroid for point source model.", + "mode": "NULLABLE", + "name": "psfDec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of psfDec.", + "mode": "NULLABLE", + "name": "psfDecErr", + "type": "FLOAT" + }, + { + "description": "Covariance between psfFlux and psfRa.", + "mode": "NULLABLE", + "name": "psfFlux_psfRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance between psfFlux and psfDec.", + "mode": "NULLABLE", + "name": "psfFlux_psfDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance between psfRa and psfDec.", + "mode": "NULLABLE", + "name": "psfRa_psfDec_Cov", + "type": "FLOAT" + }, + { + "description": "Natural log likelihood of the observed data given the point source model.", + "mode": "NULLABLE", + "name": "psfLnL", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the point source model fit.", + "mode": "NULLABLE", + "name": "psfChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points (pixels) used to fit the point source model.", + "mode": "NULLABLE", + "name": "psfNdata", + "type": "INTEGER" + }, + { + "description": "Failure to derive linear least-squares fit of psf model. Another psfFlux flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "psfFlux_flag", + "type": "BOOLEAN" + }, + { + "description": "Object was too close to the edge of the image to use the full PSF model.", + "mode": "NULLABLE", + "name": "psfFlux_flag_edge", + "type": "BOOLEAN" + }, + { + "description": "Not enough non-rejected pixels in data to attempt the fit.", + "mode": "NULLABLE", + "name": "psfFlux_flag_noGoodPixels", + "type": "BOOLEAN" + }, + { + "description": "Flux for a trailed source model. Note this actually measures the flux difference between the template and the visit image.", + "mode": "NULLABLE", + "name": "trailFlux", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailFlux.", + "mode": "NULLABLE", + "name": "trailFluxErr", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of centroid for trailed source model.", + "mode": "NULLABLE", + "name": "trailRa", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailRa.", + "mode": "NULLABLE", + "name": "trailRaErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of centroid for trailed source model.", + "mode": "NULLABLE", + "name": "trailDec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailDec.", + "mode": "NULLABLE", + "name": "trailDecErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood fit of trail length.", + "mode": "NULLABLE", + "name": "trailLength", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailLength.", + "mode": "NULLABLE", + "name": "trailLengthErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood fit of the angle between the meridian through the centroid and the trail direction (bearing)", + "mode": "NULLABLE", + "name": "trailAngle", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailAngle.", + "mode": "NULLABLE", + "name": "trailAngleErr", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailRa.", + "mode": "NULLABLE", + "name": "trailFlux_trailRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailDec.", + "mode": "NULLABLE", + "name": "trailFlux_trailDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailLength", + "mode": "NULLABLE", + "name": "trailFlux_trailLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailAngle", + "mode": "NULLABLE", + "name": "trailFlux_trailAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailRa and trailDec.", + "mode": "NULLABLE", + "name": "trailRa_trailDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailRa and trailLength.", + "mode": "NULLABLE", + "name": "trailRa_trailLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailRa and trailAngle.", + "mode": "NULLABLE", + "name": "trailRa_trailAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailDec and trailLength.", + "mode": "NULLABLE", + "name": "trailDec_trailLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailDec and trailAngle.", + "mode": "NULLABLE", + "name": "trailDec_trailAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailLength and trailAngle", + "mode": "NULLABLE", + "name": "trailLength_trailAngle_Cov", + "type": "INTEGER" + }, + { + "description": "Natural log likelihood of the observed data given the trailed source model.", + "mode": "NULLABLE", + "name": "trailLnL", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the trailed source model fit.", + "mode": "NULLABLE", + "name": "trailChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points (pixels) used to fit the trailed source model.", + "mode": "NULLABLE", + "name": "trailNdata", + "type": "INTEGER" + }, + { + "description": "This flag is set if a trailed source extends onto or past edge pixels.", + "mode": "NULLABLE", + "name": "trail_flag_edge", + "type": "BOOLEAN" + }, + { + "description": "Maximum likelihood value for the mean absolute flux of the two lobes for a dipole model.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleMeanFlux.", + "mode": "NULLABLE", + "name": "dipoleMeanFluxErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood value for the difference of absolute fluxes of the two lobes for a dipole mode", + "mode": "NULLABLE", + "name": "dipoleFluxDiff", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleFluxDiff.", + "mode": "NULLABLE", + "name": "dipoleFluxDiffErr", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of centroid for dipole model.", + "mode": "NULLABLE", + "name": "dipoleRa", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleRa.", + "mode": "NULLABLE", + "name": "dipoleRaErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of centroid for dipole model.", + "mode": "NULLABLE", + "name": "dipoleDec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleDecErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood value for the lobe separation in dipole model.", + "mode": "NULLABLE", + "name": "dipoleLength", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleLengthErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood fit of the angle between the meridian through the centroid and the dipole direction (bearing, from negative to positive lobe).", + "mode": "NULLABLE", + "name": "dipoleAngle", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleAngleErr", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleFluxDiff.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleFluxDiff_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleRa.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleRa.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleRa and dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleRa_dipoleDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleRa and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleRa_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleRa and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleRa_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleDec and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleDec_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleDec and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleDec_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleLength and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleLength_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Natural log likelihood of the observed data given the dipole source model.", + "mode": "NULLABLE", + "name": "dipoleLnL", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the model fit.", + "mode": "NULLABLE", + "name": "dipoleChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points (pixels) used to fit the model.", + "mode": "NULLABLE", + "name": "dipoleNdata", + "type": "INTEGER" + }, + { + "description": "Forced PSF photometry on science image failed. Another forced_PsfFlux flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "forced_PsfFlux_flag", + "type": "BOOLEAN" + }, + { + "description": "Forced PSF flux on science image was too close to the edge of the image to use the full PSF model.", + "mode": "NULLABLE", + "name": "forced_PsfFlux_flag_edge", + "type": "BOOLEAN" + }, + { + "description": "Forced PSF flux not enough non-rejected pixels in data to attempt the fit.", + "mode": "NULLABLE", + "name": "forced_PsfFlux_flag_noGoodPixels", + "type": "BOOLEAN" + }, + { + "description": "Calibrated flux for Point Source model centered on radec but measured on the difference of snaps comprising this visit.", + "mode": "NULLABLE", + "name": "snapDiffFlux", + "type": "FLOAT" + }, + { + "description": "Estimated uncertainty of snapDiffFlux.", + "mode": "NULLABLE", + "name": "snapDiffFluxErr", + "type": "FLOAT" + }, + { + "description": "Estimated sky background at the position (centroid) of the object.", + "mode": "NULLABLE", + "name": "fpBkgd", + "type": "FLOAT" + }, + { + "description": "Estimated uncertainty of fpBkgd.", + "mode": "NULLABLE", + "name": "fpBkgdErr", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment of the source intensity.", + "mode": "NULLABLE", + "name": "ixx", + "type": "FLOAT" + }, + { + "description": "Uncertainty of ixx.", + "mode": "NULLABLE", + "name": "ixxErr", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment of the source intensity.", + "mode": "NULLABLE", + "name": "iyy", + "type": "FLOAT" + }, + { + "description": "Uncertainty of iyy.", + "mode": "NULLABLE", + "name": "iyyErr", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment of the source intensity.", + "mode": "NULLABLE", + "name": "ixy", + "type": "FLOAT" + }, + { + "description": "Uncertainty of ixy.", + "mode": "NULLABLE", + "name": "ixyErr", + "type": "FLOAT" + }, + { + "description": "Covariance of ixx and iyy.", + "mode": "NULLABLE", + "name": "ixx_iyy_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of ixx and ixy.", + "mode": "NULLABLE", + "name": "ixx_ixy_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of iyy and ixy.", + "mode": "NULLABLE", + "name": "iyy_ixy_Cov", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment for the PSF.", + "mode": "NULLABLE", + "name": "ixxPSF", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment for the PSF.", + "mode": "NULLABLE", + "name": "iyyPSF", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment for the PSF.", + "mode": "NULLABLE", + "name": "ixyPSF", + "type": "FLOAT" + }, + { + "description": "General source shape algorithm failure flag; set if anything went wrong when measuring the shape. Another shape flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "shape_flag", + "type": "BOOLEAN" + }, + { + "description": "No pixels to measure shape.", + "mode": "NULLABLE", + "name": "shape_flag_no_pixels", + "type": "BOOLEAN" + }, + { + "description": "Center not contained in footprint bounding box.", + "mode": "NULLABLE", + "name": "shape_flag_not_contained", + "type": "BOOLEAN" + }, + { + "description": "This source is a parent source; we should only be measuring on deblended children in difference imaging.", + "mode": "NULLABLE", + "name": "shape_flag_parent_source", + "type": "BOOLEAN" + }, + { + "description": "A measure of extendedness, computed by comparing an object's moment-based traced radius to the PSF moments. extendedness = 1 implies a high degree of confidence that the source is extended. extendedness = 0 implies a high degree of confidence that the source is point-like.", + "mode": "NULLABLE", + "name": "extendedness", + "type": "FLOAT" + }, + { + "description": "A measure of reliability, computed using information from the source and image characterization, as well as the information on the Telescope and Camera system (e.g., ghost maps, defect maps, etc.).", + "mode": "NULLABLE", + "name": "reliability", + "type": "FLOAT" + }, + { + "description": "Filter band this source was observed with.", + "mode": "NULLABLE", + "name": "band", + "type": "STRING" + }, + { + "description":"Attempted to fit a dipole model to this source.", + "mode": "NULLABLE", + "name": "dipoleFitAttempted", + "type": "BOOLEAN" + }, + { + "description": "General pixel flags failure; set if anything went wrong when setting pixels flags from this footprint's mask. This implies that some pixelFlags for this source may be incorrectly set to False.", + "mode": "NULLABLE", + "name": "pixelFlags", + "type": "BOOLEAN" + }, + { + "description": "Bad pixel in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_bad", + "type": "BOOLEAN" + }, + { + "description": "Cosmic ray in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_cr", + "type": "BOOLEAN" + }, + { + "description": "Cosmic ray in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_crCenter", + "type": "BOOLEAN" + }, + { + "description": "Some of the source footprint is outside usable exposure region (masked EDGE or NO_DATA, or centroid off image).", + "mode": "NULLABLE", + "name": "pixelFlags_edge", + "type": "BOOLEAN" + }, + { + "description": "Interpolated pixel in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_interpolated", + "type": "BOOLEAN" + }, + { + "description": "Interpolated pixel in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_interpolatedCenter", + "type": "BOOLEAN" + }, + { + "description": "DiaSource center is off image.", + "mode": "NULLABLE", + "name": "pixelFlags_offimage", + "type": "BOOLEAN" + }, + { + "description": "Saturated pixel in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_saturated", + "type": "BOOLEAN" + }, + { + "description": "Saturated pixel in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_saturatedCenter", + "type": "BOOLEAN" + }, + { + "description": "DiaSource's footprint includes suspect pixels.", + "mode": "NULLABLE", + "name": "pixelFlags_suspect", + "type": "BOOLEAN" + }, + { + "description": "Suspect pixel in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_suspectCenter", + "type": "BOOLEAN" + }, + { + "description": "Streak in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_streak", + "type": "BOOLEAN" + }, + { + "description": "Streak in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_streakCenter", + "type": "BOOLEAN" + }, + { + "description": "Injection in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_injected", + "type": "BOOLEAN" + }, + { + "description": "Injection in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_injectedCenter", + "type": "BOOLEAN" + }, + { + "description": "Template injection in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_injected_template", + "type": "BOOLEAN" + }, + { + "description": "Template injection in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_injected_templateCenter", + "type": "BOOLEAN" + } + ], + "mode": "REQUIRED", + "name": "diaSource", + "type": "RECORD" + }, + { + "description": "prvDiaSources", + "fields": [ + { + "description": "Unique identifier of this DiaSource.", + "mode": "REQUIRED", + "name": "diaSourceId", + "type": "INTEGER" + }, + { + "description": "Id of the visit where this diaSource was measured.", + "mode": "REQUIRED", + "name": "visit", + "type": "INTEGER" + }, + { + "description": "Id of the detector where this diaSource was measured. Datatype short instead of byte because of DB concerns about unsigned bytes.", + "mode": "REQUIRED", + "name": "detector", + "type": "INTEGER" + }, + { + "description": "Id of the diaObject this source was associated with, if any. If not, it is set to NULL (each diaSource will be associated with either a diaObject or ssObject).", + "mode": "NULLABLE", + "name": "diaObjectId", + "type": "INTEGER" + }, + { + "description": "Id of the ssObject this source was associated with, if any. If not, it is set to NULL (each diaSource will be associated with either a diaObject or ssObject).", + "mode": "NULLABLE", + "name": "ssObjectId", + "type": "INTEGER" + }, + { + "description": "Id of the parent diaSource this diaSource has been deblended from, if any.", + "mode": "NULLABLE", + "name": "parentDiaSourceId", + "type": "INTEGER" + }, + { + "description": "Effective mid-visit time for this diaSource, expressed as Modified Julian Date, International Atomic Time.", + "mode": "REQUIRED", + "name": "midpointMjdTai", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of the center of this diaSource.", + "mode": "REQUIRED", + "name": "ra", + "type": "FLOAT" + }, + { + "description": "Uncertainty of ra.", + "mode": "NULLABLE", + "name": "raErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of the center of this diaSource.", + "mode": "REQUIRED", + "name": "dec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dec.", + "mode": "NULLABLE", + "name": "decErr", + "type": "FLOAT" + }, + { + "description": "Covariance between ra and dec.", + "mode": "NULLABLE", + "name": "ra_dec_Cov", + "type": "FLOAT" + }, + { + "description": "x position computed by a centroiding algorithm.", + "mode": "REQUIRED", + "name": "x", + "type": "FLOAT" + }, + { + "description": "Uncertainty of x.", + "mode": "NULLABLE", + "name": "xErr", + "type": "FLOAT" + }, + { + "description": "y position computed by a centroiding algorithm.", + "mode": "REQUIRED", + "name": "y", + "type": "FLOAT" + }, + { + "description": "Uncertainty of y.", + "mode": "NULLABLE", + "name": "yErr", + "type": "FLOAT" + }, + { + "description": "Covariance between x and y.", + "mode": "NULLABLE", + "name": "x_y_Cov", + "type": "FLOAT" + }, + { + "description": "General centroid algorithm failure flag; set if anything went wrong when fitting the centroid. Another centroid flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "centroid_flag", + "type": "BOOLEAN" + }, + { + "description": "Flux in a 12 pixel radius aperture on the difference image.", + "mode": "NULLABLE", + "name": "apFlux", + "type": "FLOAT" + }, + { + "description": "Estimated uncertainty of apFlux.", + "mode": "NULLABLE", + "name": "apFluxErr", + "type": "FLOAT" + }, + { + "description": "General aperture flux algorithm failure flag; set if anything went wrong when measuring aperture fluxes. Another apFlux flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "apFlux_flag", + "type": "BOOLEAN" + }, + { + "description": "Aperture did not fit within measurement image.", + "mode": "NULLABLE", + "name": "apFlux_flag_apertureTruncated", + "type": "BOOLEAN" + }, + { + "description": "The signal-to-noise ratio at which this source was detected in the difference image.", + "mode": "NULLABLE", + "name": "snr", + "type": "FLOAT" + }, + { + "description": "Flux for Point Source model. Note this actually measures the flux difference between the template and the visit image.", + "mode": "NULLABLE", + "name": "psfFlux", + "type": "FLOAT" + }, + { + "description": "Uncertainty of psfFlux.", + "mode": "NULLABLE", + "name": "psfFluxErr", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of centroid for point source model.", + "mode": "NULLABLE", + "name": "psfRa", + "type": "FLOAT" + }, + { + "description": "Uncertainty of psfRa.", + "mode": "NULLABLE", + "name": "psfRaErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of centroid for point source model.", + "mode": "NULLABLE", + "name": "psfDec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of psfDec.", + "mode": "NULLABLE", + "name": "psfDecErr", + "type": "FLOAT" + }, + { + "description": "Covariance between psfFlux and psfRa.", + "mode": "NULLABLE", + "name": "psfFlux_psfRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance between psfFlux and psfDec.", + "mode": "NULLABLE", + "name": "psfFlux_psfDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance between psfRa and psfDec.", + "mode": "NULLABLE", + "name": "psfRa_psfDec_Cov", + "type": "FLOAT" + }, + { + "description": "Natural log likelihood of the observed data given the point source model.", + "mode": "NULLABLE", + "name": "psfLnL", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the point source model fit.", + "mode": "NULLABLE", + "name": "psfChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points (pixels) used to fit the point source model.", + "mode": "NULLABLE", + "name": "psfNdata", + "type": "INTEGER" + }, + { + "description": "Failure to derive linear least-squares fit of psf model. Another psfFlux flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "psfFlux_flag", + "type": "BOOLEAN" + }, + { + "description": "Object was too close to the edge of the image to use the full PSF model.", + "mode": "NULLABLE", + "name": "psfFlux_flag_edge", + "type": "BOOLEAN" + }, + { + "description": "Not enough non-rejected pixels in data to attempt the fit.", + "mode": "NULLABLE", + "name": "psfFlux_flag_noGoodPixels", + "type": "BOOLEAN" + }, + { + "description": "Flux for a trailed source model. Note this actually measures the flux difference between the template and the visit image.", + "mode": "NULLABLE", + "name": "trailFlux", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailFlux.", + "mode": "NULLABLE", + "name": "trailFluxErr", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of centroid for trailed source model.", + "mode": "NULLABLE", + "name": "trailRa", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailRa.", + "mode": "NULLABLE", + "name": "trailRaErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of centroid for trailed source model.", + "mode": "NULLABLE", + "name": "trailDec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailDec.", + "mode": "NULLABLE", + "name": "trailDecErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood fit of trail length.", + "mode": "NULLABLE", + "name": "trailLength", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailLength.", + "mode": "NULLABLE", + "name": "trailLengthErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood fit of the angle between the meridian through the centroid and the trail direction (bearing)", + "mode": "NULLABLE", + "name": "trailAngle", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailAngle.", + "mode": "NULLABLE", + "name": "trailAngleErr", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailRa.", + "mode": "NULLABLE", + "name": "trailFlux_trailRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailDec.", + "mode": "NULLABLE", + "name": "trailFlux_trailDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailLength", + "mode": "NULLABLE", + "name": "trailFlux_trailLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailAngle", + "mode": "NULLABLE", + "name": "trailFlux_trailAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailRa and trailDec.", + "mode": "NULLABLE", + "name": "trailRa_trailDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailRa and trailLength.", + "mode": "NULLABLE", + "name": "trailRa_trailLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailRa and trailAngle.", + "mode": "NULLABLE", + "name": "trailRa_trailAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailDec and trailLength.", + "mode": "NULLABLE", + "name": "trailDec_trailLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailDec and trailAngle.", + "mode": "NULLABLE", + "name": "trailDec_trailAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailLength and trailAngle", + "mode": "NULLABLE", + "name": "trailLength_trailAngle_Cov", + "type": "INTEGER" + }, + { + "description": "Natural log likelihood of the observed data given the trailed source model.", + "mode": "NULLABLE", + "name": "trailLnL", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the trailed source model fit.", + "mode": "NULLABLE", + "name": "trailChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points (pixels) used to fit the trailed source model.", + "mode": "NULLABLE", + "name": "trailNdata", + "type": "INTEGER" + }, + { + "description": "This flag is set if a trailed source extends onto or past edge pixels.", + "mode": "NULLABLE", + "name": "trail_flag_edge", + "type": "BOOLEAN" + }, + { + "description": "Maximum likelihood value for the mean absolute flux of the two lobes for a dipole model.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleMeanFlux.", + "mode": "NULLABLE", + "name": "dipoleMeanFluxErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood value for the difference of absolute fluxes of the two lobes for a dipole mode", + "mode": "NULLABLE", + "name": "dipoleFluxDiff", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleFluxDiff.", + "mode": "NULLABLE", + "name": "dipoleFluxDiffErr", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of centroid for dipole model.", + "mode": "NULLABLE", + "name": "dipoleRa", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleRa.", + "mode": "NULLABLE", + "name": "dipoleRaErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of centroid for dipole model.", + "mode": "NULLABLE", + "name": "dipoleDec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleDecErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood value for the lobe separation in dipole model.", + "mode": "NULLABLE", + "name": "dipoleLength", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleLengthErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood fit of the angle between the meridian through the centroid and the dipole direction (bearing, from negative to positive lobe).", + "mode": "NULLABLE", + "name": "dipoleAngle", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleAngleErr", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleFluxDiff.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleFluxDiff_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleRa.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleRa.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleRa and dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleRa_dipoleDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleRa and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleRa_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleRa and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleRa_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleDec and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleDec_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleDec and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleDec_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleLength and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleLength_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Natural log likelihood of the observed data given the dipole source model.", + "mode": "NULLABLE", + "name": "dipoleLnL", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the model fit.", + "mode": "NULLABLE", + "name": "dipoleChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points (pixels) used to fit the model.", + "mode": "NULLABLE", + "name": "dipoleNdata", + "type": "INTEGER" + }, + { + "description": "Forced PSF photometry on science image failed. Another forced_PsfFlux flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "forced_PsfFlux_flag", + "type": "BOOLEAN" + }, + { + "description": "Forced PSF flux on science image was too close to the edge of the image to use the full PSF model.", + "mode": "NULLABLE", + "name": "forced_PsfFlux_flag_edge", + "type": "BOOLEAN" + }, + { + "description": "Forced PSF flux not enough non-rejected pixels in data to attempt the fit.", + "mode": "NULLABLE", + "name": "forced_PsfFlux_flag_noGoodPixels", + "type": "BOOLEAN" + }, + { + "description": "Calibrated flux for Point Source model centered on radec but measured on the difference of snaps comprising this visit.", + "mode": "NULLABLE", + "name": "snapDiffFlux", + "type": "FLOAT" + }, + { + "description": "Estimated uncertainty of snapDiffFlux.", + "mode": "NULLABLE", + "name": "snapDiffFluxErr", + "type": "FLOAT" + }, + { + "description": "Estimated sky background at the position (centroid) of the object.", + "mode": "NULLABLE", + "name": "fpBkgd", + "type": "FLOAT" + }, + { + "description": "Estimated uncertainty of fpBkgd.", + "mode": "NULLABLE", + "name": "fpBkgdErr", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment of the source intensity.", + "mode": "NULLABLE", + "name": "ixx", + "type": "FLOAT" + }, + { + "description": "Uncertainty of ixx.", + "mode": "NULLABLE", + "name": "ixxErr", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment of the source intensity.", + "mode": "NULLABLE", + "name": "iyy", + "type": "FLOAT" + }, + { + "description": "Uncertainty of iyy.", + "mode": "NULLABLE", + "name": "iyyErr", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment of the source intensity.", + "mode": "NULLABLE", + "name": "ixy", + "type": "FLOAT" + }, + { + "description": "Uncertainty of ixy.", + "mode": "NULLABLE", + "name": "ixyErr", + "type": "FLOAT" + }, + { + "description": "Covariance of ixx and iyy.", + "mode": "NULLABLE", + "name": "ixx_iyy_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of ixx and ixy.", + "mode": "NULLABLE", + "name": "ixx_ixy_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of iyy and ixy.", + "mode": "NULLABLE", + "name": "iyy_ixy_Cov", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment for the PSF.", + "mode": "NULLABLE", + "name": "ixxPSF", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment for the PSF.", + "mode": "NULLABLE", + "name": "iyyPSF", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment for the PSF.", + "mode": "NULLABLE", + "name": "ixyPSF", + "type": "FLOAT" + }, + { + "description": "General source shape algorithm failure flag; set if anything went wrong when measuring the shape. Another shape flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "shape_flag", + "type": "BOOLEAN" + }, + { + "description": "No pixels to measure shape.", + "mode": "NULLABLE", + "name": "shape_flag_no_pixels", + "type": "BOOLEAN" + }, + { + "description": "Center not contained in footprint bounding box.", + "mode": "NULLABLE", + "name": "shape_flag_not_contained", + "type": "BOOLEAN" + }, + { + "description": "This source is a parent source; we should only be measuring on deblended children in difference imaging.", + "mode": "NULLABLE", + "name": "shape_flag_parent_source", + "type": "BOOLEAN" + }, + { + "description": "A measure of extendedness, computed by comparing an object's moment-based traced radius to the PSF moments. extendedness = 1 implies a high degree of confidence that the source is extended. extendedness = 0 implies a high degree of confidence that the source is point-like.", + "mode": "NULLABLE", + "name": "extendedness", + "type": "FLOAT" + }, + { + "description": "A measure of reliability, computed using information from the source and image characterization, as well as the information on the Telescope and Camera system (e.g., ghost maps, defect maps, etc.).", + "mode": "NULLABLE", + "name": "reliability", + "type": "FLOAT" + }, + { + "description": "Filter band this source was observed with.", + "mode": "NULLABLE", + "name": "band", + "type": "STRING" + }, + { + "description": "General pixel flags failure; set if anything went wrong when setting pixels flags from this footprint's mask. This implies that some pixelFlags for this source may be incorrectly set to False.", + "mode": "NULLABLE", + "name": "pixelFlags", + "type": "BOOLEAN" + }, + { + "description": "Bad pixel in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_bad", + "type": "BOOLEAN" + }, + { + "description": "Cosmic ray in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_cr", + "type": "BOOLEAN" + }, + { + "description": "Cosmic ray in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_crCenter", + "type": "BOOLEAN" + }, + { + "description": "Some of the source footprint is outside usable exposure region (masked EDGE or NO_DATA, or centroid off image).", + "mode": "NULLABLE", + "name": "pixelFlags_edge", + "type": "BOOLEAN" + }, + { + "description": "Interpolated pixel in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_interpolated", + "type": "BOOLEAN" + }, + { + "description": "Interpolated pixel in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_interpolatedCenter", + "type": "BOOLEAN" + }, + { + "description": "DiaSource center is off image.", + "mode": "NULLABLE", + "name": "pixelFlags_offimage", + "type": "BOOLEAN" + }, + { + "description": "Saturated pixel in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_saturated", + "type": "BOOLEAN" + }, + { + "description": "Saturated pixel in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_saturatedCenter", + "type": "BOOLEAN" + }, + { + "description": "DiaSource's footprint includes suspect pixels.", + "mode": "NULLABLE", + "name": "pixelFlags_suspect", + "type": "BOOLEAN" + }, + { + "description": "Suspect pixel in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_suspectCenter", + "type": "BOOLEAN" + }, + { + "description": "Streak in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_streak", + "type": "BOOLEAN" + }, + { + "description": "Streak in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_streakCenter", + "type": "BOOLEAN" + }, + { + "description": "Injection in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_injected", + "type": "BOOLEAN" + }, + { + "description": "Injection in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_injectedCenter", + "type": "BOOLEAN" + }, + { + "description": "Template injection in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_injected_template", + "type": "BOOLEAN" + }, + { + "description": "Template injection in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_injected_templateCenter", + "type": "BOOLEAN" + } + ], + "mode": "REPEATED", + "name": "prvDiaSources", + "type": "RECORD" + }, + { + "description": "prvDiaForcedSources", + "fields": [ + { + "description": "Unique id.", + "mode": "REQUIRED", + "name": "diaForcedSourceId", + "type": "FLOAT" + }, + { + "description": "Id of the DiaObject that this DiaForcedSource was associated with.", + "mode": "REQUIRED", + "name": "diaObjectId", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of the position of the DiaObject at time radecMjdTai.", + "mode": "REQUIRED", + "name": "ra", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of the position of the DiaObject at time radecMjdTai.", + "mode": "REQUIRED", + "name": "dec", + "type": "FLOAT" + }, + { + "description": "Id of the visit where this forcedSource was measured.", + "mode": "REQUIRED", + "name": "visit", + "type": "INTEGER" + }, + { + "description": "Id of the detector where this forcedSource was measured. Datatype short instead of byte because of DB concerns about unsigned bytes.", + "mode": "REQUIRED", + "name": "detector", + "type": "INTEGER" + }, + { + "description": "Point Source model flux.", + "mode": "NULLABLE", + "name": "psfFlux", + "type": "FLOAT" + }, + { + "description": "Uncertainty of psfFlux.", + "mode": "NULLABLE", + "name": "psfFluxErr", + "type": "FLOAT" + }, + { + "description": "Effective mid-visit time for this diaForcedSource, expressed as Modified Julian Date, International Atomic Time.", + "mode": "REQUIRED", + "name": "midpointMjdTai", + "type": "FLOAT" + }, + { + "description": "Filter band this source was observed with.", + "mode": "NULLABLE", + "name": "band", + "type": "STRING" + } + ], + "mode": "REPEATED", + "name": "prvDiaForcedSources", + "type": "RECORD" + }, + { + "description": "prvDiaNondetectionLimits", + "fields": [ + { + "description": "", + "mode": "REQUIRED", + "name": "ccdVisitId", + "type": "FLOAT" + }, + { + "description": "", + "mode": "REQUIRED", + "name": "midpointMjdTai", + "type": "FLOAT" + }, + { + "description": "", + "mode": "REQUIRED", + "name": "band", + "type": "STRING" + }, + { + "description": "", + "mode": "REQUIRED", + "name": "diaNoise", + "type": "FLOAT" + } + ], + "mode": "REPEATED", + "name": "prvDiaNondetectionLimits", + "type": "RECORD" + }, + { + "description": "diaObject", + "fields": [ + { + "description": "Unique identifier of this DiaObject.", + "mode": "REQUIRED", + "name": "diaObjectId", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of the position of the object at time radecMjdTai.", + "mode": "REQUIRED", + "name": "ra", + "type": "FLOAT" + }, + { + "description": "raErr", + "mode": "NULLABLE", + "name": "raErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of the position of the object at time radecMjdTai.", + "mode": "REQUIRED", + "name": "dec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dec.", + "mode": "NULLABLE", + "name": "decErr", + "type": "FLOAT" + }, + { + "description": "Covariance between ra and dec.", + "mode": "NULLABLE", + "name": "ra_dec_Cov", + "type": "FLOAT" + }, + { + "description": "Time at which the object was at a position ra/dec, expressed as Modified Julian Date, International Atomic Time.", + "mode": "NULLABLE", + "name": "radecMjdTai", + "type": "FLOAT" + }, + { + "description": "Proper motion in right ascension.", + "mode": "NULLABLE", + "name": "pmRa", + "type": "FLOAT" + }, + { + "description": "Uncertainty of pmRa.", + "mode": "NULLABLE", + "name": "pmRaErr", + "type": "FLOAT" + }, + { + "description": "Proper motion of declination.", + "mode": "NULLABLE", + "name": "pmDec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of pmDec.", + "mode": "NULLABLE", + "name": "pmDecErr", + "type": "FLOAT" + }, + { + "description": "Parallax", + "mode": "NULLABLE", + "name": "Parallax", + "type": "FLOAT" + }, + { + "description": "Uncertainty of parallax.", + "mode": "NULLABLE", + "name": "parallaxErr", + "type": "FLOAT" + }, + { + "description": "Covariance of pmRa and pmDec.", + "mode": "NULLABLE", + "name": "pmRa_pmDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of pmRa and parallax.", + "mode": "NULLABLE", + "name": "pmRa_parallax_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of pmDec and parallax.", + "mode": "NULLABLE", + "name": "pmDec_parallax_Cov", + "type": "FLOAT" + }, + { + "description": "Natural log of the likelihood of the linear proper motion parallax fit.", + "mode": "NULLABLE", + "name": "pmParallaxLnL", + "type": "FLOAT" + }, + { + "description": "Chi^2 static of the model fit.", + "mode": "NULLABLE", + "name": "pmParallaxChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to fit the model.", + "mode": "NULLABLE", + "name": "pmParallaxNdata", + "type": "INTEGER" + }, + { + "description": "Weighted mean point-source model magnitude for u filter.", + "mode": "NULLABLE", + "name": "u_psfFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of u_psfFluxMean.", + "mode": "NULLABLE", + "name": "u_psfFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of u_psfFlux.", + "mode": "NULLABLE", + "name": "u_psfFluxSigma", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic for the scatter of u_psfFlux around u_psfFluxMean.", + "mode": "NULLABLE", + "name": "u_psfFluxChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to compute u_psfFluxChi2.", + "mode": "NULLABLE", + "name": "u_psfFluxNdata", + "type": "INTEGER" + }, + { + "description": "Weighted mean forced photometry flux for u filter.", + "mode": "NULLABLE", + "name": "u_fpFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of u_fpFluxMean.", + "mode": "NULLABLE", + "name": "u_fpFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of u_fpFlux.", + "mode": "NULLABLE", + "name": "u_fpFluxSigma", + "type": "FLOAT" + }, + { + "description": "Weighted mean point-source model magnitude for g filter.", + "mode": "NULLABLE", + "name": "g_psfFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of g_psfFluxMean.", + "mode": "NULLABLE", + "name": "g_psfFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of g_psfFlux.", + "mode": "NULLABLE", + "name": "g_psfFluxSigma", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic for the scatter of g_psfFlux around g_psfFluxMean.", + "mode": "NULLABLE", + "name": "g_psfFluxChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to compute g_psfFluxChi2.", + "mode": "NULLABLE", + "name": "g_psfFluxNdata", + "type": "INTEGER" + }, + { + "description": "Weighted mean forced photometry flux for g filter.", + "mode": "NULLABLE", + "name": "g_fpFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of g_fpFluxMean.", + "mode": "NULLABLE", + "name": "g_fpFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of g_fpFlux.", + "mode": "NULLABLE", + "name": "g_fpFluxSigma", + "type": "FLOAT" + }, + { + "description": "Weighted mean point-source model magnitude for r filter.", + "mode": "NULLABLE", + "name": "r_psfFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of r_psfFluxMean.", + "mode": "NULLABLE", + "name": "r_psfFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of r_psfFlux.", + "mode": "NULLABLE", + "name": "r_psfFluxSigma", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic for the scatter of r_psfFlux around r_psfFluxMean.", + "mode": "NULLABLE", + "name": "r_psfFluxChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to compute r_psfFluxChi2.", + "mode": "NULLABLE", + "name": "r_psfFluxNdata", + "type": "INTEGER" + }, + { + "description": "Weighted mean forced photometry flux for r filter.", + "mode": "NULLABLE", + "name": "r_fpFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of r_fpFluxMean.", + "mode": "NULLABLE", + "name": "r_fpFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of r_fpFlux.", + "mode": "NULLABLE", + "name": "r_fpFluxSigma", + "type": "FLOAT" + }, + { + "description": "Weighted mean point-source model magnitude for i filter.", + "mode": "NULLABLE", + "name": "i_psfFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of i_psfFluxMean.", + "mode": "NULLABLE", + "name": "i_psfFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of i_psfFlux.", + "mode": "NULLABLE", + "name": "i_psfFluxSigma", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic for the scatter of i_psfFlux around i_psfFluxMean.", + "mode": "NULLABLE", + "name": "i_psfFluxChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to compute i_psfFluxChi2.", + "mode": "NULLABLE", + "name": "i_psfFluxNdata", + "type": "INTEGER" + }, + { + "description": "Weighted mean forced photometry flux for i filter.", + "mode": "NULLABLE", + "name": "i_fpFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of i_fpFluxMean.", + "mode": "NULLABLE", + "name": "i_fpFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of i_fpFlux.", + "mode": "NULLABLE", + "name": "i_fpFluxSigma", + "type": "FLOAT" + }, + { + "description": "Weighted mean point-source model magnitude for z filter.", + "mode": "NULLABLE", + "name": "z_psfFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of z_psfFluxMean.", + "mode": "NULLABLE", + "name": "z_psfFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of z_psfFlux.", + "mode": "NULLABLE", + "name": "z_psfFluxSigma", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic for the scatter of z_psfFlux around z_psfFluxMean.", + "mode": "NULLABLE", + "name": "z_psfFluxChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to compute z_psfFluxChi2.", + "mode": "NULLABLE", + "name": "z_psfFluxNdata", + "type": "INTEGER" + }, + { + "description": "Weighted mean forced photometry flux for z filter.", + "mode": "NULLABLE", + "name": "z_fpFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of z_fpFluxMean.", + "mode": "NULLABLE", + "name": "z_fpFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of z_fpFlux.", + "mode": "NULLABLE", + "name": "z_fpFluxSigma", + "type": "FLOAT" + }, + { + "description": "Weighted mean point-source model magnitude for y filter.", + "mode": "NULLABLE", + "name": "y_psfFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of y_psfFluxMean.", + "mode": "NULLABLE", + "name": "y_psfFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of y_psfFlux.", + "mode": "NULLABLE", + "name": "y_psfFluxSigma", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic for the scatter of y_psfFlux around y_psfFluxMean.", + "mode": "NULLABLE", + "name": "y_psfFluxChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to compute y_psfFluxChi2.", + "mode": "NULLABLE", + "name": "y_psfFluxNdata", + "type": "INTEGER" + }, + { + "description": "Weighted mean forced photometry flux for y filter.", + "mode": "NULLABLE", + "name": "y_fpFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of y_fpFluxMean.", + "mode": "NULLABLE", + "name": "y_fpFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of y_fpFlux.", + "mode": "NULLABLE", + "name": "y_fpFluxSigma", + "type": "FLOAT" + }, + { + "description": "Id of the closest nearby object.", + "mode": "NULLABLE", + "name": "nearbyObj1", + "type": "FLOAT" + }, + { + "description": "Distance to nearbyObj1.", + "mode": "NULLABLE", + "name": "nearbyObj1Dist", + "type": "FLOAT" + }, + { + "description": "Natural log of the probability that the observed diaObject is the same as the nearbyObj1.", + "mode": "NULLABLE", + "name": "nearbyObj1LnP", + "type": "FLOAT" + }, + { + "description": "Id of the second-closest nearby object.", + "mode": "NULLABLE", + "name": "nearbyObj2", + "type": "FLOAT" + }, + { + "description": "Distance to nearbyObj2.", + "mode": "NULLABLE", + "name": "nearbyObj2Dist", + "type": "FLOAT" + }, + { + "description": "Natural log of the probability that the observed diaObject is the same as the nearbyObj2.", + "mode": "NULLABLE", + "name": "nearbyObj2LnP", + "type": "FLOAT" + }, + { + "description": "Id of the third-closest nearby object.", + "mode": "NULLABLE", + "name": "nearbyObj3", + "type": "FLOAT" + }, + { + "description": "Distance to nearbyObj3.", + "mode": "NULLABLE", + "name": "nearbyObj3Dist", + "type": "FLOAT" + }, + { + "description": "Natural log of the probability that the observed diaObject is the same as the nearbyObj3.", + "mode": "NULLABLE", + "name": "nearbyObj3LnP", + "type": "FLOAT" + }, + { + "description": "Mean of the u band flux errors.", + "mode": "NULLABLE", + "name": "u_psfFluxErrMean", + "type": "FLOAT" + }, + { + "description": "Mean of the g band flux errors.", + "mode": "NULLABLE", + "name": "g_psfFluxErrMean", + "type": "FLOAT" + }, + { + "description": "Mean of the r band flux errors.", + "mode": "NULLABLE", + "name": "r_psfFluxErrMean", + "type": "FLOAT" + }, + { + "description": "Mean of the i band flux errors.", + "mode": "NULLABLE", + "name": "i_psfFluxErrMean", + "type": "FLOAT" + }, + { + "description": "Mean of the z band flux errors.", + "mode": "NULLABLE", + "name": "z_psfFluxErrMean", + "type": "FLOAT" + }, + { + "description": "Mean of the y band flux errors.", + "mode": "NULLABLE", + "name": "y_psfFluxErrMean", + "type": "FLOAT" + } + ], + "mode": "NULLABLE", + "name": "diaObject", + "type": "RECORD" + }, + { + "description": "ssObject", + "fields": [ + { + "description": "Unique identifier.", + "mode": "REQUIRED", + "name": "ssObjectId", + "type": "INTEGER" + }, + { + "description": "The date the LSST first linked and submitted the discovery observations to the MPC. May be NULL if not an LSST discovery. The date format will follow general LSST conventions (MJD TAI, at the moment).", + "mode": "NULLABLE", + "name": "discoverySubmissionDate", + "type": "FLOAT" + }, + { + "description": "The time of the first LSST observation of this object (could be precovered) as Modified Julian Date, International Atomic Time.", + "mode": "NULLABLE", + "name": "firstObservationDate", + "type": "FLOAT" + }, + { + "description": "Arc of LSST observations.", + "mode": "NULLABLE", + "name": "arc", + "type": "FLOAT" + }, + { + "description": "Number of LSST observations of this object.", + "mode": "NULLABLE", + "name": "numObs", + "type": "INTEGER" + }, + { + "description": "Minimum orbit intersection distance to Earth.", + "mode": "NULLABLE", + "name": "MOID", + "type": "FLOAT" + }, + { + "description": "True anomaly of the MOID point.", + "mode": "NULLABLE", + "name": "MOIDTrueAnomaly", + "type": "FLOAT" + }, + { + "description": "Ecliptic longitude of the MOID point.", + "mode": "NULLABLE", + "name": "MOIDEclipticLongitude", + "type": "FLOAT" + }, + { + "description": "DeltaV at the MOID point.", + "mode": "NULLABLE", + "name": "MOIDDeltaV", + "type": "FLOAT" + }, + { + "description": "Best fit absolute magnitude (u band).", + "mode": "NULLABLE", + "name": "u_H", + "type": "FLOAT" + }, + { + "description": "Best fit G12 slope parameter (u band).", + "mode": "NULLABLE", + "name": "u_G12", + "type": "FLOAT" + }, + { + "description": "Uncertainty of H (u band).", + "mode": "NULLABLE", + "name": "u_HErr", + "type": "FLOAT" + }, + { + "description": "Uncertainty of G12 (u band).", + "mode": "NULLABLE", + "name": "u_G12Err", + "type": "FLOAT" + }, + { + "description": "H-G12 covariance (u band).", + "mode": "NULLABLE", + "name": "u_H_u_G12_Cov", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the phase curve fit (u band).", + "mode": "NULLABLE", + "name": "u_Chi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to fit the phase curve (u band).", + "mode": "NULLABLE", + "name": "u_Ndata", + "type": "INTEGER" + }, + { + "description": "Best fit absolute magnitude (g band).", + "mode": "NULLABLE", + "name": "g_H", + "type": "FLOAT" + }, + { + "description": "Best fit G12 slope parameter (g band).", + "mode": "NULLABLE", + "name": "g_G12", + "type": "FLOAT" + }, + { + "description": "Uncertainty of H (g band).", + "mode": "NULLABLE", + "name": "g_HErr", + "type": "FLOAT" + }, + { + "description": "Uncertainty of G12 (g band).", + "mode": "NULLABLE", + "name": "g_G12Err", + "type": "FLOAT" + }, + { + "description": "H-G12 covariance (g band).", + "mode": "NULLABLE", + "name": "g_H_g_G12_Cov", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the phase curve fit (g band).", + "mode": "NULLABLE", + "name": "g_Chi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to fit the phase curve (g band).", + "mode": "NULLABLE", + "name": "g_Ndata", + "type": "INTEGER" + }, + { + "description": "Best fit absolute magnitude (r band).", + "mode": "NULLABLE", + "name": "r_H", + "type": "FLOAT" + }, + { + "description": "Best fit G12 slope parameter (r band).", + "mode": "NULLABLE", + "name": "r_G12", + "type": "FLOAT" + }, + { + "description": "Uncertainty of H (r band).", + "mode": "NULLABLE", + "name": "r_HErr", + "type": "FLOAT" + }, + { + "description": "Uncertainty of G12 (r band).", + "mode": "NULLABLE", + "name": "r_G12Err", + "type": "FLOAT" + }, + { + "description": "H-G12 covariance (r band).", + "mode": "NULLABLE", + "name": "r_H_r_G12_Cov", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the phase curve fit (r band).", + "mode": "NULLABLE", + "name": "r_Chi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to fit the phase curve (r band).", + "mode": "NULLABLE", + "name": "r_Ndata", + "type": "INTEGER" + }, + { + "description": "Best fit absolute magnitude (i band).", + "mode": "NULLABLE", + "name": "i_H", + "type": "FLOAT" + }, + { + "description": "Best fit G12 slope parameter (i band).", + "mode": "NULLABLE", + "name": "i_G12", + "type": "FLOAT" + }, + { + "description": "Uncertainty of H (i band).", + "mode": "NULLABLE", + "name": "i_HErr", + "type": "FLOAT" + }, + { + "description": "Uncertainty of G12 (i band).", + "mode": "NULLABLE", + "name": "i_G12Err", + "type": "FLOAT" + }, + { + "description": "H-G12 covariance (i band).", + "mode": "NULLABLE", + "name": "i_H_i_G12_Cov", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the phase curve fit (i band).", + "mode": "NULLABLE", + "name": "i_Chi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to fit the phase curve (i band).", + "mode": "NULLABLE", + "name": "i_Ndata", + "type": "INTEGER" + }, + { + "description": "Best fit absolute magnitude (z band).", + "mode": "NULLABLE", + "name": "z_H", + "type": "FLOAT" + }, + { + "description": "Best fit G12 slope parameter (z band).", + "mode": "NULLABLE", + "name": "z_G12", + "type": "FLOAT" + }, + { + "description": "Uncertainty of H (z band).", + "mode": "NULLABLE", + "name": "z_HErr", + "type": "FLOAT" + }, + { + "description": "Uncertainty of G12 (z band).", + "mode": "NULLABLE", + "name": "z_G12Err", + "type": "FLOAT" + }, + { + "description": "H-G12 covariance (z band).", + "mode": "NULLABLE", + "name": "z_H_z_G12_Cov", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the phase curve fit (z band).", + "mode": "NULLABLE", + "name": "z_Chi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to fit the phase curve (z band).", + "mode": "NULLABLE", + "name": "z_Ndata", + "type": "INTEGER" + }, + { + "description": "Best fit absolute magnitude (y band).", + "mode": "NULLABLE", + "name": "y_H", + "type": "FLOAT" + }, + { + "description": "Best fit G12 slope parameter (y band).", + "mode": "NULLABLE", + "name": "y_G12", + "type": "FLOAT" + }, + { + "description": "Uncertainty of H (y band).", + "mode": "NULLABLE", + "name": "y_HErr", + "type": "FLOAT" + }, + { + "description": "Uncertainty of G12 (y band).", + "mode": "NULLABLE", + "name": "y_G12Err", + "type": "FLOAT" + }, + { + "description": "H-G12 covariance (y band).", + "mode": "NULLABLE", + "name": "y_H_y_G12_Cov", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the phase curve fit (y band).", + "mode": "NULLABLE", + "name": "y_Chi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to fit the phase curve (y band).", + "mode": "NULLABLE", + "name": "y_Ndata", + "type": "INTEGER" + }, + { + "description": "median `extendedness` value from the DIASource.", + "mode": "NULLABLE", + "name": "medianExtendedness", + "type": "FLOAT" + } + ], + "mode": "NULLABLE", + "name": "ssObject", + "type": "RECORD" + } +] diff --git a/broker/setup_broker/lsst/templates/bq_lsst_alerts_v7_3_schema.json b/broker/setup_broker/lsst/templates/bq_lsst_alerts_v7_3_schema.json new file mode 100644 index 00000000..8292d73f --- /dev/null +++ b/broker/setup_broker/lsst/templates/bq_lsst_alerts_v7_3_schema.json @@ -0,0 +1,2588 @@ +[ + { + "description": "unique alert identifer", + "mode": "REQUIRED", + "name": "alertId", + "type": "INTEGER" + }, + { + "description": "diaSource", + "fields": [ + { + "description": "Unique identifier of this DiaSource.", + "mode": "REQUIRED", + "name": "diaSourceId", + "type": "INTEGER" + }, + { + "description": "Id of the visit where this diaSource was measured.", + "mode": "REQUIRED", + "name": "visit", + "type": "INTEGER" + }, + { + "description": "Id of the detector where this diaSource was measured. Datatype short instead of byte because of DB concerns about unsigned bytes.", + "mode": "REQUIRED", + "name": "detector", + "type": "INTEGER" + }, + { + "description": "Id of the diaObject this source was associated with, if any. If not, it is set to NULL (each diaSource will be associated with either a diaObject or ssObject).", + "mode": "NULLABLE", + "name": "diaObjectId", + "type": "INTEGER" + }, + { + "description": "Id of the ssObject this source was associated with, if any. If not, it is set to NULL (each diaSource will be associated with either a diaObject or ssObject).", + "mode": "NULLABLE", + "name": "ssObjectId", + "type": "INTEGER" + }, + { + "description": "Id of the parent diaSource this diaSource has been deblended from, if any.", + "mode": "NULLABLE", + "name": "parentDiaSourceId", + "type": "INTEGER" + }, + { + "description": "Effective mid-visit time for this diaSource, expressed as Modified Julian Date, International Atomic Time.", + "mode": "REQUIRED", + "name": "midpointMjdTai", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of the center of this diaSource.", + "mode": "REQUIRED", + "name": "ra", + "type": "FLOAT" + }, + { + "description": "Uncertainty of ra.", + "mode": "NULLABLE", + "name": "raErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of the center of this diaSource.", + "mode": "REQUIRED", + "name": "dec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dec.", + "mode": "NULLABLE", + "name": "decErr", + "type": "FLOAT" + }, + { + "description": "Covariance between ra and dec.", + "mode": "NULLABLE", + "name": "ra_dec_Cov", + "type": "FLOAT" + }, + { + "description": "x position computed by a centroiding algorithm.", + "mode": "REQUIRED", + "name": "x", + "type": "FLOAT" + }, + { + "description": "Uncertainty of x.", + "mode": "NULLABLE", + "name": "xErr", + "type": "FLOAT" + }, + { + "description": "y position computed by a centroiding algorithm.", + "mode": "REQUIRED", + "name": "y", + "type": "FLOAT" + }, + { + "description": "Uncertainty of y.", + "mode": "NULLABLE", + "name": "yErr", + "type": "FLOAT" + }, + { + "description": "Covariance between x and y.", + "mode": "NULLABLE", + "name": "x_y_Cov", + "type": "FLOAT" + }, + { + "description": "General centroid algorithm failure flag; set if anything went wrong when fitting the centroid. Another centroid flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "centroid_flag", + "type": "BOOLEAN" + }, + { + "description": "Source was detected as significantly negative.", + "mode": "NULLABLE", + "name": "is_negative", + "type": "BOOLEAN" + }, + { + "description": "Flux in a 12 pixel radius aperture on the difference image.", + "mode": "NULLABLE", + "name": "apFlux", + "type": "FLOAT" + }, + { + "description": "Estimated uncertainty of apFlux.", + "mode": "NULLABLE", + "name": "apFluxErr", + "type": "FLOAT" + }, + { + "description": "General aperture flux algorithm failure flag; set if anything went wrong when measuring aperture fluxes. Another apFlux flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "apFlux_flag", + "type": "BOOLEAN" + }, + { + "description": "Aperture did not fit within measurement image.", + "mode": "NULLABLE", + "name": "apFlux_flag_apertureTruncated", + "type": "BOOLEAN" + }, + { + "description": "The signal-to-noise ratio at which this source was detected in the difference image.", + "mode": "NULLABLE", + "name": "snr", + "type": "FLOAT" + }, + { + "description": "Flux for Point Source model. Note this actually measures the flux difference between the template and the visit image.", + "mode": "NULLABLE", + "name": "psfFlux", + "type": "FLOAT" + }, + { + "description": "Uncertainty of psfFlux.", + "mode": "NULLABLE", + "name": "psfFluxErr", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of centroid for point source model.", + "mode": "NULLABLE", + "name": "psfRa", + "type": "FLOAT" + }, + { + "description": "Uncertainty of psfRa.", + "mode": "NULLABLE", + "name": "psfRaErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of centroid for point source model.", + "mode": "NULLABLE", + "name": "psfDec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of psfDec.", + "mode": "NULLABLE", + "name": "psfDecErr", + "type": "FLOAT" + }, + { + "description": "Covariance between psfFlux and psfRa.", + "mode": "NULLABLE", + "name": "psfFlux_psfRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance between psfFlux and psfDec.", + "mode": "NULLABLE", + "name": "psfFlux_psfDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance between psfRa and psfDec.", + "mode": "NULLABLE", + "name": "psfRa_psfDec_Cov", + "type": "FLOAT" + }, + { + "description": "Natural log likelihood of the observed data given the point source model.", + "mode": "NULLABLE", + "name": "psfLnL", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the point source model fit.", + "mode": "NULLABLE", + "name": "psfChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points (pixels) used to fit the point source model.", + "mode": "NULLABLE", + "name": "psfNdata", + "type": "INTEGER" + }, + { + "description": "Failure to derive linear least-squares fit of psf model. Another psfFlux flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "psfFlux_flag", + "type": "BOOLEAN" + }, + { + "description": "Object was too close to the edge of the image to use the full PSF model.", + "mode": "NULLABLE", + "name": "psfFlux_flag_edge", + "type": "BOOLEAN" + }, + { + "description": "Not enough non-rejected pixels in data to attempt the fit.", + "mode": "NULLABLE", + "name": "psfFlux_flag_noGoodPixels", + "type": "BOOLEAN" + }, + { + "description": "Flux for a trailed source model. Note this actually measures the flux difference between the template and the visit image.", + "mode": "NULLABLE", + "name": "trailFlux", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailFlux.", + "mode": "NULLABLE", + "name": "trailFluxErr", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of centroid for trailed source model.", + "mode": "NULLABLE", + "name": "trailRa", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailRa.", + "mode": "NULLABLE", + "name": "trailRaErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of centroid for trailed source model.", + "mode": "NULLABLE", + "name": "trailDec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailDec.", + "mode": "NULLABLE", + "name": "trailDecErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood fit of trail length.", + "mode": "NULLABLE", + "name": "trailLength", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailLength.", + "mode": "NULLABLE", + "name": "trailLengthErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood fit of the angle between the meridian through the centroid and the trail direction (bearing)", + "mode": "NULLABLE", + "name": "trailAngle", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailAngle.", + "mode": "NULLABLE", + "name": "trailAngleErr", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailRa.", + "mode": "NULLABLE", + "name": "trailFlux_trailRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailDec.", + "mode": "NULLABLE", + "name": "trailFlux_trailDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailLength", + "mode": "NULLABLE", + "name": "trailFlux_trailLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailAngle", + "mode": "NULLABLE", + "name": "trailFlux_trailAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailRa and trailDec.", + "mode": "NULLABLE", + "name": "trailRa_trailDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailRa and trailLength.", + "mode": "NULLABLE", + "name": "trailRa_trailLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailRa and trailAngle.", + "mode": "NULLABLE", + "name": "trailRa_trailAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailDec and trailLength.", + "mode": "NULLABLE", + "name": "trailDec_trailLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailDec and trailAngle.", + "mode": "NULLABLE", + "name": "trailDec_trailAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailLength and trailAngle", + "mode": "NULLABLE", + "name": "trailLength_trailAngle_Cov", + "type": "INTEGER" + }, + { + "description": "Natural log likelihood of the observed data given the trailed source model.", + "mode": "NULLABLE", + "name": "trailLnL", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the trailed source model fit.", + "mode": "NULLABLE", + "name": "trailChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points (pixels) used to fit the trailed source model.", + "mode": "NULLABLE", + "name": "trailNdata", + "type": "INTEGER" + }, + { + "description": "This flag is set if a trailed source extends onto or past edge pixels.", + "mode": "NULLABLE", + "name": "trail_flag_edge", + "type": "BOOLEAN" + }, + { + "description": "Maximum likelihood value for the mean absolute flux of the two lobes for a dipole model.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleMeanFlux.", + "mode": "NULLABLE", + "name": "dipoleMeanFluxErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood value for the difference of absolute fluxes of the two lobes for a dipole mode", + "mode": "NULLABLE", + "name": "dipoleFluxDiff", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleFluxDiff.", + "mode": "NULLABLE", + "name": "dipoleFluxDiffErr", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of centroid for dipole model.", + "mode": "NULLABLE", + "name": "dipoleRa", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleRa.", + "mode": "NULLABLE", + "name": "dipoleRaErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of centroid for dipole model.", + "mode": "NULLABLE", + "name": "dipoleDec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleDecErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood value for the lobe separation in dipole model.", + "mode": "NULLABLE", + "name": "dipoleLength", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleLengthErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood fit of the angle between the meridian through the centroid and the dipole direction (bearing, from negative to positive lobe).", + "mode": "NULLABLE", + "name": "dipoleAngle", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleAngleErr", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleFluxDiff.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleFluxDiff_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleRa.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleRa.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleRa and dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleRa_dipoleDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleRa and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleRa_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleRa and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleRa_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleDec and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleDec_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleDec and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleDec_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleLength and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleLength_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Natural log likelihood of the observed data given the dipole source model.", + "mode": "NULLABLE", + "name": "dipoleLnL", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the model fit.", + "mode": "NULLABLE", + "name": "dipoleChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points (pixels) used to fit the model.", + "mode": "NULLABLE", + "name": "dipoleNdata", + "type": "INTEGER" + }, + { + "description": "Forced PSF photometry on science image failed. Another forced_PsfFlux flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "forced_PsfFlux_flag", + "type": "BOOLEAN" + }, + { + "description": "Forced PSF flux on science image was too close to the edge of the image to use the full PSF model.", + "mode": "NULLABLE", + "name": "forced_PsfFlux_flag_edge", + "type": "BOOLEAN" + }, + { + "description": "Forced PSF flux not enough non-rejected pixels in data to attempt the fit.", + "mode": "NULLABLE", + "name": "forced_PsfFlux_flag_noGoodPixels", + "type": "BOOLEAN" + }, + { + "description": "Calibrated flux for Point Source model centered on radec but measured on the difference of snaps comprising this visit.", + "mode": "NULLABLE", + "name": "snapDiffFlux", + "type": "FLOAT" + }, + { + "description": "Estimated uncertainty of snapDiffFlux.", + "mode": "NULLABLE", + "name": "snapDiffFluxErr", + "type": "FLOAT" + }, + { + "description": "Estimated sky background at the position (centroid) of the object.", + "mode": "NULLABLE", + "name": "fpBkgd", + "type": "FLOAT" + }, + { + "description": "Estimated uncertainty of fpBkgd.", + "mode": "NULLABLE", + "name": "fpBkgdErr", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment of the source intensity.", + "mode": "NULLABLE", + "name": "ixx", + "type": "FLOAT" + }, + { + "description": "Uncertainty of ixx.", + "mode": "NULLABLE", + "name": "ixxErr", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment of the source intensity.", + "mode": "NULLABLE", + "name": "iyy", + "type": "FLOAT" + }, + { + "description": "Uncertainty of iyy.", + "mode": "NULLABLE", + "name": "iyyErr", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment of the source intensity.", + "mode": "NULLABLE", + "name": "ixy", + "type": "FLOAT" + }, + { + "description": "Uncertainty of ixy.", + "mode": "NULLABLE", + "name": "ixyErr", + "type": "FLOAT" + }, + { + "description": "Covariance of ixx and iyy.", + "mode": "NULLABLE", + "name": "ixx_iyy_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of ixx and ixy.", + "mode": "NULLABLE", + "name": "ixx_ixy_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of iyy and ixy.", + "mode": "NULLABLE", + "name": "iyy_ixy_Cov", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment for the PSF.", + "mode": "NULLABLE", + "name": "ixxPSF", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment for the PSF.", + "mode": "NULLABLE", + "name": "iyyPSF", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment for the PSF.", + "mode": "NULLABLE", + "name": "ixyPSF", + "type": "FLOAT" + }, + { + "description": "General source shape algorithm failure flag; set if anything went wrong when measuring the shape. Another shape flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "shape_flag", + "type": "BOOLEAN" + }, + { + "description": "No pixels to measure shape.", + "mode": "NULLABLE", + "name": "shape_flag_no_pixels", + "type": "BOOLEAN" + }, + { + "description": "Center not contained in footprint bounding box.", + "mode": "NULLABLE", + "name": "shape_flag_not_contained", + "type": "BOOLEAN" + }, + { + "description": "This source is a parent source; we should only be measuring on deblended children in difference imaging.", + "mode": "NULLABLE", + "name": "shape_flag_parent_source", + "type": "BOOLEAN" + }, + { + "description": "A measure of extendedness, computed by comparing an object's moment-based traced radius to the PSF moments. extendedness = 1 implies a high degree of confidence that the source is extended. extendedness = 0 implies a high degree of confidence that the source is point-like.", + "mode": "NULLABLE", + "name": "extendedness", + "type": "FLOAT" + }, + { + "description": "A measure of reliability, computed using information from the source and image characterization, as well as the information on the Telescope and Camera system (e.g., ghost maps, defect maps, etc.).", + "mode": "NULLABLE", + "name": "reliability", + "type": "FLOAT" + }, + { + "description": "Filter band this source was observed with.", + "mode": "NULLABLE", + "name": "band", + "type": "STRING" + }, + { + "description":"Attempted to fit a dipole model to this source.", + "mode": "NULLABLE", + "name": "dipoleFitAttempted", + "type": "BOOLEAN" + }, + { + "description": "General pixel flags failure; set if anything went wrong when setting pixels flags from this footprint's mask. This implies that some pixelFlags for this source may be incorrectly set to False.", + "mode": "NULLABLE", + "name": "pixelFlags", + "type": "BOOLEAN" + }, + { + "description": "Bad pixel in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_bad", + "type": "BOOLEAN" + }, + { + "description": "Cosmic ray in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_cr", + "type": "BOOLEAN" + }, + { + "description": "Cosmic ray in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_crCenter", + "type": "BOOLEAN" + }, + { + "description": "Some of the source footprint is outside usable exposure region (masked EDGE or NO_DATA, or centroid off image).", + "mode": "NULLABLE", + "name": "pixelFlags_edge", + "type": "BOOLEAN" + }, + { + "description": "Interpolated pixel in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_interpolated", + "type": "BOOLEAN" + }, + { + "description": "Interpolated pixel in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_interpolatedCenter", + "type": "BOOLEAN" + }, + { + "description": "DiaSource center is off image.", + "mode": "NULLABLE", + "name": "pixelFlags_offimage", + "type": "BOOLEAN" + }, + { + "description": "Saturated pixel in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_saturated", + "type": "BOOLEAN" + }, + { + "description": "Saturated pixel in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_saturatedCenter", + "type": "BOOLEAN" + }, + { + "description": "DiaSource's footprint includes suspect pixels.", + "mode": "NULLABLE", + "name": "pixelFlags_suspect", + "type": "BOOLEAN" + }, + { + "description": "Suspect pixel in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_suspectCenter", + "type": "BOOLEAN" + }, + { + "description": "Streak in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_streak", + "type": "BOOLEAN" + }, + { + "description": "Streak in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_streakCenter", + "type": "BOOLEAN" + }, + { + "description": "Injection in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_injected", + "type": "BOOLEAN" + }, + { + "description": "Injection in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_injectedCenter", + "type": "BOOLEAN" + }, + { + "description": "Template injection in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_injected_template", + "type": "BOOLEAN" + }, + { + "description": "Template injection in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_injected_templateCenter", + "type": "BOOLEAN" + } + ], + "mode": "REQUIRED", + "name": "diaSource", + "type": "RECORD" + }, + { + "description": "prvDiaSources", + "fields": [ + { + "description": "Unique identifier of this DiaSource.", + "mode": "REQUIRED", + "name": "diaSourceId", + "type": "INTEGER" + }, + { + "description": "Id of the visit where this diaSource was measured.", + "mode": "REQUIRED", + "name": "visit", + "type": "INTEGER" + }, + { + "description": "Id of the detector where this diaSource was measured. Datatype short instead of byte because of DB concerns about unsigned bytes.", + "mode": "REQUIRED", + "name": "detector", + "type": "INTEGER" + }, + { + "description": "Id of the diaObject this source was associated with, if any. If not, it is set to NULL (each diaSource will be associated with either a diaObject or ssObject).", + "mode": "NULLABLE", + "name": "diaObjectId", + "type": "INTEGER" + }, + { + "description": "Id of the ssObject this source was associated with, if any. If not, it is set to NULL (each diaSource will be associated with either a diaObject or ssObject).", + "mode": "NULLABLE", + "name": "ssObjectId", + "type": "INTEGER" + }, + { + "description": "Id of the parent diaSource this diaSource has been deblended from, if any.", + "mode": "NULLABLE", + "name": "parentDiaSourceId", + "type": "INTEGER" + }, + { + "description": "Effective mid-visit time for this diaSource, expressed as Modified Julian Date, International Atomic Time.", + "mode": "REQUIRED", + "name": "midpointMjdTai", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of the center of this diaSource.", + "mode": "REQUIRED", + "name": "ra", + "type": "FLOAT" + }, + { + "description": "Uncertainty of ra.", + "mode": "NULLABLE", + "name": "raErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of the center of this diaSource.", + "mode": "REQUIRED", + "name": "dec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dec.", + "mode": "NULLABLE", + "name": "decErr", + "type": "FLOAT" + }, + { + "description": "Covariance between ra and dec.", + "mode": "NULLABLE", + "name": "ra_dec_Cov", + "type": "FLOAT" + }, + { + "description": "x position computed by a centroiding algorithm.", + "mode": "REQUIRED", + "name": "x", + "type": "FLOAT" + }, + { + "description": "Uncertainty of x.", + "mode": "NULLABLE", + "name": "xErr", + "type": "FLOAT" + }, + { + "description": "y position computed by a centroiding algorithm.", + "mode": "REQUIRED", + "name": "y", + "type": "FLOAT" + }, + { + "description": "Uncertainty of y.", + "mode": "NULLABLE", + "name": "yErr", + "type": "FLOAT" + }, + { + "description": "Covariance between x and y.", + "mode": "NULLABLE", + "name": "x_y_Cov", + "type": "FLOAT" + }, + { + "description": "General centroid algorithm failure flag; set if anything went wrong when fitting the centroid. Another centroid flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "centroid_flag", + "type": "BOOLEAN" + }, + { + "description": "Flux in a 12 pixel radius aperture on the difference image.", + "mode": "NULLABLE", + "name": "apFlux", + "type": "FLOAT" + }, + { + "description": "Estimated uncertainty of apFlux.", + "mode": "NULLABLE", + "name": "apFluxErr", + "type": "FLOAT" + }, + { + "description": "General aperture flux algorithm failure flag; set if anything went wrong when measuring aperture fluxes. Another apFlux flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "apFlux_flag", + "type": "BOOLEAN" + }, + { + "description": "Aperture did not fit within measurement image.", + "mode": "NULLABLE", + "name": "apFlux_flag_apertureTruncated", + "type": "BOOLEAN" + }, + { + "description": "The signal-to-noise ratio at which this source was detected in the difference image.", + "mode": "NULLABLE", + "name": "snr", + "type": "FLOAT" + }, + { + "description": "Flux for Point Source model. Note this actually measures the flux difference between the template and the visit image.", + "mode": "NULLABLE", + "name": "psfFlux", + "type": "FLOAT" + }, + { + "description": "Uncertainty of psfFlux.", + "mode": "NULLABLE", + "name": "psfFluxErr", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of centroid for point source model.", + "mode": "NULLABLE", + "name": "psfRa", + "type": "FLOAT" + }, + { + "description": "Uncertainty of psfRa.", + "mode": "NULLABLE", + "name": "psfRaErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of centroid for point source model.", + "mode": "NULLABLE", + "name": "psfDec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of psfDec.", + "mode": "NULLABLE", + "name": "psfDecErr", + "type": "FLOAT" + }, + { + "description": "Covariance between psfFlux and psfRa.", + "mode": "NULLABLE", + "name": "psfFlux_psfRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance between psfFlux and psfDec.", + "mode": "NULLABLE", + "name": "psfFlux_psfDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance between psfRa and psfDec.", + "mode": "NULLABLE", + "name": "psfRa_psfDec_Cov", + "type": "FLOAT" + }, + { + "description": "Natural log likelihood of the observed data given the point source model.", + "mode": "NULLABLE", + "name": "psfLnL", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the point source model fit.", + "mode": "NULLABLE", + "name": "psfChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points (pixels) used to fit the point source model.", + "mode": "NULLABLE", + "name": "psfNdata", + "type": "INTEGER" + }, + { + "description": "Failure to derive linear least-squares fit of psf model. Another psfFlux flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "psfFlux_flag", + "type": "BOOLEAN" + }, + { + "description": "Object was too close to the edge of the image to use the full PSF model.", + "mode": "NULLABLE", + "name": "psfFlux_flag_edge", + "type": "BOOLEAN" + }, + { + "description": "Not enough non-rejected pixels in data to attempt the fit.", + "mode": "NULLABLE", + "name": "psfFlux_flag_noGoodPixels", + "type": "BOOLEAN" + }, + { + "description": "Flux for a trailed source model. Note this actually measures the flux difference between the template and the visit image.", + "mode": "NULLABLE", + "name": "trailFlux", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailFlux.", + "mode": "NULLABLE", + "name": "trailFluxErr", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of centroid for trailed source model.", + "mode": "NULLABLE", + "name": "trailRa", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailRa.", + "mode": "NULLABLE", + "name": "trailRaErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of centroid for trailed source model.", + "mode": "NULLABLE", + "name": "trailDec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailDec.", + "mode": "NULLABLE", + "name": "trailDecErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood fit of trail length.", + "mode": "NULLABLE", + "name": "trailLength", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailLength.", + "mode": "NULLABLE", + "name": "trailLengthErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood fit of the angle between the meridian through the centroid and the trail direction (bearing)", + "mode": "NULLABLE", + "name": "trailAngle", + "type": "FLOAT" + }, + { + "description": "Uncertainty of trailAngle.", + "mode": "NULLABLE", + "name": "trailAngleErr", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailRa.", + "mode": "NULLABLE", + "name": "trailFlux_trailRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailDec.", + "mode": "NULLABLE", + "name": "trailFlux_trailDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailLength", + "mode": "NULLABLE", + "name": "trailFlux_trailLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailFlux and trailAngle", + "mode": "NULLABLE", + "name": "trailFlux_trailAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailRa and trailDec.", + "mode": "NULLABLE", + "name": "trailRa_trailDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailRa and trailLength.", + "mode": "NULLABLE", + "name": "trailRa_trailLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailRa and trailAngle.", + "mode": "NULLABLE", + "name": "trailRa_trailAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailDec and trailLength.", + "mode": "NULLABLE", + "name": "trailDec_trailLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailDec and trailAngle.", + "mode": "NULLABLE", + "name": "trailDec_trailAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of trailLength and trailAngle", + "mode": "NULLABLE", + "name": "trailLength_trailAngle_Cov", + "type": "INTEGER" + }, + { + "description": "Natural log likelihood of the observed data given the trailed source model.", + "mode": "NULLABLE", + "name": "trailLnL", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the trailed source model fit.", + "mode": "NULLABLE", + "name": "trailChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points (pixels) used to fit the trailed source model.", + "mode": "NULLABLE", + "name": "trailNdata", + "type": "INTEGER" + }, + { + "description": "This flag is set if a trailed source extends onto or past edge pixels.", + "mode": "NULLABLE", + "name": "trail_flag_edge", + "type": "BOOLEAN" + }, + { + "description": "Maximum likelihood value for the mean absolute flux of the two lobes for a dipole model.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleMeanFlux.", + "mode": "NULLABLE", + "name": "dipoleMeanFluxErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood value for the difference of absolute fluxes of the two lobes for a dipole mode", + "mode": "NULLABLE", + "name": "dipoleFluxDiff", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleFluxDiff.", + "mode": "NULLABLE", + "name": "dipoleFluxDiffErr", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of centroid for dipole model.", + "mode": "NULLABLE", + "name": "dipoleRa", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleRa.", + "mode": "NULLABLE", + "name": "dipoleRaErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of centroid for dipole model.", + "mode": "NULLABLE", + "name": "dipoleDec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleDecErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood value for the lobe separation in dipole model.", + "mode": "NULLABLE", + "name": "dipoleLength", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleLengthErr", + "type": "FLOAT" + }, + { + "description": "Maximum likelihood fit of the angle between the meridian through the centroid and the dipole direction (bearing, from negative to positive lobe).", + "mode": "NULLABLE", + "name": "dipoleAngle", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleAngleErr", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleFluxDiff.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleFluxDiff_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleRa.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleMeanFlux and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleMeanFlux_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleRa.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleRa_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleFluxDiff and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleFluxDiff_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleRa and dipoleDec.", + "mode": "NULLABLE", + "name": "dipoleRa_dipoleDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleRa and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleRa_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleRa and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleRa_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleDec and dipoleLength.", + "mode": "NULLABLE", + "name": "dipoleDec_dipoleLength_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleDec and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleDec_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of dipoleLength and dipoleAngle.", + "mode": "NULLABLE", + "name": "dipoleLength_dipoleAngle_Cov", + "type": "FLOAT" + }, + { + "description": "Natural log likelihood of the observed data given the dipole source model.", + "mode": "NULLABLE", + "name": "dipoleLnL", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the model fit.", + "mode": "NULLABLE", + "name": "dipoleChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points (pixels) used to fit the model.", + "mode": "NULLABLE", + "name": "dipoleNdata", + "type": "INTEGER" + }, + { + "description": "Forced PSF photometry on science image failed. Another forced_PsfFlux flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "forced_PsfFlux_flag", + "type": "BOOLEAN" + }, + { + "description": "Forced PSF flux on science image was too close to the edge of the image to use the full PSF model.", + "mode": "NULLABLE", + "name": "forced_PsfFlux_flag_edge", + "type": "BOOLEAN" + }, + { + "description": "Forced PSF flux not enough non-rejected pixels in data to attempt the fit.", + "mode": "NULLABLE", + "name": "forced_PsfFlux_flag_noGoodPixels", + "type": "BOOLEAN" + }, + { + "description": "Calibrated flux for Point Source model centered on radec but measured on the difference of snaps comprising this visit.", + "mode": "NULLABLE", + "name": "snapDiffFlux", + "type": "FLOAT" + }, + { + "description": "Estimated uncertainty of snapDiffFlux.", + "mode": "NULLABLE", + "name": "snapDiffFluxErr", + "type": "FLOAT" + }, + { + "description": "Estimated sky background at the position (centroid) of the object.", + "mode": "NULLABLE", + "name": "fpBkgd", + "type": "FLOAT" + }, + { + "description": "Estimated uncertainty of fpBkgd.", + "mode": "NULLABLE", + "name": "fpBkgdErr", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment of the source intensity.", + "mode": "NULLABLE", + "name": "ixx", + "type": "FLOAT" + }, + { + "description": "Uncertainty of ixx.", + "mode": "NULLABLE", + "name": "ixxErr", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment of the source intensity.", + "mode": "NULLABLE", + "name": "iyy", + "type": "FLOAT" + }, + { + "description": "Uncertainty of iyy.", + "mode": "NULLABLE", + "name": "iyyErr", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment of the source intensity.", + "mode": "NULLABLE", + "name": "ixy", + "type": "FLOAT" + }, + { + "description": "Uncertainty of ixy.", + "mode": "NULLABLE", + "name": "ixyErr", + "type": "FLOAT" + }, + { + "description": "Covariance of ixx and iyy.", + "mode": "NULLABLE", + "name": "ixx_iyy_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of ixx and ixy.", + "mode": "NULLABLE", + "name": "ixx_ixy_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of iyy and ixy.", + "mode": "NULLABLE", + "name": "iyy_ixy_Cov", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment for the PSF.", + "mode": "NULLABLE", + "name": "ixxPSF", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment for the PSF.", + "mode": "NULLABLE", + "name": "iyyPSF", + "type": "FLOAT" + }, + { + "description": "Adaptive second moment for the PSF.", + "mode": "NULLABLE", + "name": "ixyPSF", + "type": "FLOAT" + }, + { + "description": "General source shape algorithm failure flag; set if anything went wrong when measuring the shape. Another shape flag field should also be set to provide more information.", + "mode": "NULLABLE", + "name": "shape_flag", + "type": "BOOLEAN" + }, + { + "description": "No pixels to measure shape.", + "mode": "NULLABLE", + "name": "shape_flag_no_pixels", + "type": "BOOLEAN" + }, + { + "description": "Center not contained in footprint bounding box.", + "mode": "NULLABLE", + "name": "shape_flag_not_contained", + "type": "BOOLEAN" + }, + { + "description": "This source is a parent source; we should only be measuring on deblended children in difference imaging.", + "mode": "NULLABLE", + "name": "shape_flag_parent_source", + "type": "BOOLEAN" + }, + { + "description": "A measure of extendedness, computed by comparing an object's moment-based traced radius to the PSF moments. extendedness = 1 implies a high degree of confidence that the source is extended. extendedness = 0 implies a high degree of confidence that the source is point-like.", + "mode": "NULLABLE", + "name": "extendedness", + "type": "FLOAT" + }, + { + "description": "A measure of reliability, computed using information from the source and image characterization, as well as the information on the Telescope and Camera system (e.g., ghost maps, defect maps, etc.).", + "mode": "NULLABLE", + "name": "reliability", + "type": "FLOAT" + }, + { + "description": "Filter band this source was observed with.", + "mode": "NULLABLE", + "name": "band", + "type": "STRING" + }, + { + "description": "General pixel flags failure; set if anything went wrong when setting pixels flags from this footprint's mask. This implies that some pixelFlags for this source may be incorrectly set to False.", + "mode": "NULLABLE", + "name": "pixelFlags", + "type": "BOOLEAN" + }, + { + "description": "Bad pixel in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_bad", + "type": "BOOLEAN" + }, + { + "description": "Cosmic ray in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_cr", + "type": "BOOLEAN" + }, + { + "description": "Cosmic ray in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_crCenter", + "type": "BOOLEAN" + }, + { + "description": "Some of the source footprint is outside usable exposure region (masked EDGE or NO_DATA, or centroid off image).", + "mode": "NULLABLE", + "name": "pixelFlags_edge", + "type": "BOOLEAN" + }, + { + "description": "Interpolated pixel in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_interpolated", + "type": "BOOLEAN" + }, + { + "description": "Interpolated pixel in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_interpolatedCenter", + "type": "BOOLEAN" + }, + { + "description": "DiaSource center is off image.", + "mode": "NULLABLE", + "name": "pixelFlags_offimage", + "type": "BOOLEAN" + }, + { + "description": "Saturated pixel in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_saturated", + "type": "BOOLEAN" + }, + { + "description": "Saturated pixel in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_saturatedCenter", + "type": "BOOLEAN" + }, + { + "description": "DiaSource's footprint includes suspect pixels.", + "mode": "NULLABLE", + "name": "pixelFlags_suspect", + "type": "BOOLEAN" + }, + { + "description": "Suspect pixel in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_suspectCenter", + "type": "BOOLEAN" + }, + { + "description": "Streak in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_streak", + "type": "BOOLEAN" + }, + { + "description": "Streak in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_streakCenter", + "type": "BOOLEAN" + }, + { + "description": "Injection in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_injected", + "type": "BOOLEAN" + }, + { + "description": "Injection in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_injectedCenter", + "type": "BOOLEAN" + }, + { + "description": "Template injection in the DiaSource footprint.", + "mode": "NULLABLE", + "name": "pixelFlags_injected_template", + "type": "BOOLEAN" + }, + { + "description": "Template injection in the 3x3 region around the centroid.", + "mode": "NULLABLE", + "name": "pixelFlags_injected_templateCenter", + "type": "BOOLEAN" + } + ], + "mode": "REPEATED", + "name": "prvDiaSources", + "type": "RECORD" + }, + { + "description": "prvDiaForcedSources", + "fields": [ + { + "description": "Unique id.", + "mode": "REQUIRED", + "name": "diaForcedSourceId", + "type": "FLOAT" + }, + { + "description": "Id of the DiaObject that this DiaForcedSource was associated with.", + "mode": "REQUIRED", + "name": "diaObjectId", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of the position of the DiaObject at time radecMjdTai.", + "mode": "REQUIRED", + "name": "ra", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of the position of the DiaObject at time radecMjdTai.", + "mode": "REQUIRED", + "name": "dec", + "type": "FLOAT" + }, + { + "description": "Id of the visit where this forcedSource was measured.", + "mode": "REQUIRED", + "name": "visit", + "type": "INTEGER" + }, + { + "description": "Id of the detector where this forcedSource was measured. Datatype short instead of byte because of DB concerns about unsigned bytes.", + "mode": "REQUIRED", + "name": "detector", + "type": "INTEGER" + }, + { + "description": "Point Source model flux.", + "mode": "NULLABLE", + "name": "psfFlux", + "type": "FLOAT" + }, + { + "description": "Uncertainty of psfFlux.", + "mode": "NULLABLE", + "name": "psfFluxErr", + "type": "FLOAT" + }, + { + "description": "Effective mid-visit time for this diaForcedSource, expressed as Modified Julian Date, International Atomic Time.", + "mode": "REQUIRED", + "name": "midpointMjdTai", + "type": "FLOAT" + }, + { + "description": "Filter band this source was observed with.", + "mode": "NULLABLE", + "name": "band", + "type": "STRING" + } + ], + "mode": "REPEATED", + "name": "prvDiaForcedSources", + "type": "RECORD" + }, + { + "description": "prvDiaNondetectionLimits", + "fields": [ + { + "description": "", + "mode": "REQUIRED", + "name": "ccdVisitId", + "type": "FLOAT" + }, + { + "description": "", + "mode": "REQUIRED", + "name": "midpointMjdTai", + "type": "FLOAT" + }, + { + "description": "", + "mode": "REQUIRED", + "name": "band", + "type": "STRING" + }, + { + "description": "", + "mode": "REQUIRED", + "name": "diaNoise", + "type": "FLOAT" + } + ], + "mode": "REPEATED", + "name": "prvDiaNondetectionLimits", + "type": "RECORD" + }, + { + "description": "diaObject", + "fields": [ + { + "description": "Unique identifier of this DiaObject.", + "mode": "REQUIRED", + "name": "diaObjectId", + "type": "FLOAT" + }, + { + "description": "Right ascension coordinate of the position of the object at time radecMjdTai.", + "mode": "REQUIRED", + "name": "ra", + "type": "FLOAT" + }, + { + "description": "raErr", + "mode": "NULLABLE", + "name": "raErr", + "type": "FLOAT" + }, + { + "description": "Declination coordinate of the position of the object at time radecMjdTai.", + "mode": "REQUIRED", + "name": "dec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of dec.", + "mode": "NULLABLE", + "name": "decErr", + "type": "FLOAT" + }, + { + "description": "Covariance between ra and dec.", + "mode": "NULLABLE", + "name": "ra_dec_Cov", + "type": "FLOAT" + }, + { + "description": "Time at which the object was at a position ra/dec, expressed as Modified Julian Date, International Atomic Time.", + "mode": "NULLABLE", + "name": "radecMjdTai", + "type": "FLOAT" + }, + { + "description": "Proper motion in right ascension.", + "mode": "NULLABLE", + "name": "pmRa", + "type": "FLOAT" + }, + { + "description": "Uncertainty of pmRa.", + "mode": "NULLABLE", + "name": "pmRaErr", + "type": "FLOAT" + }, + { + "description": "Proper motion of declination.", + "mode": "NULLABLE", + "name": "pmDec", + "type": "FLOAT" + }, + { + "description": "Uncertainty of pmDec.", + "mode": "NULLABLE", + "name": "pmDecErr", + "type": "FLOAT" + }, + { + "description": "Parallax", + "mode": "NULLABLE", + "name": "Parallax", + "type": "FLOAT" + }, + { + "description": "Uncertainty of parallax.", + "mode": "NULLABLE", + "name": "parallaxErr", + "type": "FLOAT" + }, + { + "description": "Covariance of pmRa and pmDec.", + "mode": "NULLABLE", + "name": "pmRa_pmDec_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of pmRa and parallax.", + "mode": "NULLABLE", + "name": "pmRa_parallax_Cov", + "type": "FLOAT" + }, + { + "description": "Covariance of pmDec and parallax.", + "mode": "NULLABLE", + "name": "pmDec_parallax_Cov", + "type": "FLOAT" + }, + { + "description": "Natural log of the likelihood of the linear proper motion parallax fit.", + "mode": "NULLABLE", + "name": "pmParallaxLnL", + "type": "FLOAT" + }, + { + "description": "Chi^2 static of the model fit.", + "mode": "NULLABLE", + "name": "pmParallaxChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to fit the model.", + "mode": "NULLABLE", + "name": "pmParallaxNdata", + "type": "INTEGER" + }, + { + "description": "Weighted mean point-source model magnitude for u filter.", + "mode": "NULLABLE", + "name": "u_psfFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of u_psfFluxMean.", + "mode": "NULLABLE", + "name": "u_psfFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of u_psfFlux.", + "mode": "NULLABLE", + "name": "u_psfFluxSigma", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic for the scatter of u_psfFlux around u_psfFluxMean.", + "mode": "NULLABLE", + "name": "u_psfFluxChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to compute u_psfFluxChi2.", + "mode": "NULLABLE", + "name": "u_psfFluxNdata", + "type": "INTEGER" + }, + { + "description": "Weighted mean forced photometry flux for u filter.", + "mode": "NULLABLE", + "name": "u_fpFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of u_fpFluxMean.", + "mode": "NULLABLE", + "name": "u_fpFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of u_fpFlux.", + "mode": "NULLABLE", + "name": "u_fpFluxSigma", + "type": "FLOAT" + }, + { + "description": "Weighted mean point-source model magnitude for g filter.", + "mode": "NULLABLE", + "name": "g_psfFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of g_psfFluxMean.", + "mode": "NULLABLE", + "name": "g_psfFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of g_psfFlux.", + "mode": "NULLABLE", + "name": "g_psfFluxSigma", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic for the scatter of g_psfFlux around g_psfFluxMean.", + "mode": "NULLABLE", + "name": "g_psfFluxChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to compute g_psfFluxChi2.", + "mode": "NULLABLE", + "name": "g_psfFluxNdata", + "type": "INTEGER" + }, + { + "description": "Weighted mean forced photometry flux for g filter.", + "mode": "NULLABLE", + "name": "g_fpFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of g_fpFluxMean.", + "mode": "NULLABLE", + "name": "g_fpFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of g_fpFlux.", + "mode": "NULLABLE", + "name": "g_fpFluxSigma", + "type": "FLOAT" + }, + { + "description": "Weighted mean point-source model magnitude for r filter.", + "mode": "NULLABLE", + "name": "r_psfFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of r_psfFluxMean.", + "mode": "NULLABLE", + "name": "r_psfFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of r_psfFlux.", + "mode": "NULLABLE", + "name": "r_psfFluxSigma", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic for the scatter of r_psfFlux around r_psfFluxMean.", + "mode": "NULLABLE", + "name": "r_psfFluxChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to compute r_psfFluxChi2.", + "mode": "NULLABLE", + "name": "r_psfFluxNdata", + "type": "INTEGER" + }, + { + "description": "Weighted mean forced photometry flux for r filter.", + "mode": "NULLABLE", + "name": "r_fpFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of r_fpFluxMean.", + "mode": "NULLABLE", + "name": "r_fpFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of r_fpFlux.", + "mode": "NULLABLE", + "name": "r_fpFluxSigma", + "type": "FLOAT" + }, + { + "description": "Weighted mean point-source model magnitude for i filter.", + "mode": "NULLABLE", + "name": "i_psfFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of i_psfFluxMean.", + "mode": "NULLABLE", + "name": "i_psfFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of i_psfFlux.", + "mode": "NULLABLE", + "name": "i_psfFluxSigma", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic for the scatter of i_psfFlux around i_psfFluxMean.", + "mode": "NULLABLE", + "name": "i_psfFluxChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to compute i_psfFluxChi2.", + "mode": "NULLABLE", + "name": "i_psfFluxNdata", + "type": "INTEGER" + }, + { + "description": "Weighted mean forced photometry flux for i filter.", + "mode": "NULLABLE", + "name": "i_fpFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of i_fpFluxMean.", + "mode": "NULLABLE", + "name": "i_fpFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of i_fpFlux.", + "mode": "NULLABLE", + "name": "i_fpFluxSigma", + "type": "FLOAT" + }, + { + "description": "Weighted mean point-source model magnitude for z filter.", + "mode": "NULLABLE", + "name": "z_psfFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of z_psfFluxMean.", + "mode": "NULLABLE", + "name": "z_psfFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of z_psfFlux.", + "mode": "NULLABLE", + "name": "z_psfFluxSigma", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic for the scatter of z_psfFlux around z_psfFluxMean.", + "mode": "NULLABLE", + "name": "z_psfFluxChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to compute z_psfFluxChi2.", + "mode": "NULLABLE", + "name": "z_psfFluxNdata", + "type": "INTEGER" + }, + { + "description": "Weighted mean forced photometry flux for z filter.", + "mode": "NULLABLE", + "name": "z_fpFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of z_fpFluxMean.", + "mode": "NULLABLE", + "name": "z_fpFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of z_fpFlux.", + "mode": "NULLABLE", + "name": "z_fpFluxSigma", + "type": "FLOAT" + }, + { + "description": "Weighted mean point-source model magnitude for y filter.", + "mode": "NULLABLE", + "name": "y_psfFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of y_psfFluxMean.", + "mode": "NULLABLE", + "name": "y_psfFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of y_psfFlux.", + "mode": "NULLABLE", + "name": "y_psfFluxSigma", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic for the scatter of y_psfFlux around y_psfFluxMean.", + "mode": "NULLABLE", + "name": "y_psfFluxChi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to compute y_psfFluxChi2.", + "mode": "NULLABLE", + "name": "y_psfFluxNdata", + "type": "INTEGER" + }, + { + "description": "Weighted mean forced photometry flux for y filter.", + "mode": "NULLABLE", + "name": "y_fpFluxMean", + "type": "FLOAT" + }, + { + "description": "Standard error of y_fpFluxMean.", + "mode": "NULLABLE", + "name": "y_fpFluxMeanErr", + "type": "FLOAT" + }, + { + "description": "Standard deviation of the distribution of y_fpFlux.", + "mode": "NULLABLE", + "name": "y_fpFluxSigma", + "type": "FLOAT" + }, + { + "description": "Id of the closest nearby object.", + "mode": "NULLABLE", + "name": "nearbyObj1", + "type": "FLOAT" + }, + { + "description": "Distance to nearbyObj1.", + "mode": "NULLABLE", + "name": "nearbyObj1Dist", + "type": "FLOAT" + }, + { + "description": "Natural log of the probability that the observed diaObject is the same as the nearbyObj1.", + "mode": "NULLABLE", + "name": "nearbyObj1LnP", + "type": "FLOAT" + }, + { + "description": "Id of the second-closest nearby object.", + "mode": "NULLABLE", + "name": "nearbyObj2", + "type": "FLOAT" + }, + { + "description": "Distance to nearbyObj2.", + "mode": "NULLABLE", + "name": "nearbyObj2Dist", + "type": "FLOAT" + }, + { + "description": "Natural log of the probability that the observed diaObject is the same as the nearbyObj2.", + "mode": "NULLABLE", + "name": "nearbyObj2LnP", + "type": "FLOAT" + }, + { + "description": "Id of the third-closest nearby object.", + "mode": "NULLABLE", + "name": "nearbyObj3", + "type": "FLOAT" + }, + { + "description": "Distance to nearbyObj3.", + "mode": "NULLABLE", + "name": "nearbyObj3Dist", + "type": "FLOAT" + }, + { + "description": "Natural log of the probability that the observed diaObject is the same as the nearbyObj3.", + "mode": "NULLABLE", + "name": "nearbyObj3LnP", + "type": "FLOAT" + }, + { + "description": "Mean of the u band flux errors.", + "mode": "NULLABLE", + "name": "u_psfFluxErrMean", + "type": "FLOAT" + }, + { + "description": "Mean of the g band flux errors.", + "mode": "NULLABLE", + "name": "g_psfFluxErrMean", + "type": "FLOAT" + }, + { + "description": "Mean of the r band flux errors.", + "mode": "NULLABLE", + "name": "r_psfFluxErrMean", + "type": "FLOAT" + }, + { + "description": "Mean of the i band flux errors.", + "mode": "NULLABLE", + "name": "i_psfFluxErrMean", + "type": "FLOAT" + }, + { + "description": "Mean of the z band flux errors.", + "mode": "NULLABLE", + "name": "z_psfFluxErrMean", + "type": "FLOAT" + }, + { + "description": "Mean of the y band flux errors.", + "mode": "NULLABLE", + "name": "y_psfFluxErrMean", + "type": "FLOAT" + } + ], + "mode": "NULLABLE", + "name": "diaObject", + "type": "RECORD" + }, + { + "description": "ssObject", + "fields": [ + { + "description": "Unique identifier.", + "mode": "REQUIRED", + "name": "ssObjectId", + "type": "INTEGER" + }, + { + "description": "The date the LSST first linked and submitted the discovery observations to the MPC. May be NULL if not an LSST discovery. The date format will follow general LSST conventions (MJD TAI, at the moment).", + "mode": "NULLABLE", + "name": "discoverySubmissionDate", + "type": "FLOAT" + }, + { + "description": "The time of the first LSST observation of this object (could be precovered) as Modified Julian Date, International Atomic Time.", + "mode": "NULLABLE", + "name": "firstObservationDate", + "type": "FLOAT" + }, + { + "description": "Arc of LSST observations.", + "mode": "NULLABLE", + "name": "arc", + "type": "FLOAT" + }, + { + "description": "Number of LSST observations of this object.", + "mode": "NULLABLE", + "name": "numObs", + "type": "INTEGER" + }, + { + "description": "Minimum orbit intersection distance to Earth.", + "mode": "NULLABLE", + "name": "MOID", + "type": "FLOAT" + }, + { + "description": "True anomaly of the MOID point.", + "mode": "NULLABLE", + "name": "MOIDTrueAnomaly", + "type": "FLOAT" + }, + { + "description": "Ecliptic longitude of the MOID point.", + "mode": "NULLABLE", + "name": "MOIDEclipticLongitude", + "type": "FLOAT" + }, + { + "description": "DeltaV at the MOID point.", + "mode": "NULLABLE", + "name": "MOIDDeltaV", + "type": "FLOAT" + }, + { + "description": "Best fit absolute magnitude (u band).", + "mode": "NULLABLE", + "name": "u_H", + "type": "FLOAT" + }, + { + "description": "Best fit G12 slope parameter (u band).", + "mode": "NULLABLE", + "name": "u_G12", + "type": "FLOAT" + }, + { + "description": "Uncertainty of H (u band).", + "mode": "NULLABLE", + "name": "u_HErr", + "type": "FLOAT" + }, + { + "description": "Uncertainty of G12 (u band).", + "mode": "NULLABLE", + "name": "u_G12Err", + "type": "FLOAT" + }, + { + "description": "H-G12 covariance (u band).", + "mode": "NULLABLE", + "name": "u_H_u_G12_Cov", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the phase curve fit (u band).", + "mode": "NULLABLE", + "name": "u_Chi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to fit the phase curve (u band).", + "mode": "NULLABLE", + "name": "u_Ndata", + "type": "INTEGER" + }, + { + "description": "Best fit absolute magnitude (g band).", + "mode": "NULLABLE", + "name": "g_H", + "type": "FLOAT" + }, + { + "description": "Best fit G12 slope parameter (g band).", + "mode": "NULLABLE", + "name": "g_G12", + "type": "FLOAT" + }, + { + "description": "Uncertainty of H (g band).", + "mode": "NULLABLE", + "name": "g_HErr", + "type": "FLOAT" + }, + { + "description": "Uncertainty of G12 (g band).", + "mode": "NULLABLE", + "name": "g_G12Err", + "type": "FLOAT" + }, + { + "description": "H-G12 covariance (g band).", + "mode": "NULLABLE", + "name": "g_H_g_G12_Cov", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the phase curve fit (g band).", + "mode": "NULLABLE", + "name": "g_Chi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to fit the phase curve (g band).", + "mode": "NULLABLE", + "name": "g_Ndata", + "type": "INTEGER" + }, + { + "description": "Best fit absolute magnitude (r band).", + "mode": "NULLABLE", + "name": "r_H", + "type": "FLOAT" + }, + { + "description": "Best fit G12 slope parameter (r band).", + "mode": "NULLABLE", + "name": "r_G12", + "type": "FLOAT" + }, + { + "description": "Uncertainty of H (r band).", + "mode": "NULLABLE", + "name": "r_HErr", + "type": "FLOAT" + }, + { + "description": "Uncertainty of G12 (r band).", + "mode": "NULLABLE", + "name": "r_G12Err", + "type": "FLOAT" + }, + { + "description": "H-G12 covariance (r band).", + "mode": "NULLABLE", + "name": "r_H_r_G12_Cov", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the phase curve fit (r band).", + "mode": "NULLABLE", + "name": "r_Chi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to fit the phase curve (r band).", + "mode": "NULLABLE", + "name": "r_Ndata", + "type": "INTEGER" + }, + { + "description": "Best fit absolute magnitude (i band).", + "mode": "NULLABLE", + "name": "i_H", + "type": "FLOAT" + }, + { + "description": "Best fit G12 slope parameter (i band).", + "mode": "NULLABLE", + "name": "i_G12", + "type": "FLOAT" + }, + { + "description": "Uncertainty of H (i band).", + "mode": "NULLABLE", + "name": "i_HErr", + "type": "FLOAT" + }, + { + "description": "Uncertainty of G12 (i band).", + "mode": "NULLABLE", + "name": "i_G12Err", + "type": "FLOAT" + }, + { + "description": "H-G12 covariance (i band).", + "mode": "NULLABLE", + "name": "i_H_i_G12_Cov", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the phase curve fit (i band).", + "mode": "NULLABLE", + "name": "i_Chi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to fit the phase curve (i band).", + "mode": "NULLABLE", + "name": "i_Ndata", + "type": "INTEGER" + }, + { + "description": "Best fit absolute magnitude (z band).", + "mode": "NULLABLE", + "name": "z_H", + "type": "FLOAT" + }, + { + "description": "Best fit G12 slope parameter (z band).", + "mode": "NULLABLE", + "name": "z_G12", + "type": "FLOAT" + }, + { + "description": "Uncertainty of H (z band).", + "mode": "NULLABLE", + "name": "z_HErr", + "type": "FLOAT" + }, + { + "description": "Uncertainty of G12 (z band).", + "mode": "NULLABLE", + "name": "z_G12Err", + "type": "FLOAT" + }, + { + "description": "H-G12 covariance (z band).", + "mode": "NULLABLE", + "name": "z_H_z_G12_Cov", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the phase curve fit (z band).", + "mode": "NULLABLE", + "name": "z_Chi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to fit the phase curve (z band).", + "mode": "NULLABLE", + "name": "z_Ndata", + "type": "INTEGER" + }, + { + "description": "Best fit absolute magnitude (y band).", + "mode": "NULLABLE", + "name": "y_H", + "type": "FLOAT" + }, + { + "description": "Best fit G12 slope parameter (y band).", + "mode": "NULLABLE", + "name": "y_G12", + "type": "FLOAT" + }, + { + "description": "Uncertainty of H (y band).", + "mode": "NULLABLE", + "name": "y_HErr", + "type": "FLOAT" + }, + { + "description": "Uncertainty of G12 (y band).", + "mode": "NULLABLE", + "name": "y_G12Err", + "type": "FLOAT" + }, + { + "description": "H-G12 covariance (y band).", + "mode": "NULLABLE", + "name": "y_H_y_G12_Cov", + "type": "FLOAT" + }, + { + "description": "Chi^2 statistic of the phase curve fit (y band).", + "mode": "NULLABLE", + "name": "y_Chi2", + "type": "FLOAT" + }, + { + "description": "The number of data points used to fit the phase curve (y band).", + "mode": "NULLABLE", + "name": "y_Ndata", + "type": "INTEGER" + }, + { + "description": "median `extendedness` value from the DIASource.", + "mode": "NULLABLE", + "name": "medianExtendedness", + "type": "FLOAT" + } + ], + "mode": "NULLABLE", + "name": "ssObject", + "type": "RECORD" + } +] diff --git a/broker/setup_broker/rubin/upload_broker_bucket.sh b/broker/setup_broker/lsst/upload_broker_bucket.sh similarity index 74% rename from broker/setup_broker/rubin/upload_broker_bucket.sh rename to broker/setup_broker/lsst/upload_broker_bucket.sh index ae85979e..3c15cd1b 100755 --- a/broker/setup_broker/rubin/upload_broker_bucket.sh +++ b/broker/setup_broker/lsst/upload_broker_bucket.sh @@ -5,4 +5,4 @@ broker_bucket=$1 # name of GCS bucket where broker files should be staged echo echo "Uploading broker files to GCS..." o="GSUtil:parallel_process_count=1" # disable multiprocessing for Macs -gsutil -m -o "${o}" cp -r ../../consumer "gs://${broker_bucket}" +gsutil -m -o "${o}" cp -r ../../consumer/lsst "gs://${broker_bucket}" diff --git a/broker/setup_broker/rubin/setup_broker.sh b/broker/setup_broker/rubin/setup_broker.sh deleted file mode 100755 index cbeb7b40..00000000 --- a/broker/setup_broker/rubin/setup_broker.sh +++ /dev/null @@ -1,91 +0,0 @@ -#! /bin/bash -# Create and configure GCP resources needed to run the nightly broker. - -testid="${1:-test}" -# "False" uses production resources -# any other string will be appended to the names of all resources -teardown="${2:-False}" -# "True" tearsdown/deletes resources, else setup -survey="${3:-rubin}" -# name of the survey this broker instance will ingest -region="${4:-us-central1}" -zone="${region}-a" # just use zone "a" instead of adding another script arg - -PROJECT_ID=$GOOGLE_CLOUD_PROJECT # get the environment variable - -#--- Make the user confirm the settings -echo -echo "setup_broker.sh will run with the following configs: " -echo -echo "GOOGLE_CLOUD_PROJECT = ${PROJECT_ID}" -echo "survey = ${survey}" -echo "testid = ${testid}" -echo "teardown = ${teardown}" -echo -echo "Continue? [y/(n)]: " - -read -r continue_with_setup -continue_with_setup="${continue_with_setup:-n}" -if [ "$continue_with_setup" != "y" ]; then - echo "Exiting setup." - echo - exit -fi - -#--- GCP resources used directly in this script -broker_bucket="${PROJECT_ID}-${survey}-broker_files" -topic_alerts="${survey}-alerts" -pubsub_subscription="${topic_alerts}" -# use test resources, if requested -# (there must be a better way to do this) -if [ "$testid" != "False" ]; then - broker_bucket="${broker_bucket}-${testid}" - topic_alerts="${topic_alerts}-${testid}" - pubsub_subscription="${pubsub_subscription}-${testid}" -fi - - -#--- Create (or delete) GCS, Pub/Sub resources -if [ "${teardown}" != "True" ]; then - # create broker bucket and upload files - echo "Creating broker_bucket and uploading files..." - gsutil mb -b on -l "${region}" "gs://${broker_bucket}" - ./upload_broker_bucket.sh "${broker_bucket}" - - # create pubsub - echo "Configuring Pub/Sub resources..." - gcloud pubsub topics create "${topic_alerts}" - gcloud pubsub subscriptions create "${pubsub_subscription}" --topic="${topic_alerts}" - - # Set IAM policies on resources - user="allUsers" - roleid="projects/${GOOGLE_CLOUD_PROJECT}/roles/userPublic" - gcloud pubsub topics add-iam-policy-binding "${topic_alerts}" --member="${user}" --role="${roleid}" - -else - # ensure that we do not teardown production resources - if [ "${testid}" != "False" ]; then - o="GSUtil:parallel_process_count=1" # disable multiprocessing for Macs - gsutil -m -o "${o}" rm -r "gs://${broker_bucket}" - gcloud pubsub topics delete "${topic_alerts}" - gcloud pubsub subscriptions delete "${pubsub_subscription}" - fi -fi - -if [ "$teardown" != "True" ]; then - #--- Create a firewall rule to open the port used by Kafka/Rubin - # on any instance with the flag --tags=tcpport9094 - echo - echo "Configuring Rubin/Kafka firewall rule..." - firewallrule="tcpport9094" - gcloud compute firewall-rules create "${firewallrule}" \ - --allow=tcp:9094 \ - --description="Allow incoming traffic on TCP port 9094" \ - --direction=INGRESS \ - --enable-logging -fi - -#--- Create VM instances -echo -echo "Configuring VMs..." -./create_vm.sh "${broker_bucket}" "${testid}" "${teardown}" "${survey}" "${zone}" "${firewallrule}"