spectre.SurfaceFinder.FindRadialSurface

Functions

find_radial_surface(h5_files, subfile_name, ...)

Find a radial surface where a variable equals a target value.

spectre.SurfaceFinder.FindRadialSurface.find_radial_surface(h5_files: Sequence[str], subfile_name: str, obs_id: int, obs_time: float, var_name: str, target: float, initial_guess: Strahlkorper, output_surfaces_file: str | Path | None = None, output_coeffs_subfile: str | None = None, output_coords_subfile: str | None = None)

Find a radial surface where a variable equals a target value.

The surface is found by searching along radial rays that are defined by the angular collocation points of the ‘initial_guess’ Strahlkorper. Only blocks that intersect the initial guess and their radial neighbors are considered, and only those neighbors that have a distorted frame. These blocks are assumed to be wedges, so their third logical coordinate is radial.

This function is useful, for example, for finding the surface of a star and then deforming the domain to match the surface.

Parameters:
  • h5_files – The H5 files containing the volume data.

  • subfile_name – Name of the volume data subfile in the ‘h5_files’.

  • obs_id – Observation ID in the volume data.

  • obs_time – Time of the observation.

  • var_name – Name of the variable in the volume data to search for the surface.

  • target – Value that the variable takes that defines the surface.

  • initial_guess – Initial guess for the surface. Only blocks that intersect this Strahlkorper and their radial neighbors are considered. These blocks must be wedges.

  • output_surfaces_file – Optional. H5 output file where the surface Ylm coefficients will be written. Can be a new or existing file. Requires either ‘output_coeffs_subfile’ or ‘output_coords_subfile’ is also specified, or both.

  • output_coeffs_subfile – Optional. Name of the subfile in the ‘output_surfaces_file’ where the surface Ylm coefficients will be written. These can be used to reconstruct the surface, e.g. to deform the domain.

  • output_coords_subfile – Optional. Name of the subfile in the ‘output_surfaces_file’ where the surface coordinates will be written. These can be used for visualization.