Skip to content

Commit

Permalink
Multiple improvements (#8)
Browse files Browse the repository at this point in the history
- Implement accurate and fast rotational broadening based on the method of Carvalho & Johns-Krull (2023)
- Fix a bug that caused the code to continue running when specifying a rotational broadening method that is not in the list of available methods!
- Implement better output of the time spent running
- Automatically create ouput directory if it does not exist
- Make a copy of the config file in the output directory (to go back to original parameters of a ForMoSA run)
- Fix import to allow importation of plotting module outside of the ForMoSA package context
- Update .gitignore file with more general patterns for a python package
- Remove files that should not have been committed
  • Loading branch information
avigan authored Nov 8, 2024
2 parents b96dea1 + 9305bd3 commit 1548073
Show file tree
Hide file tree
Showing 37 changed files with 502 additions and 4,573 deletions.
Binary file removed .DS_Store
Binary file not shown.
Binary file removed ._RELEASE_NOTES.txt
Binary file not shown.
95 changes: 94 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,97 @@
.ipynb_checkponts
*/__pycache__
*.pyc
.DS_Store
.DS_Store

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# dotenv
.env

# virtualenv
.venv/
venv/
ENV/

# Spyder project settings
.spyderproject

# Rope project settings
.ropeproject
*_flymake.py
Binary file removed DEMO/.DS_Store
Binary file not shown.
Binary file removed DEMO/inputs/.DS_Store
Binary file not shown.
Binary file removed DEMO/outputs/.DS_Store
Binary file not shown.
Binary file removed DEMO/outputs/adapted_grid/.DS_Store
Binary file not shown.
28 changes: 0 additions & 28 deletions ForMoSA.egg-info/PKG-INFO

This file was deleted.

23 changes: 0 additions & 23 deletions ForMoSA.egg-info/SOURCES.txt

This file was deleted.

1 change: 0 additions & 1 deletion ForMoSA.egg-info/dependency_links.txt

This file was deleted.

1 change: 0 additions & 1 deletion ForMoSA.egg-info/not-zip-safe

This file was deleted.

14 changes: 0 additions & 14 deletions ForMoSA.egg-info/requires.txt

This file was deleted.

1 change: 0 additions & 1 deletion ForMoSA.egg-info/top_level.txt

This file was deleted.

Binary file removed ForMoSA/.DS_Store
Binary file not shown.
11 changes: 10 additions & 1 deletion ForMoSA/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import os
# os.environ["OMP_NUM_THREADS"] = "1"
import sys
import shutil

# Import ForMoSA
#base_path = '/Users/ppalmabifani/Desktop/exoAtm/c0_ForMoSA/ForMoSA/' # Give the path to ForMoSA to be able to import it. No need when this will be a pip package
Expand All @@ -37,13 +38,21 @@
## CONFIG_FILE reading and defining global parameters
global_params = GlobFile(config_file_path) # To access any param.: global_params.parameter_name

# create output directory if needed
if not os.path.exists(global_params.result_path):
os.makedirs(global_params.result_path, exist_ok=True)

# make a copy of the input configuration file into the output directory for future reference
print('- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -')
print('-> save config file')
shutil.copy2(config_file_path, global_params.result_path + 'configuration.ini')

# ----------------------------------------------------------------------------------------------------------------------
## Run ForMoSA
print('- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -')
print('-> Initializing ForMoSA')
print()


if len(sys.argv) == 1:
y_n_par = yesno('Do you want to adapt the grid to your data? (y/n)')
else:
Expand Down
Loading

0 comments on commit 1548073

Please sign in to comment.