API reference
Mapse.LinearPkEmulator — TypeLinearPkEmulator(TrainedEmulator::AbstractTrainedEmulators, kgrid::Array, zgrid::Array,
InMinMax::Matrix, OutMinMax::Matrix)This is the fundamental struct used to obtain the $C_\ell$'s from an emulator. It contains:
TrainedEmulator::AbstractTrainedEmulators, the trained emulatorkgrid::AbstractVector, the $k$-grid the emulator has been trained on.zgrid::AbstractVector, the $z$-grid the emulator has been trained on.InMinMax::AbstractMatrix, theMatrixused for the MinMax normalization of the input featuresOutMinMax::AbstractMatrix, theMatrixused for the MinMax normalization of the output featuresPostprocessing::Function, theFunctionused for the postprocessing of the NN output
Mapse.get_Pk — FunctiongetPk(input_params, Pkemu::LinearPkEmulator)Computes and returns the linear power spectrum on the $k-z$ grid the emulator has been trained on, given input array input_params.
Mapse.get_kgrid — Functionget_kgrid(PkEmulator::AbstractCℓEmulators)Returns the $k$-grid the emulator has been trained on.
Mapse.get_zgrid — Functionget_zgrid(PkEmulator::AbstractPkEmulators)Returns the $z$-grid the emulator has been trained on.
AbstractCosmologicalEmulators.get_emulator_description — Functionget_emulator_description(PkEmulator::AbstractPkEmulators)Print on screen the emulator description.
Mapse.load_emulator — Functionload_emulator(path::String, emu_backend::AbstractTrainedEmulators)Load the emulator with the files in the folder path, using the backend defined by emu_backend. The following keyword arguments are used to specify the name of the files used to load the emulator:
k_file, defaultk.npyz_file, defaultz.npyweights_file, defaultweights.npyinminmax_file, defaultinminmax.npyoutminmax_file, defaultoutminmax.npynn_setup_file, defaultnn_setup.jsonpostprocessing_file, defaultpostprocessing.jl
If the corresponding file in the folder you are trying to load have different names, change the default values accordingly.