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?
- I don’t understand anything… Can you run CIGALE for me, please?
#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, SQLalchemy, Matplotlib, ConfigObj, and Astropy. 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, which has a channel with astronomy packages. 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. We recommend to use at Python 3.7 at the moment (see point #3). We also recommend to use the latest versions the base libraries for similar reasons. For Numpy the minimum version is 1.9.
#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.
- Try to use at least Python 3.7.
- 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.
#5 How do I indicate the distance for nearby galaxies?
The only way to give the distance of galaxies in Cigale is through the redshift. However for nearby galaxies the redshift is not indicative of the distance. We recommend in such cases to indicate a redshift of 0. Cigale then assumes a distance of 10 parsecs. The extensive physical quantities can then easily be rescaled by multiplying them with (d/10)², with d the actual distance in parsec. This is very useful when studying nearby galaxies at different distances as fewer models need to be computed.
#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. So, there is nothing to do to speed up CIGALE with upper limits, except not using upper limits.
If you 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., -1.). 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., -10.) and you will authorize down to 0. but also up to 20 mJy. Finally, you can put (flux, error) to (5., 5.) and that should authorize from 0. to 10.
#11 I don’t understand anything… Can you run CIGALE for me, please?
You can ask… If the answer is negative, you could have a look at GAZPAR!