Python <;happi._core.FieldFactory对象位于0x17c0490>;

Python <;happi._core.FieldFactory对象位于0x17c0490>;,python,Python,我尝试使用以下python脚本提取数据值: import happi import math import numpy S = happi.Open(results_path='/mnt/iusers01/fatpou01/phy01/v55735sk/scratch/SIM', show=True, reference_angular_frequency_SI=None, verbose=True) print(S.namelist.Main.simulation_time) # prin

我尝试使用以下python脚本提取数据值:

import happi
import math
import numpy
S = happi.Open(results_path='/mnt/iusers01/fatpou01/phy01/v55735sk/scratch/SIM', show=True, reference_angular_frequency_SI=None, verbose=True)
print(S.namelist.Main.simulation_time)   # print the timestep
print(S.namelist.Main.geometry)   # print the simulation dimensions
species = S.namelist.Species["electron"]
print("species "+species.name+" has mass "+str(species.mass))
print(S.Field)
print(S.Probe)
print(S.Scalar)
Diag = S.Field(0., "Ex")
Diag = S.Scalar("Utot")
print(S.namelist.LaserPlanar1D) 
以及输入输出:

<happi._core.FieldFactory object at 0x2b3103e40490>
<happi._core.ProbeFactory object at 0x29ed650>
<happi._core.ScalarFactory object at 0x2beaa10>
<function LaserPlanar1D at 0x27807d0>

在----“对象”是什么意思? 为什么我不能在输出文件中获取值?请帮助我了解以下信息:

似乎hapi.\u core.FieldFactory、hapi.\u core.ProbeFactory和hapi.\u core.ScalarFactory没有重写str()函数

为此:

LaserPlanar1D是一个函数,必须调用它才能获得类似的输出


十六进制位置指的是的输出,根据文档,它信息丰富且明确。

您能建议我如何重写str()函数吗?除非您提供一个示例,说明您希望它给出什么?我有.h5文件,其中有参数和名称列表。我想从中提取dat并绘制它?我在演讲中使用的剧本?在名称列表中:标量、探针、激光、物种等。