I am currently adapting a code I've written in Sim4Life 2.3 some years ago to Sim4Life 6.0 and found out that a lot has changed in the meantime.
How do I properly set up a Field Crop Filter (for the EMLF-Solver)?
This is what my original code looks like and the SetInputConnection and Value commands seem to be deprecated.
import sys, os import s4l_v1.analysis as analysis import s4l_v1.analysis.core as core # Create extractor for a given simulation output file results = sim.Results() overall_field_sensor = results[ 'Overall Field' ] e_field = overall_field_sensor['EM E(x,y,z,f0)'] # pipe the E_field through a crop filter crop_filter = core.FieldCropFilter() crop_filter.SetInputConnection(0, e_field) crop_filter.Update(0) crop_filter.SetValue = (63, 123, 513) # set lower extent of crop region (in grid indexes) crop_filter.SetValue = (198, 271, 662) # set upper extent of crop region (in grid indexes) analysis.RegisterAlgorithm(crop_filter)
Thanks for your help!