Schema Definitions¶
- pydantic model xedocs.schemas.AbnormalDAQRate[source]¶
Abnormal DAQ rate report
Show JSON schema
{ "title": "AbnormalDAQRate", "description": "Abnormal DAQ rate report", "type": "object", "properties": { "time": { "$ref": "#/definitions/TimeInterval" }, "operator": { "title": "Operator", "maxLength": 60, "minLength": 1, "type": "string" }, "comments": { "title": "Comments", "type": "string" }, "anode_voltage_kv": { "title": "Anode Voltage Kv", "type": "number" }, "action_taken": { "title": "Action Taken", "type": "string" }, "plot": { "title": "Plot", "type": "string" }, "reader0_rate": { "title": "Reader0 Rate", "type": "number" }, "reader1_rate": { "title": "Reader1 Rate", "type": "number" }, "reader2_rate": { "title": "Reader2 Rate", "type": "number" }, "muon_veto_rate": { "title": "Muon Veto Rate", "type": "number" }, "nveto_rate": { "title": "Nveto Rate", "type": "number" } }, "required": [ "time", "operator", "comments", "anode_voltage_kv", "action_taken", "plot", "reader0_rate", "reader1_rate", "reader2_rate", "muon_veto_rate", "nveto_rate" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
action_taken (str)anode_voltage_kv (float)muon_veto_rate (float)nveto_rate (float)plot (str)reader0_rate (float)reader1_rate (float)reader2_rate (float)
- Validators:
run_id_to_time_interval»all fieldstime_string_to_interval»time
- field action_taken: str [Required]¶
- Validated by:
run_id_to_time_interval
- field anode_voltage_kv: float [Required]¶
- Validated by:
run_id_to_time_interval
- field muon_veto_rate: float [Required]¶
- Validated by:
run_id_to_time_interval
- field nveto_rate: float [Required]¶
- Validated by:
run_id_to_time_interval
- field plot: str [Required]¶
- Validated by:
run_id_to_time_interval
- field reader0_rate: float [Required]¶
- Validated by:
run_id_to_time_interval
- field reader1_rate: float [Required]¶
- Validated by:
run_id_to_time_interval
- field reader2_rate: float [Required]¶
- Validated by:
run_id_to_time_interval
- pydantic model xedocs.schemas.AnodeRampReport[source]¶
Anode ramp - report
Show JSON schema
{ "title": "AnodeRampReport", "description": "Anode ramp - report", "type": "object", "properties": { "time": { "$ref": "#/definitions/TimeInterval" }, "operator": { "title": "Operator", "maxLength": 60, "minLength": 1, "type": "string" }, "comments": { "title": "Comments", "type": "string" }, "direction": { "title": "Direction", "enum": [ "up", "down" ], "type": "string" }, "starting_voltage": { "title": "Starting Voltage", "type": "number" }, "final_voltage": { "title": "Final Voltage", "type": "number" }, "voltage_unit": { "title": "Voltage Unit", "default": "volts", "type": "string" } }, "required": [ "time", "operator", "comments", "direction", "starting_voltage", "final_voltage" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
direction (Literal['up', 'down'])final_voltage (float)starting_voltage (float)voltage_unit (str)
- Validators:
run_id_to_time_interval»all fieldstime_string_to_interval»time
- field direction: Literal['up', 'down'] [Required]¶
- Validated by:
run_id_to_time_interval
- field final_voltage: float [Required]¶
- Validated by:
run_id_to_time_interval
- field starting_voltage: float [Required]¶
- Validated by:
run_id_to_time_interval
- field voltage_unit: str = 'volts'¶
- Validated by:
run_id_to_time_interval
- pydantic model xedocs.schemas.AnodeWashingReport[source]¶
Anode washing report
Show JSON schema
{ "title": "AnodeWashingReport", "description": "Anode washing report", "type": "object", "properties": { "time": { "$ref": "#/definitions/TimeInterval" }, "operator": { "title": "Operator", "maxLength": 60, "minLength": 1, "type": "string" }, "comments": { "title": "Comments", "type": "string" }, "washes": { "title": "Washes", "type": "array", "items": { "$ref": "#/definitions/LevelChange" } } }, "required": [ "time", "operator", "comments", "washes" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] }, "LevelChange": { "title": "LevelChange", "type": "object", "properties": { "time": { "title": "Time", "type": "string", "format": "date-time" }, "liquid_level": { "title": "Liquid Level", "exclusiveMaximum": 8, "minimum": 0, "type": "number" } }, "required": [ "time", "liquid_level" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
washes (List[xedocs.schemas.operations_reports.anode_washing.LevelChange])
- Validators:
run_id_to_time_interval»all fieldstime_string_to_interval»time
- field washes: List[LevelChange] [Required]¶
- Validated by:
run_id_to_time_interval
- pydantic model xedocs.schemas.AvgSingleElectronGain[source]¶
Show JSON schema
{ "title": "AvgSingleElectronGain", "description": "Base class for time-interval corrections\n\n- Adds an Interval index of type datetime\n- Enforces rules on updating intervals:\nCan only change the right side of an interval\nif right side is None and the new right side is\nafter the cutoff time (default is 2 hours after current time).\n\nThe cutoff is set to prevent values changing after already being used\nfor processing data.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "$ref": "#/definitions/TimeInterval" }, "partition": { "title": "Partition", "default": "all_tpc", "enum": [ "all_tpc", "ab", "cd" ], "type": "string" }, "value": { "title": "Value", "type": "number" } }, "required": [ "version", "time", "value" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
partition (Literal['all_tpc', 'ab', 'cd'])value (float)
- Validators:
normalize_tz»created_daterun_id_to_time_interval»all fieldstime_string_to_interval»time
- field partition: Literal['all_tpc', 'ab', 'cd'] = 'all_tpc'¶
- Validated by:
run_id_to_time_interval
- field value: float [Required]¶
- Validated by:
run_id_to_time_interval
- pydantic model xedocs.schemas.BaseCorrectionSchema[source]¶
Base class for all correction schemas. This class ensures:
the _ALIAS attribute is always unique
schema includes a version index
changing already set values is disallowed
Show JSON schema
{ "title": "BaseCorrectionSchema", "description": "Base class for all correction schemas.\nThis class ensures:\n\n- the _ALIAS attribute is always unique\n- schema includes a version index\n- changing already set values is disallowed", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" } }, "required": [ "version" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
comments (str)created_date (datetime.datetime)
- Validators:
normalize_tz»created_date
- field comments: str = ''¶
- field created_date: datetime [Optional]¶
- Validated by:
normalize_tz
- validator normalize_tz » created_date[source]¶
Normalize timezone info. Pandas requires uniform timezone awareness
- pre_delete(datasource, **kwargs)[source]¶
User defined checks to perform prior to document deletion. Should raise an exception if deletion is disallowed.
- pre_update(datasource, new)[source]¶
This method is called if the new document is being saved and self was found to already exist in the datasource. By default we check that all values are the same. The reason this execption is needed is because the found document may not actually exist in the datasource and may be interpolated, so we allow updating documents with identical values. Otherwise we raise an error, preventing the update.
- pydantic model xedocs.schemas.BaseMap[source]¶
Show JSON schema
{ "title": "BaseMap", "description": "Base class for time-interval corrections\n\n- Adds an Interval index of type datetime\n- Enforces rules on updating intervals:\nCan only change the right side of an interval\nif right side is None and the new right side is\nafter the cutoff time (default is 2 hours after current time).\n\nThe cutoff is set to prevent values changing after already being used\nfor processing data.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "$ref": "#/definitions/TimeInterval" }, "value": { "title": "Value", "type": "string" }, "algorithm": { "title": "Algorithm", "enum": [ "cnn", "gcn", "mlp", "cnf" ], "type": "string" } }, "required": [ "version", "time", "value", "algorithm" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
algorithm (Literal['cnn', 'gcn', 'mlp', 'cnf'])value (str)
- Validators:
normalize_tz»created_daterun_id_to_time_interval»all fieldstime_string_to_interval»time
- field algorithm: Literal['cnn', 'gcn', 'mlp', 'cnf'] [Required]¶
- Validated by:
run_id_to_time_interval
- field value: str [Required]¶
- Validated by:
run_id_to_time_interval
- property file¶
- property fmt¶
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
- property local_file¶
- property map¶
- pydantic model xedocs.schemas.BaseResourceReference[source]¶
Show JSON schema
{ "title": "BaseResourceReference", "description": "Base class for time-interval corrections\n\n- Adds an Interval index of type datetime\n- Enforces rules on updating intervals:\nCan only change the right side of an interval\nif right side is None and the new right side is\nafter the cutoff time (default is 2 hours after current time).\n\nThe cutoff is set to prevent values changing after already being used\nfor processing data.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "$ref": "#/definitions/TimeInterval" }, "value": { "title": "Value", "type": "string" } }, "required": [ "version", "time", "value" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
value (str)
- Validators:
normalize_tz»created_daterun_id_to_time_interval»all fieldstime_string_to_interval»time
- field value: str [Required]¶
- Validated by:
run_id_to_time_interval
- pre_insert(datasource)[source]¶
require the existence of the resource being referenced prior to inserting a new document. This is to avoid typos etc.
- fmt: ClassVar = 'text'¶
- property url_config¶
- pydantic model xedocs.schemas.BaselineSamplesNV[source]¶
Show JSON schema
{ "title": "BaselineSamplesNV", "description": "Base class for time-sampled corrections\n\n- Adds an interpolating index of type datetime\n- Enforces rules on inserting new data points\n\nSince extrapolation is allowed for ONLINE versions\nInserting new points before the cutoff is disallowed\nThis is to prevent setting values for times already\nprocessed using the extrapolated values.\nWhen inserting an ONLINE value after the cutoff, a\nnew document with equal values to the extrapolated values\nis inserted at the current time to prevent the inserted document\nfrom affecting the interpolated values that have already been used\nfor processing.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "title": "Time", "type": "string", "format": "date-time" }, "value": { "title": "Value", "type": "integer" } }, "required": [ "version", "time", "value" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
value (int)
- Validators:
normalize_time»timenormalize_tz»created_daterun_id_to_time»all fields
- field value: int [Required]¶
- Validated by:
run_id_to_time
- pydantic model xedocs.schemas.CalibrationSource[source]¶
Show JSON schema
{ "title": "CalibrationSource", "description": "Base class for all xedocs schemas.", "type": "object", "properties": { "source_id": { "title": "Source Id", "maxLength": 50, "type": "string" }, "lngs_id": { "title": "Lngs Id", "maxLength": 30, "type": "string" }, "kind": { "title": "Kind", "enum": [ "ambe", "ar-37", "kr-83m", "rn-220", "rn-222", "led", "pulser", "noise", "none", "th-228", "th-232", "Y88", "YBe" ], "type": "string" }, "ref": { "title": "Ref", "type": "string" }, "comments": { "title": "Comments", "type": "string" }, "activity_measurements": { "title": "Activity Measurements", "type": "array", "items": { "$ref": "#/definitions/ActivityMeasurement" } } }, "required": [ "source_id", "lngs_id", "kind", "ref", "comments", "activity_measurements" ], "definitions": { "ActivityMeasurement": { "title": "ActivityMeasurement", "type": "object", "properties": { "time": { "title": "Time", "type": "string", "format": "date-time" }, "activity": { "title": "Activity", "type": "number" }, "uncertainty": { "title": "Uncertainty", "type": "number" }, "units": { "title": "Units", "default": "Bq", "maxLength": 10, "type": "string" } }, "required": [ "time", "activity", "uncertainty" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
activity_measurements (List[xedocs.schemas.calibrations.sources.ActivityMeasurement])comments (str)kind (Literal['ambe', 'ar-37', 'kr-83m', 'rn-220', 'rn-222', 'led', 'pulser', 'noise', 'none', 'th-228', 'th-232', 'Y88', 'YBe'])lngs_id (xedocs.schemas.calibrations.sources.ConstrainedStrValue)ref (str)source_id (str)
- field activity_measurements: List[ActivityMeasurement] [Required]¶
- field comments: str [Required]¶
- field kind: Literal['ambe', 'ar-37', 'kr-83m', 'rn-220', 'rn-222', 'led', 'pulser', 'noise', 'none', 'th-228', 'th-232', 'Y88', 'YBe'] [Required]¶
- field lngs_id: ConstrainedStrValue [Required]¶
- Constraints:
maxLength = 30
- field ref: str [Required]¶
- field source_id: str [Required]¶
- Constraints:
maxLength = 50
- pydantic model xedocs.schemas.ContextConfig[source]¶
Show JSON schema
{ "title": "ContextConfig", "description": "Base class for all xedocs schemas.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "config_name": { "title": "Config Name", "type": "string" }, "value": { "title": "Value", "type": "string" } }, "required": [ "version", "config_name", "value" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
config_name (str)value (str)
- field config_name: str [Required]¶
- field value: str [Required]¶
- pydantic model xedocs.schemas.ContextLineage[source]¶
Show JSON schema
{ "title": "ContextLineage", "description": "Base class for all xedocs schemas.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "strax": { "title": "Strax", "type": "string" }, "straxen": { "title": "Straxen", "type": "string" }, "lineage_hashes": { "title": "Lineage Hashes", "type": "object", "additionalProperties": { "type": "string" } } }, "required": [ "version", "strax", "straxen", "lineage_hashes" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
lineage_hashes (Dict[str, str])strax (str)straxen (str)
- field lineage_hashes: Dict[str, str] [Required]¶
- field strax: str [Required]¶
- field straxen: str [Required]¶
- pydantic model xedocs.schemas.CorrectionReference[source]¶
A CorrectionReference document references one or more corrections by storing the name and labels required to locate the correction in a datasource
Show JSON schema
{ "title": "CorrectionReference", "description": "A CorrectionReference document references one or\nmore corrections by storing the name and labels required\nto locate the correction in a datasource", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "$ref": "#/definitions/TimeInterval" }, "alias": { "title": "Alias", "maxLength": 50, "type": "string" }, "correction": { "title": "Correction", "maxLength": 50, "type": "string" }, "attribute": { "title": "Attribute", "maxLength": 50, "type": "string" }, "labels": { "title": "Labels", "type": "object" } }, "required": [ "version", "time", "alias", "correction", "attribute", "labels" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
alias (str)attribute (xedocs.schemas.corrections.base_references.ConstrainedStrValue)correction (xedocs.schemas.corrections.base_references.ConstrainedStrValue)labels (dict)time (rframe.types.TimeInterval)version (str)
- Validators:
normalize_tz»created_daterun_id_to_time_interval»all fieldstime_string_to_interval»time
- field alias: str [Required]¶
- Constraints:
maxLength = 50
- Validated by:
run_id_to_time_interval
- field attribute: ConstrainedStrValue [Required]¶
- Constraints:
maxLength = 50
- Validated by:
run_id_to_time_interval
- field correction: ConstrainedStrValue [Required]¶
- Constraints:
maxLength = 50
- Validated by:
run_id_to_time_interval
- field labels: dict [Required]¶
- Validated by:
run_id_to_time_interval
- field time: TimeInterval [Required]¶
- Validated by:
run_id_to_time_intervaltime_string_to_interval
- field version: str [Required]¶
- Constraints:
maxLength = 20
- Validated by:
run_id_to_time_interval
- load(datasource=None, **overrides)[source]¶
Load the referenced documents from the given datasource.
- property config_dict¶
- property url_config¶
Convert reference to a URLConfig URL
- pydantic model xedocs.schemas.DetectorNumber[source]¶
Detector parameters A collection of non-time dependent detector values.
Show JSON schema
{ "title": "DetectorNumber", "description": "Detector parameters\nA collection of non-time dependent detector\nvalues.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "$ref": "#/definitions/TimeInterval" }, "field": { "title": "Field", "maxLength": 80, "type": "string" }, "partition": { "title": "Partition", "default": "all_tpc", "enum": [ "all_tpc", "ab", "cd" ], "type": "string" }, "science_run": { "title": "Science Run", "maxLength": 80, "type": "string" }, "definition": { "title": "Definition", "default": "", "type": "string" }, "value": { "title": "Value", "type": "number" }, "uncertainty": { "title": "Uncertainty", "type": "number" }, "reference": { "title": "Reference", "default": "", "type": "string" } }, "required": [ "version", "time", "field", "science_run", "value", "uncertainty" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
definition (str)field (str)partition (Literal['all_tpc', 'ab', 'cd'])reference (str)science_run (str)uncertainty (float)value (float)
- Validators:
normalize_tz»created_daterun_id_to_time_interval»all fieldstime_string_to_interval»time
- field definition: str = ''¶
- Validated by:
run_id_to_time_interval
- field field: str [Required]¶
- Constraints:
maxLength = 80
- Validated by:
run_id_to_time_interval
- field partition: Literal['all_tpc', 'ab', 'cd'] = 'all_tpc'¶
- Validated by:
run_id_to_time_interval
- field reference: str = ''¶
- Validated by:
run_id_to_time_interval
- field science_run: str [Required]¶
- Constraints:
maxLength = 80
- Validated by:
run_id_to_time_interval
- field uncertainty: float [Required]¶
- Validated by:
run_id_to_time_interval
- field value: float [Required]¶
- Validated by:
run_id_to_time_interval
- pydantic model xedocs.schemas.DetectorOperations[source]¶
Detector Operations Reports
Show JSON schema
{ "title": "DetectorOperations", "description": "Detector Operations Reports ", "type": "object", "properties": { "time": { "$ref": "#/definitions/TimeInterval" }, "operator": { "title": "Operator", "maxLength": 60, "minLength": 1, "type": "string" }, "comments": { "title": "Comments", "type": "string" }, "system": { "title": "System", "default": "", "type": "string" }, "label": { "title": "Label", "default": "", "type": "string" }, "details": { "title": "Details", "default": "", "type": "string" }, "link": { "title": "Link", "default": "", "type": "string" } }, "required": [ "time", "operator", "comments" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
details (str)label (str)link (str)system (str)
- Validators:
run_id_to_time_interval»all fieldstime_string_to_interval»time
- field details: str = ''¶
- Validated by:
run_id_to_time_interval
- field label: str = ''¶
- Validated by:
run_id_to_time_interval
- field link: str = ''¶
- Validated by:
run_id_to_time_interval
- field system: str = ''¶
- Validated by:
run_id_to_time_interval
- pydantic model xedocs.schemas.DiffusedCalibration[source]¶
Internal diffused Calibrations
Show JSON schema
{ "title": "DiffusedCalibration", "description": "Internal diffused Calibrations", "type": "object", "properties": { "time": { "$ref": "#/definitions/TimeInterval" }, "source_id": { "title": "Source Id", "maxLength": 60, "minLength": 1, "type": "string" }, "source_type": { "title": "Source Type", "enum": [ "ambe", "ar-37", "kr-83m", "rn-220", "rn-222", "led", "pulser", "noise", "none", "th-228", "th-232", "Y88", "YBe" ], "type": "string" }, "operator": { "title": "Operator", "default": "", "maxLength": 60, "minLength": 1, "type": "string" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "run_ids": { "title": "Run Ids", "default": [], "type": "array", "items": { "type": "string" } }, "filled_by": { "title": "Filled By", "default": "", "maxLength": 60, "minLength": 1, "type": "string" }, "source": { "title": "Source", "enum": [ "rn-220", "rn-222", "kr-83m", "ar-37" ], "type": "string" }, "nv_ticks": { "title": "Nv Ticks", "minimum": 0, "type": "integer" }, "valve_opened": { "title": "Valve Opened", "type": "string", "format": "date-time" }, "valve_closed": { "title": "Valve Closed", "type": "string", "format": "date-time" } }, "required": [ "time", "source_id", "source_type", "source", "nv_ticks", "valve_opened", "valve_closed" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
nv_ticks (xedocs.schemas.calibrations.diffused_calibration.ConstrainedIntValue)source (Literal['rn-220', 'rn-222', 'kr-83m', 'ar-37'])valve_closed (datetime.datetime)valve_opened (datetime.datetime)
- Validators:
run_id_to_time_interval»all fieldstime_string_to_interval»time
- field nv_ticks: ConstrainedIntValue [Required]¶
- Constraints:
minimum = 0
- Validated by:
run_id_to_time_interval
- field source: Literal['rn-220', 'rn-222', 'kr-83m', 'ar-37'] [Required]¶
- Validated by:
run_id_to_time_interval
- field valve_closed: datetime [Required]¶
- Validated by:
run_id_to_time_interval
- field valve_opened: datetime [Required]¶
- Validated by:
run_id_to_time_interval
- pydantic model xedocs.schemas.DriftTimeGate[source]¶
Show JSON schema
{ "title": "DriftTimeGate", "description": "Base class for time-sampled corrections\n\n- Adds an interpolating index of type datetime\n- Enforces rules on inserting new data points\n\nSince extrapolation is allowed for ONLINE versions\nInserting new points before the cutoff is disallowed\nThis is to prevent setting values for times already\nprocessed using the extrapolated values.\nWhen inserting an ONLINE value after the cutoff, a\nnew document with equal values to the extrapolated values\nis inserted at the current time to prevent the inserted document\nfrom affecting the interpolated values that have already been used\nfor processing.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "title": "Time", "type": "string", "format": "date-time" }, "value": { "title": "Value", "type": "number" } }, "required": [ "version", "time", "value" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
value (float)
- Validators:
normalize_time»timenormalize_tz»created_daterun_id_to_time»all fields
- field value: float [Required]¶
- Validated by:
run_id_to_time
- pydantic model xedocs.schemas.ElectronDiffusionCte[source]¶
Show JSON schema
{ "title": "ElectronDiffusionCte", "description": "Base class for time-sampled corrections\n\n- Adds an interpolating index of type datetime\n- Enforces rules on inserting new data points\n\nSince extrapolation is allowed for ONLINE versions\nInserting new points before the cutoff is disallowed\nThis is to prevent setting values for times already\nprocessed using the extrapolated values.\nWhen inserting an ONLINE value after the cutoff, a\nnew document with equal values to the extrapolated values\nis inserted at the current time to prevent the inserted document\nfrom affecting the interpolated values that have already been used\nfor processing.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "title": "Time", "type": "string", "format": "date-time" }, "value": { "title": "Value", "type": "number" } }, "required": [ "version", "time", "value" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
value (float)
- Validators:
normalize_time»timenormalize_tz»created_daterun_id_to_time»all fields
- field value: float [Required]¶
- Validated by:
run_id_to_time
- pydantic model xedocs.schemas.ElectronDriftVelocity[source]¶
Show JSON schema
{ "title": "ElectronDriftVelocity", "description": "Base class for time-sampled corrections\n\n- Adds an interpolating index of type datetime\n- Enforces rules on inserting new data points\n\nSince extrapolation is allowed for ONLINE versions\nInserting new points before the cutoff is disallowed\nThis is to prevent setting values for times already\nprocessed using the extrapolated values.\nWhen inserting an ONLINE value after the cutoff, a\nnew document with equal values to the extrapolated values\nis inserted at the current time to prevent the inserted document\nfrom affecting the interpolated values that have already been used\nfor processing.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "title": "Time", "type": "string", "format": "date-time" }, "value": { "title": "Value", "type": "number" } }, "required": [ "version", "time", "value" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
value (float)
- Validators:
normalize_time»timenormalize_tz»created_daterun_id_to_time»all fields
- field value: float [Required]¶
- Validated by:
run_id_to_time
- pydantic model xedocs.schemas.ElectronLifetime[source]¶
Show JSON schema
{ "title": "ElectronLifetime", "description": "Base class for time-sampled corrections\n\n- Adds an interpolating index of type datetime\n- Enforces rules on inserting new data points\n\nSince extrapolation is allowed for ONLINE versions\nInserting new points before the cutoff is disallowed\nThis is to prevent setting values for times already\nprocessed using the extrapolated values.\nWhen inserting an ONLINE value after the cutoff, a\nnew document with equal values to the extrapolated values\nis inserted at the current time to prevent the inserted document\nfrom affecting the interpolated values that have already been used\nfor processing.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "title": "Time", "type": "string", "format": "date-time" }, "value": { "title": "Value", "type": "number" } }, "required": [ "version", "time", "value" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
value (float)
- Validators:
normalize_time»timenormalize_tz»created_daterun_id_to_time»all fields
- field value: float [Required]¶
- Validated by:
run_id_to_time
- pydantic model xedocs.schemas.FaxConfig[source]¶
fax configuration values for WFSim
Show JSON schema
{ "title": "FaxConfig", "description": "fax configuration values for WFSim", "type": "object", "properties": { "version": { "title": "Version", "default": "v1", "type": "string" }, "field": { "title": "Field", "type": "string" }, "experiment": { "title": "Experiment", "default": "nt", "enum": [ "1t", "nt", "nt_design" ], "type": "string" }, "detector": { "title": "Detector", "default": "tpc", "enum": [ "tpc", "muon_veto", "neutron_veto" ], "type": "string" }, "science_run": { "title": "Science Run", "type": "string" }, "value": { "title": "Value", "anyOf": [ { "type": "integer" }, { "type": "number" }, { "type": "boolean" }, { "type": "string" }, { "type": "array", "items": {} }, { "type": "object" } ] }, "resource": { "title": "Resource", "type": "string" } }, "required": [ "field", "science_run", "value", "resource" ] }
- Config:
smart_union: bool = True
- Fields:
detector (Literal['tpc', 'muon_veto', 'neutron_veto'])experiment (Literal['1t', 'nt', 'nt_design'])field (str)resource (str)science_run (str)value (int | float | bool | str | list | dict)version (str)
- field detector: Literal['tpc', 'muon_veto', 'neutron_veto'] = 'tpc'¶
- field experiment: Literal['1t', 'nt', 'nt_design'] = 'nt'¶
- field field: str [Required]¶
- field resource: str [Required]¶
- field science_run: str [Required]¶
- field value: int | float | bool | str | list | dict [Required]¶
- field version: str = 'v1'¶
- pydantic model xedocs.schemas.FdcMap[source]¶
Show JSON schema
{ "title": "FdcMap", "description": "Base class for time-interval corrections\n\n- Adds an Interval index of type datetime\n- Enforces rules on updating intervals:\nCan only change the right side of an interval\nif right side is None and the new right side is\nafter the cutoff time (default is 2 hours after current time).\n\nThe cutoff is set to prevent values changing after already being used\nfor processing data.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "$ref": "#/definitions/TimeInterval" }, "value": { "title": "Value", "type": "string" }, "algorithm": { "title": "Algorithm", "enum": [ "cnn", "gcn", "mlp", "cnf" ], "type": "string" } }, "required": [ "version", "time", "value", "algorithm" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
- Validators:
normalize_tz»created_daterun_id_to_time_interval»all fieldstime_string_to_interval»time
- fmt: ClassVar = 'json.gz'¶
- xedocs.schemas.Field(default: Any = PydanticUndefined, *, default_factory: NoArgAnyCallable | None = None, alias: str | None = None, title: str | None = None, description: str | None = None, exclude: 'AbstractSetIntStr' | 'MappingIntStrAny' | Any | None = None, include: 'AbstractSetIntStr' | 'MappingIntStrAny' | Any | None = None, const: bool | None = None, gt: float | None = None, ge: float | None = None, lt: float | None = None, le: float | None = None, multiple_of: float | None = None, allow_inf_nan: bool | None = None, max_digits: int | None = None, decimal_places: int | None = None, min_items: int | None = None, max_items: int | None = None, unique_items: bool | None = None, min_length: int | None = None, max_length: int | None = None, allow_mutation: bool = True, regex: str | None = None, discriminator: str | None = None, repr: bool = True, **extra: Any) Any¶
Used to provide extra information about a field, either for the model schema or complex validation. Some arguments apply only to number fields (
int,float,Decimal) and some apply only tostr.- Parameters:
default – since this is replacing the field’s default, its first argument is used to set the default, use ellipsis (
...) to indicate the field is requireddefault_factory – callable that will be called when a default value is needed for this field If both default and default_factory are set, an error is raised.
alias – the public name of the field
title – can be any string, used in the schema
description – can be any string, used in the schema
exclude – exclude this field while dumping. Takes same values as the
includeandexcludearguments on the.dictmethod.include – include this field while dumping. Takes same values as the
includeandexcludearguments on the.dictmethod.const – this field is required and must take it’s default value
gt – only applies to numbers, requires the field to be “greater than”. The schema will have an
exclusiveMinimumvalidation keywordge – only applies to numbers, requires the field to be “greater than or equal to”. The schema will have a
minimumvalidation keywordlt – only applies to numbers, requires the field to be “less than”. The schema will have an
exclusiveMaximumvalidation keywordle – only applies to numbers, requires the field to be “less than or equal to”. The schema will have a
maximumvalidation keywordmultiple_of – only applies to numbers, requires the field to be “a multiple of”. The schema will have a
multipleOfvalidation keywordallow_inf_nan – only applies to numbers, allows the field to be NaN or infinity (+inf or -inf), which is a valid Python float. Default True, set to False for compatibility with JSON.
max_digits – only applies to Decimals, requires the field to have a maximum number of digits within the decimal. It does not include a zero before the decimal point or trailing decimal zeroes.
decimal_places – only applies to Decimals, requires the field to have at most a number of decimal places allowed. It does not include trailing decimal zeroes.
min_items – only applies to lists, requires the field to have a minimum number of elements. The schema will have a
minItemsvalidation keywordmax_items – only applies to lists, requires the field to have a maximum number of elements. The schema will have a
maxItemsvalidation keywordunique_items – only applies to lists, requires the field not to have duplicated elements. The schema will have a
uniqueItemsvalidation keywordmin_length – only applies to strings, requires the field to have a minimum length. The schema will have a
minLengthvalidation keywordmax_length – only applies to strings, requires the field to have a maximum length. The schema will have a
maxLengthvalidation keywordallow_mutation – a boolean which defaults to True. When False, the field raises a TypeError if the field is assigned on an instance. The BaseModel Config must set validate_assignment to True
regex – only applies to strings, requires the field match against a regular expression pattern string. The schema will have a
patternvalidation keyworddiscriminator – only useful with a (discriminated a.k.a. tagged) Union of sub models with a common field. The discriminator is the name of this common field to shorten validation and improve generated schema
repr – show this field in the representation
**extra –
any additional keyword arguments will be added as is to the schema
- pydantic model xedocs.schemas.GainCalculation[source]¶
Show JSON schema
{ "title": "GainCalculation", "description": "Base class for all xedocs schemas.", "type": "object", "properties": { "detector": { "title": "Detector", "enum": [ "tpc", "neutron_veto", "muon_veto", "tpc_he" ], "type": "string" }, "pmt": { "title": "Pmt", "minimum": 0, "type": "integer" }, "time": { "title": "Time", "type": "string", "format": "date-time" }, "voltage": { "title": "Voltage", "type": "number" }, "gain": { "title": "Gain", "type": "number" }, "gain_error": { "title": "Gain Error", "type": "number" }, "gain_stat_error": { "title": "Gain Stat Error", "type": "number" }, "gain_sys_error": { "title": "Gain Sys Error", "type": "number" }, "occupancy": { "title": "Occupancy", "type": "number" }, "occupancy_error": { "title": "Occupancy Error", "type": "number" } }, "required": [ "detector", "pmt", "time", "voltage", "gain", "gain_error", "gain_stat_error", "gain_sys_error", "occupancy", "occupancy_error" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
detector (Literal['tpc', 'neutron_veto', 'muon_veto', 'tpc_he'])gain (float)gain_error (float)gain_stat_error (float)gain_sys_error (float)occupancy (float)occupancy_error (float)pmt (int)time (datetime.datetime)voltage (float)
- field detector: Literal['tpc', 'neutron_veto', 'muon_veto', 'tpc_he'] [Required]¶
- field gain: float [Required]¶
- field gain_error: float [Required]¶
- field gain_stat_error: float [Required]¶
- field gain_sys_error: float [Required]¶
- field occupancy: float [Required]¶
- field occupancy_error: float [Required]¶
- field pmt: int [Required]¶
- Constraints:
minimum = 0
- field time: datetime [Required]¶
- field voltage: float [Required]¶
- pydantic model xedocs.schemas.HistorianTag[source]¶
Schema for historian tags to read into influxdb for grafana
Show JSON schema
{ "title": "HistorianTag", "description": "Schema for historian tags to read into influxdb for grafana\n ", "type": "object", "properties": { "tag_name": { "title": "Tag Name", "type": "string" }, "measurement_name": { "title": "Measurement Name", "type": "string" }, "bucket_name": { "title": "Bucket Name", "type": "string" }, "description": { "title": "Description", "default": "", "type": "string" }, "query_type": { "title": "Query Type", "default": "LAB", "enum": [ "LAB", "RAWBYTIME" ], "type": "string" }, "query_interval": { "title": "Query Interval", "default": 1, "type": "integer" }, "category": { "title": "Category", "default": "", "type": "string" }, "subsystem": { "title": "Subsystem", "default": "", "type": "string" } }, "required": [ "tag_name", "measurement_name", "bucket_name" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
bucket_name (str)category (str)description (str)measurement_name (str)query_interval (int)query_type (Literal['LAB', 'RAWBYTIME'])subsystem (str)tag_name (str)
- Validators:
validate_measurement_name»measurement_name
- field bucket_name: str [Required]¶
- field category: str = ''¶
- field description: str = ''¶
- field measurement_name: str [Required]¶
- Validated by:
validate_measurement_name
- field query_interval: int = 1¶
- field query_type: Literal['LAB', 'RAWBYTIME'] = 'LAB'¶
- field subsystem: str = ''¶
- field tag_name: str [Required]¶
- pydantic model xedocs.schemas.HitThreshold[source]¶
Show JSON schema
{ "title": "HitThreshold", "description": "Base class for time-sampled corrections\n\n- Adds an interpolating index of type datetime\n- Enforces rules on inserting new data points\n\nSince extrapolation is allowed for ONLINE versions\nInserting new points before the cutoff is disallowed\nThis is to prevent setting values for times already\nprocessed using the extrapolated values.\nWhen inserting an ONLINE value after the cutoff, a\nnew document with equal values to the extrapolated values\nis inserted at the current time to prevent the inserted document\nfrom affecting the interpolated values that have already been used\nfor processing.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "title": "Time", "type": "string", "format": "date-time" }, "detector": { "title": "Detector", "enum": [ "tpc", "neutron_veto", "muon_veto", "tpc_he" ], "type": "string" }, "pmt": { "title": "Pmt", "type": "integer" }, "value": { "title": "Value", "type": "integer" } }, "required": [ "version", "time", "detector", "pmt", "value" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
detector (Literal['tpc', 'neutron_veto', 'muon_veto', 'tpc_he'])pmt (int)value (int)
- Validators:
normalize_time»timenormalize_tz»created_daterun_id_to_time»all fields
- field detector: Literal['tpc', 'neutron_veto', 'muon_veto', 'tpc_he'] [Required]¶
- Validated by:
run_id_to_time
- field pmt: int [Required]¶
- Validated by:
run_id_to_time
- field value: int [Required]¶
- Validated by:
run_id_to_time
- pydantic model xedocs.schemas.HotspotReport[source]¶
Hotspot report
Show JSON schema
{ "title": "HotspotReport", "description": "Hotspot report", "type": "object", "properties": { "time": { "$ref": "#/definitions/TimeInterval" }, "operator": { "title": "Operator", "maxLength": 60, "minLength": 1, "type": "string" }, "comments": { "title": "Comments", "type": "string" }, "severity": { "title": "Severity", "default": "hotspot", "enum": [ "hotspot", "warmspot" ], "type": "string" }, "anode_voltage_kv": { "title": "Anode Voltage Kv", "type": "number" }, "disppeared_by_itself": { "title": "Disppeared By Itself", "type": "boolean" }, "action_taken": { "title": "Action Taken", "type": "string" }, "plot": { "title": "Plot", "type": "string" }, "pmt_rates": { "title": "Pmt Rates", "type": "array", "items": { "$ref": "#/definitions/PmtRate" } } }, "required": [ "time", "operator", "comments", "anode_voltage_kv", "disppeared_by_itself", "action_taken", "plot", "pmt_rates" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] }, "PmtRate": { "title": "PmtRate", "type": "object", "properties": { "pmt": { "title": "Pmt", "exclusiveMaximum": 494, "minimum": 0, "type": "integer" }, "avg_rate_kbps": { "title": "Avg Rate Kbps", "type": "number" } }, "required": [ "pmt", "avg_rate_kbps" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
action_taken (str)anode_voltage_kv (float)disppeared_by_itself (bool)plot (str)pmt_rates (List[xedocs.schemas.operations_reports.hotspot.PmtRate])severity (Literal['hotspot', 'warmspot'])
- Validators:
run_id_to_time_interval»all fieldstime_string_to_interval»time
- field action_taken: str [Required]¶
- Validated by:
run_id_to_time_interval
- field anode_voltage_kv: float [Required]¶
- Validated by:
run_id_to_time_interval
- field disppeared_by_itself: bool [Required]¶
- Validated by:
run_id_to_time_interval
- field plot: str [Required]¶
- Validated by:
run_id_to_time_interval
- field pmt_rates: List[PmtRate] [Required]¶
- Validated by:
run_id_to_time_interval
- field severity: Literal['hotspot', 'warmspot'] = 'hotspot'¶
- Validated by:
run_id_to_time_interval
- pydantic model xedocs.schemas.HotspotVetoThreshold[source]¶
Show JSON schema
{ "title": "HotspotVetoThreshold", "description": "Base class for time-interval corrections\n\n- Adds an Interval index of type datetime\n- Enforces rules on updating intervals:\nCan only change the right side of an interval\nif right side is None and the new right side is\nafter the cutoff time (default is 2 hours after current time).\n\nThe cutoff is set to prevent values changing after already being used\nfor processing data.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "$ref": "#/definitions/TimeInterval" }, "value": { "title": "Value", "type": "number" } }, "required": [ "version", "time", "value" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
value (float)
- Validators:
normalize_tz»created_daterun_id_to_time_interval»all fieldstime_string_to_interval»time
- field value: float [Required]¶
- Validated by:
run_id_to_time_interval
- pydantic model xedocs.schemas.IbeltCalibation[source]¶
Calibrations performed inside the utube
Show JSON schema
{ "title": "IbeltCalibation", "description": "Calibrations performed inside the utube", "type": "object", "properties": { "time": { "$ref": "#/definitions/TimeInterval" }, "source_id": { "title": "Source Id", "maxLength": 60, "minLength": 1, "type": "string" }, "source_type": { "title": "Source Type", "enum": [ "ambe", "ar-37", "kr-83m", "rn-220", "rn-222", "led", "pulser", "noise", "none", "th-228", "th-232", "Y88", "YBe" ], "type": "string" }, "operator": { "title": "Operator", "default": "", "maxLength": 60, "minLength": 1, "type": "string" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "run_ids": { "title": "Run Ids", "default": [], "type": "array", "items": { "type": "string" } }, "filled_by": { "title": "Filled By", "default": "", "maxLength": 60, "minLength": 1, "type": "string" }, "z_cm": { "title": "Z Cm", "type": "number" }, "plug": { "title": "Plug", "type": "boolean" } }, "required": [ "time", "source_id", "source_type", "z_cm", "plug" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
plug (bool)z_cm (float)
- Validators:
run_id_to_time_interval»all fieldstime_string_to_interval»time
- field plug: bool [Required]¶
- Validated by:
run_id_to_time_interval
- field z_cm: float [Required]¶
- Validated by:
run_id_to_time_interval
- pydantic model xedocs.schemas.NaiveBayesClassifier[source]¶
Show JSON schema
{ "title": "NaiveBayesClassifier", "description": "Base class for time-interval corrections\n\n- Adds an Interval index of type datetime\n- Enforces rules on updating intervals:\nCan only change the right side of an interval\nif right side is None and the new right side is\nafter the cutoff time (default is 2 hours after current time).\n\nThe cutoff is set to prevent values changing after already being used\nfor processing data.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "$ref": "#/definitions/TimeInterval" }, "value": { "title": "Value", "type": "string" } }, "required": [ "version", "time", "value" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
value (str)
- Validators:
normalize_tz»created_daterun_id_to_time_interval»all fieldstime_string_to_interval»time
- field value: str [Required]¶
- Validated by:
run_id_to_time_interval
- fmt: ClassVar = 'binary'¶
- pydantic model xedocs.schemas.PeakReconstructionBias[source]¶
Show JSON schema
{ "title": "PeakReconstructionBias", "description": "Base class for time-interval corrections\n\n- Adds an Interval index of type datetime\n- Enforces rules on updating intervals:\nCan only change the right side of an interval\nif right side is None and the new right side is\nafter the cutoff time (default is 2 hours after current time).\n\nThe cutoff is set to prevent values changing after already being used\nfor processing data.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "$ref": "#/definitions/TimeInterval" }, "value": { "title": "Value", "type": "string" }, "signal": { "title": "Signal", "enum": [ "s1", "s2" ], "type": "string" } }, "required": [ "version", "time", "value", "signal" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
signal (Literal['s1', 's2'])value (str)
- Validators:
normalize_tz»created_daterun_id_to_time_interval»all fieldstime_string_to_interval»time
- field signal: Literal['s1', 's2'] [Required]¶
- Validated by:
run_id_to_time_interval
- field value: str [Required]¶
- Validated by:
run_id_to_time_interval
- fmt: ClassVar = 'json'¶
- pydantic model xedocs.schemas.PhotoionizationStrength[source]¶
Show JSON schema
{ "title": "PhotoionizationStrength", "description": "Base class for time-sampled corrections\n\n- Adds an interpolating index of type datetime\n- Enforces rules on inserting new data points\n\nSince extrapolation is allowed for ONLINE versions\nInserting new points before the cutoff is disallowed\nThis is to prevent setting values for times already\nprocessed using the extrapolated values.\nWhen inserting an ONLINE value after the cutoff, a\nnew document with equal values to the extrapolated values\nis inserted at the current time to prevent the inserted document\nfrom affecting the interpolated values that have already been used\nfor processing.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "title": "Time", "type": "string", "format": "date-time" }, "value": { "title": "Value", "type": "number" } }, "required": [ "version", "time", "value" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
value (float)
- Validators:
normalize_time»timenormalize_tz»created_daterun_id_to_time»all fields
- field value: float [Required]¶
- Validated by:
run_id_to_time
- pydantic model xedocs.schemas.PmtAreaToPE[source]¶
Show JSON schema
{ "title": "PmtAreaToPE", "description": "Base class for time-sampled corrections\n\n- Adds an interpolating index of type datetime\n- Enforces rules on inserting new data points\n\nSince extrapolation is allowed for ONLINE versions\nInserting new points before the cutoff is disallowed\nThis is to prevent setting values for times already\nprocessed using the extrapolated values.\nWhen inserting an ONLINE value after the cutoff, a\nnew document with equal values to the extrapolated values\nis inserted at the current time to prevent the inserted document\nfrom affecting the interpolated values that have already been used\nfor processing.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "title": "Time", "type": "string", "format": "date-time" }, "detector": { "title": "Detector", "enum": [ "tpc", "neutron_veto", "muon_veto", "tpc_he" ], "type": "string" }, "pmt": { "title": "Pmt", "minimum": 0, "type": "integer" }, "value": { "title": "Value", "type": "number" } }, "required": [ "version", "time", "detector", "pmt", "value" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
detector (Literal['tpc', 'neutron_veto', 'muon_veto', 'tpc_he'])pmt (int)value (float)
- Validators:
normalize_time»timenormalize_tz»created_daterun_id_to_time»all fields
- field detector: Literal['tpc', 'neutron_veto', 'muon_veto', 'tpc_he'] [Required]¶
- Validated by:
run_id_to_time
- field pmt: int [Required]¶
- Constraints:
minimum = 0
- Validated by:
run_id_to_time
- field value: float [Required]¶
- Validated by:
run_id_to_time
- pydantic model xedocs.schemas.PmtInstall[source]¶
Show JSON schema
{ "title": "PmtInstall", "description": "Base class for all xedocs schemas.", "type": "object", "properties": { "detector": { "title": "Detector", "enum": [ "tpc", "neutron_veto", "muon_veto", "tpc_he" ], "type": "string" }, "pmt": { "title": "Pmt", "minimum": 0, "type": "integer" }, "array": { "title": "Array", "type": "string" }, "sector": { "title": "Sector", "type": "string" }, "time": { "title": "Time", "type": "string", "format": "date-time" }, "serial_number": { "title": "Serial Number", "maxLength": 60, "type": "string" }, "position_x": { "title": "Position X", "type": "number" }, "position_y": { "title": "Position Y", "type": "number" }, "position_z": { "title": "Position Z", "type": "number" }, "signal_channel": { "title": "Signal Channel", "type": "integer" }, "signal_connector": { "title": "Signal Connector", "type": "integer" }, "signal_feedthrough": { "title": "Signal Feedthrough", "type": "string" }, "amplifier_crate": { "title": "Amplifier Crate", "type": "integer" }, "amplifier_fan": { "title": "Amplifier Fan", "type": "integer" }, "amplifier_plug": { "title": "Amplifier Plug", "type": "integer" }, "amplifier_serial": { "title": "Amplifier Serial", "type": "integer" }, "amplifier_slot": { "title": "Amplifier Slot", "type": "integer" }, "amplifier_channel": { "title": "Amplifier Channel", "type": "integer" }, "digitizer_channel": { "title": "Digitizer Channel", "type": "integer" }, "digitizer_crate": { "title": "Digitizer Crate", "type": "integer" }, "digitizer_module": { "title": "Digitizer Module", "type": "integer" }, "digitizer_slot": { "title": "Digitizer Slot", "type": "integer" }, "high_voltage_crate": { "title": "High Voltage Crate", "type": "integer" }, "high_voltage_board": { "title": "High Voltage Board", "type": "integer" }, "high_voltage_channel": { "title": "High Voltage Channel", "type": "integer" }, "high_voltage_connector": { "title": "High Voltage Connector", "type": "integer" }, "high_voltage_feedthrough": { "title": "High Voltage Feedthrough", "type": "string" }, "high_voltage_return": { "title": "High Voltage Return", "type": "integer" } }, "required": [ "detector", "pmt", "array", "sector", "time", "serial_number", "position_x", "position_y" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
amplifier_channel (int | None)amplifier_crate (int | None)amplifier_fan (int | None)amplifier_plug (int | None)amplifier_serial (int | None)amplifier_slot (int | None)array (str)detector (Literal['tpc', 'neutron_veto', 'muon_veto', 'tpc_he'])digitizer_channel (int | None)digitizer_crate (int | None)digitizer_module (int | None)digitizer_slot (int | None)high_voltage_board (int | None)high_voltage_channel (int | None)high_voltage_connector (int | None)high_voltage_crate (int | None)high_voltage_feedthrough (str | None)high_voltage_return (int | None)pmt (int)position_x (float)position_y (float)position_z (float | None)sector (str)serial_number (str)signal_channel (int | None)signal_connector (int | None)signal_feedthrough (str | None)time (datetime.datetime)
- field amplifier_channel: int | None = None¶
- field amplifier_crate: int | None = None¶
- field amplifier_fan: int | None = None¶
- field amplifier_plug: int | None = None¶
- field amplifier_serial: int | None = None¶
- field amplifier_slot: int | None = None¶
- field array: str [Required]¶
- field detector: Literal['tpc', 'neutron_veto', 'muon_veto', 'tpc_he'] [Required]¶
- field digitizer_channel: int | None = None¶
- field digitizer_crate: int | None = None¶
- field digitizer_module: int | None = None¶
- field digitizer_slot: int | None = None¶
- field high_voltage_board: int | None = None¶
- field high_voltage_channel: int | None = None¶
- field high_voltage_connector: int | None = None¶
- field high_voltage_crate: int | None = None¶
- field high_voltage_feedthrough: str | None = None¶
- field high_voltage_return: int | None = None¶
- field pmt: int [Required]¶
- Constraints:
minimum = 0
- field position_x: float [Required]¶
- field position_y: float [Required]¶
- field position_z: float | None = None¶
- field sector: str [Required]¶
- field serial_number: str [Required]¶
- Constraints:
maxLength = 60
- field signal_channel: int | None = None¶
- field signal_connector: int | None = None¶
- field signal_feedthrough: str | None = None¶
- field time: datetime [Required]¶
- pydantic model xedocs.schemas.PosRecModel[source]¶
Show JSON schema
{ "title": "PosRecModel", "description": "Base class for time-interval corrections\n\n- Adds an Interval index of type datetime\n- Enforces rules on updating intervals:\nCan only change the right side of an interval\nif right side is None and the new right side is\nafter the cutoff time (default is 2 hours after current time).\n\nThe cutoff is set to prevent values changing after already being used\nfor processing data.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "$ref": "#/definitions/TimeInterval" }, "value": { "title": "Value", "type": "string" }, "kind": { "title": "Kind", "enum": [ "cnn", "gcn", "mlp", "s1_cnn", "cnf" ], "type": "string" } }, "required": [ "version", "time", "value", "kind" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
kind (Literal['cnn', 'gcn', 'mlp', 's1_cnn', 'cnf'])value (str)
- Validators:
normalize_tz»created_daterun_id_to_time_interval»all fieldstime_string_to_interval»time
- field kind: Literal['cnn', 'gcn', 'mlp', 's1_cnn', 'cnf'] [Required]¶
- Validated by:
run_id_to_time_interval
- field value: str [Required]¶
- Validated by:
run_id_to_time_interval
- fmt: ClassVar = 'binary'¶
- pydantic model xedocs.schemas.ProcessingRequest[source]¶
Schema definition for a processing request
Show JSON schema
{ "title": "ProcessingRequest", "description": "Schema definition for a processing request", "type": "object", "properties": { "data_type": { "title": "Data Type", "type": "string" }, "lineage_hash": { "title": "Lineage Hash", "type": "string" }, "run_id": { "title": "Run Id", "type": "string" }, "destination": { "title": "Destination", "default": "UC_DALI_USERDISK", "enum": [ "SURFSARA_USERDISK", "SDSC_USERDISK", "LNGS_USERDISK", "UC_OSG_USERDISK", "UC_DALI_USERDISK", "CNAF_USERDISK" ], "type": "string" }, "user": { "title": "User", "type": "string" }, "request_date": { "title": "Request Date", "type": "string", "format": "date-time" }, "priority": { "title": "Priority", "default": -1, "type": "integer" }, "comments": { "title": "Comments", "default": "", "type": "string" } }, "required": [ "data_type", "lineage_hash", "run_id" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
comments (str)data_type (str)destination (Literal['SURFSARA_USERDISK', 'SDSC_USERDISK', 'LNGS_USERDISK', 'UC_OSG_USERDISK', 'UC_DALI_USERDISK', 'CNAF_USERDISK'])lineage_hash (str)priority (int)request_date (datetime.datetime)run_id (str)user (str)
- field comments: str = ''¶
- field data_type: str [Required]¶
- field destination: Literal['SURFSARA_USERDISK', 'SDSC_USERDISK', 'LNGS_USERDISK', 'UC_OSG_USERDISK', 'UC_DALI_USERDISK', 'CNAF_USERDISK'] = 'UC_DALI_USERDISK'¶
- field lineage_hash: str [Required]¶
- field priority: int = -1¶
- field request_date: datetime [Optional]¶
- field run_id: str [Required]¶
- field user: str [Optional]¶
- pydantic model xedocs.schemas.RelExtractionEff[source]¶
Show JSON schema
{ "title": "RelExtractionEff", "description": "Base class for time-sampled corrections\n\n- Adds an interpolating index of type datetime\n- Enforces rules on inserting new data points\n\nSince extrapolation is allowed for ONLINE versions\nInserting new points before the cutoff is disallowed\nThis is to prevent setting values for times already\nprocessed using the extrapolated values.\nWhen inserting an ONLINE value after the cutoff, a\nnew document with equal values to the extrapolated values\nis inserted at the current time to prevent the inserted document\nfrom affecting the interpolated values that have already been used\nfor processing.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "title": "Time", "type": "string", "format": "date-time" }, "partition": { "title": "Partition", "default": "all_tpc", "enum": [ "all_tpc", "ab", "cd" ], "type": "string" }, "value": { "title": "Value", "type": "number" } }, "required": [ "version", "time", "value" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
partition (Literal['all_tpc', 'ab', 'cd'])value (float)
- Validators:
normalize_time»timenormalize_tz»created_daterun_id_to_time»all fields
- field partition: Literal['all_tpc', 'ab', 'cd'] = 'all_tpc'¶
- Validated by:
run_id_to_time
- field value: float [Required]¶
- Validated by:
run_id_to_time
- pydantic model xedocs.schemas.RelativeChargeYield[source]¶
Show JSON schema
{ "title": "RelativeChargeYield", "description": "Base class for time-sampled corrections\n\n- Adds an interpolating index of type datetime\n- Enforces rules on inserting new data points\n\nSince extrapolation is allowed for ONLINE versions\nInserting new points before the cutoff is disallowed\nThis is to prevent setting values for times already\nprocessed using the extrapolated values.\nWhen inserting an ONLINE value after the cutoff, a\nnew document with equal values to the extrapolated values\nis inserted at the current time to prevent the inserted document\nfrom affecting the interpolated values that have already been used\nfor processing.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "title": "Time", "type": "string", "format": "date-time" }, "value": { "title": "Value", "type": "number" } }, "required": [ "version", "time", "value" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
value (float)
- Validators:
normalize_time»timenormalize_tz»created_daterun_id_to_time»all fields
- field value: float [Required]¶
- Validated by:
run_id_to_time
- pydantic model xedocs.schemas.RelativeLightYield[source]¶
Show JSON schema
{ "title": "RelativeLightYield", "description": "Base class for time-sampled corrections\n\n- Adds an interpolating index of type datetime\n- Enforces rules on inserting new data points\n\nSince extrapolation is allowed for ONLINE versions\nInserting new points before the cutoff is disallowed\nThis is to prevent setting values for times already\nprocessed using the extrapolated values.\nWhen inserting an ONLINE value after the cutoff, a\nnew document with equal values to the extrapolated values\nis inserted at the current time to prevent the inserted document\nfrom affecting the interpolated values that have already been used\nfor processing.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "title": "Time", "type": "string", "format": "date-time" }, "value": { "title": "Value", "type": "number" } }, "required": [ "version", "time", "value" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
value (float)
- Validators:
normalize_time»timenormalize_tz»created_daterun_id_to_time»all fields
- field value: float [Required]¶
- Validated by:
run_id_to_time
- pydantic model xedocs.schemas.S1AFTXYZMap[source]¶
Show JSON schema
{ "title": "S1AFTXYZMap", "description": "Base class for time-interval corrections\n\n- Adds an Interval index of type datetime\n- Enforces rules on updating intervals:\nCan only change the right side of an interval\nif right side is None and the new right side is\nafter the cutoff time (default is 2 hours after current time).\n\nThe cutoff is set to prevent values changing after already being used\nfor processing data.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "$ref": "#/definitions/TimeInterval" }, "value": { "title": "Value", "type": "string" } }, "required": [ "version", "time", "value" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
value (str)
- Validators:
normalize_tz»created_daterun_id_to_time_interval»all fieldstime_string_to_interval»time
- field value: str [Required]¶
- Validated by:
run_id_to_time_interval
- fmt: ClassVar = 'json'¶
- pydantic model xedocs.schemas.S1PatternMap[source]¶
Show JSON schema
{ "title": "S1PatternMap", "description": "Base class for time-interval corrections\n\n- Adds an Interval index of type datetime\n- Enforces rules on updating intervals:\nCan only change the right side of an interval\nif right side is None and the new right side is\nafter the cutoff time (default is 2 hours after current time).\n\nThe cutoff is set to prevent values changing after already being used\nfor processing data.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "$ref": "#/definitions/TimeInterval" }, "value": { "title": "Value", "type": "string" }, "algorithm": { "title": "Algorithm", "enum": [ "cnn", "gcn", "mlp", "cnf" ], "type": "string" } }, "required": [ "version", "time", "value", "algorithm" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
- Validators:
normalize_tz»created_daterun_id_to_time_interval»all fieldstime_string_to_interval»time
- fmt: ClassVar = 'pkl'¶
- pydantic model xedocs.schemas.S1XYZMap[source]¶
Show JSON schema
{ "title": "S1XYZMap", "description": "Base class for time-interval corrections\n\n- Adds an Interval index of type datetime\n- Enforces rules on updating intervals:\nCan only change the right side of an interval\nif right side is None and the new right side is\nafter the cutoff time (default is 2 hours after current time).\n\nThe cutoff is set to prevent values changing after already being used\nfor processing data.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "$ref": "#/definitions/TimeInterval" }, "value": { "title": "Value", "type": "string" }, "algorithm": { "title": "Algorithm", "enum": [ "cnn", "gcn", "mlp", "cnf" ], "type": "string" } }, "required": [ "version", "time", "value", "algorithm" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
- Validators:
normalize_tz»created_daterun_id_to_time_interval»all fieldstime_string_to_interval»time
- pydantic model xedocs.schemas.S2PatternMap[source]¶
Show JSON schema
{ "title": "S2PatternMap", "description": "Base class for time-interval corrections\n\n- Adds an Interval index of type datetime\n- Enforces rules on updating intervals:\nCan only change the right side of an interval\nif right side is None and the new right side is\nafter the cutoff time (default is 2 hours after current time).\n\nThe cutoff is set to prevent values changing after already being used\nfor processing data.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "$ref": "#/definitions/TimeInterval" }, "value": { "title": "Value", "type": "string" }, "algorithm": { "title": "Algorithm", "enum": [ "cnn", "gcn", "mlp", "cnf" ], "type": "string" } }, "required": [ "version", "time", "value", "algorithm" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
- Validators:
normalize_tz»created_daterun_id_to_time_interval»all fieldstime_string_to_interval»time
- fmt: ClassVar = 'binary'¶
- pydantic model xedocs.schemas.S2XYMap[source]¶
Show JSON schema
{ "title": "S2XYMap", "description": "Base class for time-interval corrections\n\n- Adds an Interval index of type datetime\n- Enforces rules on updating intervals:\nCan only change the right side of an interval\nif right side is None and the new right side is\nafter the cutoff time (default is 2 hours after current time).\n\nThe cutoff is set to prevent values changing after already being used\nfor processing data.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "$ref": "#/definitions/TimeInterval" }, "value": { "title": "Value", "type": "string" }, "algorithm": { "title": "Algorithm", "enum": [ "cnn", "gcn", "mlp", "cnf" ], "type": "string" } }, "required": [ "version", "time", "value", "algorithm" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
- Validators:
normalize_tz»created_daterun_id_to_time_interval»all fieldstime_string_to_interval»time
- pydantic model xedocs.schemas.SOMClassifier[source]¶
Show JSON schema
{ "title": "SOMClassifier", "description": "Base class for time-interval corrections\n\n- Adds an Interval index of type datetime\n- Enforces rules on updating intervals:\nCan only change the right side of an interval\nif right side is None and the new right side is\nafter the cutoff time (default is 2 hours after current time).\n\nThe cutoff is set to prevent values changing after already being used\nfor processing data.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "$ref": "#/definitions/TimeInterval" }, "value": { "title": "Value", "type": "string" } }, "required": [ "version", "time", "value" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
value (str)
- Validators:
normalize_tz»created_daterun_id_to_time_interval»all fieldstime_string_to_interval»time
- field value: str [Required]¶
- Validated by:
run_id_to_time_interval
- fmt: ClassVar = 'binary'¶
- pydantic model xedocs.schemas.SingleElectronGain[source]¶
Show JSON schema
{ "title": "SingleElectronGain", "description": "Base class for time-sampled corrections\n\n- Adds an interpolating index of type datetime\n- Enforces rules on inserting new data points\n\nSince extrapolation is allowed for ONLINE versions\nInserting new points before the cutoff is disallowed\nThis is to prevent setting values for times already\nprocessed using the extrapolated values.\nWhen inserting an ONLINE value after the cutoff, a\nnew document with equal values to the extrapolated values\nis inserted at the current time to prevent the inserted document\nfrom affecting the interpolated values that have already been used\nfor processing.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "title": "Time", "type": "string", "format": "date-time" }, "partition": { "title": "Partition", "default": "all_tpc", "enum": [ "all_tpc", "ab", "cd" ], "type": "string" }, "value": { "title": "Value", "type": "number" } }, "required": [ "version", "time", "value" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
partition (Literal['all_tpc', 'ab', 'cd'])value (float)
- Validators:
normalize_time»timenormalize_tz»created_daterun_id_to_time»all fields
- field partition: Literal['all_tpc', 'ab', 'cd'] = 'all_tpc'¶
- Validated by:
run_id_to_time
- field value: float [Required]¶
- Validated by:
run_id_to_time
- pydantic model xedocs.schemas.SingleElectronGainPartition[source]¶
Show JSON schema
{ "title": "SingleElectronGainPartition", "description": "Base class for time-interval corrections\n\n- Adds an Interval index of type datetime\n- Enforces rules on updating intervals:\nCan only change the right side of an interval\nif right side is None and the new right side is\nafter the cutoff time (default is 2 hours after current time).\n\nThe cutoff is set to prevent values changing after already being used\nfor processing data.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "$ref": "#/definitions/TimeInterval" }, "region": { "title": "Region", "maxLength": 80, "type": "string" }, "value": { "title": "Value", "type": "number" } }, "required": [ "version", "time", "region", "value" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
region (str)value (float)
- Validators:
normalize_tz»created_daterun_id_to_time_interval»all fieldstime_string_to_interval»time
- field region: str [Required]¶
- Constraints:
maxLength = 80
- Validated by:
run_id_to_time_interval
- field value: float [Required]¶
- Validated by:
run_id_to_time_interval
- pydantic model xedocs.schemas.TestCorrection[source]¶
Show JSON schema
{ "title": "TestCorrection", "description": "Base class for time-sampled corrections\n\n- Adds an interpolating index of type datetime\n- Enforces rules on inserting new data points\n\nSince extrapolation is allowed for ONLINE versions\nInserting new points before the cutoff is disallowed\nThis is to prevent setting values for times already\nprocessed using the extrapolated values.\nWhen inserting an ONLINE value after the cutoff, a\nnew document with equal values to the extrapolated values\nis inserted at the current time to prevent the inserted document\nfrom affecting the interpolated values that have already been used\nfor processing.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "title": "Time", "type": "string", "format": "date-time" }, "detector": { "title": "Detector", "enum": [ "tpc", "neutron_veto", "muon_veto", "tpc_he" ], "type": "string" }, "pmt": { "title": "Pmt", "minimum": 0, "type": "integer" }, "value": { "title": "Value", "type": "number" } }, "required": [ "version", "time", "detector", "pmt", "value" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
detector (Literal['tpc', 'neutron_veto', 'muon_veto', 'tpc_he'])pmt (int)value (float)
- Validators:
normalize_time»timenormalize_tz»created_daterun_id_to_time»all fields
- field detector: Literal['tpc', 'neutron_veto', 'muon_veto', 'tpc_he'] [Required]¶
- Validated by:
run_id_to_time
- field pmt: int [Required]¶
- Constraints:
minimum = 0
- Validated by:
run_id_to_time
- field value: float [Required]¶
- Validated by:
run_id_to_time
- pydantic model xedocs.schemas.TimeIntervalCorrection[source]¶
Base class for time-interval corrections
Adds an Interval index of type datetime
Enforces rules on updating intervals:
Can only change the right side of an interval if right side is None and the new right side is after the cutoff time (default is 2 hours after current time).
The cutoff is set to prevent values changing after already being used for processing data.
Show JSON schema
{ "title": "TimeIntervalCorrection", "description": "Base class for time-interval corrections\n\n- Adds an Interval index of type datetime\n- Enforces rules on updating intervals:\nCan only change the right side of an interval\nif right side is None and the new right side is\nafter the cutoff time (default is 2 hours after current time).\n\nThe cutoff is set to prevent values changing after already being used\nfor processing data.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "$ref": "#/definitions/TimeInterval" } }, "required": [ "version", "time" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
time (rframe.types.TimeInterval)
- Validators:
normalize_tz»created_daterun_id_to_time_interval»all fieldstime_string_to_interval»time
- field time: TimeInterval [Required]¶
- Validated by:
run_id_to_time_intervaltime_string_to_interval
- pre_delete(datasource, **kwargs)[source]¶
User defined checks to perform prior to document deletion. Should raise an exception if deletion is disallowed.
- pydantic model xedocs.schemas.TimeSampledCorrection[source]¶
Base class for time-sampled corrections
Adds an interpolating index of type datetime
Enforces rules on inserting new data points
Since extrapolation is allowed for ONLINE versions Inserting new points before the cutoff is disallowed This is to prevent setting values for times already processed using the extrapolated values. When inserting an ONLINE value after the cutoff, a new document with equal values to the extrapolated values is inserted at the current time to prevent the inserted document from affecting the interpolated values that have already been used for processing.
Show JSON schema
{ "title": "TimeSampledCorrection", "description": "Base class for time-sampled corrections\n\n- Adds an interpolating index of type datetime\n- Enforces rules on inserting new data points\n\nSince extrapolation is allowed for ONLINE versions\nInserting new points before the cutoff is disallowed\nThis is to prevent setting values for times already\nprocessed using the extrapolated values.\nWhen inserting an ONLINE value after the cutoff, a\nnew document with equal values to the extrapolated values\nis inserted at the current time to prevent the inserted document\nfrom affecting the interpolated values that have already been used\nfor processing.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "title": "Time", "type": "string", "format": "date-time" } }, "required": [ "version", "time" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
time (datetime.datetime)
- Validators:
normalize_time»timenormalize_tz»created_daterun_id_to_time»all fields
- field time: datetime [Required]¶
- Validated by:
normalize_timerun_id_to_time
- pre_delete(datasource, **kwargs)[source]¶
User defined checks to perform prior to document deletion. Should raise an exception if deletion is disallowed.
- pydantic model xedocs.schemas.UtubeCalibration[source]¶
Calibrations performed inside the utube
Show JSON schema
{ "title": "UtubeCalibration", "description": "Calibrations performed inside the utube", "type": "object", "properties": { "time": { "$ref": "#/definitions/TimeInterval" }, "source_id": { "title": "Source Id", "maxLength": 60, "minLength": 1, "type": "string" }, "source_type": { "title": "Source Type", "enum": [ "ambe", "ar-37", "kr-83m", "rn-220", "rn-222", "led", "pulser", "noise", "none", "th-228", "th-232", "Y88", "YBe" ], "type": "string" }, "operator": { "title": "Operator", "default": "", "maxLength": 60, "minLength": 1, "type": "string" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "run_ids": { "title": "Run Ids", "default": [], "type": "array", "items": { "type": "string" } }, "filled_by": { "title": "Filled By", "default": "", "maxLength": 60, "minLength": 1, "type": "string" }, "tube": { "title": "Tube", "enum": [ "top", "bottom" ], "type": "string" }, "direction": { "title": "Direction", "enum": [ "cw", "ccw" ], "type": "string" }, "depth_cm": { "title": "Depth Cm", "type": "number" } }, "required": [ "time", "source_id", "source_type", "tube", "direction", "depth_cm" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
depth_cm (float)direction (Literal['cw', 'ccw'])tube (Literal['top', 'bottom'])
- Validators:
run_id_to_time_interval»all fieldstime_string_to_interval»time
- field depth_cm: float [Required]¶
- Validated by:
run_id_to_time_interval
- field direction: Literal['cw', 'ccw'] [Required]¶
- Validated by:
run_id_to_time_interval
- field tube: Literal['top', 'bottom'] [Required]¶
- Validated by:
run_id_to_time_interval
- pydantic model xedocs.schemas.VersionedXeDoc[source]¶
Show JSON schema
{ "title": "VersionedXeDoc", "description": "Base class for all xedocs schemas.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" } }, "required": [ "version" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
version (str)
- field version: str [Required]¶
- Constraints:
maxLength = 20
- pydantic model xedocs.schemas.VoltageChange[source]¶
Show JSON schema
{ "title": "VoltageChange", "description": "Base class for all xedocs schemas.", "type": "object", "properties": { "detector": { "title": "Detector", "enum": [ "tpc", "neutron_veto", "muon_veto", "tpc_he" ], "type": "string" }, "pmt": { "title": "Pmt", "minimum": 0, "type": "integer" }, "time": { "title": "Time", "type": "string", "format": "date-time" }, "old_voltage": { "title": "Old Voltage", "type": "number" }, "new_voltage": { "title": "New Voltage", "type": "number" }, "operator": { "title": "Operator", "maxLength": 60, "type": "string" }, "comments": { "title": "Comments", "type": "string" } }, "required": [ "detector", "pmt", "time", "old_voltage", "new_voltage", "operator", "comments" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
comments (str)detector (Literal['tpc', 'neutron_veto', 'muon_veto', 'tpc_he'])new_voltage (float)old_voltage (float)operator (str)pmt (int)time (datetime.datetime)
- field comments: str [Required]¶
- field detector: Literal['tpc', 'neutron_veto', 'muon_veto', 'tpc_he'] [Required]¶
- field new_voltage: float [Required]¶
- field old_voltage: float [Required]¶
- field operator: str [Required]¶
- Constraints:
maxLength = 60
- field pmt: int [Required]¶
- Constraints:
minimum = 0
- field time: datetime [Required]¶
- pydantic model xedocs.schemas.VoltageSetting[source]¶
Show JSON schema
{ "title": "VoltageSetting", "description": "Base class for all xedocs schemas.", "type": "object", "properties": { "name": { "title": "Name", "maxLength": 60, "minLength": 4, "type": "string" }, "detector": { "title": "Detector", "enum": [ "tpc", "neutron_veto", "muon_veto", "tpc_he" ], "type": "string" }, "pmt": { "title": "Pmt", "minimum": 0, "type": "integer" }, "active": { "title": "Active", "default": true, "type": "boolean" }, "created_by": { "title": "Created By", "type": "string" }, "comments": { "title": "Comments", "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "voltage": { "title": "Voltage", "type": "number" } }, "required": [ "name", "detector", "pmt", "created_by", "comments", "created_date", "voltage" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
active (bool)comments (str)created_by (str)created_date (datetime.datetime)detector (Literal['tpc', 'neutron_veto', 'muon_veto', 'tpc_he'])name (str)pmt (int)voltage (float)
- field active: bool = True¶
- field comments: str [Required]¶
- field created_by: str [Required]¶
- field created_date: datetime [Required]¶
- field detector: Literal['tpc', 'neutron_veto', 'muon_veto', 'tpc_he'] [Required]¶
- field name: str [Required]¶
- Constraints:
maxLength = 60
minLength = 4
- field pmt: int [Required]¶
- Constraints:
minimum = 0
- field voltage: float [Required]¶
- pydantic model xedocs.schemas.XeDoc[source]¶
Base class for all xedocs schemas.
Show JSON schema
{ "title": "XeDoc", "description": "Base class for all xedocs schemas.", "type": "object", "properties": {} }
- Config:
allow_population_by_field_name: bool = True
- pydantic model xedocs.schemas.ZBias[source]¶
Show JSON schema
{ "title": "ZBias", "description": "Base class for time-interval corrections\n\n- Adds an Interval index of type datetime\n- Enforces rules on updating intervals:\nCan only change the right side of an interval\nif right side is None and the new right side is\nafter the cutoff time (default is 2 hours after current time).\n\nThe cutoff is set to prevent values changing after already being used\nfor processing data.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "$ref": "#/definitions/TimeInterval" }, "value": { "title": "Value", "type": "string" } }, "required": [ "version", "time", "value" ], "definitions": { "TimeInterval": { "title": "TimeInterval", "type": "object", "properties": { "left": { "title": "Left", "type": "string", "format": "date-time" }, "right": { "title": "Right", "default": "2232-01-01T00:00:00", "type": "string", "format": "date-time" } }, "required": [ "left" ] } } }
- Config:
allow_population_by_field_name: bool = True
- Fields:
- Validators:
normalize_tz»created_daterun_id_to_time_interval»all fieldstime_string_to_interval»time
- fmt: ClassVar = 'json.gz'¶
- xedocs.schemas.are_equal(x: str, y: str)[source]¶
- xedocs.schemas.are_equal(x: numbers.Number, y: numbers.Number)[source]
- xedocs.schemas.are_equal(x: collections.abc.Iterable, y: collections.abc.Iterable)[source]
- xedocs.schemas.are_equal(x: collections.abc.Mapping, y: collections.abc.Mapping)[source]
- xedocs.schemas.are_equal(x: rframe.types.Interval, y: rframe.types.Interval)[source]
- xedocs.schemas.are_equal(x: object, y: object)[source]
- pydantic model xedocs.schemas.cS2BottomTopRatioCorrection[source]¶
Show JSON schema
{ "title": "cS2BottomTopRatioCorrection", "description": "Base class for time-sampled corrections\n\n- Adds an interpolating index of type datetime\n- Enforces rules on inserting new data points\n\nSince extrapolation is allowed for ONLINE versions\nInserting new points before the cutoff is disallowed\nThis is to prevent setting values for times already\nprocessed using the extrapolated values.\nWhen inserting an ONLINE value after the cutoff, a\nnew document with equal values to the extrapolated values\nis inserted at the current time to prevent the inserted document\nfrom affecting the interpolated values that have already been used\nfor processing.", "type": "object", "properties": { "version": { "title": "Version", "maxLength": 20, "type": "string" }, "created_date": { "title": "Created Date", "type": "string", "format": "date-time" }, "comments": { "title": "Comments", "default": "", "type": "string" }, "time": { "title": "Time", "type": "string", "format": "date-time" }, "value": { "title": "Value", "type": "number" } }, "required": [ "version", "time", "value" ] }
- Config:
allow_population_by_field_name: bool = True
- Fields:
value (float)
- Validators:
normalize_time»timenormalize_tz»created_daterun_id_to_time»all fields
- field value: float [Required]¶
- Validated by:
run_id_to_time
- xedocs.schemas.root_validator(_func: AnyCallable | None = None, *, pre: bool = False, allow_reuse: bool = False, skip_on_failure: bool = False) 'AnyClassMethod' | Callable[[AnyCallable], 'AnyClassMethod']¶
Decorate methods on a model indicating that they should be used to validate (and perhaps modify) data either before or after standard model parsing/validation is performed.
- xedocs.schemas.validator(*fields: str, pre: bool = False, each_item: bool = False, always: bool = False, check_fields: bool = True, whole: bool | None = None, allow_reuse: bool = False) Callable[[AnyCallable], 'AnyClassMethod']¶
Decorate methods on the class indicating that they should be used to validate fields :param fields: which field(s) the method should be called on :param pre: whether or not this validator should be called before the standard validators (else after) :param each_item: for complex objects (sets, lists etc.) whether to validate individual elements rather than the
whole object
- Parameters:
always – whether this method and other validators should be called even if the value is missing
check_fields – whether to check that the fields actually exist on the model
allow_reuse – whether to track and raise an error if another validator refers to the decorated function