====== DRP Snapshot Creation ====== {{ drp_snapshot1.gif?300}} Event snapshots are created by a helper process whenever an event is created or changed. This process is too slow to do dynamically (on demand in the web server). The snapshot should be automatically revised within a minute of any significant changes to the event. For robustness, there are redundant processing threads. Each makes a snapshot of every event and copies it to a [[postproc:drp|DRP]] web server where it is displayed in a frame of the DRP. The snapshot can take up to 4 minutes after the event origin time. This is a combination of RT system processing, and snapshot creation. If there is no snapshot within 4 minutes there may be a problem with the snapshot creation process. Try the alternate DRP web server. ^ Function ^ Processing Stream #2 ^ Processing Stream #1 ^ |Physical Location| Menlo Park | UC Berkeley | |RT event creation | Primary System (mnlort1.wr.usgs.gov (rtmp2) or ucbrt.geo.berkeley.edu (rtucb2)) || |Archive Database | dcmp2 | dcucb | |**Snapshot creation** | **mnlodb1** | **ucbpp** | |Web server | mnlodrp.wr.usgs.gov | rodgers.geo.berkeley.edu | Note that the Menlo Park system //mnlodrp.wr.usgs.gov// is simply a relay for the actual web content that is hosted on //mnlodrp-int.wr.usgs.gov//. This is required by USGS firewall rules. ==== What's in the Snapshot? ==== The snapshot shows the closest 15 or so channels with phase picks for the event. The snapshop shows 120 seconds of time beginning 20 seconds before the origin time of the event. The traces are plotted on a constant time scale - there is no "move out" shift. The red flags show phase arrivals and the green vertical bars on the snapshot are the calculated (expected) arrival times of the P and S-waves for each station for the current solution. If the actual phase picks (red flags) deviate significantly from the green bars the event is mislocated. The waveforms are color coded by channel type. ==Waveform Color Key:== * Black: broad-band, high-gain, digital channel * Brown: broad-band, low-gain, digital channel (accelerometer) * Blue: short-period, analog channel ==== Processing Script ==== The snapshots are created by a continuously running script on the snapshot creation machines. That script will process any event ID posted to a predefined state in the [[PostProc:PCS|Process Control System]] (PCS). This script is called //makeDRPcont// and is found in ///home/ncss/ncpp/drp/bin//. It's logfile can be found at ///home/ncss/ncpp/drp/logs/makeDRP.log//. The script runs as username //__ncss__// and is started after boot-time and restarted after failure by a cron job. It depends on a working //ssh// connection to write snapshots to web server machines. As part of its processing it runs the script ///home/ncss/ncpp/bin/snapgif// which, in turn, runs the Java program to create the graphic. ==== Java Code ==== The Java program that actually creates the snapshot is //org.trinet.web.SnapGif//. I gets event and phase information from it's affiliated database. Once it builds a list of channels to plot it retrieves waveform data from the [[pws|proxy wave servers]] process on the RT systems.