Example of mask filter in postpro?
-
The typical workflow is to first build the postprocessing pipeline in the GUI, then use the "To Python" tool (available from the right-click contextual menu) to generate the corresponding Python script.
For the mask filter + SAR statistics, it would give something like this:
import numpy import s4l_v1.analysis as analysis import s4l_v1.document as document import s4l_v1.model as model import s4l_v1.units as units from s4l_v1 import Unit # Creating the analysis pipeline # Adding a new SimulationExtractor simulation = document.AllSimulations["Dipole (Broadband) - Copy"] simulation_extractor = simulation.Results() # Adding a new EmSensorExtractor em_sensor_extractor = simulation_extractor["Overall Field"] em_sensor_extractor.FrequencySettings.ExtractedFrequency = u"All" em_sensor_extractor.Normalization.Normalize = True em_sensor_extractor.Normalization.AvailableReferences = u"EM Input Power(f)" em_sensor_extractor.SurfaceCurrent.SurfaceResolution = 0.001, units.Meters document.AllAlgorithms.Add(em_sensor_extractor) entity1=model.AllEntities()['Sphere 1'] # Adding a new FieldMaskingFilter inputs = [em_sensor_extractor.Outputs["EM E(x,y,z,f0)"]] field_masking_filter = analysis.core.FieldMaskingFilter(inputs=inputs) field_masking_filter.SetAllMaterials(False) field_masking_filter.SetEntities([entity1]) field_masking_filter.UpdateAttributes() document.AllAlgorithms.Add(field_masking_filter) # Adding a new SarStatisticsEvaluator inputs = [field_masking_filter.Outputs["EM E(x,y,z,f0)"]] sar_statistics_evaluator = analysis.em_evaluators.SarStatisticsEvaluator(inputs=inputs) sar_statistics_evaluator.Snapshot = u"3e+08" sar_statistics_evaluator.StdDev = False sar_statistics_evaluator.TotalLossyVolume = False sar_statistics_evaluator.VoxelCount = False sar_statistics_evaluator.LossyVoxelCount = False sar_statistics_evaluator.UpdateAttributes() document.AllAlgorithms.Add(sar_statistics_evaluator)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login