neuromancer.psl.file_emulator module

This module implements an emulator interface for recorded datasets. The FileEmulator class facilitates sampling a wide range of initial conditions across the state space. Users can interact with a FileEmulator almost exactly how they interact with any other psl Emulator objects.

Data files are expected to be in .csv or .mat format with columns named by prefix indicating x) state, y) observation, u) system input, d) system disturbance.

See psl/psl/data for example files of recorded datasets.

class neuromancer.psl.file_emulator.FileEmulator(seed=59, path=None, system=None)[source]

Bases: EmulatorBase

An emulator interface for recorded datasets. The FileEmulator class facilitates sampling a wide range of initial conditions across the state space.

find_nearest(array, value)[source]
get_batch(nsim, startidx=0)[source]
property params
property path

Path where model parameter file is stored

retrieve_data()[source]
simulate(nsim=None, x0=None)[source]
Parameters:
  • nsim – (int) Number of steps for open loop response

  • ninit – (float) initial simulation time

  • x0 – (float) state initial conditions

Returns:

X, Y, U, D

property url

Remote github location for model parameter data

neuromancer.psl.file_emulator.read_file(file_or_dir)[source]