-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #119 from jhmatthews/dev
Changing dev to contain the whole structure, minus data
- Loading branch information
Showing
2,845 changed files
with
903,589 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# | ||
# This is the makefile for the python related programs | ||
# | ||
# Make sure you have defined $PYTHON as this directory first | ||
# then type | ||
# make [GIT=False] install | ||
# | ||
# if this fails, consult https://github.com/agnwinds/python/wiki/Installing-Python | ||
# for manual install. | ||
|
||
CFITSIO = $(PYTHON)/software/cfitsio3040 | ||
CMAKE = mpicc | ||
GSL = $(PYTHON)/software/gsl-1.15 | ||
GIT = True | ||
LIBS = True | ||
|
||
|
||
ifeq (True, $(GIT)) | ||
CLONE_DATA = mkdir $(PYTHON)/data; cd $(PYTHON)/data; git clone https://github.com/agnwinds/python.git -b data . | ||
CLONE_RELEASE = mkdir $(PYTHON)/progs; cd $(PYTHON)/progs; git clone https://github.com/agnwinds/python.git; cd python; make CC=$(CMAKE) python; make CC=$(CMAKE) py_wind | ||
PRINT_CLONE = 'Cloning Git Release' | ||
else | ||
CLONE_DATA = | ||
CLONE_RELEASE = | ||
PRINT_CLONE = 'No git installed- have to obtain release and data manually from releases page on github. Exiting.' | ||
endif | ||
|
||
MAKE_SOURCE = cd $(PYTHON)/source; make CC=$(CMAKE) python; make CC=$(CMAKE) py_wind; | ||
|
||
|
||
|
||
ifeq (True, $(LIBS)) | ||
INSTALL_CFITSIO = cd $(CFITSIO); ./configure; make; mv libcfitsio.a ../../lib; make clean | ||
INSTALL_GSL = cd $(GSL); ./configure --disable-shared --prefix=$(GSL); make; make check 2>&1; make install; make clean; | ||
MOVE_GSL = mkdir $(PYTHON)/include/gsl/; mv $(GSL)/include/gsl/* $(PYTHON)/include/gsl; mv $(GSL)/lib/* $(PYTHON)/lib/; | ||
else | ||
INSTALL_CFITSIO = | ||
INSTALL_GSL = | ||
MOVE_GSL = | ||
endif | ||
|
||
install: | ||
@echo 'Installing Python. the radiative transfer code' | ||
@echo 'Installing in directory '$(PYTHON) | ||
# First make cfitsio library | ||
@echo 'Installing CFITSIO library...' | ||
$(INSTALL_CFITSIO) | ||
|
||
# Then make GSL library | ||
@echo 'Installing GSL library...' | ||
$(INSTALL_GSL) | ||
$(MOVE_GSL) | ||
|
||
|
||
#finally, make the latest release | ||
@echo 'Making source code...' | ||
$(MAKE_SOURCE) | ||
|
||
|
||
@echo 'all done' | ||
|
||
clean: | ||
rm -f *.o *~ | ||
cd $(CFITSIO); make clean | ||
cd $(GSL); make clean | ||
cd $(PYTHON)/source/; make clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,65 +6,57 @@ It has been developed by Knox Long, Christian Knigge, Stuart Sim, Nick Higginbot | |
The code is not yet ready for use and should not be installed yet. If you are interested in using | ||
Python please contact [email protected]. | ||
|
||
# Travis Build Status | ||
|
||
Simple build checks are carried out on Travis. The latest status shows up below: | ||
## Travis Build Status | ||
|
||
[![Build Status](https://travis-ci.org/agnwinds/python.png?branch=dev)](https://travis-ci.org/agnwinds/python) | ||
|
||
|
||
# Getting the radiative transfer code 'Python' | ||
|
||
You can download the required structure under the structure branch. e.g. | ||
git clone https://github.com/agnwinds/python.git -b structure | ||
or simply click on the 'zip' button! | ||
|
||
|
||
Releases of progs can be found under [tags](https://github.com/agnwinds/python/tags "Wiki"). | ||
|
||
Consult the [wiki](https://github.com/agnwinds/python/wiki/_pages "Wiki") for how to install Python. | ||
|
||
## Installation | ||
|
||
# Installation | ||
Python and the various routines associated are set up in a self-contained directory structure. The basic directory structure and the data files that one needs to run Python need to be retrieved and compiled. | ||
|
||
Python and the various routines associated are set up in a self-contained directory structure. The basic directory structure and the data files that one needs to run Python need to be retrieved (and most likely recompiled). | ||
If you want to obtain a stable (!) release, go to the [Releases](https://github.com/agnwinds/python/releases) page. | ||
|
||
If you want to download the latest dev version, you can zip up the git repository by clicking on the zip icon to the right of the GitHub page. Aternatively, you can clone the repository using | ||
|
||
**If you have git installed:** To obtain the directory structure, simply retrieve it using git as follows to clone the directory structure: | ||
$ git clone https://github.com/agnwinds/python.git | ||
|
||
$ git clone https://github.com/agnwinds/python.git -b structure | ||
If you anticipate contributing to development we suggest Forking the repository and submitting pull requests with any proposed changes. | ||
|
||
You then need to cd to the new directory and set your environment variables | ||
Once you have the files, you need to cd to the new directory and set your environment variables | ||
|
||
$ export PYTHON = /path/to/python/ | ||
$ cd $PYTHON | ||
$ ./configure | ||
$ make install | ||
$ make clean | ||
|
||
note that export syntax is for bash- for csh use | ||
|
||
$ setenv PYTHON /path/to/python/ | ||
|
||
Atomic data is stored in our [data repository](https://github.com/agnwinds/data) with it's own releases page. one should unzip these files and place them in a $PYTHON/data folder. | ||
|
||
**Without git:** Use the ZIP function under the [structures](https://github.com/agnwinds/python/tree/structure "Structure") branch, and then download .tar.gz versions of the python source under [releases](https://github.com/agnwinds/python/releases). | ||
A development user may want to work on atomic data as part of their work, and pull in changes as they are made, in which case we recommend cloning the data repository: | ||
|
||
Once you have a directory /path/to/python/ which contains the structure, place the unpacked tar.gz python source folder under /path/to/python/progs/ | ||
$ cd $PYTHON; git clone https://github.com/agnwinds/data data | ||
|
||
$ export PYTHON = /path/to/python/ | ||
$ cd $PYTHON | ||
$ make GIT=False install | ||
$ make clean | ||
$ cd progs/python_xx #replace xx version you download | ||
$ make clean | ||
$ make CC=gcc python # if you want to use mpicc, ignore the CC=gcc | ||
$ make clean | ||
## Running python | ||
|
||
Again, for csh use | ||
|
||
$ setenv PYTHON /path/to/python/ | ||
To run python you need to add the following to your $PATH variable: | ||
|
||
$PYTHON/bin | ||
|
||
You can then setup your symbolic links by running | ||
|
||
$ Setup_Py_Dir | ||
|
||
and run the code by typing, e.g. | ||
|
||
$ py root.pf | ||
|
||
As you can tell, the git install is simpler! | ||
|
||
Please see the (wiki)[https://github.com/agnwinds/python/wiki/Installing-and-Running-Python] for how to use the code. | ||
Please see the [wiki](https://github.com/agnwinds/python/wiki/Installing-and-Running-Python) and docs folder for how to use the code. | ||
|
||
Any comments, email [email protected] or [email protected]. | ||
Any comments, email [email protected] or [email protected]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
find . -name *.sig -print > tmpCheck | ||
rm tmpCheck1 | ||
awk '{print "grep COMPLETE "$1" >> tmpCheck1.out"}'<tmpCheck >>tmpCheck1 | ||
rm tmpCheck1.out | ||
source tmpCheck1 | ||
echo 'Total sig files' | ||
wc tmpCheck | ||
echo 'Total completed' | ||
wc tmpCheck1.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
python/bin README | ||
|
||
==================== | ||
|
||
This is where binaries are stored once versions of python have been compiled using make. | ||
|
||
Setup_Py_Dir can be used to set up the links to the data directories in a given working folder. | ||
|
||
|
||
This should be set up with your bash configuration file (or similar) | ||
export PYTHON=/path/to/python | ||
PATH=${PATH}:$PYTHON/bin | ||
export PATH | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#! /bin/bash | ||
|
||
# This is a simple routine to set up links so that python can be run in | ||
# a directory | ||
# 05aug ksl Coded | ||
# 0603 ksl Modified so others could use this as well | ||
# 1306 jm Modified structure to close issue #13 | ||
|
||
|
||
# please make sure your $PYTHON path is setup to use this script | ||
top=$PYTHON | ||
xdata=data | ||
|
||
# Note that we now have standard73, standard39, h20 and so on in the top level data directory | ||
# that way atomic/standard73 now links to $PYTHON/data/standard73 | ||
# and standard73 then links to the subfolder atomic73 | ||
|
||
ln -s -f $top/$xdata | ||
#ln -s -f $top/$xdata atomic | ||
|
||
## the other data is the same | ||
#ln -s -f $top/$xdata/kurucz91 | ||
#ln -s -f $top/$xdata/hutdisk93 | ||
#ln -s -f $top/$xdata/disk06 | ||
|
||
|
Oops, something went wrong.