pythermica package

Submodules

pythermica.analyse_nwk module

pythermica.analyse_nwk.analyse_GL_nwk_data(filename_gl, list_of_nodes_numbers, list_of_nodes_names)[source]
read the gl.nwk file and generate the relation matrix,

with the same order as the list_of_nodes_numbers

Args:

filename_gl (str): filename of the *gl.nwk to process list_of_nodes_numbers (list): list of all the node numbers list_of_nodes_names (list): ist of the name of each node,

with the same order as list_of_nodes_numbers

Returns:

mat_GL (np.array): the coefficient matrice with GL links between each nodes

pythermica.analyse_nwk.analyse_GR_nwk_data(filename_gr: str, list_of_nodes_numbers: list, list_of_nodes_names: list)[source]
read the gr.nwk file and generate the relation matrix,

with the same order as the list_of_nodes_numbers

Args:

filename_gr (str): filename of the *gr.nwk to process list_of_nodes_numbers (list): list of all the node numbers list_of_nodes_names (list): ist of the name of each node,

with the same order as list_of_nodes_numbers

Returns:

mat_GR (np.array): the coefficient matrice with GL links between each nodes

pythermica.analyse_nwk.extract_nodes(filename_nod)[source]

Read the *.od.nwk file and generate the list of all nodes and their names

Args:

filename_nod (str): file name of the results in *.nod.nwk

Returns:

list_of_nodes_numbers [list]: list of all the node numbers, ordered

list_of_nodes_names [list]: list of the name of each node,

with the same order as list_of_nodes_numbers

pythermica.analyse_nwk.generate_correlation_matrixes(list_mats, list_node_names, list_titles, use_log=True, save_fig=False, filename='', cmap='afmhot_r')[source]

creat a Matrice figure of the node coefficients

Args:

list_mats (list of np.array): list of the coefficient matrices list_node_names (list): list of the node names, needs one for each node list_titles (list): list of the subplot titles, coerrespondes to list_mats use_log (bool, optional): if True, then compute the log10 of the matrice before ploting . Defaults to True. save_fig (bool, optional): if True, then save the figure on a PNG file. Defaults to False. filename (str, optional): name of the figure file, used if save_fig. Defaults to “”.

Returns:

fig, axarr [matplotlib.Figure and Axies]: the matplotlig objects

pythermica.analyse_nwk.get_all_dict_of_gb_lines(filename_gb, list_of_nodes_numbers, index_lines_with_new_node, lines_with_new_node)[source]

open the file and read all the coefficients

pythermica.analyse_nwk.get_nth_max_coupling(mat, list_of_nodes_names, n=10)[source]

Read the matrice and print the biggest elements

Args:

mat (numpy.array): the coefficients matrix list_of_nodes_names (list): the list of names n (int, optional): number of maximum element to print. Defaults to 10.

pythermica.analyse_nwk.get_useful_files(root)[source]

Look for the useful fils in a folder

Args:

root (str): relative or absolute name of the folder

pythermica.analyse_nwk.parse_one_node_lines(lines_selected)[source]
pythermica.analyse_nwk.read_gb_file(filename_gb)[source]

Read a first time the BG fiel to have a big picture

Args:

filename_gb ([type]): [description]

Returns:

[type]: [description]

pythermica.analyse_nwk.trans_dict_of_list_to_mat(dol, list_of_nodes_numbers)[source]

transform the dist of list to a np.array

Args:

dol (dict of list): the dict of list generated earlier

Returns:

mat_gb: the np.array matrix

pythermica.hdf5_process module

pythermica.hdf5_process.descend_obj(obj, sep='\t')[source]

Iterate through groups in a HDF5 file and prints the groups and datasets names and datasets attributes

pythermica.hdf5_process.h5dump(path, group='/')[source]

print HDF5 file metadata

group: you can give a specific group, defaults to the root group

pythermica.plot_variables module

Created on Wed Jun 9 17:39:13 2021

@author: Zineb Bouaoudate

pythermica.plot_variables.figure_over_nodes(therm_results, temperatures, times, n_orbits, path_list, case_names, nodes_to_process=['/Powercard P60', '/Printed Circuits', '/Transponders (1)', '/Batteries'], path_root='./', name_yaxis='Temperature', filename_prefix='')[source]

generate a bunch of figures to compare simulations

pythermica.plot_variables.totalInternalDissipation(therm_results, internal_dissipations, time, n_orbits, path_list, case_names, nodes_to_process=None, path_root='./', filename_prefix='Total_IQ')[source]

generate a bunch of figures to compare simulations

pythermica.pythermica module

class pythermica.pythermica.Thermica(path, verbose=True)[source]

Bases: object

Main class to analyse the simulation results

dump_result_file_structure()[source]

Print the structure of the file

get_filenames(type='none', sort_by='name')[source]

general fonction to get the filenames depending of the type of results wanted

get_internal_dissipation()[source]

return the value in W of the internal dissiabation for each node (each mesh cell)

get_solarflux_file()[source]

return the h5 file name with the solar flux

get_temperature()[source]
get_temperature_file()[source]

return the h5 file name with the temperature data

names_unique

list of the names used to label the nodes

nodes_per_names

list of the lists of the nodes for each unique names

nodes_value

list of the node value, order in the same way as the temperatures

path

path were the simulation results are stored

process_model_nodes()[source]

The nodes are accessible, but this model is meat to understand better their information

read_solarflux(groupname='Results', subgroupname='Direct Solar', datasetname='Flux')[source]
read_temperature_results(groupname='Results', subgroup='Thermal', datasetname='Temperatures')[source]

Read the *.temp.h5 data file according to the group, subgroup and dataset name

Args:
groupname (str): name of the groupe, from

[“Model”, “Posther”n “Results”, “Run Info”, “Time”]. Defautl is “Results”

subgroup (str): name of the subgroup. If Group is “Results”, options are

[“Couplings”, “Electric”, “Outgassing”, “Properties”, “Thermal”, “Variables”]. Default is Thermal

datasetname (str): name of the DataSet. If Subgroup is “Thermal”, options are

[“Albedo fluxes”, “Internal dissipations”, “Planet IR fluxes”, “Residual fluxes”, “Solar fluxes”, “Temperatures”]. Default is “Temperatures”

Returns:

[type]: [description]

read_temperature_results2(groupname, datasetname)[source]

Open the temperature h5 file, but access the dataset with only one groupe of hyerachi

return_time_temperature()[source]

the time vector is stor in all of the h5 files

Module contents

Top-level package for pythermica.