Conversation
|
I just did a quick experiment locally and if we convert the Table to a numpy recarray before we save it ( Full codeimport dkist; from dkist.data.sample import VBI_AJQWW
tds = dkist.load_dataset(VBI_AJQWW)
whole_table = tds.combined_headers
import asdf
small1 = whole_table[0:10]
small2 = whole_table[10:20]
new_tree = {"whole": whole_table, "small1":small1, "small2": small2}
with asdf.AsdfFile(tree=new_tree) as af:
af.write_to("test.asdf")
<duplicates the data>
whole_array = whole_table.as_array()
array_tree = {"whole": whole_array, "small1":whole_array[0:10], "small2": whole_array[10:20]}
with asdf.AsdfFile(tree=array_tree) as af:
af.write_to("array.asdf")
<does not duplicate the data>For a small example: whole_table2 = whole_table[["INSTRUME", "DATE-AVG"]]
whole_array2 = whole_table2.as_array()
array_tree2 = {"whole": whole_array2, "small1":whole_array2[0:10], "small2": whole_array2[10:20]}
with asdf.AsdfFile(tree=array_tree2) as af:
af.write_to("array2.asdf")yields this asdf: notice the I think this might be a good idea. My main worry is that it severely limits how rich we can make the metadata table, i.e. #265 becomes something custom we have to glue on the side rather than being able to use built-in features of astropy Table. However I think this approach has many advantages:
|
CodSpeed Instrumentation Performance ReportMerging #514 will improve performances by ×3.9Comparing Summary
Benchmarks breakdown
|
|
If I remember rightly, the current notebooks failure is a known sunpy issue and not a problem with this PR, which means this is actually finally ready to go, pending final review I guess. |
|
I think this is now ready, we just need to coordinate releasing it with the data center team. |
|
@eigenbrot Could you check this out and generate a before and after DL-NIRSP ASDF file to see how we did on performance? |
|
I did some before and after tests with a DL dataset consisting of 2116 L1 frames in a 23 x 23 mosaic. With With this PR: So much faster! |
eigenbrot
left a comment
There was a problem hiding this comment.
I'm approving just based on the fact that it works on real DL data.
|
build_docs failure is fixed in #574 . Not sure what's up with the oldestdeps one. |
WWWWWHHHHHHHYYYY!?!?!? |
|
Does the test file use the new code from this PR? |
|
No, that'll do it |

Fixes #500