Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Hugo Buddelmeijer
sourcecollection-dev
Commits
b371f055
Commit
b371f055
authored
Dec 19, 2016
by
Hugo Buddelmeijer
Browse files
Moved from astro.main.sourcecollection.AttributeCalculator
parent
295fe1f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
SourceCollectionOnTheFly/to_add_to_AC.py
0 → 100644
View file @
b371f055
def
get_onthefly_dependencies_with_attributes
(
self
,
config
=
None
,
attributes
=
None
):
"""
Experimental functionality.
The dependency of an AttributeCalculator is a SourceCollection
that represents the same sources but with the attributes that
are required for the calculation.
The necessary attributes can only be known when the
AttributeCalculatorDefinition is known, which is currently
set by set_onthefly_attributes. Another option might be to
have the ACD itself as a dependency. The easiest way to achieve
that might be to make the ACD a 'raw'.
"""
from
astro.experimental.SourceCollection.SourceCollectionAttributesSelectedSourcesAll
import
SourceCollectionAttributesSelectedSourcesAll
dependencies_and_attributes
=
[
(
None
,
SourceCollectionAttributesSelectedSourcesAll
,
'parent_collection'
,
{
'attributes'
:
tuple
(
self
.
definition
.
input_attribute_names
),
'universe'
:
attributes
[
'universe'
],
}
)
]
return
dependencies_and_attributes
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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