-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add the ability to reassemble live calculated TimeChunked quantities #47
base: master
Are you sure you want to change the base?
Changes from all commits
f5c3a45
b92e831
1f17c4d
ea27201
cb4daa2
7590a08
8f66aa3
16ca8e0
5cb8f18
76ca96f
e939fc9
8610e14
b31ed25
8c1dbfe
1a25fe5
7f145d6
dc65895
f71ec5a
8ff294a
0b51eb9
3d1e7f4
ba1eabe
d8aeee9
668d8a7
25b6aad
fd7b66f
4f35edb
2e943a2
06df11a
84ba316
ebec14e
bb3dd1b
3c74ee5
1189e5e
e1ecc28
c4eb1ec
3ed09bc
8f3feaa
2916854
30f4151
ecf504b
07168f6
9b84a56
bee20db
3a2c058
9d93b3c
94d2eb2
1361067
a8380a2
51c7543
814b511
f081b44
2a807ef
a1e3c16
27ee542
0534ad8
4953ba4
340dfd2
b1d8329
9aefdb8
f9216bf
f4ee038
51e2595
f056837
8591f8c
d51b987
616e42a
365024f
6e5dd43
d7ec0ec
0e50a12
e4d3ced
ab43ea2
33a32d8
3c7f5ee
c358cb5
cabad3f
246629a
eceec76
e1fdd80
5c47a87
503617b
86b5857
6a6db25
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
from __future__ import absolute_import | ||
from tangos.core import extraction_patterns | ||
from . import BuiltinFunction | ||
from .. import StoredProperty, FixedInput | ||
from .. import StoredProperty, FixedInput, LiveProperty | ||
|
||
|
||
@BuiltinFunction.register | ||
def raw(halos, values): | ||
return values | ||
raw.set_input_options(0, assert_class=StoredProperty) | ||
|
||
@raw.set_initialisation | ||
def raw_initialisation(input): | ||
input.set_extraction_pattern(extraction_patterns.HaloPropertyRawValueGetter()) | ||
if isinstance(input, LiveProperty): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You want to avoid things like this wherever possible as it spreads around knowledge of the inner workings of a I suggest always calling There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this issue was resolved |
||
input.set_raw() | ||
else: | ||
input.set_extraction_pattern(extraction_patterns.HaloPropertyRawValueGetter()) | ||
|
||
|
||
@BuiltinFunction.register | ||
def reassemble(halos, values, *options): | ||
return values | ||
reassemble.set_input_options(0, assert_class=StoredProperty) | ||
|
||
@reassemble.set_initialisation | ||
def reassemble_initialisation(input, *options): | ||
|
@@ -27,6 +28,9 @@ def reassemble_initialisation(input, *options): | |
options_values.append(option.proxy_value()) | ||
else: | ||
raise TypeError("Options to 'reassemble' must be fixed numbers or strings") | ||
|
||
input.set_extraction_pattern( | ||
extraction_patterns.HaloPropertyValueWithReassemblyOptionsGetter(*options_values)) | ||
if isinstance(input,LiveProperty): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar comment as above; you want a single There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, this seems to be pending resolution |
||
input.set_reassemble() | ||
input.set_evaluation_options(*options_values) | ||
else: | ||
input.set_extraction_pattern( | ||
extraction_patterns.HaloPropertyValueWithReassemblyOptionsGetter(*options_values)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is
reassemble
required?