Skip to content

Commit

Permalink
Now PyORBIT can be installed using python setup.py install
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaMalavolta committed Jun 9, 2022
1 parent cb312bc commit bde82ce
Show file tree
Hide file tree
Showing 146 changed files with 13,103 additions and 13,345 deletions.
140 changes: 0 additions & 140 deletions PyORBIT_GetResults.py

This file was deleted.

7 changes: 7 additions & 0 deletions PyORBIT_Results.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import pyorbit
import argparse
import sys

if __name__ == '__main__':
# print 'This program is being run by itself'
pyorbit.pyorbit_results()
57 changes: 1 addition & 56 deletions PyORBIT_Run.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,59 +6,4 @@

if __name__ == '__main__':

print()
print('PyORBIT v{0}'.format(pyorbit.__version__))
print()
print('Python version in use:')
print(sys.version)
#if sys.version_info[0] == 3 and sys.version_info[1] > 7:
# print('WARNING MESSAGES SUPPRESSED!')
#print()

parser = argparse.ArgumentParser(prog='PyORBIT_run.py', description='PyORBIT runner')
parser.add_argument('sampler', type=str, nargs=1, help='sampler (emcee or polychord)')
parser.add_argument('config_file', type=str, nargs=1, help='config file')

args = parser.parse_args()
sampler = args.sampler[0]
file_conf = args.config_file[0]

config_in = pyorbit.yaml_parser(file_conf)

sampler_keyword = {
'multinest':['multinest', 'MultiNest', 'multi'],
'polychord':['polychord', 'PolyChord', 'polychrod', 'poly'],
'emcee': ['emcee', 'MCMC', 'Emcee'],
'zeus': ['zeus', 'ZEUS', 'Zeus', 'zeus-mcmc'],
'dynesty': ['dynesty', 'DyNesty', 'Dynesty', 'DYNESTY'],
'ultranest': ['ultranest', 'UltraNest', 'Ultranest', 'ULTRANEST', 'ultra','Unest'],
'optimize': ['optimize', 'scipy', 'Optimize', 'OPTIMIZE'],
}

if sampler in sampler_keyword['emcee']:
pyorbit.pyorbit_emcee(config_in)

if sampler in sampler_keyword['zeus']:
pyorbit.pyorbit_zeus(config_in)

if sampler in sampler_keyword['multinest']:
pyorbit.pyorbit_multinest(config_in)

if sampler in sampler_keyword['polychord']:
pyorbit.pyorbit_polychord(config_in)

if sampler in sampler_keyword['dynesty']:
pyorbit.pyorbit_dynesty(config_in)

if sampler in sampler_keyword['ultranest']:
pyorbit.pyorbit_ultranest(config_in)

if sampler in sampler_keyword['optimize']:
pyorbit.pyorbit_optimize(config_in)




# This line was used to check if imprtation was working
# else:
# print 'I am being imported from another module'
pyorbit.pyorbit_run()
5 changes: 0 additions & 5 deletions clean_compile.sh

This file was deleted.

2 changes: 0 additions & 2 deletions compile.sh

This file was deleted.

2 changes: 2 additions & 0 deletions pyorbit/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from .pyorbit_run import *
from .pyorbit_results import *
from .model_definitions import *
from .samplers.pyorbit_emcee import *
from .samplers.pyorbit_zeus import *
Expand Down
1 change: 0 additions & 1 deletion pyorbit/classes/model_container_abstract.py

This file was deleted.

Loading

0 comments on commit bde82ce

Please sign in to comment.