- 31 Aug, 2015 4 commits
-
-
Médéric Boquien authored
-
Médéric Boquien authored
-
Médéric Boquien authored
-
Médéric Boquien authored
Move the invocation of Matplotlib's Agg backend right after matplotlib's import. Even if it violates PEP8, it avoids some nasty warnings when runing pcigale-plots.
-
- 30 Aug, 2015 6 commits
-
-
Médéric Boquien authored
-
Médéric Boquien authored
As the code is much faster now, let's update the number of computed models a bit less often as printing something on screen causes a context switch
-
Médéric Boquien authored
-
Médéric Boquien authored
-
Médéric Boquien authored
-
Médéric Boquien authored
We need to sort the sed.info before saving the data. The reason is that the dictionary orders the keys with a hash so it appears random. In addition the order also changes from one process to another (I suspect the hash also depends on a seed). Thanks to Yannick for pointing out this issue.
-
- 29 Aug, 2015 8 commits
-
-
Médéric Boquien authored
-
Médéric Boquien authored
If there is the redshift information then there is necessarily the luminosity distance too. No need to test separately for the presence of each.
-
Médéric Boquien authored
Normalise the SFH appropriately in the same if then else statement. Bonus is that is saves an array multiplication if a specific scaling factor is not given.
-
Médéric Boquien authored
When computing the galaxy mass, convert from yr to Myr outside of the integral. That way we only multiply a scalar by 1e6 rather than a large array. Good for speed and memory bandwidth.
-
Médéric Boquien authored
-
Médéric Boquien authored
-
Médéric Boquien authored
Simplify the construction of modules by remove the out_parameter_list dictionary. It was not used anywhere, was not always provided, and was not even up to date.
-
Médéric Boquien authored
Switch back to ordered dictionaries for the input parameters after all. That way the list of parameters is kept into a logical order when building the configuration file. The impact on performance is negligible.
-
- 28 Aug, 2015 6 commits
-
-
Médéric Boquien authored
-
Médéric Boquien authored
InfoDict was made to overcome the slowness to copy an OrderedDict. However since we have removed OrderedDict now, we can just switch to a regular dictionary, which happens to be fast to copy.
-
Médéric Boquien authored
JSON is slow. Now that OrderedDict have been removed we can just use marshal to conver modules names and parameters into keys.
-
Médéric Boquien authored
We rely on OrderedDict to keep the order of the parameters. However given the way the code is structured currently, there is really no reason for this. So let's just switch to the standard dictionary. This has two advantages. First the standard dictionary is much faster than OrderedDict (implemented in C rather than in pure python). Then, standard dictionaries are marshalable, which makes them usable as keys for other dictionaries.
-
Médéric Boquien authored
Simplify a bit the code by removing the normalisation option from the convolve procedure as it duplicates the functionality from the SFH modules.
-
Médéric Boquien authored
Do not rely on the index to find the last observation analysed as they may be out of order. Rather use the number of observations already analysed. It should void a spurious carriage return that occurs in some cases.
-
- 27 Aug, 2015 2 commits
-
-
Médéric Boquien authored
As python evaluates expressions from the left to the right, put the vector in the rightmost position so that we do not multiply it with a scalar several times.
-
Médéric Boquien authored
When computing the flux in filters, np.trapz() become the bottleneck of the code. A large part of the time is spent on safeguards and on operations for nD arrays. However in our specific case we only have 1D arrays. Also we can cache some computed variables, for instance dx which only depends on the wavelength sampling. We do that employing the same key that is used for caching the best sampling of each filter in compute_fnu(). That way the caches are consistent. The key is based on the size of the wavelength grid, the name of the filter, and the redshift.
-
- 26 Aug, 2015 4 commits
-
-
Médéric Boquien authored
Replace the SED.info OrderedDict() with a very light weight and speficically tailored reimplementation of an OrderedDict(). The reason is that an OrderedDict() takes an inordinate amount to time to copy. In the end this could amount to a very significant fraction of the total runtime. Do not use this new implementation anywhere or it will break your code. It makes very strong assumptions on how it is to be used.
-
Médéric Boquien authored
-
Médéric Boquien authored
To verify whether a variable is among the keys of a dictionary there is actually no need to call the keys() function. A dictionary has a __contains__() member which is called when the “in” keyword is used.
-
Médéric Boquien authored
There is no need to build a list of keys to check whether a variable is among the keys of a dictionary.
-
- 25 Aug, 2015 4 commits
-
-
Médéric Boquien authored
Avoid retrieving the module parameters for the sed.info dictionary each time we process a SED as these parameters are set in stone. Rather add them as class members in the init. This should result in a slight speedup.
-
Médéric Boquien authored
Repair the badly broken dustatt_powerlaw module. It did not handle the contribution names properly, which broke the code if the nebular module was called.
-
Médéric Boquien authored
-
Médéric Boquien authored
-
- 07 Aug, 2015 1 commit
-
-
Médéric Boquien authored
Remove leftover comments from debugging and add the stellar population back in the output parameters.
-
- 31 Jul, 2015 2 commits
-
-
For now, CIGALE does not work with a parameterless module, so we use a fake one.
-
- mbb: modified black body - param: parameterless module to compute some parameters and add them to the information dictionary - sfhcomb_constant and sfhcomb_delayed: two star formation histories
-
- 24 Jul, 2015 1 commit
-
-
Yannick Roehlly authored
The pseudo filters used to compute (pseudo) line fluxes must not be normalised to 1. Also, we set their effective wavelength to the mean wavelength of the positive part.
-
- 23 Jul, 2015 2 commits
-
-
Yannick Roehlly authored
The wavelengths must be in angstrom.
-
Yannick Roehlly authored
Addition of pseudo filters used to compute de fluxes in some lines. They are composed of a positive part (normalised to 1) above the line and two negative part (of the same total area) on each side used to remove the continuum. The PSEUDO_D4000 pseudo filter measures the difference (not the ratio) of the 4000 Å break.
-