Questions tentatively addressed in this FAQ:
- How do I get Python?
- What version of Python/libraries should I use?
- Cigale crashes at startup with Memory error. What should I do?
- What are the units in the output files?
- How do I indicate the distance for nearby galaxies?
- Are my filters in the database?
- How can I add a filter?
- How can I see/get the transmission curves of the filters?
- How can I enter many values for a parameter?
- How do I manage upper limits and why is it so slooow?
- Can you run CIGALE for me?
#1 How do I get Python?
If you are using a recent version of a Linux distribution, chances are that you get everything you need shipped with it. Just use your package manager to install Python (3 not 2), Numpy, Scipy, Matplotlib, ConfigObj, Astropy, and rich. MacOS X generally comes with an outdated Python distribution and Windows does not come with Python at all. In these cases multiple options are available. A fairly popular one is the Anaconda distribution. Follow the instructions and you should have your environment set up in no time. Note that if some packages are missing Python will install them when installing cigale but we recommend all packages to come from a single Python distribution to avoid issues down the road.
#2 What version of Python/libraries should I use?
We tend to use the latest and newest features provided by Python. As of version 2022.1, Python 3.8 is more recent is required. We also recommend to use the latest versions of the base libraries for similar reasons.
#3 Cigale crashes at startup with Memory error. What should I do?
- It may be that you are trying to compute too many models. Try reducing the parameter space. A desktop computer with 16 GB of RAM should be able to handle ~30 million models, depending on the number of bands you are fitting and the number of physical properties you want to estimate.
- It may be that your /tmp directory is full (for technical reasons, the shared memory between the CPUs is a virtual file in /tmp). Ensure you have enough free space. If the partition is too small (make sure it has at least 16 GB) you can use any other directory on another disk. Then just start cigale the following way: TMPDIR=/path/to/your/new/tmp/directory pcigale run.
- If you run out of memory during the analysis phase, try to reduce the number of cores used as each core uses a bit of memory and it can quickly add up when you have many cores.
- You can also try to modify the last parameter in the pcigale.ini file and increase the number of blocks. Note that this will slow down CIGALE:
# Number of blocks to compute the models and analyse the observations.
# If there is enough memory, we strongly recommend this to be set to 1.
blocks = 1
#4 What are the units in the output files?
Flux densities are in mJy. Luminosities are in Watts. Stellar masses are in solar masses. Dust masses are in kg. Ages are in Myr. Equivalent widths are in nm. The units are given in the output FITS files.
#5 How do I indicate the distance for nearby galaxies?
If you give a redshift of 0, Cigale will assume a distance of 10 pc. This requires extensive properties to be rescaled by multiplying them by (d/10)², with d the actual distance in parsec. However you can also provide the distance directly by adding a dist column in the input file. This distance must be given in Mpc.
#6 Are my filters in the database?
You can access the list of all the filters present in the database with the command pcigale-filters list.
#7 How can I add a filter?
If the filter is not present you can create one. This file should have the following header:
# type (energy or photon)
# description (telescope/instrument)
The first column must be the wavelength in Ångström and the second column the transmission.
You can then add it to the database using the command pcigale-filters add “myfilter.dat”.
#8 How can I see/get the transmission curves of the filters?
You can generate a plot of a filter with the comment pcigale-filters plot filtername. It will generate a PDF file. If you omit the filter name it will generate plots for every filter in the database.
If you want to access the raw transmission curves, they are stored in the database_builder/filters/ directory in the source of of Cigale.
#9 How can I enter many values for a parameter?
Rather than inputting values individually, you can rather pass a Numpy expression. For instance to input 100 values between 0 and 1 with a step of 0.01 you can simply write “eval np.linspace(0., 1., 101)”.
#10 How do I manage upper limits and why is it so slooow?
When you use upper limits, CIGALE solves a more complex equation than without upper limits (see Boquien et al. 2019). And this slows the code considerably. As of Cigale 2022.1, by default it takes upper limits into account but does not change the scaling of the models, which is much faster. To get the full computations as described in the article, set lim_flag to full.
If you set sigma = -5000 for the uncertainty associated to the upper limit, with a flux density of about 10 mJy, that means that you allow the upper limit to be at 10 +/- 5000 mJy. And you can get quite large error bars in the final plot. Errors, like fluxes are in mJy by default.
The probability on the position of the upper limit will depend on this sigma. If you think the undetected flux density is close to the upper limit, you can set the (flux, error) to e.g., (10.0, -1.0). On the other hand, if you have no idea and it could be anywhere between 0 and 10 mJy, you could set the (flux, error) to (10.0, -10.0) and you will authorize down to 0. but also up to 20 mJy. Finally, you can put (flux, error) to (5.0, 5.0) and that should authorize from 0.0 to 10.0.
#11 Can you run CIGALE for me?
There is a service dedicated to running CIGALE (among other codes) that is available at LAM as a service to the community, GAZPAR!