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

Not space before a colon in English.

parent 2aa6aeea
...@@ -27,7 +27,7 @@ def genconf(config): ...@@ -27,7 +27,7 @@ def genconf(config):
def check(config): def check(config):
"Check the configuration." "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. # given for each module.
print("With this configuration, pcigale must compute {} " print("With this configuration, pcigale must compute {} "
"SEDs.".format(len(config.creation_modules_conf_array))) "SEDs.".format(len(config.creation_modules_conf_array)))
......
...@@ -40,18 +40,18 @@ class AnalysisModule(object): ...@@ -40,18 +40,18 @@ class AnalysisModule(object):
Parameters Parameters
---------- ----------
data_file : string data_file: string
Name of the file containing the observations to be fitted. 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. 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. 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 Array containing all the possible combinations of configurations
for the creation_modules. Each 'inner' array has the same length as for the creation_modules. Each 'inner' array has the same length as
the creation_modules array and contains the configuration the creation_modules array and contains the configuration
dictionary for the corresponding module. dictionary for the corresponding module.
parameters : dictionary parameters: dictionary
Configuration for the module. Configuration for the module.
Returns Returns
...@@ -72,18 +72,18 @@ class AnalysisModule(object): ...@@ -72,18 +72,18 @@ class AnalysisModule(object):
Parameters Parameters
---------- ----------
data_file : string data_file: string
Name of the file containing the observations to be fitted. 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. 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. 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 Array containing all the possible combinations of configurations
for the creation_modules. Each 'inner' array has the same length as for the creation_modules. Each 'inner' array has the same length as
the creation_modules array and contains the configuration the creation_modules array and contains the configuration
dictionary for the corresponding module. dictionary for the corresponding module.
parameters : dictionary parameters: dictionary
Configuration for the module. Configuration for the module.
Returns Returns
...@@ -92,7 +92,7 @@ class AnalysisModule(object): ...@@ -92,7 +92,7 @@ class AnalysisModule(object):
Raises 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 # For parameters that are present on the parameter_list with a default
...@@ -133,12 +133,12 @@ def get_module(module_name): ...@@ -133,12 +133,12 @@ def get_module(module_name):
Parameters Parameters
---------- ----------
module_name : string module_name: string
The name of the module we want to get the class. The name of the module we want to get the class.
Returns Returns
------- -------
module_class : class module_class: class
""" """
try: try:
...@@ -159,21 +159,21 @@ def adjust_errors(flux, error, tolerance, default_error=0.1, ...@@ -159,21 +159,21 @@ def adjust_errors(flux, error, tolerance, default_error=0.1,
Parameters Parameters
---------- ----------
flux : array of floats flux: array of floats
Fluxes. Fluxes.
error : array of floats error: array of floats
Observational error in the same unit as the fluxes. Observational error in the same unit as the fluxes.
tolerance : float tolerance: float
Tolerance threshold under flux error is considered as 0. 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 Default error factor used when the provided error in under the
tolerance threshold. tolerance threshold.
systematic_deviation : float systematic_deviation: float
Systematic deviation added to the error. Systematic deviation added to the error.
Returns Returns
------- -------
error : array of floats error: array of floats
The corrected errors. The corrected errors.
""" """
...@@ -207,18 +207,18 @@ def complete_obs_table(obs_table, used_columns, filter_list, tolerance, ...@@ -207,18 +207,18 @@ def complete_obs_table(obs_table, used_columns, filter_list, tolerance,
Parameters Parameters
---------- ----------
obs_table : astropy.table.Table obs_table: astropy.table.Table
The observation table. The observation table.
used_columns : list of strings used_columns: list of strings
The list of columns to use in the observation table. 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. The list of filters used in the analysis.
tolerance : float tolerance: float
Tolerance threshold under flux error is considered as 0. 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 Default error factor used when the provided error in under the
tolerance threshold. tolerance threshold.
systematic_deviation : float systematic_deviation: float
Systematic deviation added to the error. Systematic deviation added to the error.
Returns Returns
...@@ -228,7 +228,7 @@ def complete_obs_table(obs_table, used_columns, filter_list, tolerance, ...@@ -228,7 +228,7 @@ def complete_obs_table(obs_table, used_columns, filter_list, tolerance,
Raises 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 # 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): ...@@ -266,17 +266,17 @@ def bin_evenly(values, max_bins):
Parameters Parameters
---------- ----------
values : list of floats values: list of floats
List of values to be binned. List of values to be binned.
max_bins : integer max_bins: integer
Maximum number of bins. If there are less distinct value, every value Maximum number of bins. If there are less distinct value, every value
is in it's own bin. is in it's own bin.
Returns Returns
------- -------
boundaries : array of floats boundaries: array of floats
The value of the boundaries of the bins. 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 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. bin number (between 1 and nb_of_bins) it belongs to.
......
...@@ -37,11 +37,11 @@ def gen_pdf(values, probabilities, grid): ...@@ -37,11 +37,11 @@ def gen_pdf(values, probabilities, grid):
Parameters Parameters
---------- ----------
values : array like of floats values: array like of floats
The values of the variable. The values of the variable.
probabilities : array like of floats probabilities: array like of floats
The probability associated with each value 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. The list of values to which the probability will be evaluated.
Returns Returns
......
...@@ -22,14 +22,14 @@ def complete_parameters(given_parameters, parameter_list): ...@@ -22,14 +22,14 @@ def complete_parameters(given_parameters, parameter_list):
Parameters Parameters
---------- ----------
given_parameters : dictionary given_parameters: dictionary
Parameter dictionary used to configure the module. Parameter dictionary used to configure the module.
parameter_list : OrderedDict parameter_list: OrderedDict
Parameter list from the module. Parameter list from the module.
Returns Returns
------- -------
parameters : OrderedDict parameters: OrderedDict
Ordered dictionary combining the given parameters with the default Ordered dictionary combining the given parameters with the default
values for the missing ones. values for the missing ones.
...@@ -107,9 +107,9 @@ class CreationModule(object): ...@@ -107,9 +107,9 @@ class CreationModule(object):
Parameters Parameters
---------- ----------
name : string name: string
Name of the module. Name of the module.
blank : boolean blank: boolean
If true, return a non-parametrised module that will be used only If true, return a non-parametrised module that will be used only
to query the module parameter list. to query the module parameter list.
...@@ -117,7 +117,7 @@ class CreationModule(object): ...@@ -117,7 +117,7 @@ class CreationModule(object):
Raises 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. unexpected parameter is given.
""" """
...@@ -153,7 +153,7 @@ class CreationModule(object): ...@@ -153,7 +153,7 @@ class CreationModule(object):
Parameters Parameters
---------- ----------
sed : pcigale.sed.SED object sed: pcigale.sed.SED object
""" """
raise NotImplementedError() raise NotImplementedError()
...@@ -164,7 +164,7 @@ def get_module(name, **kwargs): ...@@ -164,7 +164,7 @@ def get_module(name, **kwargs):
Parameters Parameters
---------- ----------
module_name : string module_name: string
The name of the module we want to get the class. This name can be 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 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 used to determine the module to load (e.g. 'dh2002.1' will return
......
...@@ -78,7 +78,7 @@ class BC03(CreationModule): ...@@ -78,7 +78,7 @@ class BC03(CreationModule):
Parameters Parameters
---------- ----------
sed : pcigale.sed.SED sed: pcigale.sed.SED
SED object. SED object.
""" """
......
...@@ -92,7 +92,7 @@ class Casey2012(CreationModule): ...@@ -92,7 +92,7 @@ class Casey2012(CreationModule):
Parameters Parameters
---------- ----------
sed : pcigale.sed.SED object sed: pcigale.sed.SED object
""" """
if 'dust.luminosity' not in sed.info.keys(): if 'dust.luminosity' not in sed.info.keys():
......
...@@ -67,8 +67,8 @@ class Dale2014(CreationModule): ...@@ -67,8 +67,8 @@ class Dale2014(CreationModule):
Parameters Parameters
---------- ----------
sed : pcigale.sed.SED object sed: pcigale.sed.SED object
parameters : dictionary containing the parameters parameters: dictionary containing the parameters
""" """
if 'dust.luminosity' not in sed.info.keys(): if 'dust.luminosity' not in sed.info.keys():
......
...@@ -48,7 +48,7 @@ class DH2002(CreationModule): ...@@ -48,7 +48,7 @@ class DH2002(CreationModule):
Parameters Parameters
---------- ----------
sed : pcigale.sed.SED object sed: pcigale.sed.SED object
""" """
alpha = float(self.parameters["alpha"]) alpha = float(self.parameters["alpha"])
......
...@@ -97,8 +97,8 @@ class DL2007(CreationModule): ...@@ -97,8 +97,8 @@ class DL2007(CreationModule):
Parameters Parameters
---------- ----------
sed : pcigale.sed.SED object sed: pcigale.sed.SED object
parameters : dictionary containing the parameters parameters: dictionary containing the parameters
""" """
if 'dust.luminosity' not in sed.info.keys(): if 'dust.luminosity' not in sed.info.keys():
......
...@@ -28,7 +28,7 @@ def k_calzetti2000(wavelength): ...@@ -28,7 +28,7 @@ def k_calzetti2000(wavelength):
Parameters Parameters
---------- ----------
wavelength : array of floats wavelength: array of floats
Wavelength grid in nm. Wavelength grid in nm.
Returns Returns
...@@ -62,7 +62,7 @@ def k_leitherer2002(wavelength): ...@@ -62,7 +62,7 @@ def k_leitherer2002(wavelength):
Parameters Parameters
---------- ----------
wavelength : array of floats wavelength: array of floats
Wavelength grid in nm. Wavelength grid in nm.
Returns Returns
...@@ -83,13 +83,13 @@ def uv_bump(wavelength, central_wave, gamma, ebump): ...@@ -83,13 +83,13 @@ def uv_bump(wavelength, central_wave, gamma, ebump):
Parameters Parameters
---------- ----------
wavelength : array of floats wavelength: array of floats
Wavelength grid in nm. Wavelength grid in nm.
central_wave : float central_wave: float
Central wavelength of the bump in nm. Central wavelength of the bump in nm.
gamma : float gamma: float
Width (FWHM) of the bump in nm. Width (FWHM) of the bump in nm.
ebump : float ebump: float
Amplitude of the bump. Amplitude of the bump.
Returns Returns
...@@ -107,9 +107,9 @@ def power_law(wavelength, delta): ...@@ -107,9 +107,9 @@ def power_law(wavelength, delta):
Parameters Parameters
---------- ----------
wavelength : array of floats wavelength: array of floats
The wavelength grid in nm. The wavelength grid in nm.
delta : float delta: float
The slope of the power law. The slope of the power law.
Returns Returns
...@@ -131,20 +131,20 @@ def a_vs_ebv(wavelength, bump_wave, bump_width, bump_ampl, power_slope): ...@@ -131,20 +131,20 @@ def a_vs_ebv(wavelength, bump_wave, bump_width, bump_ampl, power_slope):
Parameters Parameters
---------- ----------
wavelength : array of floats wavelength: array of floats
The wavelength grid (in nm) to compute the attenuation curve on. 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. Central wavelength (in nm) of the UV bump.
bump_width : float bump_width: float
Width (FWHM, in nm) of the UV bump. Width (FWHM, in nm) of the UV bump.
bump_ampl : float bump_ampl: float
Amplitude of the UV bump. Amplitude of the UV bump.
power_slope : float power_slope: float
Slope of the power law. Slope of the power law.
Returns Returns
------- -------
attenuation : array of floats attenuation: array of floats
The A(λ)/E(B-V)* attenuation at each wavelength of the grid. The A(λ)/E(B-V)* attenuation at each wavelength of the grid.
""" """
...@@ -249,7 +249,7 @@ class CalzLeit(CreationModule): ...@@ -249,7 +249,7 @@ class CalzLeit(CreationModule):
Parameters Parameters
---------- ----------
sed : pcigale.sed.SED object sed: pcigale.sed.SED object
""" """
ebvs = {} ebvs = {}
......
...@@ -23,9 +23,9 @@ def power_law(wavelength, delta): ...@@ -23,9 +23,9 @@ def power_law(wavelength, delta):
Parameters Parameters
---------- ----------
wavelength : array of float wavelength: array of float
Wavelength grid in nm. Wavelength grid in nm.
delta : float delta: float
Power law slope. Power law slope.
Returns Returns
...@@ -42,13 +42,13 @@ def uv_bump(wavelength, central_wave, gamma, ebump): ...@@ -42,13 +42,13 @@ def uv_bump(wavelength, central_wave, gamma, ebump):
Parameters Parameters
---------- ----------
wavelength : array of floats wavelength: array of floats
Wavelength grid in nm. Wavelength grid in nm.
central_wave : float central_wave: float
Central wavelength of the bump in nm. Central wavelength of the bump in nm.
gamma : float gamma: float
Width (FWHM) of the bump in nm. Width (FWHM) of the bump in nm.
ebump : float ebump: float
Amplitude of the bump. Amplitude of the bump.
Returns Returns
...@@ -68,20 +68,20 @@ def alambda_av(wavelength, delta, bump_wave, bump_width, bump_ampl): ...@@ -68,20 +68,20 @@ def alambda_av(wavelength, delta, bump_wave, bump_width, bump_ampl):
Parameters Parameters
---------- ----------
wavelength : array of floats wavelength: array of floats
The wavelength grid (in nm) to compute the attenuation curve on. The wavelength grid (in nm) to compute the attenuation curve on.
delta : float delta: float
Slope of the power law. Slope of the power law.
bump_wave : float bump_wave: float
Central wavelength (in nm) of the UV bump. Central wavelength (in nm) of the UV bump.
bump_width : float bump_width: float
Width (FWHM, in nm) of the UV bump. Width (FWHM, in nm) of the UV bump.
bump_ampl : float bump_ampl: float
Amplitude of the UV bump. Amplitude of the UV bump.
Returns Returns
------- -------
attenuation : array of floats attenuation: array of floats
The A(λ)/Av attenuation at each wavelength of the grid. The A(λ)/Av attenuation at each wavelength of the grid.
""" """
...@@ -174,7 +174,7 @@ class PowerLawAtt(CreationModule): ...@@ -174,7 +174,7 @@ class PowerLawAtt(CreationModule):
Parameters Parameters
---------- ----------
sed : pcigale.sed.SED object sed: pcigale.sed.SED object
""" """
av = {} av = {}
......
...@@ -91,8 +91,8 @@ class Fritz2006(CreationModule): ...@@ -91,8 +91,8 @@ class Fritz2006(CreationModule):
Parameters Parameters
---------- ----------
sed : pcigale.sed.SED object sed: pcigale.sed.SED object
parameters : dictionary containing the parameters