************** 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.8 or later * `numpy `_ version 1.18 or later * `astropy `_ version 4.5 or later * `scipy `_ version 1.7 or later * `healpy `_ version 1.12 or later * `pandas `_ version 1.3 or later * `requests `_ version 2.18 or later * `extinction `_ version 0.4.2 or greater * `matplotlib `_ version 3.3 or greater * `linetools `_ version 0.3 or later * `astropath `_ version 0.1 or later If you are using Anaconda, you can check the presence of these packages with:: conda list "^python|numpy|astropy|scipy|pandas" If the packages have been installed, this command should print out all the packages and their version numbers. The following packages are required to access surveys (e.g. SDSS, DES) for data that may be associated to an FRB: * `astroquery `_ v0.4.4 only (maybe) * `datalab-client `_ v2.20 or later * `pyvo `_ version 0.9.2 or later The following package(s) is/are required to access FRB galaxy spectra: * `specdb `_ no versioning (yet) The following package is required to map a slit onto a finder chart (frb.figures.finder): * `photutils `_ version 1.2.0 or later The following are required to use our KCWI datacube handling tools: * `SEP `_ version 1.0 or later * `spectralcube `_ version 0.4.5 or later * `pyregion `_ version 2.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 2018.0.1 to 2020.0 (cannot yet accommodate 2022.0 or greater) 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 specdb. 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.