firecrown.utils.save_to_sacc#
- firecrown.utils.save_to_sacc(sacc_data, data_vector, indices, strict=True)[source]#
Save a data vector into a (new) SACC object, copied from sacc_data.
Note that the original object sacc_data is not modified. Its contents are copied into a new object, and the new information is put into that copy, which is returned by this method.
- Parameters:
sacc_data (sacc.Sacc) – SACC object to be copied. It is not modified.
data_vector (np.ndarray[float]) – Data vector to be saved to the new copy of sacc_data.
indices (np.ndarray[int]) – SACC indices where the data vector should be written.
strict (bool) – Whether to check if the data vector covers all the data already present in the sacc_data.
- Returns:
new_sacc – A copy of sacc_data, with data at indices replaced with data_vector.
- Return type:
sacc.Sacc