kilopop.mappings.construct_opacity_gaussian_process

kilopop.mappings.construct_opacity_gaussian_process(opacity_data_path, hyperparameter_file_path)[source]

Wrapper function to build the gaussian process instance for obtaining a grey opacity value for arbitray values of total ejecta mass, median ejecta velocity, and electron fraction.

Parameters:
  • opacity_data_path (string) – File path for the data from which the grid interpolation is built.

  • hyperparameter_file_path (string) – File path for the parameters of the Gaussian process from traiing.

Returns:

  • grey_opacity_training_data (nd.array) – The training data corresponding to the grey opacity values fit from our weighted chi square optimisation.

  • opacity_GP (george.GP instance) – Trained interpolator function to map (total_ejecta_mass, median_ejecta_velocity, electron_fraction) to grey opacity.