Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cigale
CIGALE
Commits
5cced935
Commit
5cced935
authored
Nov 04, 2015
by
Médéric Boquien
Browse files
We save Lλ, not Fλ. Give a relevant name for the table. Fixes issue
#4
reported by Yannick Roehlly.
parent
e7f9b698
Changes
1
Show whitespace changes
Inline
Side-by-side
pcigale/sed/io/vo.py
View file @
5cced935
...
...
@@ -38,23 +38,23 @@ def save_sed_to_vo(sed, filename, norm=1.):
fnu_table
.
array
[
"wavelength"
]
=
sed
.
wavelength_grid
fnu_table
.
array
[
"F_nu"
]
=
norm
*
sed
.
fnu
#
F
_lambda contributions and total
f
lambda_table
=
Table
(
votable
,
name
=
"
F
lambda"
,
id
=
"
F
lambda"
)
spectra_resource
.
tables
.
append
(
f
lambda_table
)
f
lambda_fields
=
[
#
L
_lambda contributions and total
L
lambda_table
=
Table
(
votable
,
name
=
"
L
lambda"
,
id
=
"
L
lambda"
)
spectra_resource
.
tables
.
append
(
L
lambda_table
)
L
lambda_fields
=
[
Field
(
votable
,
name
=
"wavelength"
,
datatype
=
"double"
,
unit
=
"nm"
,
ucd
=
"em.wl"
),
Field
(
votable
,
name
=
"
F
_lambda_total"
,
datatype
=
"double"
,
unit
=
"W/nm"
,
Field
(
votable
,
name
=
"
L
_lambda_total"
,
datatype
=
"double"
,
unit
=
"W/nm"
,
ucd
=
"phot.flux"
)]
for
name
in
sed
.
contribution_names
:
f
lambda_fields
.
append
(
Field
(
votable
,
name
=
name
,
datatype
=
"double"
,
L
lambda_fields
.
append
(
Field
(
votable
,
name
=
name
,
datatype
=
"double"
,
unit
=
"W/nm"
,
ucd
=
"phot.flux"
))
f
lambda_table
.
fields
.
extend
(
f
lambda_fields
)
f
lambda_table
.
create_arrays
(
len
(
sed
.
wavelength_grid
))
f
lambda_table
.
array
[
"wavelength"
]
=
sed
.
wavelength_grid
f
lambda_table
.
array
[
"
F
_lambda_total"
]
=
norm
*
sed
.
luminosity
L
lambda_table
.
fields
.
extend
(
L
lambda_fields
)
L
lambda_table
.
create_arrays
(
len
(
sed
.
wavelength_grid
))
L
lambda_table
.
array
[
"wavelength"
]
=
sed
.
wavelength_grid
L
lambda_table
.
array
[
"
L
_lambda_total"
]
=
norm
*
sed
.
luminosity
for
name
in
sed
.
contribution_names
:
f
lambda_table
.
array
[
name
]
=
norm
*
sed
.
get_lumin_contribution
(
name
)
L
lambda_table
.
array
[
name
]
=
norm
*
sed
.
get_lumin_contribution
(
name
)
# SFH
if
sed
.
sfh
is
not
None
:
...
...
Médéric Boquien
@mboquien2
mentioned in issue
#4 (closed)
·
Nov 04, 2015
mentioned in issue
#4 (closed)
mentioned in issue #4
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment