Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

Make sure to initialise test database - it will be used for temporary files

Code Block
> imasdb test



Preparing the

...

FC2K project

First of all, we need simple code that will read data. In this sample, we will use very simple code that reads distribution IDS, shows some info, and output scalar value

...

Defining interface to user code

...

First of all, let's add two ports into actor. Input port - IDS, and output port - integer.

...

Code Block
> idsdumppath g2michal test 3 92436 1 distribution_sources "time(0)"
Type: <class 'numpy.float64'>
----------------------------------------------
----------------------------------------------
49.005001068115234

Let's say we will retrieve the first time index (as integer) from the array of all times. Remember, this is just an exercise where we want to make all things work together. Don't pay attention to whether it's something meaningful or not. Let's say our actor is supposed to retrieve first time index in the IDS.

...