Commit f287a598 authored by Médéric Boquien's avatar Médéric Boquien

Not space before a colon in English.

parent 2aa6aeea
......@@ -27,7 +27,7 @@ def genconf(config):
def check(config):
"Check the configuration."
# TODO : Check if all the parameters that don't have default values are
# TODO: Check if all the parameters that don't have default values are
# given for each module.
print("With this configuration, pcigale must compute {} "
"SEDs.".format(len(config.creation_modules_conf_array)))
......
......@@ -40,18 +40,18 @@ class AnalysisModule(object):
Parameters
----------
data_file : string
data_file: string
Name of the file containing the observations to be fitted.
column_list : array of strings
column_list: array of strings
Names of the columns from the data file to use in the analysis.
creation_modules : array of strings
creation_modules: array of strings
Names (in the right order) of the modules to use to build the SED.
creation_modules_params : array of array of dictionaries
creation_modules_params: array of array of dictionaries
Array containing all the possible combinations of configurations
for the creation_modules. Each 'inner' array has the same length as
the creation_modules array and contains the configuration
dictionary for the corresponding module.
parameters : dictionary
parameters: dictionary
Configuration for the module.
Returns
......@@ -72,18 +72,18 @@ class AnalysisModule(object):
Parameters
----------
data_file : string
data_file: string
Name of the file containing the observations to be fitted.
column_list : array of strings
column_list: array of strings
Names of the columns from the data file to use in the analysis.
creation_modules : array of strings
creation_modules: array of strings
Names (in the right order) of the modules to use to build the SED.
creation_modules_params : array of array of dictionaries
creation_modules_params: array of array of dictionaries
Array containing all the possible combinations of configurations
for the creation_modules. Each 'inner' array has the same length as
the creation_modules array and contains the configuration
dictionary for the corresponding module.
parameters : dictionary
parameters: dictionary
Configuration for the module.
Returns
......@@ -92,7 +92,7 @@ class AnalysisModule(object):
Raises
------
KeyError : when not all the needed parameters are given.
KeyError: when not all the needed parameters are given.
"""
# For parameters that are present on the parameter_list with a default
......@@ -133,12 +133,12 @@ def get_module(module_name):
Parameters
----------
module_name : string
module_name: string
The name of the module we want to get the class.
Returns
-------
module_class : class
module_class: class
"""
try:
......@@ -159,21 +159,21 @@ def adjust_errors(flux, error, tolerance, default_error=0.1,
Parameters
----------
flux : array of floats
flux: array of floats
Fluxes.
error : array of floats
error: array of floats
Observational error in the same unit as the fluxes.
tolerance : float
tolerance: float
Tolerance threshold under flux error is considered as 0.
default_error : float
default_error: float
Default error factor used when the provided error in under the
tolerance threshold.
systematic_deviation : float
systematic_deviation: float
Systematic deviation added to the error.
Returns
-------
error : array of floats
error: array of floats
The corrected errors.
"""
......@@ -207,18 +207,18 @@ def complete_obs_table(obs_table, used_columns, filter_list, tolerance,
Parameters
----------
obs_table : astropy.table.Table
obs_table: astropy.table.Table
The observation table.
used_columns : list of strings
used_columns: list of strings
The list of columns to use in the observation table.
filter_list : list of strings
filter_list: list of strings
The list of filters used in the analysis.
tolerance : float
tolerance: float
Tolerance threshold under flux error is considered as 0.
default_error : float
default_error: float
Default error factor used when the provided error in under the
tolerance threshold.
systematic_deviation : float
systematic_deviation: float
Systematic deviation added to the error.
Returns
......@@ -228,7 +228,7 @@ def complete_obs_table(obs_table, used_columns, filter_list, tolerance,
Raises
------
StandardError : When a filter is not present in the observation table.
StandardError: When a filter is not present in the observation table.
"""
# TODO Print or log a warning when an error column is in the used column
......@@ -266,17 +266,17 @@ def bin_evenly(values, max_bins):
Parameters
----------
values : list of floats
values: list of floats
List of values to be binned.
max_bins : integer
max_bins: integer
Maximum number of bins. If there are less distinct value, every value
is in it's own bin.
Returns
-------
boundaries : array of floats
boundaries: array of floats
The value of the boundaries of the bins.
bins_digits : numpy array of integers
bins_digits: numpy array of integers
Array of the same length as the value list giving for each value the
bin number (between 1 and nb_of_bins) it belongs to.
......
......@@ -37,11 +37,11 @@ def gen_pdf(values, probabilities, grid):
Parameters
----------
values : array like of floats
values: array like of floats
The values of the variable.
probabilities : array like of floats
probabilities: array like of floats
The probability associated with each value
grid : array like of float
grid: array like of float
The list of values to which the probability will be evaluated.
Returns
......
......@@ -22,14 +22,14 @@ def complete_parameters(given_parameters, parameter_list):
Parameters
----------
given_parameters : dictionary
given_parameters: dictionary
Parameter dictionary used to configure the module.
parameter_list : OrderedDict
parameter_list: OrderedDict
Parameter list from the module.
Returns
-------
parameters : OrderedDict
parameters: OrderedDict
Ordered dictionary combining the given parameters with the default
values for the missing ones.
......@@ -107,9 +107,9 @@ class CreationModule(object):
Parameters
----------
name : string
name: string
Name of the module.
blank : boolean
blank: boolean
If true, return a non-parametrised module that will be used only
to query the module parameter list.
......@@ -117,7 +117,7 @@ class CreationModule(object):
Raises
------
KeyError : when not all the needed parameters are given or when an
KeyError: when not all the needed parameters are given or when an
unexpected parameter is given.
"""
......@@ -153,7 +153,7 @@ class CreationModule(object):
Parameters
----------
sed : pcigale.sed.SED object
sed: pcigale.sed.SED object
"""
raise NotImplementedError()
......@@ -164,7 +164,7 @@ def get_module(name, **kwargs):
Parameters
----------
module_name : string
module_name: string
The name of the module we want to get the class. This name can be
prefixed by anything using a dot, then the part before the dot is
used to determine the module to load (e.g. 'dh2002.1' will return
......
......@@ -78,7 +78,7 @@ class BC03(CreationModule):
Parameters
----------
sed : pcigale.sed.SED
sed: pcigale.sed.SED
SED object.
"""
......
......@@ -92,7 +92,7 @@ class Casey2012(CreationModule):
Parameters
----------
sed : pcigale.sed.SED object
sed: pcigale.sed.SED object
"""
if 'dust.luminosity' not in sed.info.keys():
......
......@@ -67,8 +67,8 @@ class Dale2014(CreationModule):
Parameters
----------
sed : pcigale.sed.SED object
parameters : dictionary containing the parameters
sed: pcigale.sed.SED object
parameters: dictionary containing the parameters
"""
if 'dust.luminosity' not in sed.info.keys():
......
......@@ -48,7 +48,7 @@ class DH2002(CreationModule):
Parameters
----------
sed : pcigale.sed.SED object
sed: pcigale.sed.SED object
"""
alpha = float(self.parameters["alpha"])
......
......@@ -97,8 +97,8 @@ class DL2007(CreationModule):
Parameters
----------
sed : pcigale.sed.SED object
parameters : dictionary containing the parameters
sed: pcigale.sed.SED object
parameters: dictionary containing the parameters
"""
if 'dust.luminosity' not in sed.info.keys():
......
......@@ -28,7 +28,7 @@ def k_calzetti2000(wavelength):
Parameters
----------
wavelength : array of floats
wavelength: array of floats
Wavelength grid in nm.
Returns
......@@ -62,7 +62,7 @@ def k_leitherer2002(wavelength):
Parameters
----------
wavelength : array of floats
wavelength: array of floats
Wavelength grid in nm.
Returns
......@@ -83,13 +83,13 @@ def uv_bump(wavelength, central_wave, gamma, ebump):
Parameters
----------
wavelength : array of floats
wavelength: array of floats
Wavelength grid in nm.
central_wave : float
central_wave: float
Central wavelength of the bump in nm.
gamma : float
gamma: float
Width (FWHM) of the bump in nm.
ebump : float
ebump: float
Amplitude of the bump.
Returns
......@@ -107,9 +107,9 @@ def power_law(wavelength, delta):
Parameters
----------
wavelength : array of floats
wavelength: array of floats
The wavelength grid in nm.
delta : float
delta: float
The slope of the power law.
Returns
......@@ -131,20 +131,20 @@ def a_vs_ebv(wavelength, bump_wave, bump_width, bump_ampl, power_slope):
Parameters
----------
wavelength : array of floats
wavelength: array of floats
The wavelength grid (in nm) to compute the attenuation curve on.
bump_wave : float
bump_wave: float
Central wavelength (in nm) of the UV bump.
bump_width : float
bump_width: float
Width (FWHM, in nm) of the UV bump.
bump_ampl : float
bump_ampl: float
Amplitude of the UV bump.
power_slope : float
power_slope: float
Slope of the power law.
Returns
-------
attenuation : array of floats
attenuation: array of floats
The A(λ)/E(B-V)* attenuation at each wavelength of the grid.
"""
......@@ -249,7 +249,7 @@ class CalzLeit(CreationModule):
Parameters
----------
sed : pcigale.sed.SED object
sed: pcigale.sed.SED object
"""
ebvs = {}
......
......@@ -23,9 +23,9 @@ def power_law(wavelength, delta):
Parameters
----------
wavelength : array of float
wavelength: array of float
Wavelength grid in nm.
delta : float
delta: float
Power law slope.
Returns
......@@ -42,13 +42,13 @@ def uv_bump(wavelength, central_wave, gamma, ebump):
Parameters
----------
wavelength : array of floats
wavelength: array of floats
Wavelength grid in nm.
central_wave : float
central_wave: float
Central wavelength of the bump in nm.
gamma : float
gamma: float
Width (FWHM) of the bump in nm.
ebump : float
ebump: float
Amplitude of the bump.
Returns
......@@ -68,20 +68,20 @@ def alambda_av(wavelength, delta, bump_wave, bump_width, bump_ampl):
Parameters
----------
wavelength : array of floats
wavelength: array of floats
The wavelength grid (in nm) to compute the attenuation curve on.
delta : float
delta: float
Slope of the power law.
bump_wave : float
bump_wave: float
Central wavelength (in nm) of the UV bump.
bump_width : float
bump_width: float
Width (FWHM, in nm) of the UV bump.
bump_ampl : float
bump_ampl: float
Amplitude of the UV bump.
Returns
-------
attenuation : array of floats
attenuation: array of floats
The A(λ)/Av attenuation at each wavelength of the grid.
"""
......@@ -174,7 +174,7 @@ class PowerLawAtt(CreationModule):
Parameters
----------
sed : pcigale.sed.SED object
sed: pcigale.sed.SED object
"""
av = {}
......
......@@ -91,8 +91,8 @@ class Fritz2006(CreationModule):
Parameters
----------
sed : pcigale.sed.SED object
parameters : dictionary containing the parameters
sed: pcigale.sed.SED object
parameters: dictionary containing the parameters
"""
......
......@@ -39,7 +39,7 @@ class IgmAttenuation(CreationModule):
Parameters
----------
sed : pcigale.sed.SED object
sed: pcigale.sed.SED object
"""
redshift = sed.info['redshift']
......@@ -67,14 +67,14 @@ def igm_transmission_meiksin(wavelength, redshift):
Parameters
----------
wavelength : array like of floats
wavelength: array like of floats
The wavelength(s) in nm.
redshift : float
redshift: float
The redshift. Must be strictly positive.
Returns
-------
igm_transmission : numpy array of floats
igm_transmission: numpy array of floats
The intergalactic transmission at each input wavelength.
"""
......
......@@ -46,7 +46,7 @@ class LoadSpecFile(CreationModule):
Parameters
----------
sed : pcigale.sed.SED object
sed: pcigale.sed.SED object
"""
filename = self.parameters['filename']
......
......@@ -27,7 +27,7 @@ class M2005(CreationModule):
Information added to the SED:
- imf, metallicity, galaxy_age
- mass_total, mass_alive, mass_white_dwarf,mass_neutrino,
mass_black_hole, mass_turn_off : stellar masses in solar mass.
mass_black_hole, mass_turn_off: stellar masses in solar mass.
- age: age of the oldest stars in the galaxy.
- old_young_separation_age: age (in Myr) separating the young and the
old star populations (if 0, there is only one population)
......@@ -115,7 +115,7 @@ class M2005(CreationModule):
Parameters
----------
sed : pcigale.sed.SED
sed: pcigale.sed.SED
SED object.
"""
......
......@@ -130,8 +130,8 @@ class NebularEmission(CreationModule):
Parameters
----------
sed : pcigale.sed.SED object
parameters : dictionary containing the parameters
sed: pcigale.sed.SED object
parameters: dictionary containing the parameters
"""
f_esc = self.parameters['f_esc']
......
......@@ -57,7 +57,7 @@ class Redshifting(CreationModule):
Parameters
----------
sed : pcigale.sed.SED object
sed: pcigale.sed.SED object
"""
# If the SED is already redshifted, raise an error.
......
......@@ -73,7 +73,7 @@ class Sfh2Exp(CreationModule):
Parameters
----------
sed : pcigale.sed.SED object
sed: pcigale.sed.SED object
"""
tau_main = float(self.parameters["tau_main"])
......
......@@ -60,8 +60,8 @@ class SfhFromFile(CreationModule):
Parameters
----------
sed : pcigale.sed.SED object
parameters : dictionary containing the parameters
sed: pcigale.sed.SED object
parameters: dictionary containing the parameters
"""
filename = self.parameters['filename']
......
......@@ -245,7 +245,7 @@ class Database(object):
Parameters
----------
writable : boolean
writable: boolean
If True the user will be able to write new data in the database
(but he/she must have a writable access to the sqlite file). By
default, False.
......@@ -281,7 +281,7 @@ class Database(object):
Parameters
----------
ssp : pcigale.base.M2005
ssp: pcigale.base.M2005
"""
if self.is_writable:
......@@ -302,19 +302,19 @@ class Database(object):
Parameters
----------
imf : string
imf: string
Initial mass function (ss for Salpeter, kr for Kroupa)
metallicity : float
metallicity: float
[Z/H] = Log10(Z/Zsun) - Log10(H/Hsun)
Returns
-------
ssp : pcigale.base.M2005
ssp: pcigale.base.M2005
The M2005 object.
Raises
------
DatabaseLookupError : if the requested SSP is not in the database.
DatabaseLookupError: if the requested SSP is not in the database.
"""
result = self.session.query(_M2005)\
......@@ -346,7 +346,7 @@ class Database(object):
Parameters
----------
ssp : pcigale.data.SspBC03
ssp: pcigale.data.SspBC03
"""
if self.is_writable:
......@@ -367,18 +367,18 @@ class Database(object):
Parameters
----------
imf : string
imf: string
Initial mass function (salp for Salpeter, chab for Chabrier)
metallicity : float
metallicity: float
0.02 for Solar metallicity
Returns
-------
ssp : pcigale.data.BC03
ssp: pcigale.data.BC03
The BC03 object.
Raises
------
DatabaseLookupError : if the requested SSP is not in the database.
DatabaseLookupError: if the requested SSP is not in the database.
"""
result = self.session.query(_BC03)\
......@@ -410,7 +410,7 @@ class Database(object):
Parameters
----------
data : array
data: array
Array containing the templates data.
"""
......@@ -442,12 +442,12 @@ class Database(object):
Returns
-------
template : pcigale.base.DH2002
template: pcigale.base.DH2002
The Dale and Helou (2002) infrared templates.
Raises
------
DatabaseLookupError : if the templates are not in the database.
DatabaseLookupError: if the templates are not in the database.
"""
result = (self.session.query(_DH2002).
......@@ -505,12 +505,12 @@ class Database(object):
Returns
-------
model : pcigale.data.DL2007
model: pcigale.data.DL2007
The Draine and Li (2007) model.
Raises
------
DatabaseLookupError : if the requested model is not in the database.
DatabaseLookupError: if the requested model is not in the database.
"""
result = (self.session.query(_DL2007).
......@@ -542,7 +542,7 @@ class Database(object):
Parameters
----------
iragn : pcigale.data.Dale2014
iragn: pcigale.data.Dale2014
"""
......@@ -573,12 +573,12 @@ class Database(object):
Returns
-------
template : pcigale.data.Dale2014
template: pcigale.data.Dale2014
The Dale et al. (2014) IR template.
Raises
------
DatabaseLookupError : if the requested template is not in the database.
DatabaseLookupError: if the requested template is not in the database.
"""
result = (self.session.query(_Dale2014).
......@@ -609,7 +609,7 @@ class Database(object):
Parameters
----------
agn : pcigale.data.Fritz2006
agn: pcigale.data.Fritz2006
"""
if self.is_writable:
......@@ -629,37 +629,37 @@ class Database(object):
Parameters
----------
r_ratio : float
r_ratio: float
Ratio of the maximum and minimum radii of the dust torus.
tau : float
tau: float
Tau at 9.7µm
beta : float
beta: float
Beta
gamma : float
gamma: float
Gamma
opening_angle : float
opening_angle: float
Opening angle of the dust torus.
psy : float
psy: float
Angle between AGN axis and line of sight.
wave : array of float
wave: array of float
Wavelength grid in nm.
lumin_therm : array of float
lumin_therm: array of float
Luminosity density of the dust torus at each wavelength in W/nm.
lumin_scatt : array of float
lumin_scatt: array of float
Luminosity density of the scattered emission at each wavelength
in W/nm.
lumin_agn : array of float
lumin_agn: array of float
Luminosity density of the central AGN at each wavelength in W/nm.
Returns
-------
agn : pcigale.data.Fritz2006
agn: pcigale.data.Fritz2006
The AGN model.
Raises
------
DatabaseLookupError : if the requested template is not in the database.
DatabaseLookupError: if the requested template is not in the database.
"""
result = (self.session.query(_Fritz2006).
......@@ -799,7 +799,7 @@ class Database(object):
Parameters
----------
pcigale_filter : pcigale.data.Filter
pcigale_filter: pcigale.data.Filter
"""
if self.is_writable:
self.session.add(_Filter(pcigale_filter))
......@@ -817,17 +817,17 @@ class Database(object):
Parameters
----------