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

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): ...@@ -54,37 +54,37 @@ class PdfAnalysis(AnalysisModule):
parameter_list = OrderedDict([ parameter_list = OrderedDict([
("analysed_variables", ( ("analysed_variables", (
"array of strings", "cigale_string_list()",
"List of the physical properties to estimate. Leave empty to " "List of the physical properties to estimate. Leave empty to "
"analyse all the physical properties (not recommended when there " "analyse all the physical properties (not recommended when there "
"are many models).", "are many models).",
["sfh.sfr", "sfh.sfr10Myrs", "sfh.sfr100Myrs"] ["sfh.sfr", "sfh.sfr10Myrs", "sfh.sfr100Myrs"]
)), )),
("save_best_sed", ( ("save_best_sed", (
"boolean", "boolean()",
"If true, save the best SED for each observation to a file.", "If true, save the best SED for each observation to a file.",
False False
)), )),
("save_chi2", ( ("save_chi2", (
"boolean", "boolean{}",
"If true, for each observation and each analysed variable save " "If true, for each observation and each analysed variable save "
"the reduced chi2.", "the reduced chi2.",
False False
)), )),
("save_pdf", ( ("save_pdf", (
"boolean", "boolean{}",
"If true, for each observation and each analysed variable save " "If true, for each observation and each analysed variable save "
"the probability density function.", "the probability density function.",
False False
)), )),
("lim_flag", ( ("lim_flag", (
"boolean", "boolean()",
"If true, for each object check whether upper limits are present " "If true, for each object check whether upper limits are present "
"and analyse them.", "and analyse them.",
False False
)), )),
("mock_flag", ( ("mock_flag", (
"boolean", "boolean()",
"If true, for each object we create a mock object " "If true, for each object we create a mock object "
"and analyse them.", "and analyse them.",
False False
......
...@@ -41,25 +41,25 @@ class SaveFluxes(AnalysisModule): ...@@ -41,25 +41,25 @@ class SaveFluxes(AnalysisModule):
parameter_list = OrderedDict([ parameter_list = OrderedDict([
("variables", ( ("variables", (
"array of strings", "cigale_string_list()",
"List of the physical properties to save. Leave empty to save all " "List of the physical properties to save. Leave empty to save all "
"the physical properties (not recommended when there are many " "the physical properties (not recommended when there are many "
"models).", "models).",
None None
)), )),
("output_file", ( ("output_file", (
"string", "string()",
"Name of the output file that contains the parameters of the " "Name of the output file that contains the parameters of the "
"model(s) and the flux densities in the bands", "model(s) and the flux densities in the bands",
"computed_fluxes.txt" "computed_fluxes.txt"
)), )),
("save_sed", ( ("save_sed", (
"boolean", "boolean()",
"If True, save the generated spectrum for each model.", "If True, save the generated spectrum for each model.",
"False" False
)), )),
("output_format", ( ("output_format", (
"string", "string()",
"Format of the output file. Any format supported by astropy.table " "Format of the output file. Any format supported by astropy.table "
"e.g. votable or ascii.", "e.g. votable or ascii.",
"ascii" "ascii"
......
...@@ -30,18 +30,19 @@ class BC03(CreationModule): ...@@ -30,18 +30,19 @@ class BC03(CreationModule):
parameter_list = OrderedDict([ parameter_list = OrderedDict([
("imf", ( ("imf", (
"int", "cigale_list(dtype=int, options=0. & 1.)",
"Initial mass function: 0 (Salpeter) or 1 (Chabrier).", "Initial mass function: 0 (Salpeter) or 1 (Chabrier).",
0 0
)), )),
("metallicity", ( ("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, " "Metalicity. Possible values are: 0.0001, 0.0004, 0.004, 0.008, "
"0.02, 0.05.", "0.02, 0.05.",
0.02 0.02
)), )),
("separation_age", ( ("separation_age", (
"int", "cigale_list(dtype=int, minvalue=0)",
"Age [Myr] of the separation between the young and the old star " "Age [Myr] of the separation between the young and the old star "
"populations. The default value in 10^7 years (10 Myr). Set " "populations. The default value in 10^7 years (10 Myr). Set "
"to 0 not to differentiate ages (only an old population).", "to 0 not to differentiate ages (only an old population).",
......
...@@ -31,17 +31,17 @@ class Casey2012(CreationModule): ...@@ -31,17 +31,17 @@ class Casey2012(CreationModule):
parameter_list = OrderedDict([ parameter_list = OrderedDict([
("temperature", ( ("temperature", (
"float", "cigale_list(minvalue=0.)",
"Temperature of the dust in K.", "Temperature of the dust in K.",
35 35.
)), )),
("beta", ( ("beta", (
"float", "cigale_list(minvalue=0.)",
"Emissivity index of the dust.", "Emissivity index of the dust.",
1.6 1.6
)), )),
("alpha", ( ("alpha", (
"float", "cigale_list(minvalue=0.)",
"Mid-infrared powerlaw slope.", "Mid-infrared powerlaw slope.",
2. 2.
)) ))
......
...@@ -31,13 +31,22 @@ class Dale2014(CreationModule): ...@@ -31,13 +31,22 @@ class Dale2014(CreationModule):
parameter_list = OrderedDict([ parameter_list = OrderedDict([
('fracAGN', ( ('fracAGN', (
'float', 'cigale_list(minvalue=0., maxvalue=1.)',
"AGN fraction. It is not recommended to combine this AGN emission " "AGN fraction. It is not recommended to combine this AGN emission "
"with the of Fritz et al. (2006) models.", "with the of Fritz et al. (2006) models.",
0.0 0.0
)), )),
('alpha', ( ('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, " "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.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, " "0.7500, 0.8125, 0.8750, 0.9375, 1.0000, 1.0625, 1.1250, 1.1875, "
......
...@@ -34,26 +34,29 @@ class DL2007(CreationModule): ...@@ -34,26 +34,29 @@ class DL2007(CreationModule):
parameter_list = OrderedDict([ parameter_list = OrderedDict([
('qpah', ( ('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, " "Mass fraction of PAH. Possible values are: 0.47, 1.12, 1.77, "
"2.50, 3.19, 3.90, 4.58.", "2.50, 3.19, 3.90, 4.58.",
2.50 2.50
)), )),
('umin', ( ('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, " "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, " "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.", "3.00, 4.00, 5.00, 7.00, 8.00, 10.0, 12.0, 15.0, 20.0, 25.0.",
1.0 1.0
)), )),
('umax', ( ('umax', (
'float', 'cigale_list(options=1e3 & 1e4 & 1e5 & 1e6)',
"Maximum radiation field. Possible values are: 1e3, 1e4, 1e5, " "Maximum radiation field. Possible values are: 1e3, 1e4, 1e5, "
"1e6.", "1e6.",
1e6 1e6
)), )),
('gamma', ( ('gamma', (
'float', 'cigale_list(minvalue=0., maxvalue=1.)',
"Fraction illuminated from Umin to Umax. Possible values between " "Fraction illuminated from Umin to Umax. Possible values between "
"0 and 1.", "0 and 1.",
0.1 0.1
......
...@@ -34,13 +34,18 @@ class DL2014(CreationModule): ...@@ -34,13 +34,18 @@ class DL2014(CreationModule):
parameter_list = OrderedDict([ parameter_list = OrderedDict([
('qpah', ( ('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, " "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, 3.19, 3.90, 4.58, 5.26, 5.95, 6.63, 7.32.",
2.50 2.50
)), )),
('umin', ( ('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, " "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.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, " "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): ...@@ -49,14 +54,16 @@ class DL2014(CreationModule):
1.0 1.0
)), )),
('alpha', ( ('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, " "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, " "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.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0.",
2.0 2.0
)), )),
('gamma', ( ('gamma', (
'float', 'cigale_list(minvalue=0., maxvalue=1.)',
"Fraction illuminated from Umin to Umax. Possible values between " "Fraction illuminated from Umin to Umax. Possible values between "
"0 and 1.", "0 and 1.",
0.1 0.1
......
...@@ -192,7 +192,7 @@ class CalzLeit(CreationModule): ...@@ -192,7 +192,7 @@ class CalzLeit(CreationModule):
parameter_list = OrderedDict([ parameter_list = OrderedDict([
("E_BVs_young", ( ("E_BVs_young", (
"float", "cigale_list(minvalue=0.)",
"E(B-V)*, the colour excess of the stellar continuum light for " "E(B-V)*, the colour excess of the stellar continuum light for "
"the young population. BEWARE that if you add a power law with " "the young population. BEWARE that if you add a power law with "
"a slope different from 0, this E(B-V)* no longer equals " "a slope different from 0, this E(B-V)* no longer equals "
...@@ -200,33 +200,33 @@ class CalzLeit(CreationModule): ...@@ -200,33 +200,33 @@ class CalzLeit(CreationModule):
0.3 0.3
)), )),
("E_BVs_old_factor", ( ("E_BVs_old_factor", (
"float", "cigale_list(minvalue=0., maxvalue=1.)",
"Reduction factor for the E(B-V)* of the old population compared " "Reduction factor for the E(B-V)* of the old population compared "
"to the young one (<1).", "to the young one (<1).",
0.44 0.44
)), )),
("uv_bump_wavelength", ( ("uv_bump_wavelength", (
"float", "cigale_list(minvalue=0.)",
"Central wavelength of the UV bump in nm.", "Central wavelength of the UV bump in nm.",
217.5 217.5
)), )),
("uv_bump_width", ( ("uv_bump_width", (
"float", "cigale_list()",
"Width (FWHM) of the UV bump in nm.", "Width (FWHM) of the UV bump in nm.",
35. 35.
)), )),
("uv_bump_amplitude", ( ("uv_bump_amplitude", (
"float", "cigale_list(minvalue=0.)",
"Amplitude of the UV bump. For the Milky Way: 3.", "Amplitude of the UV bump. For the Milky Way: 3.",
0. 0.
)), )),
("powerlaw_slope", ( ("powerlaw_slope", (
"float", "cigale_list()",
"Slope delta of the power law modifying the attenuation curve.", "Slope delta of the power law modifying the attenuation curve.",
0. 0.
)), )),
("filters", ( ("filters", (
"string", "string()",
"Filters for which the attenuation will be computed and added to " "Filters for which the attenuation will be computed and added to "
"the SED information dictionary. You can give several filter " "the SED information dictionary. You can give several filter "
"names separated by a & (don't use commas).", "names separated by a & (don't use commas).",
......
...@@ -112,38 +112,38 @@ class PowerLawAtt(CreationModule): ...@@ -112,38 +112,38 @@ class PowerLawAtt(CreationModule):
parameter_list = OrderedDict([ parameter_list = OrderedDict([
("Av_young", ( ("Av_young", (
"float", "cigale_list(minvalue=0.)",
"V-band attenuation of the young population.", "V-band attenuation of the young population.",
1. 1.
)), )),
("Av_old_factor", ( ("Av_old_factor", (
"float", "cigale_list(minvalue=0., maxvalue=1.)",
"Reduction factor for the V-band attenuation of the old " "Reduction factor for the V-band attenuation of the old "
"population compared to the young one (<1).", "population compared to the young one (<1).",
0.44 0.44
)), )),
("uv_bump_wavelength", ( ("uv_bump_wavelength", (
"float", "cigale_list(minvalue=0.)",
"Central wavelength of the UV bump in nm.", "Central wavelength of the UV bump in nm.",
217.5 217.5
)), )),
("uv_bump_width", ( ("uv_bump_width", (
"float", "cigale_list(minvalue=0.)",
"Width (FWHM) of the UV bump in nm.", "Width (FWHM) of the UV bump in nm.",
35. 35.
)), )),
("uv_bump_amplitude", ( ("uv_bump_amplitude", (
"float", "cigale_list(minvalue=0.)",
"Amplitude of the UV bump. For the Milky Way: 3.", "Amplitude of the UV bump. For the Milky Way: 3.",
0. 0.
)), )),
("powerlaw_slope", ( ("powerlaw_slope", (
"float", "cigale_list()",
"Slope delta of the power law continuum.", "Slope delta of the power law continuum.",
-0.7 -0.7
)), )),
("filters", ( ("filters", (
"string", "string()",
"Filters for which the attenuation will be computed and added to " "Filters for which the attenuation will be computed and added to "
"the SED information dictionary. You can give several filter " "the SED information dictionary. You can give several filter "
"names separated by a & (don't use commas).", "names separated by a & (don't use commas).",
......
...@@ -42,35 +42,37 @@ class Fritz2006(CreationModule): ...@@ -42,35 +42,37 @@ class Fritz2006(CreationModule):
parameter_list = OrderedDict([ parameter_list = OrderedDict([
('r_ratio', ( ('r_ratio', (
'float', "cigale_list(options=10. & 30. & 60. & 100. & 150.)",
"Ratio of the maximum to minimum radii of the dust torus. " "Ratio of the maximum to minimum radii of the dust torus. "
"Possible values are: 10, 30, 60, 100, 150.", "Possible values are: 10, 30, 60, 100, 150.",
60. 60.
)), )),
('tau', ( ('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. " "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.", "Possible values are: 0.1, 0.3, 0.6, 1.0, 2.0, 3.0, 6.0, 10.0.",
1.0 1.0
)), )),
('beta', ( ('beta', (
'float', "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.", "Beta. Possible values are: -1.00, -0.75, -0.50, -0.25, 0.00.",
-0.50 -0.50
)), )),
('gamma', ( ('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.", "Gamma. Possible values are: 0.0, 2.0, 4.0, 6.0.",
4.0 4.0
)), )),
('opening_angle', ( ('opening_angle', (
'float', 'cigale_list(options=60. & 100. & 140.)',
"Full opening angle of the dust torus (Fig 1 of Fritz 2006). " "Full opening angle of the dust torus (Fig 1 of Fritz 2006). "
"Possible values are: 60., 100., 140.", "Possible values are: 60., 100., 140.",
100. 100.
)), )),
('psy', ( ('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. " "Angle between equatorial axis and line of sight. "
"Psy = 90◦ for type 1 and Psy = 0° for type 2. Possible values " "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, " "are: 0.001, 10.100, 20.100, 30.100, 40.100, 50.100, 60.100, "
...@@ -78,7 +80,7 @@ class Fritz2006(CreationModule): ...@@ -78,7 +80,7 @@ class Fritz2006(CreationModule):
50.100 50.100
)), )),
('fracAGN', ( ('fracAGN', (
'float', 'cigale_list(minvalue=0., maxvalue=1.)',
"AGN fraction.", "AGN fraction.",
0.1 0.1
)) ))
......
...@@ -24,18 +24,18 @@ class LoadSpecFile(CreationModule): ...@@ -24,18 +24,18 @@ class LoadSpecFile(CreationModule):
parameter_list = OrderedDict([ parameter_list = OrderedDict([
("filename", ( ("filename", (
'str', 'string()',
"Name of the file to load and to add to the SED table. This " "Name of the file to load and to add to the SED table. This "
"file must be loadable with astropy", "file must be loadable with astropy",
None None
)), )),
("lambda_column", ( ("lambda_column", (
'str', 'string()',
"Name of the column containing the wavelength in nm.", "Name of the column containing the wavelength in nm.",
None None
)), )),
("l_lambda_column", ( ("l_lambda_column", (
'str', 'string()',
"Name of the column containing the Lλ luminosity in W/nm.", "Name of the column containing the Lλ luminosity in W/nm.",
None None
)) ))
......
...@@ -43,17 +43,17 @@ class M2005(CreationModule): ...@@ -43,17 +43,17 @@ class M2005(CreationModule):
parameter_list = OrderedDict([ parameter_list = OrderedDict([
('imf', ( ('imf', (
'int', 'cigale_list(dtype=int, options=0. & 1.)',
"Initial mass function: 0 (Salpeter) or 1 (Kroupa)", "Initial mass function: 0 (Salpeter) or 1 (Kroupa)",
0 0
)), )),
('metallicity', ( ('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.", "Metallicity. Possible values are: 0.001, 0.01, 0.02, 0.04.",
0.02 0.02
)), )),
('separation_age', ( ('separation_age', (