Repository navigation
Conversation
The create_abd_from_h5 function can now take a subset of fields to construct a valid ABD object.
keefemitman
left a comment
There was a problem hiding this comment.
Thanks for doing this @akhairna. I just found two issues with how copying/interpolation is being done; can you please fix them? Thanks!
keefemitman
left a comment
There was a problem hiding this comment.
I think another change is needed
|
Looks good! |
|
From the point of view of code complexity and avoiding pitfalls, I think the safest thing is to change the API of |
ABD object can be constructed with a subset of fields. The user specifies which field gets allocated in the memory.
|
@moble, @duetosymmetry & @keefemitman - After considering the pitfalls of resizing the array in place, these are the changes that we (me & Leo) think would be best approach. I changed the constructor of ABD, so that the user can declare which fields need to be allocated. The rest of the ABD class is the minimally changed to support this. The user can still give a subset of fields, and can enjoy playing with BMS transformations if the fields are consistent. The tests are running without any failures. Please let me know any feedback for this. |
keefemitman
left a comment
There was a problem hiding this comment.
@akhairna I think there are some outstanding issues with the key names, the constructor, and the way the copy is performed. Could you take a look? Let me know if you have any questions.
Also, I believe time_translation in map_to_superrest_frame will now raise a ValueError since it still calls the constructor without data_components.
keefemitman
left a comment
There was a problem hiding this comment.
@akhairna sorry a few more things I noticed; also I don't think the change to time_translation() in map_to_superrest_frame line 673 was made?
Hi @moble, @duetosymmetry, and @keefemitman
I have added the improvements to ABD object, and I have managed to resolve the test failures locally.
Currently, I have initialized the fields as None instead of zeroes along with some changes to the setter properties of the fields. Now, if the field attribute is set to some value it creates a MTS object with zeros and then broadcasts the new values to it. A few methods and properties are added (& existing ones are modified) to support this structure.
Also, I replaced the$\sigma$ , $\Psi_i$ ), then the BMS transformations work for those subset (given all the required fields are present).
_raw_datafield withdatamethod to construct data array for the fields that are given.If the abd object is constructed with a subset of (
If you have any suggestion on the structure of the code, please let me know.