| |
String_0 |
String_1 |
| Test Date |
<%=logdate(0)%> |
<%=logdate(1)%> |
| Test Type |
<%=Description(0)%> |
<%=Description(1)%> |
| Channels |
<%=Nchans(0)%> |
<%=Nchans(1)%> |
| Comments |
<%=comments(0)%> |
<%=comments(1)%> |
<%
old_test="XXXXXX"
Do While Not RS2.Eof
If old_test<>CStr(RS2("MEASUREMENT_ID")) Then
If old_test<>"XXXXXX" Then 'finish previous row
%>
<%
End If
old_test=CStr(RS2("MEASUREMENT_ID"))
%>
| <%=RS2("DESCRIPTION")%> |
<% If CInt(RS2("WURST_ID"))=0 Then
%>
<%=RS2("VALUE")%> |
<% Else %>
|
<%=RS2("VALUE")%> |
<% End If
Else
If CInt(RS2("WURST_ID"))=1 Then %>
<%=RS2("VALUE")%> |
<% Else %>
Error: Table logic messed up |
<% End If
End If %>
<%
RS2.MoveNext
Loop %>
<%
'
' Do heavy duty database extraction here
'
Set RS1 = Connection.Execute(SQLStmt1)
Response.write(SQLStmt1 & " ")
npoints=0
Do While Not RS1.EoF
'
' Get average pedestals
'
Chip(npoints)=CInt(RS1("chip"))
If Not IsNull(RS1("mped")) Then
IDE_Ped(npoints)=-CDbl(RS1("mped"))
Else
IDE_Ped(npoints)=-999
End If
Phobos_Ped(npoints)=CDbl(RS1("aped"))
String(npoints)=CDbl(RS1("string"))
Stringchip(npoints)=CDbl(RS1("stringchip"))
npoints=npoints+1
RS1.MoveNext
Loop
npoints=npoints-1
%> <% start_time = Time %> <%
'
' Prepare plot
'
seed=-(second(now())+60*minute(now())+3600*hour(now())+3600*24*day(now()))
filename="mped" & cstr(int(100000.*rnd(seed))) & ".jpg"
filename_full=ph_image_directory & filename
%> <%
Dim Chart
Dim Color(8)
Color(0) = vbRed
Color(1) = vbBlue
Color(2) = vbYellow
Color(3) = vbGreen
Color(4)= vbMagenta
Color(5)= vbCyan
Color(6)= vbWhite
Color(7)= vbBlack
rem **********************************************************************
rem * Instantiate the Chart component
rem **********************************************************************
Set Chart = Server.CreateObject ("ASPChart.Chart")
rem **********************************************************************
rem * Create x Array
rem **********************************************************************
Chart.AddSeries 6
Chart.SeriesTitle = "Average pedestal correlation"
Chart.LineWidth = 1
Chart.Stairs = True
Chart.SeriesInLegend = true
For ipoints=0 To npoints
Chart.AddXY Phobos_Ped(ipoints),IDE_Ped(ipoints),"",Color(1)
Next
rem **********************************************************************
rem * Add and format the title
rem **********************************************************************
rem Chart.ChartTitleAdd ("Pedestal, Hybrid " & CStr(RSx("HYBRID_ID")))
Chart.ChartTitleFont.Size = 16
Chart.ChartTitleFont.Name = "Arial"
Chart.ChartTitleFont.Italic = true
Chart.ChartTitleFont.Bold = true
Chart.View3D = false
Chart.LegendVisible = false
Chart.LegendStyle = cSeries
Chart.AxisGridLines = true
Chart.Frame = false
Chart.BottomAxisIncrement = 50.
Chart.LeftAxisIncrement = 50.
'
' gsfs added xtic, ytic option
If IsEmpty(xtic) Then
Chart.BottomAxisIncrement = 50.
Else
Chart.BottomAxisIncrement = xtic
End If
If IsEmpty(ytic) Then
Chart.LeftAxisIncrement = 50.
Else
Chart.LeftAxisIncrement = ytic
End If
'
rem **********************************************************************
rem * Remove the OuterBevel, add a gradient fill to chart panel
rem **********************************************************************
Chart.BevelOuter = 0
rem Chart.GradientVisible = true
rem Chart.GradientStartColor = vbWhite
rem Chart.GradientEndColor = vbYellow
Chart.PanelColor = Color(6)
rem **********************************************************************
rem * Set the Width and Height of the image
rem **********************************************************************
Chart.Height = 400
Chart.Width = 400
' If nrows<1 Then ' Single String
' Chart.HorizAxisMax =(wurst_id+1)*nstring+1
' Chart.HorizAxisMin = wurst_id*nstring
' Else
Chart.HorizAxisMin =-500
Chart.HorizAxisMax = 100
' End If
Chart.VertAxisMin = -400.
Chart.VertAxisMax = 200.
' Following lines added by gsfs 8/1/00
If IsEmpty(xmin) Then
Chart.HorizAxisMin = -500
Else
Chart.HorizAxisMin = xmin
End If
If IsEmpty(xmax) Then
Chart.HorizAxisMax = 100
Else
Chart.HorizAxisMax = xmax
End If
If IsEmpty(ymin) Then
Chart.VertAxisMin = -400.
Else
Chart.VertAxisMin = ymin
End If
If IsEmpty(ymax) Then
Chart.VertAxisMax = 200.
Else
Chart.VertAxisMax = ymax
End If
' End of gsfs addition
Chart.AddAxisLabel 1 , "-Mean Pedestal as measured by IDE [mV]"
Chart.AddAxisLabel 2 , "Mean Pedestal as measured by Phobos [mV]"
rem **********************************************************************
rem * Set the filename, save the image and write the image tag
rem **********************************************************************
Chart.FileName = filename_full
Chart.SaveChart
line=" | "
Response.Write (line)
rem **********************************************************************
rem * Destroy the object
rem **********************************************************************
Set Chart = nothing
' Database is not needed anymore !
Connection.Close
%>
<% Else %> |
Both ROWID's are empty ! <%End If%> |