===== Duty Review Page (DRP) ===== {{ drp_1.gif?400x400}} The Duty Review Page (DRP) is used by [[NCSN]] duty seismologists to review and modify event solutions. It shows a list of events for the past 72 hours or 200 events (whichever is less), a [[postproc:snapshot_creation|snapshot]] of a selected event's waveforms and a panel of button that allow the seismologist to perform selected actions on the event. See: [[postproc:drpfaq|DRP FAQ]] ==== Web Servers ==== The DRP is hosted on password protected web servers: * [[https://rodgers.geo.berkeley.edu/review/events|rodgers.geo.berkeley.edu]] (located in Earl Warren data center at UC Berkeley) * [[https://mnlodrp.wr.usgs.gov/review/events/ | mnlodrp.wr.usgs.gov]] ^ Function ^ Processing Stream #2 ^ Processing Stream #1 ^ |Physical Location| Menlo Park | UC Berkeley | |RT event creation | Active RT System (mnlort1.wr.usgs.gov or ucbrt.geo.berkeley.edu || |Archive Database | dcmp2 | dcucb | |Snapshot creation | mnlodb1 | ucbpp | |Web server | mnlodrp.wr.usgs.gov | rodgers.geo.berkeley.edu | ==== Web Page Creation Scripts ==== The DRP is a set of three frames controlled by HTML and JavaScript. Unless otherwise noted all scripts are found in /home/httpd/html/review/events/cgi-bin. The following scripts create the DRP contents. === index.php === This is the entry point. It defines the frame sizes, positions and names and calls cgi-bin/catalog.php. === catalog.php === Queries the database and creates the catalog frame (lower) contents. Prints events >3.0 in red. Creates a hyperlink for each event ID. Creates a JavaScript array of ID numbers for internal use. Calls the JavaScript function selectNewEvid($evid) to select the most recent event in the list (top of the list). Only 3 days of "local" events are shown in the list. If an event is deleted it will disappear from the list when the frame is refreshed. === selectNewEvid($evid)=== Creates event-specific contents for the two upper frames. * Calls makeSnapshotFrame.php to create the snapshot view in the waves (upper left) frame. * Calls makeButtonPanel.php to create the contents of the button frame (upper right). The selectNewEvid($evid) function is also called when the user clicks a hyperlinked event ID in the catalog list or uses the arrows in the button panel. === makeSnapshotFrame.php === Dynamically creates the contents of the waves frame (upper left). Checks for a synopsis gif and adds it if it exists. * Checks for synopsis view, [[Recent Earthquakes page]], [[postproc:shakemap|ShakeMap]] page and [[CIIM]] (aka DYFI) and adds links if they exist. * Lists summary of event's history. * Lists alarm actions from both RT and DC databases. === makeButtonPanel.php === Dynamically create the contents of the button frame (upper right). The style of the button panel is defined using a Cascading Style Sheet (css) called buttonpanel.css. The script: * Looks up and writes current time and event info * Creates buttons * Checks for synopsis view and adds links if it exists. ==== What the Buttons do (and how they do it) ==== {{ drp_buttons1.gif}} The Accept and Cancel buttons call the JavaScript routine doAction.php?EVID=&ACTION=" which is located in cgi-bin/phpmods/event_actions.php. Each button inserts the appropriate ACTION argument. This php routine calls other routines to accomplish the desired actions. === Accept === Action: - sets Origin.rflag = "H" in the DC databases to indicate the event has been human reviewed. - Posts the event to the [[PCS]] system with a state of "ALARM". This should result in reevaluation of the event by the postprocessing version of the [[postproc:alarm|alarm system]] and the sending of revised alarms. - writes log entry - If the earthquake magnitude is 5.0 or larger, a web page for [[postproc:asw|Aftershock Forecast Control]] will be presented to the Duty Seismologist. This page allows the user to initiate aftershock warnings if appropriate for the event. How: - Calls "epref.accept_Event ($_evid)" stored procedure in the server's partner dbase. - Writes log entry to: /home/ncss/ncpp/drp/logs/review.log === Cancel === Action: - Posts the event to the [[PCS]] system with a state of "DELETED". This should cause both the RT and the postprocessing versions of the alarm system to cancel any event messages they had sent earlier. Note that some alarm actions may not be cancellable. - writes log entry How: - Calls "epref.cancel_Event ($_evid)" stored procedure in the server's partner dbase. - Writes log entry to: /home/ncss/ncpp/drp/logs/review.log === Delete === The **delete** button has been removed from the DRP because the waveform images do not show sufficient information to verify that the event is not an earthquake. Jiggle is a better tool to view events prior to deleting them. === Arrow buttons === Action: - Display next event up or down the catalog listing. Will wrap if it hits either the top or bottom of the list. How: - Move one entry up or down in the catalog frame's internal array of event IDs. Then calls the selectNewEvid($evid) function. === Set Type === Action: - Pops up a menu with a list of allowed event type: Local, Regional, Teleseism, Quarry blast and Sonic. - Clicking a type sets the event's type in the DC databases. - Writes a log entry (Note: alarms are not resent. If you want this change to be published to the web, you should "accept" the event after changing its type.) How: - Calls "makeSetTypePage.php" to create new frame. - Calls "setEventType.php" which calls the call "epref.setEventType($evid, $type)" stored procedure in the database. - Writes log entry to: /home/ncss/ncpp/drp/logs/review.log === Edit Mag === {{ editmag_1.gif}} Action: - Pops up a window to allow changing the evemt magnitude value, setting the magnitude type to **Mh**. - Buttons are provided to **Commit** the change, to **Reset** the value displayed in the window to the event magnitude, or to **Cancel** the operation and close the window. - When the **Accept** button is pressed, the window changes to show the results of the action. If the change is successful, this window advises the user to **Accept** the event (on the DRP) so that the revised magnitude is published. - Until the **DRP Accept* button is pressed, the changed magnitude will reside in the catalog, but will not be published! How: - calls "magEditPanel.php". === Show Logs === Action: - Pops up a new browser window to show the last 50 log entries of actions taken on the DRP server. How: - Calls /home/httpd/apache2/cgi-bin/DRP/logAsHtml.cgi, which reads the last entries from /home/ncss/ncpp/drp/logs/log.txt. === Remake GIF === Action: - Posts the event to [[PCS]] with state of "MakeGif". This causes the [[postproc:snapshot_creation|snapshot]] creation script to run again. It may take as long as 4 minutes for a new GIF to be produced. You should refresh your browser to see the new GIF.