> For the complete documentation index, see [llms.txt](https://iddynamics.gitbook.io/flepimop/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://iddynamics.gitbook.io/flepimop/more/setting-up-the-model-and-post-processing/plotting-scripts.md).

# Diagnostic plotting scripts

We provide helper scripts to aid users in understanding model outputs and diagnosing simulations and iterations. These scripts may be set to run automatically after a model run, and are dependent on the model defined in the user's defined config file ;

The script `postprocess_snapshot.R` requires the following command line inputs:

* a user-defined config, `$CONFIG_PATH`
* a run index, `$FLEPI_RUN_INDEX`
* a path to the model output results, `$FS_RESULTS_PATH`
* a path to the flepiMoP repository, `$FLEPI_PATH`; an ;
* a list of outputs to plot, `$OUTPUTS`, by default the script provides diagnostics for the following model output file ;

  ```r
  "hosp, hpar, snpi, hnpi, llik"
  ```

Plots of `hosp` output files show confidence intervals of model runs, against the provided ground truth data for inference runs, for each metapopulation node. `hnpi` and `snpi` plots provide violin plots of parameter values for each slot ;

Other scripts are included as more specific examples of post-processing, used for diagnostic tools. `processing_diagnostics.R` scripts provides a detailed diagnosis of inference model runs and fits ;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://iddynamics.gitbook.io/flepimop/more/setting-up-the-model-and-post-processing/plotting-scripts.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
