Skip to content
jessicahunter24 edited this page Apr 16, 2013 · 32 revisions

PINSPEC is a library that provides the ability to generate, broaden, and plot cross sections, run simulations, plot results, and more! The tutorials below will demonstrate some of the more important aspects of PINSPEC. In order to follow the tutorials, users should begin by learning how to execute input.

Since the input for PINSPEC is written in Python, commands can be executed interactively via the Python interpreter, or they can be assembled into a Python file (with extension ".py") and executed from any directory. Output will be deposited in the same directory as the input file, or the directory in which the interpreter is run.

###Running PINSPEC Using the Python Intrepreter

To run in PINSPEC interactively, simply open a terminal window and use the command:

python

This will begin the interpreter, whose prompts are marked by ">>>". In this environment, a user can type input line by line with immediate execution. For multiple line input, like if loops, the interpreter will show continuation lines with "...". Once the structure is completed, the commands will be executed. Once the user is finished with PINSPEC, the interpreter can be exited by using Ctrl-D or typing: exit()

This will return you to the normal terminal window.

Running PINSPEC interactively is highly recommended for beginners who wish to learn the versatility of PINSPEC. For more information on using the Python interpreter, visit the Python guide for using the interpreter.

###Running PINSPEC Using an Input File An alternative to running PINSPEC interactively is to assemble the input into a text file, save it as a Python file, and execute using Python. This method is encouraged for users who wish to loop over input files or those who have longer, more complicated input. Once the Python file is saved in a directory, it can be executed using the command:

python InputFile.py

Both the interpreter and input file method will produce the same results regardless; the choice between the two is user preference. Now that both methods have been explored they can be used in the tutorial step-by-step.

  1. Creating Input Files
  1. Running PINSPEC

Home

Clone this wiki locally