Below are steps to make spectrum curves from a RAMSES output. This is tested on my star formation simulations.
- Download ramspec (this repo) including its submodules:
git clone --recursive https://github.com/astroumd/ramspec.git
- Compile ramski:
cd ramspec/external/RAMSKI_test/f90; make
- Note: check if
gfortran
exists viawhich gfortran
. You may need to load the necessary module, e.g.module load gcc
(on HPC) orbrew install gcc
(on macOS).
- Compile amr2cube:
cd ramspec/tools/amr2cube; make
- Install SKIRT following the official website. Install PTS as well and add it to PYTHONPATH (see tests/run.sh for how to do this). Confirm by running
python -c 'import pts'
- Install necessary packages for pts
- List Python package dependencies:
python -m pts.do list_dependencies
- Install missing packages via conda or pip. For example, I have to do the following:
conda install lxml reportlab
andpython -m pip install fsps opencv-python
- List Python package dependencies:
- Prepare a namelist file for RAMSKI/SKIRT simulation and run the test:
- Copy the tests folder to somewhere in your computer.
- Set PYTHONPATH in your shell following the example in run.sh. You should set your PYTHONPATH to the directory containing ramspec AND the path to PTS.
- Run import_modules.py to make sure all modules and installed and correctly linked:
cd tests; python test_modules.py
- Run the test:
python test_run.py
. Before running this test, make sure to change a few variables in test_run.py:ramspec.FIELDS
,jobpath
,nml
,outs
.
Notes:
- Use ramspec as a Python module and don't change its contents unless you know what you are doing. Your change will conflict with future git pull as I keep updating this repository. Make a folder outside of ramspec, copy test_run.py and do your run there.