**************
Installing frb
**************
This document describes how to install the `frb`
repository.
Installing Dependencies
=======================
We have and will continue to keep the number of dependencies low.
There are a few standard packages that must be installed
and one package `linetools` under review for
`astropy` affiliated status.
In general, we recommend that you use Anaconda for the majority of
these installations.
Detailed installation instructions are presented below:
Python Dependencies
-------------------
frb depends on the following list of Python packages.
We recommend that you use `Anaconda `_
to install and/or update these packages.
* `python `_ versions 3.11 or later
* `numpy `_ version 2.2 or later
* `astropy `_ version 7.1 or later
* `scipy `_ version 1.17 or later
* `healpy `_ version 1.19 or later
* `pandas `_ version 2.2 or later
* `requests `_ version 2.18 or later
* `dust_extinction `_
* `matplotlib `_ version 3.7 or greater
* `linetools `_ version 0.3.1 or later
* `astropath `_ version 0.1 or later
The following packages are required to access surveys (e.g. SDSS, DES)
for data that may be associated to an FRB:
* `astroquery `_ v0.4.11 or later
* `datalab-client `_ v2.20 or later
* `pyvo `_ version 0.9.2 or later
Extras
------
The following packages are more for builders and not recommended for most users.
The following package is required to map a slit onto a finder chart (frb.figures.finder):
* `photutils `_ version 1.11.0 or later
* `scikit-image `_ version 0.21.0 or later
The following are required to run some of the halo codes:
* `ne2001 `_ NE2001
* george :: Use pip
* `class `_ version 2.7 or greater
* `Aemulator `_ pip is broken..
* `hmf_emulator `_ HMF emulator (requires GSL)
The following are required to build host galaxy objects:
* `pPXF `_ version 6.7 or greater
* `pcigale `_ version 2025.0
The following is required to run the code in dm_kde:
* `asymmetric_kde `_ no versioning
The following is required to run the MCMC DM code in dm.mcmc.py:
* `numba `_ version >= 0.50
For pPXF, you will also likely need to modify the standard install
to use the Chabrier libraries. See the InstallNotes in this
`Google Drive `_.
The following are required for using functions in halos.photoz.py:
* `threedhst `_ version >= 0.1.dev0
* progressbar2 :: Use pip
* pathos :: Use pip
Our CIGALE wrappers use custom filter files not
provided by their current release (e.g DES, Pan-STARRS).
See the instructions for adding those as needed.
Installing frb
==============
Presently, you must download the code from github::
#go to the directory where you would like to install frb.
git clone https://github.com/FRBs/FRB.git
From there, you can build and install with::
cd FRB
python setup.py install # or use develop
This should install the package and scripts.
Make sure that your PATH includes the standard
location for Python scripts (e.g. ~/anaconda/bin)
Adding additional CIGALE filter files
=====================================
We have had to add new filters to CIGALE (e.g. from
DES and Pan-STARRS).
You can find these filter files in
`frb.data.analysis.CIGALE`.
If you use any of those surveys,
**our wrappers will not work without them.**
Here are the steps to update CIGALE:
* cd frb/data/analysis/CIGALE
* Add any desired filter into your CIGALE code base with: `pcigale-filters add file.dat`
Note that DECaLs uses the BASS and MzLS data files.
EAZY setup
==========
In order to perform photo-z estimation
with EAZY using our wrappers, the following
changes need to be made.
* Add an environment variable `EAZYDIR` that points to your EAZY installation. Add this to your `bashrc`::
export EAZYDIR="/path/to/eazy-photoz/"
* Locate the `templates` folder in `$EAZYDIR` and edit the paths present in `*.spectra.param`. Replace all SED file paths with the absolute paths. For instance, in `$EAZYDIR/templates/eazy_v1.3.spectra.param`, replace::
templates/EAZY_v1.1_lines/eazy_v1.1_sed1.dat
with::
/path/to/eazy-photoz/templates/EAZY_v1.1_lines/eazy_v1.1_sed1.dat
.. _download-public:
pPXF
====
Our pPXF wrapper currently uses an older version of the code
(v 6.7.17) and a few custom files. Contact JXP if you wish
to use this.