relap-py


Namerelap-py JSON
Version 1.0.3 PyPI version JSON
download
home_pageNone
SummaryModule for RELAP post-processing
upload_time2025-01-22 10:52:09
maintainerNone
docs_urlNone
authorJordi Freixa
requires_pythonNone
licenseMIT
keywords relap trace
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # General Information

* Title: RELAP utilities
* created: May 2020
* last modified: 2025-01-22
* Created by: Jordi Freixa
* Description: This Module provides function tools for postprocessing RELAP data

# INSTALLATION:

* install with pip install relap_py
* make a new system environmental variable called `RELAP_EXE_PATH` that contains
the path to your relap executable.

# CONFIGURATION AND DEFAULTS

Use the following functions to set up the configuration of the module for the particular python project:

* set_figures_type('pdf') the figures will be saved with this format
* set_figures_loc('./figures/') location where the figures will be saved
* set_show_plot(False) Boolean, show interactive python plot window?
* set_unc_bands(False) is there a uncertainty file containing bands? set the name here and bands will be added to the variables plot
* set_relap_scdap(False) Are you using the package for Relap/scdap cases?


# TODO:

- [ ] Adapt to TRACE plotting (basically reading data from csv files)
- [ ] Read and plot uncertainty bands
- [ ] profile plot

# TUTORIAL

* Title: relap.py tutorial
* Version: 3.0
* Date: 2025-01-22
* Created by: Jordi Freixa
* Description: A quick tutorial for relap.py package

Firstly import the package, for instance

```
import relap_py as rp
```

You may use the help function of Python to get info on the possible functions

```
help(rp) # to get info on the whole package
help(rp.plot_var) # to get info on one specific function
```

## Changing defaults

List of defaults. If you want to change them, you can do so by using the 
following commands

```
rp.set_figures_type('pdf')
rp.set_figures_loc('./my_best_figures/')
rp.set_show_plot(True)
rp.set_unc_bands('unc.dat')
rp.set_relap_scdap(True)
```

## Variables file

It is good to write a file to specify a list of variables that you want to extract.
The structure is as follows. It is important to keep the same column names but the order is arbitrary:

```
alphanum   numeric      var_tag          figure_tag                    unit   timei   timee   ymin   ymax   general
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
mflowj     933020000    SGTR_MF          SGTR_Break_Mass_Flow          kg/s   -100    3500    0      0      no
mflowj     545000000    REL_VLV_MF       Reliev_Valve_Flow_A           kg/s   -100    3500    0      0      mid_left
```

*  Lines starting with `%` are not read
* `var_tag` This is the tag of the variable used to plot it. If you you use experimental data, you should use the same tags for the variables in the experimental data file.
* `figure_tag` will be used in the plots for the title, labels or legends. (the underscores will be removed automatically)
* `unit` will be used as the unit in some labels
Optional columns
* `temei` will be used as initial time for plots
* `timee` will be used as the end time
* `ymin` and `ymax` will be the limits in the plot, 0 means automatic
* `general` indicates if you want to plot this in the general figure and in which position:
    * `no` it will not be added
    * `top_left` added to the top plot with the left y-axis
    * `top_right` added to the top plot with the right y-axis
    * `mid_left`
    * `mid_right`
    * `bottom_left`
    * `bottom_right`
The minimal structure is therefore:

```
alphanum   numeric      var_tag          figure_tag                    unit
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
mflowj     933020000    SGTR_MF          SGTR_Break_Mass_Flow          kg/s
mflowj     545000000    REL_VLV_MF       Reliev_Valve_Flow_A           kg/s
```

## File structure

The package works best when you adapt to the following structure when you 
perform several calculations of the same scenario/case

* Place each calculation in a different folder
* In each folder, always use the same restart name

```
├── Test4
│   ├── base
│   │   ├── test4.i 
│   │   ├── test4.o 
│   │   ├── test4.r 
│   ├── no_hpis
│   │   ├── test4.i 
│   │   ├── test4.o 
│   │   ├── test4.r 
│   ├── rcp_earlier 
│   │   ├── test4.i 
│   │   ├── test4.o 
│   │   ├── test4.r 
│   ├── figures
│   ├── variables_test4.txt
```

I find this approach very convenient as it is very easy to generate new 
sensitivities and it is clearly structured. It is also very easy to automatize a
loop to run several cases at once as the commands will be the same for all folders.

## Examples

### Plot one single variable from a restart file (simple)

```
rp.set_show_plot(True) # Most probably you want to play with the plot
rp.plot('voidfj', '993020000', 'your_restart')
```

> [!NOTE]
>
> remember that for more info, `help(rp.plot)`

### Plot one single variable from a restart file (advanced)

In this case you plot more than one variable and you want to store the data in 
a variable. In this example the data of two cases is extracted and stored in `voidfj`
the figure will be stored in pdf format but you can still play with the interactive plot

```
rp.set_show_plot(True) # Most probably you want to play with the plot
voidfj = rp.plot('voidfj', '993020000', 'test4', ['base', 'no_hpis'], 'pdf')
# ['base', 'no_hpis'] are restart cases you have calculated
rp.set_show_plot(False) # I want to hide other plots created later
```

### Extract data for a restart case

> [!NOTE]
>
>  You will need to first create the variables file, in this example `variables_test4.txt`

With the following command the time trends specified in `variables_test4` will 
be extracted from restart file `test4.r` which should be in the folder
you are running the command

```
data, variables = rp.extract_data('variables_test4.txt', 'test4')
```
> [!NOTE]
>
>  this will save a .dat file in your file system

Once you have loaded the variable files you can change its contents if you need. For instance to change the final time for all

```
variables['timee'] = 4000.0 # 
```

Once you have loaded the variable files you can use it to extract other data:

```
data, _ = rp.extract_data(variables, 'test4')
```


### Extract data for several restart cases


> [!NOTE]
>
>  first declare the list of cases, it can be a single case or even empty and then it will read the restart in the folder


```
cases_sgtr = ['base', 'no_hpis', 'rcp_earlier']
cases_df_sgtr, variables = rp.extract_data('variables_test4.txt', 'test4', cases_sgtr )
```

Once you have loaded the variable files you can change its contents if you need. For instance to change the final time for all

```
variables['timee'] = 4000.0 # 
```
> [!TIP]
> At this point you can do data manipulation if needed. For instance, to correct the time for all cases

```
for i, item in enumerate(cases_sgtr):
    cases_df_sgtr[item]['time'] = cases_df_sgtr[item]['time'] - 4900
```
> [!TIP]
> If you are not repeating the calculations, and you already extracted the data, you might want to load the data directly from the created .dat files. In this case you can load them with numpy and then put them together:

```
base = np.genfromtxt('base/test4.dat', delimiter=',',names= True)
no_hpis = np.genfromtxt('no_hpis/test4.dat', delimiter=',',names= True)
rcp_earlier = np.genfromtxt('rcp_earlier/test4.dat', delimiter=',',names= True)
cases_df_sgtr = {'base': base,
                 'no_hpis': no_hpis,
                 'rcp_earlier': rcp_earlier}
```

### Plot one single variable from the extracted data for all cases or a selected list of cases

in this example only 'base' and 'rcp_earlier' will be plotted

```
rp.plot_var('SGTR_MF', variables, cases_df_sgtr, ['base', 'rcp_earlier'] )
```

> [!TIP]
> use the function variables y_limits and x_limits if you want to specify the axes limits


### Plot all variables listed in variables file for the defined cases

This one could be eliminated because it simply does a for loop
over each variable and runs rp.plot_var

```
rp.plot_all(variables, cases_df_sgtr, cases_sgtr)
```

### Plot different variables from one case

```
vars_to_plot = ['core_level', 'SG_A_level']
rp.plot_variables(vars_to_plot, variables, cases_df_sgtr['base'])
```

### Make an interactive plot with all the available data

After loading one or several cases (for example):
```
cases_sgtr = ['base', 'no_hpis', 'rcp_earlier']
cases_df_sgtr, variables = rp.extract_data('variables_test4.txt', 'test4', cases_sgtr )
```

You can generate an interactive plot where you can play with all the data. This requires Json and connection to the internet.

```
rp.interactive_plot(cases_df_sgtr)
```

a file with name interactive_plot.html will be available

### Make a general plot for a single case

A general figure is a figure with three subfigures (top, mid and bottom) each figure
may contain more than one time trend and you may use right or left Y-axes

This figure is useful to generate a figure to explain the whole transient.

```
rp.general_fig(variables, cases_df_sgtr['base'])
```

Labels to each time trend are placed automatically, sometimes they are not placed
in the best location and you may want to adjust them. When you run the command above 
you will see that a list of numbers is shown, this list is the locations of each label
ordered from top to bottom. You can copy the list, modify it and provide it as an input 
for the command so you can manually set the locations of the labels 

> [!TIP]
> see `help(rp.general_fig)`for further details

### Generate the general figure for several cases

The general figure does not compare cases. If you want to generate one general figure
for each of your cases, you should do the following.

```
for i, item in enumerate(cases_sgtr):
    rp.general_fig(variables, cases_df_sgtr[item])
    try : os.remove(rp.figures_loc + cases_sgtr[i] + '.pdf')
    except : pass
    os.rename(rp.figures_loc + 'general.pdf', rp.figures_loc + cases_sgtr[i] + '.pdf')
```

### Add a new variable to the extracted data:

    first calculate whatever new variable you want to do.
    In this case I want to get the sgtr flow minus the HPIS flow
```
for elements in cases_df_sgtr:
    new = cases_df_sgtr[elements]['core_level']
    for i in range(0, len(new)):
        new[i] = cases_df_sgtr[elements]['SGTR_MF'][i] - cases_df_sgtr[elements]['HPSI_A'][i]
    # append the new line to each element in the dictionary
    cases_df_sgtr[elements] = append_fields(cases_df_sgtr[elements], 'new_var', new , np.double)
```

> [!TIP]
>
> Additionally we may want to add one line to the variables dataframe

```
variables = rp.append_variable(variables, 'new_var', 'kg/s', 'mid_right')
```

> [!TIP]
>
> If I want to remove a variable from the general figure I can select it like this

```
variables.loc[23, 'general'] = 'no' # to change a single option
```

### Just read old dat files generated with the package

If you have already generated .dat files and you just want to load them, 
you can do so as follows:

```
new_case = np.genfromtxt('path/to/data.dat', delimiter=',',names= True)
```

The problem now is that you will need to load the variables file if you want
to run some of the functions of the package. You can do so by:

```
variables = rp.read_variables('path/to/variables.i')
```

### Some additional fucntions not used in this example are:

* make_strip --> make a strip
* read_variables --> just reads a file that lists all variables
* read_stripf --> reads a stripf file
* run_strip --> performs a strip
* mypie --> makes a fancy pie chart
* read_exp --> reads a experiment data file 
* print_ss --> Makes a table with the steady state data (in development) 



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "relap-py",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "relap, trace",
    "author": "Jordi Freixa",
    "author_email": "<jordi.freixa-terradas@upc.edu>",
    "download_url": null,
    "platform": null,
    "description": "# General Information\r\n\r\n* Title: RELAP utilities\r\n* created: May 2020\r\n* last modified: 2025-01-22\r\n* Created by: Jordi Freixa\r\n* Description: This Module provides function tools for postprocessing RELAP data\r\n\r\n# INSTALLATION:\r\n\r\n* install with pip install relap_py\r\n* make a new system environmental variable called `RELAP_EXE_PATH` that contains\r\nthe path to your relap executable.\r\n\r\n# CONFIGURATION AND DEFAULTS\r\n\r\nUse the following functions to set up the configuration of the module for the particular python project:\r\n\r\n* set_figures_type('pdf') the figures will be saved with this format\r\n* set_figures_loc('./figures/') location where the figures will be saved\r\n* set_show_plot(False) Boolean, show interactive python plot window?\r\n* set_unc_bands(False) is there a uncertainty file containing bands? set the name here and bands will be added to the variables plot\r\n* set_relap_scdap(False) Are you using the package for Relap/scdap cases?\r\n\r\n\r\n# TODO:\r\n\r\n- [ ] Adapt to TRACE plotting (basically reading data from csv files)\r\n- [ ] Read and plot uncertainty bands\r\n- [ ] profile plot\r\n\r\n# TUTORIAL\r\n\r\n* Title: relap.py tutorial\r\n* Version: 3.0\r\n* Date: 2025-01-22\r\n* Created by: Jordi Freixa\r\n* Description: A quick tutorial for relap.py package\r\n\r\nFirstly import the package, for instance\r\n\r\n```\r\nimport relap_py as rp\r\n```\r\n\r\nYou may use the help function of Python to get info on the possible functions\r\n\r\n```\r\nhelp(rp) # to get info on the whole package\r\nhelp(rp.plot_var) # to get info on one specific function\r\n```\r\n\r\n## Changing defaults\r\n\r\nList of defaults. If you want to change them, you can do so by using the \r\nfollowing commands\r\n\r\n```\r\nrp.set_figures_type('pdf')\r\nrp.set_figures_loc('./my_best_figures/')\r\nrp.set_show_plot(True)\r\nrp.set_unc_bands('unc.dat')\r\nrp.set_relap_scdap(True)\r\n```\r\n\r\n## Variables file\r\n\r\nIt is good to write a file to specify a list of variables that you want to extract.\r\nThe structure is as follows. It is important to keep the same column names but the order is arbitrary:\r\n\r\n```\r\nalphanum   numeric      var_tag          figure_tag                    unit   timei   timee   ymin   ymax   general\r\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r\nmflowj     933020000    SGTR_MF          SGTR_Break_Mass_Flow          kg/s   -100    3500    0      0      no\r\nmflowj     545000000    REL_VLV_MF       Reliev_Valve_Flow_A           kg/s   -100    3500    0      0      mid_left\r\n```\r\n\r\n*  Lines starting with `%` are not read\r\n* `var_tag` This is the tag of the variable used to plot it. If you you use experimental data, you should use the same tags for the variables in the experimental data file.\r\n* `figure_tag` will be used in the plots for the title, labels or legends. (the underscores will be removed automatically)\r\n* `unit` will be used as the unit in some labels\r\nOptional columns\r\n* `temei` will be used as initial time for plots\r\n* `timee` will be used as the end time\r\n* `ymin` and `ymax` will be the limits in the plot, 0 means automatic\r\n* `general` indicates if you want to plot this in the general figure and in which position:\r\n    * `no` it will not be added\r\n    * `top_left` added to the top plot with the left y-axis\r\n    * `top_right` added to the top plot with the right y-axis\r\n    * `mid_left`\r\n    * `mid_right`\r\n    * `bottom_left`\r\n    * `bottom_right`\r\nThe minimal structure is therefore:\r\n\r\n```\r\nalphanum   numeric      var_tag          figure_tag                    unit\r\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r\nmflowj     933020000    SGTR_MF          SGTR_Break_Mass_Flow          kg/s\r\nmflowj     545000000    REL_VLV_MF       Reliev_Valve_Flow_A           kg/s\r\n```\r\n\r\n## File structure\r\n\r\nThe package works best when you adapt to the following structure when you \r\nperform several calculations of the same scenario/case\r\n\r\n* Place each calculation in a different folder\r\n* In each folder, always use the same restart name\r\n\r\n```\r\n\u251c\u2500\u2500 Test4\r\n\u2502   \u251c\u2500\u2500 base\r\n\u2502   \u2502   \u251c\u2500\u2500 test4.i \r\n\u2502   \u2502   \u251c\u2500\u2500 test4.o \r\n\u2502   \u2502   \u251c\u2500\u2500 test4.r \r\n\u2502   \u251c\u2500\u2500 no_hpis\r\n\u2502   \u2502   \u251c\u2500\u2500 test4.i \r\n\u2502   \u2502   \u251c\u2500\u2500 test4.o \r\n\u2502   \u2502   \u251c\u2500\u2500 test4.r \r\n\u2502   \u251c\u2500\u2500 rcp_earlier \r\n\u2502   \u2502   \u251c\u2500\u2500 test4.i \r\n\u2502   \u2502   \u251c\u2500\u2500 test4.o \r\n\u2502   \u2502   \u251c\u2500\u2500 test4.r \r\n\u2502   \u251c\u2500\u2500 figures\r\n\u2502   \u251c\u2500\u2500 variables_test4.txt\r\n```\r\n\r\nI find this approach very convenient as it is very easy to generate new \r\nsensitivities and it is clearly structured. It is also very easy to automatize a\r\nloop to run several cases at once as the commands will be the same for all folders.\r\n\r\n## Examples\r\n\r\n### Plot one single variable from a restart file (simple)\r\n\r\n```\r\nrp.set_show_plot(True) # Most probably you want to play with the plot\r\nrp.plot('voidfj', '993020000', 'your_restart')\r\n```\r\n\r\n> [!NOTE]\r\n>\r\n> remember that for more info, `help(rp.plot)`\r\n\r\n### Plot one single variable from a restart file (advanced)\r\n\r\nIn this case you plot more than one variable and you want to store the data in \r\na variable. In this example the data of two cases is extracted and stored in `voidfj`\r\nthe figure will be stored in pdf format but you can still play with the interactive plot\r\n\r\n```\r\nrp.set_show_plot(True) # Most probably you want to play with the plot\r\nvoidfj = rp.plot('voidfj', '993020000', 'test4', ['base', 'no_hpis'], 'pdf')\r\n# ['base', 'no_hpis'] are restart cases you have calculated\r\nrp.set_show_plot(False) # I want to hide other plots created later\r\n```\r\n\r\n### Extract data for a restart case\r\n\r\n> [!NOTE]\r\n>\r\n>  You will need to first create the variables file, in this example `variables_test4.txt`\r\n\r\nWith the following command the time trends specified in `variables_test4` will \r\nbe extracted from restart file `test4.r` which should be in the folder\r\nyou are running the command\r\n\r\n```\r\ndata, variables = rp.extract_data('variables_test4.txt', 'test4')\r\n```\r\n> [!NOTE]\r\n>\r\n>  this will save a .dat file in your file system\r\n\r\nOnce you have loaded the variable files you can change its contents if you need. For instance to change the final time for all\r\n\r\n```\r\nvariables['timee'] = 4000.0 # \r\n```\r\n\r\nOnce you have loaded the variable files you can use it to extract other data:\r\n\r\n```\r\ndata, _ = rp.extract_data(variables, 'test4')\r\n```\r\n\r\n\r\n### Extract data for several restart cases\r\n\r\n\r\n> [!NOTE]\r\n>\r\n>  first declare the list of cases, it can be a single case or even empty and then it will read the restart in the folder\r\n\r\n\r\n```\r\ncases_sgtr = ['base', 'no_hpis', 'rcp_earlier']\r\ncases_df_sgtr, variables = rp.extract_data('variables_test4.txt', 'test4', cases_sgtr )\r\n```\r\n\r\nOnce you have loaded the variable files you can change its contents if you need. For instance to change the final time for all\r\n\r\n```\r\nvariables['timee'] = 4000.0 # \r\n```\r\n> [!TIP]\r\n> At this point you can do data manipulation if needed. For instance, to correct the time for all cases\r\n\r\n```\r\nfor i, item in enumerate(cases_sgtr):\r\n    cases_df_sgtr[item]['time'] = cases_df_sgtr[item]['time'] - 4900\r\n```\r\n> [!TIP]\r\n> If you are not repeating the calculations, and you already extracted the data, you might want to load the data directly from the created .dat files. In this case you can load them with numpy and then put them together:\r\n\r\n```\r\nbase = np.genfromtxt('base/test4.dat', delimiter=',',names= True)\r\nno_hpis = np.genfromtxt('no_hpis/test4.dat', delimiter=',',names= True)\r\nrcp_earlier = np.genfromtxt('rcp_earlier/test4.dat', delimiter=',',names= True)\r\ncases_df_sgtr = {'base': base,\r\n                 'no_hpis': no_hpis,\r\n                 'rcp_earlier': rcp_earlier}\r\n```\r\n\r\n### Plot one single variable from the extracted data for all cases or a selected list of cases\r\n\r\nin this example only 'base' and 'rcp_earlier' will be plotted\r\n\r\n```\r\nrp.plot_var('SGTR_MF', variables, cases_df_sgtr, ['base', 'rcp_earlier'] )\r\n```\r\n\r\n> [!TIP]\r\n> use the function variables y_limits and x_limits if you want to specify the axes limits\r\n\r\n\r\n### Plot all variables listed in variables file for the defined cases\r\n\r\nThis one could be eliminated because it simply does a for loop\r\nover each variable and runs rp.plot_var\r\n\r\n```\r\nrp.plot_all(variables, cases_df_sgtr, cases_sgtr)\r\n```\r\n\r\n### Plot different variables from one case\r\n\r\n```\r\nvars_to_plot = ['core_level', 'SG_A_level']\r\nrp.plot_variables(vars_to_plot, variables, cases_df_sgtr['base'])\r\n```\r\n\r\n### Make an interactive plot with all the available data\r\n\r\nAfter loading one or several cases (for example):\r\n```\r\ncases_sgtr = ['base', 'no_hpis', 'rcp_earlier']\r\ncases_df_sgtr, variables = rp.extract_data('variables_test4.txt', 'test4', cases_sgtr )\r\n```\r\n\r\nYou can generate an interactive plot where you can play with all the data. This requires Json and connection to the internet.\r\n\r\n```\r\nrp.interactive_plot(cases_df_sgtr)\r\n```\r\n\r\na file with name interactive_plot.html will be available\r\n\r\n### Make a general plot for a single case\r\n\r\nA general figure is a figure with three subfigures (top, mid and bottom) each figure\r\nmay contain more than one time trend and you may use right or left Y-axes\r\n\r\nThis figure is useful to generate a figure to explain the whole transient.\r\n\r\n```\r\nrp.general_fig(variables, cases_df_sgtr['base'])\r\n```\r\n\r\nLabels to each time trend are placed automatically, sometimes they are not placed\r\nin the best location and you may want to adjust them. When you run the command above \r\nyou will see that a list of numbers is shown, this list is the locations of each label\r\nordered from top to bottom. You can copy the list, modify it and provide it as an input \r\nfor the command so you can manually set the locations of the labels \r\n\r\n> [!TIP]\r\n> see `help(rp.general_fig)`for further details\r\n\r\n### Generate the general figure for several cases\r\n\r\nThe general figure does not compare cases. If you want to generate one general figure\r\nfor each of your cases, you should do the following.\r\n\r\n```\r\nfor i, item in enumerate(cases_sgtr):\r\n    rp.general_fig(variables, cases_df_sgtr[item])\r\n    try : os.remove(rp.figures_loc + cases_sgtr[i] + '.pdf')\r\n    except : pass\r\n    os.rename(rp.figures_loc + 'general.pdf', rp.figures_loc + cases_sgtr[i] + '.pdf')\r\n```\r\n\r\n### Add a new variable to the extracted data:\r\n\r\n    first calculate whatever new variable you want to do.\r\n    In this case I want to get the sgtr flow minus the HPIS flow\r\n```\r\nfor elements in cases_df_sgtr:\r\n    new = cases_df_sgtr[elements]['core_level']\r\n    for i in range(0, len(new)):\r\n        new[i] = cases_df_sgtr[elements]['SGTR_MF'][i] - cases_df_sgtr[elements]['HPSI_A'][i]\r\n    # append the new line to each element in the dictionary\r\n    cases_df_sgtr[elements] = append_fields(cases_df_sgtr[elements], 'new_var', new , np.double)\r\n```\r\n\r\n> [!TIP]\r\n>\r\n> Additionally we may want to add one line to the variables dataframe\r\n\r\n```\r\nvariables = rp.append_variable(variables, 'new_var', 'kg/s', 'mid_right')\r\n```\r\n\r\n> [!TIP]\r\n>\r\n> If I want to remove a variable from the general figure I can select it like this\r\n\r\n```\r\nvariables.loc[23, 'general'] = 'no' # to change a single option\r\n```\r\n\r\n### Just read old dat files generated with the package\r\n\r\nIf you have already generated .dat files and you just want to load them, \r\nyou can do so as follows:\r\n\r\n```\r\nnew_case = np.genfromtxt('path/to/data.dat', delimiter=',',names= True)\r\n```\r\n\r\nThe problem now is that you will need to load the variables file if you want\r\nto run some of the functions of the package. You can do so by:\r\n\r\n```\r\nvariables = rp.read_variables('path/to/variables.i')\r\n```\r\n\r\n### Some additional fucntions not used in this example are:\r\n\r\n* make_strip --> make a strip\r\n* read_variables --> just reads a file that lists all variables\r\n* read_stripf --> reads a stripf file\r\n* run_strip --> performs a strip\r\n* mypie --> makes a fancy pie chart\r\n* read_exp --> reads a experiment data file \r\n* print_ss --> Makes a table with the steady state data (in development) \r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Module for RELAP post-processing",
    "version": "1.0.3",
    "project_urls": null,
    "split_keywords": [
        "relap",
        " trace"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1550b644f545c87d5600ace42198d6825c94b34a879cfec9c0a0c14a4e17ea46",
                "md5": "e5bdd000289961edaa81b2e1253e502e",
                "sha256": "9d199796e4b00500667d1128d901da85a5000843323dd368b5fbac80c4389100"
            },
            "downloads": -1,
            "filename": "relap_py-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e5bdd000289961edaa81b2e1253e502e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 38904,
            "upload_time": "2025-01-22T10:52:09",
            "upload_time_iso_8601": "2025-01-22T10:52:09.715356Z",
            "url": "https://files.pythonhosted.org/packages/15/50/b644f545c87d5600ace42198d6825c94b34a879cfec9c0a0c14a4e17ea46/relap_py-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-22 10:52:09",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "relap-py"
}
        
Elapsed time: 2.80012s