scri.SpEC.file_io

Functions

create_abd_from_h5(file_format[, convention])

Returns an AsymptoticBondiData object with waveform data loaded from specified H5 files.

index_is_monotonic(y)

monotonic_indices(y)

monotonize(y)

read_from_h5(file_name, **kwargs)

Read data from an H5 file in SXS format

translate_data_types_GWFrames_to_waveforms(d)

translate_data_types_waveforms_to_GWFrames(d)

write_to_h5(w, file_name[, file_write_mode, ...])

Output the Waveform to an HDF5 file.

scri.SpEC.file_io.create_abd_from_h5(file_format, convention='SpEC', **kwargs)[source]

Returns an AsymptoticBondiData object with waveform data loaded from specified H5 files.

The AsymptoticBondiData class internally uses the Moreschi-Boyle conventions, see the following reference:
  1. Moreschi, On angular momentum at future null infinity, DOI:10.1088/0264-9381/3/4/006

If necessary, the waveform data will be converted to the Moreschi-Boyle conventions when loaded.

Parameters:
file_format‘SXS’, ‘CCE’, ‘SpECTRECCE1’, ‘RPDMB’, or ‘RPXMB’
The H5 files may be in the one of the following file formats:
  • ‘SXS’ - Dimensionless extrapolated waveform files found in the SXS Catalog, also known as NRAR format.

  • ‘CCE’ - Asymptotic waveforms output by SpECTRE CCE. These are not dimensionless.

  • ‘SpECTRECCE1’ - Asymptotic waveforms output by SpECTRE CCE’s original format.

  • SpECTRECCE’ - Asymptotic waveforms output by SpECTRE CCE’s newest format. (NOTE: this may break compatibility)

  • ‘RPDMB’ - Dimensionless waveforms compressed using the rotating_paired_diff_multishuffle_bzip2 format.

  • ‘RPXMB’ - Dimensionless waveforms compressed using the rotating_paired_xor_multishuffle_bzip2 format.

convention‘SpEC’ or ‘Moreschi-Boyle’

The data conventions of the waveform data that will be loaded. This defaults to ‘SpEC’ since this will be most often used with ‘SpEC’ convention waveforms.

Returns:
AsymptoticBondiData
scri.SpEC.file_io.index_is_monotonic(y)[source]
scri.SpEC.file_io.monotonic_indices(y)[source]
scri.SpEC.file_io.monotonize(y)[source]
scri.SpEC.file_io.read_from_h5(file_name, **kwargs)[source]

Read data from an H5 file in SXS format

Note that SXS format is essentially compatible with NRAR format. The existence of this function is not to be taken as the author’s endorsement of either SXS or NRAR format.

Parameters:
file_namestr

Path to H5 file containing the data, optionally including the path within the file itself to the directory containing the data. For example, the standard SXS data with N=2 might be obtained with the file name ‘rhOverM_Asymptotic_GeometricUnits.h5/Extrapolated_N2.dir’.

See also

scri.rpxmb.save

Save a waveform in RPXMB format

scri.rpxmb.load

Load a file in RPXMB format

scri.SpEC.file_io.translate_data_types_GWFrames_to_waveforms(d)[source]
scri.SpEC.file_io.translate_data_types_waveforms_to_GWFrames(d)[source]
scri.SpEC.file_io.write_to_h5(w, file_name, file_write_mode='w', attributes={}, use_NRAR_format=True)[source]

Output the Waveform to an HDF5 file. Default behavior uses the NRAR format.

Note that the file_name is prepended with some descriptive information involving the data type and the frame type, such as ‘rhOverM_Corotating_’ or ‘rMpsi4_Aligned_’.

See also

scri.rpxmb.save

Save a waveform in RPXMB format

scri.rpxmb.load

Load a file in RPXMB format

Modules

scri.SpEC.file_io.corotating_paired_xor

scri.SpEC.file_io.rotating_paired_xor_multishuffle_bzip2