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
372e45e8
Commit
372e45e8
authored
Aug 26, 2014
by
Médéric Boquien
Browse files
Fix plotting error bars when the uncertainty is larger than 1/3. Also properly select the mask.
parent
cbde188e
Changes
1
Hide whitespace changes
Inline
Side-by-side
pcigale_plots/__init__.py
View file @
372e45e8
...
...
@@ -119,13 +119,14 @@ def _sed_worker(obs, mod, filters):
ax1
=
plt
.
subplot
(
gs
[
0
])
ax2
=
plt
.
subplot
(
gs
[
1
])
ax1
.
loglog
(
sed
[
'wavelength'
][
wsed
],
sed
[
'F_nu'
][
wsed
],
label
=
"Model spectrum"
,
color
=
'k'
)
label
=
"Model spectrum"
,
color
=
'k'
,
nonposy
=
'clip'
)
ax1
.
set_autoscale_on
(
False
)
ax1
.
scatter
(
filters_wl
,
mod_fluxes
,
marker
=
'o'
,
color
=
'r'
,
label
=
"Model fluxes"
)
ax1
.
errorbar
(
filters_wl
,
obs_fluxes
,
yerr
=
obs_fluxes_err
*
3
,
ls
=
''
,
marker
=
'_'
,
label
=
'Observed fluxes'
,
color
=
'b'
,
capsize
=
0.
)
mask
=
obs_fluxes
!=
-
9999.
mask
=
np
.
where
(
obs_fluxes
>
0.
)
ax2
.
errorbar
(
filters_wl
[
mask
],
(
obs_fluxes
[
mask
]
-
mod_fluxes
[
mask
])
/
obs_fluxes
[
mask
],
yerr
=
obs_fluxes_err
[
mask
]
/
obs_fluxes
[
mask
]
*
3
,
marker
=
'_'
,
...
...
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