<happi._core.0x17c0490>的字段工厂对象



我正在尝试使用以下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>

----处的宾语是什么意思?为什么我没有得到输出文件中的值?请帮我

对于这些:

<happi_果心0x2b3103e40490处的FieldFactory对象>

<happi_果心位于0x29ed650的ProbeFactory对象>

<happi_果心位于0x2beaa10的ScalarFactory对象>

看起来很开心_果心FieldFactory,happi_果心ProbeFactory和happi_果心ScalarFactory没有覆盖str((函数。

为此:

<函数LaserPlanar1D在0x27807d0>

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

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

最新更新