cape.writell
: Collect CAPE line load databooks¶
This module provides tools to combine the individual-case line load
files from a CAPE “databook” (which are extracted using a command like
pyfun --ll
) into a single .mat
file.
- Versions:
2021-02-10
@ddalle
: Version 1.0 (executable)2021-09-30
@ddalle
: Version 1.0 (module)
- cape.writell.genr8_dbcolnames(dbi, comp=None)¶
Translate column names from one case line load
- Call:
>>> dbcols = genr8_llcolnames(dbi, comp=None)
- Inputs:
- dbi:
DataKit
DataKit read from single-case CAPE line load data file
- comp: {
None
} |str
Optional prefix for combined line load column names (e.g. shift
"CN"
to"CORE.dCN"
instead of just"dCN"
)
- dbi:
- Outputs:
- dbcols:
dict
[str
] List of prefixed line load column names
- dbcols:
- Versions:
2021-02-10
@ddalle
: Version 1.0
- cape.writell.genr8_ll_datakit(cntl, comp)¶
Create datakit from run matrix of CAPE line load files
- Call:
>>> db = genr8_ll_datakit(cntl, comp)
- Inputs:
- cntl:
cape.Cntl
CAPE control class instance
- comp:
str
Name of
"LineLoad"
component to read using cntl
- cntl:
- Outputs:
- db:
None
|cape.attdb.dbll.DBLL
Line load database read from
pyfun --ll
data if possible
- db:
- Versions:
2021-02-10
@ddalle
: Version 1.0
- cape.writell.genr8_llcolnames(dbi, comp=None)¶
Generate names of line load columns from one case line load
- Call:
>>> llcols = genr8_llcolnames(dbi, comp=None)
- Inputs:
- dbi:
DataKit
DataKit read from single-case CAPE line load data file
- comp: {
None
} |str
Optional prefix for combined line load column names (e.g. shift
"CN"
to"CORE.dCN"
instead of just"dCN"
)
- dbi:
- Outputs:
- llcols:
list
[str
] List of prefixed line load column names
- llcols:
- Versions:
2021-02-10
@ddalle
: Version 1.0
- cape.writell.main()¶
Command-line interface to
cape-writell
- Call:
>>> main()
- Versions:
2021-02-10
@ddalle
: Version 1.0
- cape.writell.write_ll_datakit(cntl, comp)¶
Write
.mat
file of combined line loadsThe output file is in the
"DataBook"
folder of cntl with a name likelineload/lineload_%(comp)s.mat
.- Call:
>>> db = genr8_ll_datakit(cntl, comp)
- Inputs:
- cntl:
cape.Cntl
CAPE control class instance
- comp:
str
Name of
"LineLoad"
component to read using cntl
- cntl:
- Outputs:
- db:
None
|cape.attdb.dbll.DBLL
Line load database read from
pyfun --ll
data if possible
- db:
- Versions:
2021-02-10
@ddalle
: Version 1.0