scri.SpEC.file_io

Functions

create_abd_from_h5(file_format[, ...])

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

index_is_monotonic(y)

make_variable_dimensionless(WM[, ch_mass])

Make variable dimensionless by scaling out Christodoulou mass.

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', radius=None, ch_mass=None, t_interpolate=None, t_0_superrest=None, padding_time=None, **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’, ‘SpECTRECCE_v1’, ‘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.

  • ‘SpECTRECCE_v1’ - Asymptotic waveforms output by SpECTRE CCE v1.

  • ‘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. The output convention is Moreschi-Boyle.

radiusstr, optional

Worldtube radius used when running CCE; only needed for versions of SpECTRE before PR #5985. The time array of the worldtube is translated by this radius.

ch_massfloat, optional

Total Christodoulou mass of the system.

t_interpolatefloat array, optional

Time array to interpolate to, e.g., the time array of the worldtube.

t_0_superrestfloat, optional

When to map to the BMS superrest frame. Typically a few hundred M after the junk radiation is sufficient.

padding_timefloat, optional

Time window length around t_0_superrest to use when mapping to the superrest frame. Typically a few hundred M or a few orbits is sufficient.

Returns:
AsymptoticBondiData
scri.SpEC.file_io.index_is_monotonic(y)[source]
scri.SpEC.file_io.make_variable_dimensionless(WM, ch_mass=1.0)[source]

Make variable dimensionless by scaling out Christodoulou mass.

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

corotating_paired_xor

rotating_paired_xor_multishuffle_bzip2