> 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
