# Script - RADHAZ Safety Zone Using NRPB 89 Standard

This script generates a near field result that incorporates the calculated near fields and the NRPB 89 safety standards.

**The normalised threshold as per NRPB 89**

Each near field value is processed and normalised to the maximum field value that the
standard allows for that frequency. A value of 1

corresponds to the field threshold
according to the standard. A value higher than 1

is over the limit and a value lower
than1

is a safe zone.

-- This example illustrates how advanced calculations-- can be performed to display radiation hazard zones.-- The NRPB 89 standards are used.nf = pf.NearField.GetDataSet("yagi.StandardConfiguration1.nf3D")functioncalculateRADHAZThresholds(index, nf)-- Get a handle on the indexed near field pointlocalnfPt = nf[index]-- Set up the threshold according to the standards-- Frequency in GHzlocalfreq = nfPt:AxisValue(pf.Enums.DataSetAxisEnum.Frequency)/1e9localEfieldLimit = 97.1*math.sqrt(freq)localHfieldLimit = 0.258*math.sqrt(freq)-- SCALE THE ELECTRIC FIELD VALUES-- Scale the values to indicate percentages. The percentage represents-- the field value relative to the limit of the standard.nfPt.EFieldComp1 = nfPt.EFieldComp1/(EfieldLimit) nfPt.EFieldComp2 = nfPt.EFieldComp2/(EfieldLimit) nfPt.EFieldComp3 = nfPt.EFieldComp3/(EfieldLimit)-- SCALE THE MAGNETIC FIELD VALUES-- Scale the values to indicate percentages. The percentage represents-- the field value relative to the limit of the standard.nfPt.HFieldComp1 = nfPt.HFieldComp1/(HfieldLimit) nfPt.HFieldComp2 = nfPt.HFieldComp2/(HfieldLimit) nfPt.HFieldComp3 = nfPt.HFieldComp3/(HfieldLimit)endpf.DataSet.ForAllValues(calculateRADHAZThresholds, nf)-- Note that in essence, the values being returned are-- no longer near fields. As such, interpret them-- carefully in POSTFEKO.returnnf