Inversion bug for 01_dip_plate example
Now I start to run 02_run_inversion.py , unfortunately I'm still experiencing problems that I can't solve. Here is my traceback:
Traceback (most recent call last): File "/home/custEM/custem-examples/inversion/01_dip_plate/02_run_inversion.py", line 92, in invmodel = inv.run(fop.measured, fop.errors, lam=lam, verbose=True, File "/home/cdut5815/.conda/envs/custEM/lib/python3.8/site-packages/pygimli/frameworks/inversion.py", line 650, in run self.inv.start() File "/home/custEM/custEM/inv/inv_utils.py", line 282, in response self.import_fields( ) File "/home/custEM/custEM/inv/inv_utils.py", line 555, in import_fields fields = fields[self.data_mask] IndexError: boolean index did not match indexed array along dimension 0; dimension is 5082 but corresponding boolean dimension is 64050
After debugging , I realize the data of dimension 64050 is loaded from BxyzToImport.npz which is the output of the 01_create_synth_data.py. And “fop.measured” is also from BxyzToImport.npz. But when I run "self.inv.start()" it starts to caluate forward response by using run_multi_fwds function. This function outputs data in a folder name like "schleiz_inv_p1" and the dimension of the data is 5082. I'm not really sure what that data means. But I think the error should come from self.data_mask which is initialized by
fop = MultiFWD(invmod, invmesh, saem_data=synth_data,sig_bg=sig_bg, p_fwd=p, max_procs=6)
Therefore self.data_mask is defined by synth_data which is loaded from BxyzToImport.npz
In summary, the script computes a new forward response without setting up another forward operator. self.data_mask is not properly assigned. Is there any way I can solve this problem? I'd appreciate it if you could provide me any advices about this problem.