Skip to content

Instantly share code, notes, and snippets.

View marenaud's full-sized avatar

Marc-André Renaud marenaud

View GitHub Profile

Setting medium dose = yes to get some statistics as part of the output

	:start ausgab object:
		library = egs_dose_scoring
		name = BONE
		medium dose = yes
		region dose = no
		:start output dose file:
			geometry name = phantom4 # must name an EGS_XYZGeometry
			file type = 3ddose
@marenaud
marenaud / Dose.py
Created January 16, 2018 18:24
Read doses in Python
"""Dose module to load and represent voxelized Monte Carlo dose data"""
import struct
import numpy as np
class Dose(object):
"""Voxelized Monte Carlo dose data"""
def __init__(self, num_voxels, x_voxels, y_voxels, z_voxels, doses, uncerts):
self.num_voxels = num_voxels
self.x_voxels = x_voxels
self.y_voxels = y_voxels
@marenaud
marenaud / Dose.cc
Last active January 16, 2018 18:03
Loading doses in C++
#include <string>
#include <vector>
#include <fstream>
#include <iostream>
#include <chrono>
#include <string.h>
#include <stdlib.h>
class Dose
{

Keybase proof

I hereby claim:

  • I am marenaud on github.
  • I am marenaud (https://keybase.io/marenaud) on keybase.
  • I have a public key ASCRv9YXPS8Vs_ZF2jFsEyz2nNMJuOyKcCt5dpADkv8ZBQo

To claim this, I am signing this object: