{ "cells": [ { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Using matplotlib backend: nbAgg\n", "Populating the interactive namespace from numpy and matplotlib\n" ] } ], "source": [ "%pylab \n", "from nugridpy import nugridse as mp\n", "from nugridpy import mesa as ms\n", "\n", "data_dir=\"/data/nugrid_apod2/\" \n", "#data_dir=\"/data/nugrid_vos/\" \n", "\n", "ms.set_nugrid_path(data_dir)\n", "mp.set_nugrid_path(data_dir)" ] }, { "cell_type": "code", "execution_count": 25, "metadata": { "collapsed": true }, "outputs": [], "source": [ "from nugridpy import ascii_table as at" ] }, { "cell_type": "code", "execution_count": 33, "metadata": { "collapsed": true }, "outputs": [], "source": [ "dcols=['Z', 'species','mass fraction']\n", "z=[10,1,2,3]\n", "names=['ne 21','ne 21','ne 21','ne 21']\n", "abu = [0.1,0.2,0.3,0.4]\n", "data=[z,names,abu]\n", "hd=[\"info about this initial abundance\"]\n", "outfile='iniab.dat'\n", "%rm iniab.dat\n", "at.write(outfile,hd,dcols,data)" ] }, { "cell_type": "code", "execution_count": 34, "metadata": { "collapsed": true }, "outputs": [], "source": [ "%less iniab.dat\n" ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.12" } }, "nbformat": 4, "nbformat_minor": 1 }