Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
cigale
CIGALE
Commits
00d6eaad
Commit
00d6eaad
authored
Feb 27, 2018
by
Hector Salas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add intprops and extprops property to BestResultManager class
parent
fda2ce6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
pcigale/managers/results.py
pcigale/managers/results.py
+22
-0
No files found.
pcigale/managers/results.py
View file @
00d6eaad
...
...
@@ -127,11 +127,15 @@ class BestResultsManager(object):
self
.
obs
=
models
.
obs
self
.
nbands
=
len
(
models
.
obs
.
bands
)
self
.
nobs
=
len
(
models
.
obs
)
self
.
nintprops
=
len
(
models
.
obs
.
intprops
)
self
.
nextprops
=
len
(
models
.
obs
.
extprops
)
self
.
propertiesnames
=
models
.
allpropertiesnames
self
.
massproportional
=
models
.
massproportional
self
.
nproperties
=
len
(
models
.
allpropertiesnames
)
self
.
_fluxes_shape
=
(
self
.
nobs
,
self
.
nbands
)
self
.
_intprops_shape
=
(
self
.
nobs
,
self
.
nintprops
)
self
.
_extprops_shape
=
(
self
.
nobs
,
self
.
nextprops
)
self
.
_properties_shape
=
(
self
.
nobs
,
self
.
nproperties
)
# Arrays where we store the data related to the models. For memory
...
...
@@ -140,6 +144,8 @@ class BestResultsManager(object):
# important that there is no conflict and that two different workers do
# not write on the same section.
self
.
_fluxes
=
SharedArray
(
self
.
_fluxes_shape
)
self
.
_intprops
=
SharedArray
(
self
.
_intprops_shape
)
self
.
_extprops
=
SharedArray
(
self
.
_extprops_shape
)
self
.
_properties
=
SharedArray
(
self
.
_properties_shape
)
self
.
_chi2
=
SharedArray
(
self
.
nobs
)
# We store the index as a float to work around python issue #10746
...
...
@@ -153,6 +159,22 @@ class BestResultsManager(object):
"""
return
self
.
_fluxes
.
data
@
property
def
intprops
(
self
):
"""Returns a shared array containing the fluxes of the best fit for
each observation.
"""
return
self
.
_intprops
.
data
@
property
def
extprops
(
self
):
"""Returns a shared array containing the fluxes of the best fit for
each observation.
"""
return
self
.
_extprops
.
data
@
property
def
properties
(
self
):
"""Returns a shared array containing the physical properties of the
...
...
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