End-to-end code to estimate AGN properties from a single spectrum by fitting the continuum and a Broad Emission Line (BEL)
Clone the repository on your local machine:
git clone https://github.com/Alexperiments/fit-BEL.git
Enter the newly created folder:
cd fit-BEL
Create a virtual environment
python -m venv my_env
Activate the virtual environment for Unix OS:
source my_env/bin/activate
If you are running Windows use this instead:
.\my_venv\Scripts\activate.ps1
Install required dependencies into the virtual environment:
pip install -r requirements.txt
Run fit-BEL as:
python fit-BEL.py examples/sample.fits -z 3.1 -e 2.1
Run:
python fit-BEL.py -h
to get more information about the optional arguments
- Adapt the original code to a single script:
- Basic spectrum plot
- Add interval selection procedure
- Add continuum fit procedure
- Add mask selection procedure
- Add fit selection procedure
- Add parameters estimation
- Refactor the code to allow models modularity
- Add error estimate procedure
- Fix the zoom reset
- Fix the masks re-draw
- Fix FWHM calculation
- Add different file formats in addition to
.fits
and.txt
- Add different fit components in addition to gaussian ones.