Scenario

iota.session.Scenario()

Description Iota scenario object.

Methods

Variables

  • name (str) scenario name

  • description (str) scenario description

  • id (int) scenario Id

  • project (iota.session.Project) the project containing this scenario

Methods

Return a dataset record specified by name

Arguments

  • name: (str) dataset name

  • data_format: (str) data format of the dataset to be loaded. The scenario can have more than one dataset with the same name if data_format is different. (default: None)

Example

Return the list of dataset records in the scenario

Example

Add a Iota Dataset file to a scenario data_format must be one of PADEM or PACG

Arguments

  • name: (str) dataset name

  • data_format: (str) format of the dataset

  • file: (str) dataset filepath

  • description: (str) dataset description (default: None)

Example

Import external Dataset to a scenario data_format must be one of the accepted formats: [EDEM 2017]

Arguments

  • file: (str) dataset filepath

  • name: (str) dataset name. If not defined, used the basename of the filepath (Default: None)

  • data_format: (str) format of the dataset

  • include_graphs: (bool) import any graph available in the dataset to the scenario

  • description: (str) dataset description (Default: None)

Example

Check if exists a DEM dataset in the scenario

Example

Return the scenario DEM Dataset if one exists in the scenario

Example

Return the scenario CG Dataset if one exists in the scenario

Example

Return True if graph exists, specified by name (and tags)

Arguments

  • name: (str) graph name

  • tags: (dict) tags dictionary

Example

Return a graph, specified by name (and tags)

Arguments

  • name: (str) graph name

  • tags: (dict) tags dictionary

Example

Return the list of graphs in the scenario

Example

Add a new graph to a scenario. The graph can be defined in a csv file or by defining all the components (data, titles, etc)

Arguments

  • name: (str) graph name

  • title: (str) graph title

  • filepath: (str) optional file path for new graph file (Default: None)

  • xdata: (iota.ArrayFloat) array of data representing the values of axis X

  • ydata: (list[iota.ArrayFloat]) list of arrays representing the data series

  • legend: (list[str]) list of names for the data series

  • xtitle: (str) title of the axis X

  • ytitle: (str) title of the axis Y

  • csvfile: (str) csv file containing the graph data. If this is defined, none of the previous variables are considered

  • description: (str) graph description

  • tags: (dict) tags dictionary

  • overwrite: (bool) overwrite graph file if already exists

Example

Return a mesh specified by a name

Arguments

  • name: (str) mesh name

Example

Return th elist of meshes in a scenario

Example

Add a mesh by filepath to a scenario

Arguments

  • file: (str) mesh filepath

  • description: (str) mesh description

Example

Return a file, specified by name

Arguments

  • name: (str) file name

Example

Return the list of files in a scenario

Example

Create and return a file, describe by name, filepath and optional description

Arguments

  • name: (str) scenario name

  • filepath: (str) file path

  • description: (str) file description (Default: None)

Example

Return a script spcified by a name

Arguments

  • name: (str) script name

Example

Return the list of scripts in a scenario

Example

Add a script (python file) to a scenario

Arguments

  • name: (str) script name

  • filepath: (str) script file path

  • description: (str) script description (Default: None)

Example

Add a video file to a scenario

Arguments

  • file: (str) video file path

  • name: (str) video name

  • description: (str) video description (Default: None)

  • tags: (dict) tags dictionary (Default: None)

  • thumbnail: (str) image file to be used as a thumbnail (Default: None)

Example

Add image file to a scenario

Arguments

  • file: (str) screenshot file path

  • name: (str) screenshot name

  • description: (str) screenshot description (Default: None)

  • tags: (dict) tags dictionary (Default: None)

Example

Delete scenario from the database (and disk if applicable)

Example

Retun the a CG Settings object of defined in the current scenario (see CG_Settings for more info)

Example

Run coarse graining on a scenario with optional custom settings. If custom settings are provided, a copy of the provided settings with with modified output directory and scenario fields will be used.

Arguments

  • with_settings: (iota.session.CG_Settings) Alternative settings to replace local one used for the analysis (Default: None)

  • print_messages: (bool) activate/deactivate full verbosity during execution (Default: False)

Example

Last updated

Was this helpful?