Installation
CompactObject is an open-source tool designed for comprehensive neutron star equation inference. It is built to be easy to install and use. Follow the step-by-step installation guide below to get started.
Using Anaconda (Recommended)
Create a Virtual Environment
We recommend creating a virtual environment for CompactObject using Anaconda:
conda create -n CompactObject
When prompted to proceed, type y and press Enter:
Proceed ([y]/n)?
Activate the Environment
Activate your newly created environment with the following command:
conda activate CompactObject
Note: Once you create this environment, you don’t need to create it again. Simply activate it whenever you want to use CompactObject.
Install CompactObject
Use pip to install the CompactObject package:
pip install CompactObject-TOV
To upgrade to the latest version, run:
pip install CompactObject-TOV --upgrade
You’re Ready to Use CompactObject!
You are now ready to use CompactObject. Whenever you want to use this package, remember to activate the environment first:
conda activate CompactObject
Our package automatically installs all necessary dependencies for you. The dependencies include:
corner
csv
itertools
math
matplotlib
numba
numbaminpack
numpy
os
pandas
scipy
sys
ultranest
Some of the dependencies like numbaminpack may hard to install if don’t have a fortran complier, please refer to this page NumbaMinpack documentation <https://pypi.org/project/NumbaMinpack/>, and you can skip this NumbaMinpack if you are not using “fastRMF_EoS” and “pQCD”
Optional: Using Python Virtual Environment
If you are not using Anaconda, you can create a virtual environment using Python’s venv module:
Create a Virtual Environment
Run the following command to create a virtual environment named CompactObject:
python3 -m venv CompactObject
You can specify a different path by replacing `CompactObject` with your desired directory name.
Activate the Environment
Activate the virtual environment with:
source CompactObject/bin/activate
Install CompactObject
Once the environment is activated, install CompactObject using pip:
pip install CompactObject-TOV
To upgrade to the latest version, run:
pip install CompactObject-TOV --upgrade
Using the Package
You are now ready to use CompactObject. Each time you want to use the package, ensure you activate the environment:
source CompactObject/bin/activate
Summary
Using Anaconda: 1. Create and activate the CompactObject environment. 2. Install CompactObject with pip. 3. Activate the environment whenever you use the package.
Using Python Virtual Environment: 1. Create and activate the CompactObject virtual environment. 2. Install CompactObject with pip. 3. Activate the environment whenever you use the package.
If you encounter any issues or have questions, feel free to reach out for support. Happy computing!