> ## Documentation Index
> Fetch the complete documentation index at: https://docs.atomscale.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Tool State

> Parse, clean, and analyze instrument log files from synthesis tools

The Tool State workflow processes instrument log files from synthesis tools, extracts timeseries data for each parameter, and runs signal analysis to characterize oscillation behavior and decay.

<Tabs>
  <Tab title="Overview">
    ## What It Does

    The tool state pipeline takes raw log files uploaded from an instrument and produces structured timeseries that you can plot, compare across runs, and monitor for anomalies. The pipeline handles format parsing, data cleaning, signal analysis, and anomaly detection in a single pass.

    ## Supported Formats

    The pipeline supports three input formats:

    | Format               | Description                                                                                                                                                                 |
    | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | **Tool logs**        | CSV log files from synthesis tools. Extracts Ratio Pyrometer and SC Pyrometer temperature readings, then runs signal analysis.                                              |
    | **Generic CSV**      | Any delimited file (CSV, TSV, or other). The pipeline auto-detects the delimiter and header offset, coerces columns to numeric types, and extracts time axes automatically. |
    | **MOCVD recipe XML** | Recipe definition files. The pipeline expands compact recipe steps into a dense timeseries with interpolation.                                                              |

    ## Outputs

    For **tool logs**, the pipeline produces:

    | Output                     | Description                                                         |
    | -------------------------- | ------------------------------------------------------------------- |
    | `ratio_pyrometer`          | Raw Ratio Pyrometer temperature timeseries                          |
    | `sc_pyrometer`             | Raw SC Pyrometer temperature timeseries                             |
    | `median_period_seconds`    | Median oscillation period extracted from peak analysis, per segment |
    | `decay_constant_minutes`   | Exponential decay time constant fitted to peak envelopes            |
    | `decay_fit`                | Interpolated decay fit curve                                        |
    | `{property}_anomaly_score` | Embedding-based anomaly score (0 to 1) for each property            |
    | `{property}_anomaly_class` | Classification label for detected anomalies                         |
    | `{property}_forecast`      | Predicted value based on current trajectory                         |
    | `{property}_z_score`       | Z-score deviation metric for each property (legacy)                 |
    | `{property}_ema_z_score`   | EMA residual z-score for each property (legacy)                     |

    For **generic CSV** files, the pipeline produces a timeseries for each numeric column in the file, plus the same anomaly detection metrics.
  </Tab>

  <Tab title="Technical">
    ## Tool Log Pipeline

    The tool log pipeline processes MOCVD temperature logs through the following stages:

    1. **Data ingestion**: downloads and concatenates CSV log files into a single dataset
    2. **Cleaning**: extracts pyrometer temperature columns, filters invalid readings, and computes elapsed time
    3. **Segmentation**: breaks the timeseries into segments based on time gaps, discarding segments that are too short or too low in amplitude
    4. **Signal analysis**: detects oscillation peaks within each segment, computes the median oscillation period, and fits a decay model to the peak envelope
    5. **Changepoint detection**: runs the [Changepoint Detection workflow](/platform/reference/workflows/changepoint-detection) on each property to flag changepoints

    ## Generic CSV Pipeline

    The generic CSV pipeline auto-detects the delimiter and header structure of arbitrary delimited files, identifies time columns, and stores each numeric column as an independent timeseries with anomaly detection metrics.
  </Tab>
</Tabs>
