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
f10d9f86
Commit
f10d9f86
authored
Feb 28, 2018
by
Médéric Boquien
Browse files
Slight formatting corrections to follow the PEP8 a bit more closely.
parent
eb3ffc69
Changes
3
Hide whitespace changes
Inline
Side-by-side
pcigale/managers/observations.py
View file @
f10d9f86
...
...
@@ -97,7 +97,8 @@ class ObservationsManagerPassbands(object):
self
.
tofit
=
self
.
bands
+
self
.
intprops
+
self
.
extprops
self
.
tofit_err
=
self
.
bands_err
+
self
.
intprops_err
+
self
.
extprops_err
self
.
observations
=
list
([
Observation
(
row
,
self
)
for
row
in
self
.
table
])
self
.
observations
=
list
([
Observation
(
row
,
self
)
for
row
in
self
.
table
])
def
__len__
(
self
):
return
len
(
self
.
observations
)
...
...
@@ -162,9 +163,12 @@ class ObservationsManagerPassbands(object):
for
item
in
self
.
tofit
:
error
=
item
+
'_err'
if
item
in
self
.
intprops
:
if
error
not
in
self
.
intprops_err
or
error
not
in
self
.
table
.
colnames
:
raise
ValueError
(
"Intensive properties errors must be in input file."
)
elif
error
not
in
self
.
tofit_err
or
error
not
in
self
.
table
.
colnames
:
if
(
error
not
in
self
.
intprops_err
or
error
not
in
self
.
table
.
colnames
):
raise
ValueError
(
"Intensive properties errors must be in "
"input file."
)
elif
(
error
not
in
self
.
tofit_err
or
error
not
in
self
.
table
.
colnames
):
colerr
=
Column
(
data
=
np
.
fabs
(
self
.
table
[
item
]
*
defaulterror
),
name
=
error
)
self
.
table
.
add_column
(
colerr
,
...
...
pcigale/managers/parameters.py
View file @
f10d9f86
...
...
@@ -73,7 +73,7 @@ class ParametersManagerGrid(object):
"""
k
=
len
(
l
)
//
nb
step
=
k
+
nz
-
k
%
nz
step
=
k
+
nz
-
k
%
nz
return
[
l
[
i
*
step
:
(
i
+
1
)
*
step
]
for
i
in
range
(
nb
)]
...
...
@@ -223,7 +223,6 @@ class ParametersManagerFile(object):
raise
ValueError
(
"The number of blocks must be no more than the number"
"of models."
)
def
from_index
(
self
,
index
):
"""Provides the parameters of a model given an index.
...
...
pcigale/managers/utils.py
View file @
f10d9f86
...
...
@@ -13,6 +13,7 @@ import numpy as np
from
multiprocessing.sharedctypes
import
RawArray
from
..warehouse
import
SedWarehouse
def
get_info
(
cls
):
warehouse
=
SedWarehouse
()
sed
=
warehouse
.
get_sed
(
cls
.
conf
[
'sed_modules'
],
...
...
@@ -22,6 +23,7 @@ def get_info(cls):
return
(
info
,
sed
.
mass_proportional_info
)
class
SharedArray
(
object
):
"""Class to Create a shared array that can be read/written by parallel
processes, were data related to the models is going to be stored. For
...
...
Write
Preview
Markdown
is supported
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