The WaveBlocks Project
@author: R. Bourquin @copyright: Copyright (C) 2010, 2011, 2012 R. Bourquin @license: Modified BSD License
The WaveBlocks Project
This file contains various functions for finding and retrieving the files that contain parameter settings and simulation results. Note: The terms ‘path’ and ‘ID’ are used as synonyms here. Each simulation ID is just the basename of the path or the configuration file.
@author: R. Bourquin @copyright: Copyright (C) 2010, 2011 R. Bourquin @license: Modified BSD License
Compare two simulation IDs with respect to a (numerical) value in the ID.
Parameters: |
|
---|---|
Returns: | A boolean answer if the IDs are the same w.r.t the pattern. |
Collects all simulation IDs which contain a specific pattern from a given list.
Parameters: |
|
---|---|
Returns: | A list of simulation IDs that contain the given pattern. |
Get the maximum of a list with simulation IDs with respect to a (numerical) value in the ID.
Parameters: |
|
---|---|
Returns: | A sorted list of simulation IDs. |
Note
This is just a simple convenience function so that the user needs not to remember if the sort order is ascending or descending which plays no role for iteration.
Get the minimum of a list with simulation IDs with respect to a (numerical) value in the ID.
Parameters: |
|
---|---|
Returns: | A sorted list of simulation IDs. |
Note
This is just a simple convenience function so that the user needs not to remember if the sort order is ascending or descending which plays no role for iteration.
Get the number of simulations at hand below the given path.
Parameters: | path – The path under which we search for a output file. |
---|---|
Returns: | The number of simulations result directories. |
Search for a configuration file containing the simulation parameters under a given path.
Parameters: | path – The path under which we search for a configuration file. |
---|---|
Returns: | The path (filename) of the configuration file. |
Note
In case there are more than one .py file under the given path we just return the first one found!
Lists all simulations (IDs) that can be found under the given path.
Parameters: | path – The filesystem path under which we search for simulations. |
---|---|
Returns: | A list of simulation IDs. |
Search for a file containing the simulation results under a given path.
Parameters: | path – The path under which we search for a output file. |
---|---|
Returns: | The path (filename) of the output file. |
Note
In case there are more than one .hdf5 file under the given path we just return the first one found!
Groups simulation IDs with respect to a pattern.
Parameters: |
|
---|---|
Returns: | A list of groups of simulation IDs. |
Find the intersection of two lists containing simulation IDs.
Parameters: |
|
---|---|
Returns: | A sorted list of simulation IDs. |
Checks if a simulation ID contains a given pattern.
Parameters: |
|
---|---|
Returns: | A boolean answer. |
Sorts simulation IDs with respect to a (numerical) value in the ID.
Parameters: |
|
---|---|
Returns: | A sorted list of simulation IDs. |