Add spectre versioning to abd metadata - #118
Conversation
| spectre_cce_version_info_update = ( | ||
| _spectre_cce_version_info_update_from_h5(f, cce_key, file_name) | ||
| ) |
There was a problem hiding this comment.
I'm just a little nervous about assuming that this pretty complicated function that makes a lot of nested assumptions about where things are in files will always work, even for some old files people have lying around. Should you wrap this in a try block?
There was a problem hiding this comment.
This has been added in the latest commit.
| else: | ||
| cce_key = "Cce" | ||
| data_label_suffix = ".dat" | ||
| else: | ||
| cce_key = "Cce" | ||
| data_label_suffix = ".dat" |
There was a problem hiding this comment.
Why did the indentation change here?
There was a problem hiding this comment.
TIL: This else block fires whenever break did not fire in the for loop — so if there are not items to iterate over or if the clause inside the loop never succeeded. So this makes sure that these variables will always be defined. LGTM.
There was a problem hiding this comment.
Actually, @keefemitman I guess this should get a comment explaining that point, since it was not obvious to either of us.
There was a problem hiding this comment.
This has been added in the latest commit.
|
With the latest commit, the metadata now contains something along the lines of |
|
@duetosymmetry @moble can we merge? |
This changes the pipeline for the
"SpECTRECCE_v1"pathway increate_abd_from_h5to extract metadata information from SpECTRE CCE's output .h5 file and append it to the metadata of the returned abd object asversion_info_update. This can then be supplied to output waveforms, like the strain, by usingsxs.waveforms.rotating_paired_diff_multishuffle_bzip2.save's optionversion_info_update.An example of what this additional information looks like as a part of the
version_infois the following: