semvec/pypi-packages huggingface dataset:
topassimgraph 0.1
GUI to plot the results of a topas simulation
Requires Python: >=3.8
Keywords: topas,monte-carlo,python,simulation

# topas-create-graphs

## A script to automatically plot the results of a topas simulation

Works for percentage depth dose (pdd) and dose profiles (dp). Depth dose measurements are assumed to be in the z-direction, dose profiles in the x- or y-directions.
Language is in german.

## Installation

Install using <b>pip install topas-create-graphs</b>. Then, start the GUI by running:

<img src="https://user-images.githubusercontent.com/87897942/149772476-5d950e25-9a60-40a7-a739-c80f763405c9.png"  width="400" height="200" />

## Automatically calculates relevant parameters

| Measurement type | Parameters |         |              |             |                |                 |
|------------------|:----------:|:-------:|:------------:|:-----------:|:--------------:|:---------------:|
|                  |            |         |              |             |                |                 |
| Depth dose       |  Q-Factor  |  z<sub>max</sub>  |              |             |                |                 |
|                  |            |         |              |             |                |                 |
| Dose profile     |    FWHM    | CAX<sub>dev</sub>  | FLAT<sub>Krieger</sub>  | FLAT<sub>stddev</sub>  | Penumbra (L&R) | Integral (L&R)  |

- Q-Factor : Radiation Quality Factor
- z<sub>max</sub> : Depth at Maximum

- FWHM : Full-Width at Half-Maximum
- CAX<sub>dev</sub> : Centre Axis Deviation
- FLAT<sub>Krieger</sub> : Flatness of Dose Plateau (Definitionby Krieger)
- FLAT<sub>stddev</sub> : Flatness of Dose Plateau (Standard Deviation)
- Penumbra (L&R) : Width of Left and Right Penumbra
- Integral (L&R) : Integral below Left and Right Penumbra

### Assumes a ".csv" input file format from a TOPAS Scorer with the following header format:

\# TOPAS Version: {...}  
\# Parameter File: {...}.txt  
\# Results for scorer {...}  
\# Scored in component: {...}  
\# X in {...} bin of {...} cm  
\# Y in 1 {...} of {...} cm  
\# Z in {...} bins of {...} cm  
\# DoseToMedium ( Gy ) : {Sum/Mean}   Standard_Deviation     
Voxel Coordinate X, Voxel Coordinate Y, Voxel Coordinate Z, {Sum/Mean} Value, Standard_Deviation Value   
                 .   
                 .   
                 .   
## Dependencies

Uses the beautiful Azure-ttk dark theme by @rdbende.
Requires python3, numpy, scipy, matplotlib, PIL, cv2, and tkinter.
random-brain 0.1.2
Python Random Brain Module

# Random-brain

[![](https://img.shields.io/badge/Python-3776AB?style=for-the-badge&logo=python&logoColor=white)](https://www.python.org/)


[![](https://img.shields.io/badge/Maintained%3F-yes-green.svg)]()
[![](https://img.shields.io/website-up-down-green-red/http/monip.org.svg)](https://einelson.github.io/projects/random_brain/random_brain.html)
[![](https://img.shields.io/bitbucket/issues/einelson/Random-brain)]()


## About
Random brain is the neural network implementation of a random forest. Its purpose is to combine the strengths of multiple nerual networks.

## Background on random forests
A random forest is a machine learning model that is composed of multiple decision trees. These trees in the forest all predict an outcome and the majority rules.

## Similarities
Just as the random forest is a vote based ML algorithm, the random brain is a vote based algorithm as well, but uses neural networks specified by the user rather than decision forests.

## Setting up Random brain
```
pip install random-brain
```

## API
Init the brain module and class.
```
from random_brain import random_brain
brain = random_brain.random_brain()
```

**import models()**

Import models will take in a directory or a single .h5 file. Sub directories will be ignored.
```
brain.import_models(model_path = 'path/to/model.h5')
brain.import_models(model_path = 'path/to/directory')
```

**show_brain()**

Shows the keys used in the brain. This should just be the name of each imported model
```
brain.show_brain()
```


**clear_brain()**

Clear a single model or more by entering in the model name as a list. Leave blank to clear all models.
```
brain.clear_brain(item_list = ['model to remove'])
```

**vote**

Add in yTest to cast votes. Vote() will only return the votes as a numpy array and not actual predictions. This is useful if you want to run your own statistics on the votes.

```
brain.vote(yTest = [1, 2, 3, 4, ...])
```

**predict (in development)**

Add in your yTest to make predictions. This will attempt to make a prediction based off of the networks and will return a single answer. This is still in development.

In the future prediction and threading options will be added and improved.
```
brain.predict(yTest = [1, 2, 3, 4, ...])
```