### eventStationScript

Runs a eventStation subsetter script via JSR223. The event is put as "event" and the station as "station". The station and event objects are a VelocityStation and VelocityEvent, respectively, the same classes used in the templates for the printlineChannelProcess. See the scripting tutorial for more information on inlining scripts into a SOD recipe.

### Example

    <eventStationScript type="jython">
            from edu.sc.seis.TauP import SphericalCoords, SeismicPhase
            from edu.iris.Fissures import Location
            from edu.iris.Fissures.model import BoxAreaImpl
            from edu.sc.seis.fissuresUtil.bag import AreaUtil
            minLatitude = 0;
            maxLatitude = 40;
            minLongitude = 100;
            maxLongitude = 160;
            result = False
            box = BoxAreaImpl(minLatitude, maxLatitude, minLongitude, maxLongitude)
            PP = SeismicPhase('PP','iasp91',event.getPreferred().getLocation().depth.value)
            dist = SphericalCoords.distance(event.getPreferred().getLocation().latitude, event.getPreferred().getLocation().longitude, station.getFloatLatitude(), station.getFloatLongitude())
            arrival = PP.getEarliestArrival(dist)
            if arrival != None:
               piercePoints = arrival.getPierce()
               for timeDist in piercePoints:
                  if timeDist.getDistDeg() != 0 and timeDist.getDepth() == 0:
                     azimuth = SphericalCoords.azimuth(event.getPreferred().getLocation().latitude, event.getPreferred().getLocation().longitude, station.getFloatLatitude(), station.getFloatLongitude())
                     bounceLat = SphericalCoords.latFor(station.getFloatLatitude(), station.getFloatLongitude(), timeDist.getDistDeg(), azimuth)
                     bounceLon = SphericalCoords.lonFor(station.getFloatLatitude(), station.getFloatLongitude(), timeDist.getDistDeg(), azimuth)
                     result = AreaUtil.inArea(box, bounceLat, bounceLon)
                     break
    </eventStationScript>

### This consists of

<eventStationScript>

An attribute named type with a value of Any Text Any text
</eventStationScript>

### Places this can be found

In eventStation there is a choice between all of the following

- distanceRange
- printlineEventStation
- azimuthRange
- backAzimuthRange
- linearDistanceMagnitudeRange
- eventStationAND
- eventStationOR
- eventStationNOT
- midPoint
- removeStationDuplicate
- phaseExists
- phaseWithoutInterference
- eventStationScript
- externalEventStationSubsetter