SUAVE  2.5.2
An Aerospace Vehicle Environment for Designing Future Aircraft

Functions needed to save SUAVE data structures in JSON form. More...

Functions

def SUAVE.Input_Output.SUAVE.archive.archive (data, filename)
 
def SUAVE.Input_Output.SUAVE.archive.build_dict_base (base)
 
def SUAVE.Input_Output.SUAVE.archive.build_dict_r (v)
 
def SUAVE.Input_Output.SUAVE.load.load (filename)
 
def SUAVE.Input_Output.SUAVE.load.read_SUAVE_json_dict (res_dict)
 
def SUAVE.Input_Output.SUAVE.load.build_data_r (v)
 

Detailed Description

Functions needed to save SUAVE data structures in JSON form.

Function Documentation

◆ archive()

def SUAVE.Input_Output.SUAVE.archive.archive (   data,
  filename 
)
Converts a SUAVE data structure to a JSON file for storage. 

Assumptions:
Data must be numpy arrays, strings, booleans, floats, ints, or lists.
Functions are ignored and all other data raises an error.

Source:
N/A

Inputs:
data       SUAVE data structure
filename   <string> - file to be output

Outputs:
filename   File as specified in JSON format

Properties Used:
N/A

◆ build_data_r()

def SUAVE.Input_Output.SUAVE.load.build_data_r (   v)
Builds a SUAVE data structure based on a dictionary from a JSON file. This is recursive step.

Assumptions:
Dictionary was created based on a previously saved SUAVE data structure.

Source:
N/A

Inputs:
v     generic value

Outputs:
ret   value converted to needed format

Properties Used:
N/A

◆ build_dict_base()

def SUAVE.Input_Output.SUAVE.archive.build_dict_base (   base)
Builds a dictionary based on a SUAVE data structure. This is initial case.

Assumptions:
Data must be numpy arrays, strings, booleans, floats, ints, or lists.
Functions are ignored and all other data raises an error.

Source:
N/A

Inputs:
data       SUAVE data structure

Outputs:
base_dict  Dictionary built on the data structure.

Properties Used:
N/A

◆ build_dict_r()

def SUAVE.Input_Output.SUAVE.archive.build_dict_r (   v)
Builds a dictionary based on a SUAVE data structure. This the recursive step.

Assumptions:
Data must be numpy arrays, strings, booleans, floats, ints, or lists.
Functions are ignored and all other data raises an error.

Source:
N/A

Inputs:
v       value in a data structure

Outputs:
ret     value based on type of v

Properties Used:
N/A

◆ load()

def SUAVE.Input_Output.SUAVE.load.load (   filename)
Converts a JSON file into a SUAVE data structure.

Assumptions:
JSON file was a previously saved SUAVE data structure.

Source:
N/A

Inputs:
filename   <string> - file to be loaded

Outputs:
data       SUAVE data structure

Properties Used:
N/A

◆ read_SUAVE_json_dict()

def SUAVE.Input_Output.SUAVE.load.read_SUAVE_json_dict (   res_dict)
Builds a SUAVE data structure based on a dictionary from a JSON file. This is initial case.

Assumptions:
Dictionary was created based on a previously saved SUAVE data structure.

Source:
N/A

Inputs:
res_dict    Dictionary based on the SUAVE data structure

Outputs:
SUAVE_data  SUAVE data structure

Properties Used:
N/A