properties.grid_interpolation.compare_ml.CompareInterpolation#

class CompareInterpolation(tmb_file='clump_Tmb_LineCenter.dat', tau_file='clump_tau_LineCenter.dat', n_param=4)[source]#

Bases: object

This is a class to facilitate the comparison of interpolation methods.

Initialise attributes and open grid files.

Methods

interpolate

Perform interpolation of model grid at each point in multiple ways.

open_files

Parse header of grid files and load data into memory.

plot_result

Plot ratio of the interpolated and original data as a function of parameter.

save_results

Save original and interpolated data in separate numpy binary files.

interpolate(transition=None, full_grid=False, all_species=False, savedir='', verbose=False)[source]#

Perform interpolation of model grid at each point in multiple ways. Currently this performs a linear interpolation as well as predicting the interpolated point using extremely-randomised trees.

open_files(n_param=4)[source]#

Parse header of grid files and load data into memory.

plot_result(ax=None, transition=None, **kwargs)[source]#

Plot ratio of the interpolated and original data as a function of parameter.

save_results(directory='', full_grid=True)[source]#

Save original and interpolated data in separate numpy binary files.