Commit 784a1690 authored by Médéric Boquien's avatar Médéric Boquien

Specify the types and the constraints of the input parameters for the SED...

Specify the types and the constraints of the input parameters for the SED creation modules and the analysis modules. Once validation is activated, the validation module will be able to infer the constraints from the specified information.
parent ee031ae8
......@@ -54,37 +54,37 @@ class PdfAnalysis(AnalysisModule):
parameter_list = OrderedDict([
("analysed_variables", (
"array of strings",
"cigale_string_list()",
"List of the physical properties to estimate. Leave empty to "
"analyse all the physical properties (not recommended when there "
"are many models).",
["sfh.sfr", "sfh.sfr10Myrs", "sfh.sfr100Myrs"]
)),
("save_best_sed", (
"boolean",
"boolean()",
"If true, save the best SED for each observation to a file.",
False
)),
("save_chi2", (
"boolean",
"boolean{}",
"If true, for each observation and each analysed variable save "
"the reduced chi2.",
False
)),
("save_pdf", (
"boolean",
"boolean{}",
"If true, for each observation and each analysed variable save "
"the probability density function.",
False
)),
("lim_flag", (
"boolean",
"boolean()",
"If true, for each object check whether upper limits are present "
"and analyse them.",
False
)),
("mock_flag", (
"boolean",
"boolean()",
"If true, for each object we create a mock object "
"and analyse them.",
False
......
......@@ -41,25 +41,25 @@ class SaveFluxes(AnalysisModule):
parameter_list = OrderedDict([
("variables", (
"array of strings",
"cigale_string_list()",
"List of the physical properties to save. Leave empty to save all "
"the physical properties (not recommended when there are many "
"models).",
None
)),
("output_file", (
"string",
"string()",
"Name of the output file that contains the parameters of the "
"model(s) and the flux densities in the bands",
"computed_fluxes.txt"
)),
("save_sed", (
"boolean",
"boolean()",
"If True, save the generated spectrum for each model.",
"False"
False
)),
("output_format", (
"string",
"string()",
"Format of the output file. Any format supported by astropy.table "
"e.g. votable or ascii.",
"ascii"
......
......@@ -30,18 +30,19 @@ class BC03(CreationModule):
parameter_list = OrderedDict([
("imf", (
"int",
"cigale_list(dtype=int, options=0. & 1.)",
"Initial mass function: 0 (Salpeter) or 1 (Chabrier).",
0
)),
("metallicity", (
"float",
"cigale_list(options=0.0001 & 0.0004 & 0.004 & 0.008 & 0.02 & "
"0.05)",
"Metalicity. Possible values are: 0.0001, 0.0004, 0.004, 0.008, "
"0.02, 0.05.",
0.02
)),
("separation_age", (
"int",
"cigale_list(dtype=int, minvalue=0)",
"Age [Myr] of the separation between the young and the old star "
"populations. The default value in 10^7 years (10 Myr). Set "
"to 0 not to differentiate ages (only an old population).",
......
......@@ -31,17 +31,17 @@ class Casey2012(CreationModule):
parameter_list = OrderedDict([
("temperature", (
"float",
"cigale_list(minvalue=0.)",
"Temperature of the dust in K.",
35
35.
)),
("beta", (
"float",
"cigale_list(minvalue=0.)",
"Emissivity index of the dust.",
1.6
)),
("alpha", (
"float",
"cigale_list(minvalue=0.)",
"Mid-infrared powerlaw slope.",
2.
))
......
......@@ -31,13 +31,22 @@ class Dale2014(CreationModule):
parameter_list = OrderedDict([
('fracAGN', (
'float',
'cigale_list(minvalue=0., maxvalue=1.)',
"AGN fraction. It is not recommended to combine this AGN emission "
"with the of Fritz et al. (2006) models.",
0.0
)),
('alpha', (
'float',
"cigale_list(options=0.0625 & 0.1250 & 0.1875 & 0.2500 & 0.3125 & "
"0.3750 & 0.4375 & 0.5000 & 0.562 &, 0.6250 & 0.6875 & 0.7500 & "
"0.8125 & 0.8750 & 0.9375 & 1.0000 & 1.0625 & 1.1250 & 1.1875 & "
"1.2500 & 1.3125 & 1.3750 & 1.4375 & 1.5000 & 1.5625 & 1.6250 & "
"1.6875 & 1.7500 & 1.8125 & 1.8750 & 1.9375 & 2.0000 & 2.0625 & "
"2.1250 & 2.1875 & 2.2500 & 2.3125 & 2.3750 & 2.4375 & 2.5000 & "
"2.5625 & 2.6250 & 2.6875 & 2.7500 & 2.8125 & 2.8750 & 2.9375 & "
"3.0000 & 3.0625 & 3.1250 & 3.1875 & 3.2500 & 3.3125 & 3.3750 & "
"3.4375 & 3.5000 & 3.5625 & 3.6250 & 3.6875 & 3.7500 & 3.8125 & "
"3.8750 & 3.9375 & 4.0000)",
"Alpha slope. Possible values are: 0.0625, 0.1250, 0.1875, "
"0.2500, 0.3125, 0.3750, 0.4375, 0.5000, 0.5625, 0.6250, 0.6875, "
"0.7500, 0.8125, 0.8750, 0.9375, 1.0000, 1.0625, 1.1250, 1.1875, "
......
......@@ -34,26 +34,29 @@ class DL2007(CreationModule):
parameter_list = OrderedDict([
('qpah', (
'float',
'cigale_list(options=0.47 & 1.12 & 1.77 & 2.50 & 3.19 & 3.90 & '
'4.58)',
"Mass fraction of PAH. Possible values are: 0.47, 1.12, 1.77, "
"2.50, 3.19, 3.90, 4.58.",
2.50
)),
('umin', (
'float',
'cigale_list(options=0.10 & 0.15 & 0.20 & 0.30 & 0.40 & 0.50 & '
'0.70 & 0.80 & 1.00 & 1.20 & 1.50 & 2.00 & 2.50 & 3.00 & 4.00 & '
'5.00 & 7.00 & 8.00 & 10.0 & 12.0 & 15.0 & 20.0 & 25.0)',
"Minimum radiation field. Possible values are: 0.10, 0.15, 0.20, "
"0.30, 0.40, 0.50, 0.70, 0.80, 1.00, 1.20, 1.50, 2.00, 2.50, "
"3.00, 4.00, 5.00, 7.00, 8.00, 10.0, 12.0, 15.0, 20.0, 25.0.",
1.0
)),
('umax', (
'float',
'cigale_list(options=1e3 & 1e4 & 1e5 & 1e6)',
"Maximum radiation field. Possible values are: 1e3, 1e4, 1e5, "
"1e6.",
1e6
)),
('gamma', (
'float',
'cigale_list(minvalue=0., maxvalue=1.)',
"Fraction illuminated from Umin to Umax. Possible values between "
"0 and 1.",
0.1
......
......@@ -34,13 +34,18 @@ class DL2014(CreationModule):
parameter_list = OrderedDict([
('qpah', (
'float',
'cigale_list(options=0.47 & 1.12 & 1.77 & 2.50 & 3.19 & 3.90 & '
'4.58 & 5.26 & 5.95 & 6.63 & 7.32)',
"Mass fraction of PAH. Possible values are: 0.47, 1.12, 1.77, "
"2.50, 3.19, 3.90, 4.58, 5.26, 5.95, 6.63, 7.32.",
2.50
)),
('umin', (
'float',
'cigale_list(options=0.10 & 0.12 & 0.15 & 0.17 & 0.20 & 0.25 & '
'0.30 & 0.35 & 0.40 & 0.50 & 0.60 & 0.70 & 0.80 & 1.00 & 1.20 & '
'1.50 & 1.70 & 2.00 & 2.50 & 3.00 & 3.50 & 4.00 & 5.00 & 6.00 & '
'7.00 & 8.00 & 10.00 & 12.00 & 15.00 & 17.00 & 20.00 & 25.00 & '
'30.00 & 35.00 & 40.00 & 50.00)',
"Minimum radiation field. Possible values are: 0.100, 0.120, "
"0.150, 0.170, 0.200, 0.250, 0.300, 0.350, 0.400, 0.500, 0.600, "
"0.700, 0.800, 1.000, 1.200, 1.500, 1.700, 2.000, 2.500, 3.000, "
......@@ -49,14 +54,16 @@ class DL2014(CreationModule):
1.0
)),
('alpha', (
'float',
'cigale_list(options=1.0 & 1.1 & 1.2 & 1.3 & 1.4 & 1.5 & 1.6 & '
'1.7 & 1.8 & 1.9 & 2.0 & 2.1 & 2.2 & 2.3 & 2.4 & 2.5 & 2.6 & '
'2.7 & 2.8 & 2.9 & 3.0)',
"Powerlaw slope dU/dM propto U^alpha. Possible values are: 1.0, "
"1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1, 2.2, "
"2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0.",
2.0
)),
('gamma', (
'float',
'cigale_list(minvalue=0., maxvalue=1.)',
"Fraction illuminated from Umin to Umax. Possible values between "
"0 and 1.",
0.1
......
......@@ -192,7 +192,7 @@ class CalzLeit(CreationModule):
parameter_list = OrderedDict([
("E_BVs_young", (
"float",
"cigale_list(minvalue=0.)",
"E(B-V)*, the colour excess of the stellar continuum light for "
"the young population. BEWARE that if you add a power law with "
"a slope different from 0, this E(B-V)* no longer equals "
......@@ -200,33 +200,33 @@ class CalzLeit(CreationModule):
0.3
)),
("E_BVs_old_factor", (
"float",
"cigale_list(minvalue=0., maxvalue=1.)",
"Reduction factor for the E(B-V)* of the old population compared "
"to the young one (<1).",
0.44
)),
("uv_bump_wavelength", (
"float",
"cigale_list(minvalue=0.)",
"Central wavelength of the UV bump in nm.",
217.5
)),
("uv_bump_width", (
"float",
"cigale_list()",
"Width (FWHM) of the UV bump in nm.",
35.
)),
("uv_bump_amplitude", (
"float",
"cigale_list(minvalue=0.)",
"Amplitude of the UV bump. For the Milky Way: 3.",
0.
)),
("powerlaw_slope", (
"float",
"cigale_list()",
"Slope delta of the power law modifying the attenuation curve.",
0.
)),
("filters", (
"string",
"string()",
"Filters for which the attenuation will be computed and added to "
"the SED information dictionary. You can give several filter "
"names separated by a & (don't use commas).",
......
......@@ -112,38 +112,38 @@ class PowerLawAtt(CreationModule):
parameter_list = OrderedDict([
("Av_young", (
"float",
"cigale_list(minvalue=0.)",
"V-band attenuation of the young population.",
1.
)),
("Av_old_factor", (
"float",
"cigale_list(minvalue=0., maxvalue=1.)",
"Reduction factor for the V-band attenuation of the old "
"population compared to the young one (<1).",
0.44
)),
("uv_bump_wavelength", (
"float",
"cigale_list(minvalue=0.)",
"Central wavelength of the UV bump in nm.",
217.5
)),
("uv_bump_width", (
"float",
"cigale_list(minvalue=0.)",
"Width (FWHM) of the UV bump in nm.",
35.
)),
("uv_bump_amplitude", (
"float",
"cigale_list(minvalue=0.)",
"Amplitude of the UV bump. For the Milky Way: 3.",
0.
)),
("powerlaw_slope", (
"float",
"cigale_list()",
"Slope delta of the power law continuum.",
-0.7
)),
("filters", (
"string",
"string()",
"Filters for which the attenuation will be computed and added to "
"the SED information dictionary. You can give several filter "
"names separated by a & (don't use commas).",
......
......@@ -42,35 +42,37 @@ class Fritz2006(CreationModule):
parameter_list = OrderedDict([
('r_ratio', (
'float',
"cigale_list(options=10. & 30. & 60. & 100. & 150.)",
"Ratio of the maximum to minimum radii of the dust torus. "
"Possible values are: 10, 30, 60, 100, 150.",
60.
)),
('tau', (
'float',
"cigale_list(options=0.1 & 0.3 & 0.6 & 1.0 & 2.0 & 3.0 & 6.0 & "
"10.0)",
"Optical depth at 9.7 microns. "
"Possible values are: 0.1, 0.3, 0.6, 1.0, 2.0, 3.0, 6.0, 10.0.",
1.0
)),
('beta', (
'float',
"Beta. Possible values are:-1.00, -0.75, -0.50, -0.25, 0.00.",
"cigale_list(options=-1.00 & -0.75 & -0.50 & -0.25 & 0.00)",
"Beta. Possible values are: -1.00, -0.75, -0.50, -0.25, 0.00.",
-0.50
)),
('gamma', (
'float',
'cigale_list(options=0.0 & 2.0 & 4.0 & 6.0)',
"Gamma. Possible values are: 0.0, 2.0, 4.0, 6.0.",
4.0
)),
('opening_angle', (
'float',
'cigale_list(options=60. & 100. & 140.)',
"Full opening angle of the dust torus (Fig 1 of Fritz 2006). "
"Possible values are: 60., 100., 140.",
100.
)),
('psy', (
'float',
'cigale_list(options=0.001 & 10.100 & 20.100 & 30.100 & 40.100 & '
'50.100 & 60.100 & 70.100 & 80.100 & 89.990)',
"Angle between equatorial axis and line of sight. "
"Psy = 90◦ for type 1 and Psy = 0° for type 2. Possible values "
"are: 0.001, 10.100, 20.100, 30.100, 40.100, 50.100, 60.100, "
......@@ -78,7 +80,7 @@ class Fritz2006(CreationModule):
50.100
)),
('fracAGN', (
'float',
'cigale_list(minvalue=0., maxvalue=1.)',
"AGN fraction.",
0.1
))
......
......@@ -24,18 +24,18 @@ class LoadSpecFile(CreationModule):
parameter_list = OrderedDict([
("filename", (
'str',
'string()',
"Name of the file to load and to add to the SED table. This "
"file must be loadable with astropy",
None
)),
("lambda_column", (
'str',
'string()',
"Name of the column containing the wavelength in nm.",
None
)),
("l_lambda_column", (
'str',
'string()',
"Name of the column containing the Lλ luminosity in W/nm.",
None
))
......
......@@ -43,17 +43,17 @@ class M2005(CreationModule):
parameter_list = OrderedDict([
('imf', (
'int',
'cigale_list(dtype=int, options=0. & 1.)',
"Initial mass function: 0 (Salpeter) or 1 (Kroupa)",
0
)),
('metallicity', (
'float',
'cigale_list(options=0.001 & 0.01 & 0.02 & 0.04)',
"Metallicity. Possible values are: 0.001, 0.01, 0.02, 0.04.",
0.02
)),
('separation_age', (
'int',
'cigale_list(dtype=int, minvalue=0.)',
"Age [Myr] of the separation between the young and the old star "
"populations. The default value in 10^7 years (10 Myr). Set to "
"0 not to differentiate ages (only an old population).",
......
......@@ -36,22 +36,22 @@ class MBB(CreationModule):
parameter_list = OrderedDict([
("epsilon_mbb", (
"float",
"Fraction [>= Ø] of L_dust(energy balance) in the MBB",
"cigale_list(minvalue=0., maxvalue=1.)",
"Fraction [>= 0] of L_dust(energy balance) in the MBB",
0.5
)),
("t_mbb", (
"float",
"cigale_list(minvalue=0.)",
"Temperature of black body in K.",
50.
)),
("beta_mbb", (
"float",
"cigale_list()",
"Emissivity index of modified black body.",
1.5
)),
("energy_balance", (
"boolean",
"boolean()",
"Energy balance checked?"
"If False, Lum[MBB] not taken into account in energy balance",
False
......
......@@ -29,27 +29,27 @@ class NebularEmission(CreationModule):
parameter_list = OrderedDict([
('logU', (
'float',
'cigale_list(options=-3. & -2. & -1.)',
"Ionisation parameter",
-2.
)),
('f_esc', (
'float',
'cigale_list(minvalue=0., maxvalue=1.)',
"Fraction of Lyman continuum photons escaping the galaxy",
0.
)),
('f_dust', (
'float',
'cigale_list(minvalue=0., maxvalue=1.)',
"Fraction of Lyman continuum photons absorbed by dust",
0.
)),
('lines_width', (
'float',
'cigale_list(minvalue=0.)',
"Line width in km/s",
300.
)),
('emission', (
'boolean',
'boolean()',
"Include nebular emission.",
True
))
......
......@@ -39,7 +39,7 @@ class Param(CreationModule):
parameter_list = OrderedDict([
("filter_list", (
"string",
"string()",
"Filters for which the flux will be computed and added to the SED "
"information dictionary. You can give several filter names "
"separated by a & (don't use commas).",
......
......@@ -36,12 +36,12 @@ class Radio(CreationModule):
parameter_list = OrderedDict([
("qir", (
"float",
"cigale_list(minvalue=0.)",
"The value of the FIR/radio correlation coefficient.",
2.58
)),
("alpha", (
"float",
"cigale_list()",
"The slope of the power-law synchrotron emission.",
0.8
))
......
......@@ -145,7 +145,7 @@ class Redshifting(CreationModule):
parameter_list = OrderedDict([
("redshift", (
"float",
"cigale_list(minvalue=0.)",
"Redshift to apply to the galaxy. Leave empty to use the redshifts"
" from the input file.",
None
......
......@@ -30,13 +30,17 @@ class Schreiber2016(CreationModule):
parameter_list = OrderedDict([
('tdust', (
'float',
'cigale_list(options=15. & 16. & 17. & 18. & 19. & 20. & 21. & '
'22. & 23. & 24. & 25. & 26. & 27. & 28. & 29. & 30. & 31. & '
'32. & 33. & 34. & 35. & 36. & 37. & 38. & 39. & 40. & 41. & '
'42. & 43. & 44. & 45. & 46. & 47. & 48. & 49. & 50. & 51. & '
'52. & 53. & 54. & 55. & 56. & 57. & 58. & 59. & 60.)',
"Dust temperature. "
"Between 15 and 60K, with 1K step.",
20.
)),
('fpah', (
'float',
'cigale_list(minvalue=0., maxvalue=1.)',
"Mass fraction of PAH. "
"Between 0 and 1.",
0.05
......
......@@ -29,38 +29,38 @@ class Sfh2Exp(CreationModule):
parameter_list = OrderedDict([
("tau_main", (
"float",
"cigale_list()",
"e-folding time of the main stellar population model in Myr.",
6000.
)),
("tau_burst", (
"float",
"cigale_list()",
"e-folding time of the late starburst population model in Myr.",
50.
)),
("f_burst", (
"float",
"cigale_list(minvalue=0., maxvalue=0.9999)",
"Mass fraction of the late burst population.",
0.01
)),
("age", (
"integer",
"cigale_list(dtype=int, minvalue=0.)",
"Age of the main stellar population in the galaxy in Myr."
"The precision is 1 Myr.",
5000.
5000
)),
("burst_age", (
"integer",
"cigale_list(dtype=int, minvalue=1.)",
"Age of the late burst in Myr. Precision is 1 Myr.",
20.
20
)),
("sfr_0", (
"float",
"float(min=0)",
"Value of SFR at t = 0 in M_sun/yr.",
1.
)),
("normalise", (
"boolean",
"boolean()",
"Normalise the SFH to produce one solar mass.",
True
)),
......
......@@ -39,19 +39,19 @@ class SfhBuat08(CreationModule):
parameter_list = OrderedDict([
("velocity", (
"float",
"cigale_list(minvalue=80., maxvalue=360.)",
"Rotational velocity of the galaxy in km/s. Must be between 80 "
"and 360 (included).",
200.
)),
("age", (
"integer",
"cigale_list(dtype=int, minvalue=0.)",
"Age of the oldest stars in the galaxy. The precision "
"is 1 Myr.",
5000.
5000
)),
("normalise", (
"boolean",
"boolean()",
"Normalise the SFH to produce one solar mass.",
True
))
......
......@@ -30,20 +30,20 @@ class SfhQuench(CreationModule):
parameter_list = OrderedDict([
("quenching_age", (
"integer",
"cigale_list(dtype=int, minvalue=0.)",
"Look-back time when the quenching happens in Myr.",
0
)),
("quenching_factor", (
"float",
"cigale_list(minvalue=0., maxvalue=1.)",
"Quenching factor applied to the SFH. After the quenching time, "
"the SFR is multiplied by 1 - quenching factor and made constant. "
"The factor must be between 0 (no quenching) and 1 (no more star "
"formation).",
0
0.
)),
("normalise", (
"boolean",
"boolean()",
"Normalise the SFH to produce one solar mass.",
True
))
......
......@@ -30,23 +30,23 @@ class SFHDelayed(CreationModule):
parameter_list = OrderedDict([
("tau_main", (
"float",
"cigale_list()",
"e-folding time of the main stellar population model in Myr.",
2000.
)),
("age", (
"integer",
"cigale_list(dtype=int, minvalue=0.)",
"Age of the oldest stars in the galaxy in Myr. The precision "
"is 1 Myr.",
5000.
5000
)),
("sfr_A", (
"float",
"float(min=0.)",
"Multiplicative factor controlling the amplitude of SFR.",
1.
)),
("normalise", (
"boolean",
"boolean()",
"Normalise the SFH to produce one solar mass.",
True
))
......
......@@ -32,7 +32,7 @@ class SfhFromFile(CreationModule):
parameter_list = OrderedDict([
("filename", (
"str",
"string()",
"Name of the file containing the SFH. The first column must be "
"the time in Myr, starting from 0 with a step of 1 Myr. The other "
"columns must contain the SFR in Msun/yr."
......@@ -40,18 +40,18 @@ class SfhFromFile(CreationModule):
None
)),
("sfr_column", (
"integer",
"cigale_list(dtype=int)",
"List of column indices of the SFR. The first SFR column has the "
"index 1.",
None
)),
("age", (
"integer",
"cigale_list(dtype=int, minvalue=0.)",
"Age in Myr at which the SFH will be looked at.",
None
)),
("normalise", (
"boolean",
"boolean()",
"Normalise the SFH to one solar mass produced at the given age.",
True
))
......
......@@ -31,37 +31,37 @@ class SfhPeriodic(CreationModule):
parameter_list = OrderedDict([
("type_bursts", (
"integer",
"cigale_list(dtype=int, options=0. & 1. & 2.)",
"Type of the individual star formation episodes. 0: exponential, "
"1: delayed, 2: rectangle.",
0
)),
("delta_bursts", (
"integer",
"cigale_list(dtype=int, minvalue=0.)",
"Elapsed time between the beginning of each burst in Myr. The "
"precision is 1 Myr.",
50
)),
("tau_bursts", (
"integer",
"cigale_list()",
"Duration (rectangle) or e-folding time of all short events in "
"Myr. The precision is 1 Myr.",
20
20.
)),
("age", (
"integer",
"cigale_list(dtype=int, minvalue=0.)",
"Age of the main stellar population in the galaxy in Myr. The "
"precision is 1 Myr.",
1000
)),
("sfr_A", (
"float",
"float(min=0.)",
"Multiplicative factor controlling the amplitude of SFR (valid "
"for each event).",
1.
)),
("normalise", (
"boolean",
"boolean()",
"Normalise the SFH to produce one solar mass.",
True
)),
......