analysis_submit
Submit a Python analysis script to run against project data in a persistent queue, copying inputs and outputs and returning an operation ID for results.
Instructions
Run a native Python script against existing data in a persistent analysis queue.
script and inputs are project-relative files. They are copied, with subdirectories preserved, into analysis/<operation_id>/. Python's working directory is that analysis directory, so scripts read input paths relative to its root, not their own scripts/ folder. outputs are required nonempty paths relative to the analysis directory. The installed analysis environment provides NumPy and Matplotlib. Example: script='scripts/plot.py', inputs=['data.csv'], outputs=['plot.png','statistics.csv']. Reuse previous results without editing script paths: input_bindings={'data.csv':'analysis//data.csv'} maps workspace paths to project source files. inputs may be [] when bindings are provided. The receipt retains source paths, hashes and each independent input copy. Returns operation_id; release the task lease before polling. operation_get returns output paths, SHA-256 values and analysis.log. Use file_read for logs, artifact_preview for the actual image, then artifact_register to link each result to requirements. For batch analysis set batch_id and batch_files (paths relative to each collected run). The service generates batch-samples.json and samples/<run_id>/... inputs, preserving planned/included/excluded members. The script chooses scientific statistics and reports their denominator. method is optional native-analysis context (purpose, units, window, uncertainty, rationale); supersedes links an earlier analysis operation without deleting its files. Source/version facts are recorded by the service. Physics evaluations use run_prepare/run_submit on HPC.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"task_id": "<task_id>",
"revision": "<revision>",
"script": "<script>",
"inputs": "<inputs>",
"outputs": "<outputs>",
"op_id": "<op_id>"
},
"name": "analysis_submit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op_id | Yes | ||
| token | No | ||
| inputs | Yes | ||
| method | No | ||
| script | Yes | ||
| outputs | Yes | ||
| task_id | Yes | ||
| batch_id | No | ||
| revision | Yes | ||
| supersedes | No | ||
| batch_files | No | ||
| input_bindings | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |