<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.labrps.com/index.php?action=history&amp;feed=atom&amp;title=Plugin_WindLab_PDFCheckTool</id>
	<title>Plugin WindLab PDFCheckTool - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.labrps.com/index.php?action=history&amp;feed=atom&amp;title=Plugin_WindLab_PDFCheckTool"/>
	<link rel="alternate" type="text/html" href="https://wiki.labrps.com/index.php?title=Plugin_WindLab_PDFCheckTool&amp;action=history"/>
	<updated>2026-05-07T16:55:44Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.38.2</generator>
	<entry>
		<id>https://wiki.labrps.com/index.php?title=Plugin_WindLab_PDFCheckTool&amp;diff=2573&amp;oldid=prev</id>
		<title>LabRPS: Created page with &quot;{{Plugin |Name=PDF Check Tool Plugin |Description=This plugin assesses the probability distribution density of the simulated wind velocity. |Author=Koffi Daniel |Version=1.0 |Date=03/12/2022 |Features= PDF Check Tool  |RPSVersion=All }}  == Introduction == This plugin computes the histogram of the simulated wind velocity and compares it to the Weibull distribution.  1024px   == Correlation Ergodic...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.labrps.com/index.php?title=Plugin_WindLab_PDFCheckTool&amp;diff=2573&amp;oldid=prev"/>
		<updated>2025-01-23T09:08:11Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Plugin |Name=PDF Check Tool Plugin |Description=This plugin assesses the probability distribution density of the simulated wind velocity. |Author=Koffi Daniel |Version=1.0 |Date=03/12/2022 |Features= &lt;a href=&quot;#PDF_Check_Tool&quot;&gt;PDF Check Tool&lt;/a&gt;  |RPSVersion=All }}  == Introduction == This plugin computes the histogram of the simulated wind velocity and compares it to the Weibull distribution.  &lt;a href=&quot;/File:Plugin_WindLab_PDFCheckTool_Screenshot_1.png&quot; title=&quot;File:Plugin WindLab PDFCheckTool Screenshot 1.png&quot;&gt;1024px&lt;/a&gt;   == Correlation Ergodic...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Plugin&lt;br /&gt;
|Name=PDF Check Tool Plugin&lt;br /&gt;
|Description=This plugin assesses the probability distribution density of the simulated wind velocity.&lt;br /&gt;
|Author=Koffi Daniel&lt;br /&gt;
|Version=1.0&lt;br /&gt;
|Date=03/12/2022&lt;br /&gt;
|Features= [[#PDF_Check_Tool|PDF Check Tool]]&lt;br /&gt;
&lt;br /&gt;
|RPSVersion=All&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
This plugin computes the histogram of the simulated wind velocity and compares it to the Weibull distribution.&lt;br /&gt;
&lt;br /&gt;
[[Image:Plugin_WindLab_PDFCheckTool_Screenshot_1.png|1024px]] &lt;br /&gt;
&lt;br /&gt;
== Correlation Ergodicity Check Tool == &lt;br /&gt;
This is the only RPS feature that the plugin implements. It belongs to the [[RPS_Feature_Group#Table_Tool| table tool group]]. This feature uses the simulated wind velocity to compute the histogram. Therefore, you need to make sure you simulate random wind velocity first. You can also import the wind velocity from file. Note that if you use the mouse (GUI mode) to run this feature, you have to make sure the active window is the window containing the wind velocity data for which you want to compute the temporal correlation.&lt;br /&gt;
&lt;br /&gt;
=== Properties === &lt;br /&gt;
&lt;br /&gt;
* {{PropertyData|MeanSpeedIncrement}}: The increment of the mean speed.&lt;br /&gt;
* {{PropertyData|NumberOfBins}}: TThe number of bins.&lt;br /&gt;
* {{PropertyData|ShapeParameter}}: The shape parameter.&lt;br /&gt;
* {{PropertyData|ScaleParameter}}: The scale parameter.&lt;br /&gt;
* {{PropertyData|UserDefinedWeibullParameters}}: This defines whether Weibul parameters will be inputed directly or calculated.&lt;br /&gt;
* {{PropertyData|pdfLength}}: This is the length of pdf function data.&lt;br /&gt;
* {{PropertyData|WeibulParametersEstimationMethod}}: The Weibul parameters estimation method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Scripting === &lt;br /&gt;
&lt;br /&gt;
{{Code|code=&lt;br /&gt;
import LabRPS&lt;br /&gt;
import WindLabObjects&lt;br /&gt;
import WindLabGui&lt;br /&gt;
import WindLab&lt;br /&gt;
import GeneralToolsGui&lt;br /&gt;
&lt;br /&gt;
# Before you run this macro, simulation must be run and there  must be a table containing the simulated wind velocities.&lt;br /&gt;
def checkResult():&lt;br /&gt;
    # Install the PDF checking tool&lt;br /&gt;
    installResuslt = WindLab.installPlugin(&amp;quot;PDFCheckToolPlugin&amp;quot;)&lt;br /&gt;
    if not installResuslt:&lt;br /&gt;
        LabRPS.Console.PrintError(&amp;quot;The installation of the PDF tool Plugin has failed.\n&amp;quot;)&lt;br /&gt;
        return None&lt;br /&gt;
&lt;br /&gt;
    # Get the active simulation which as this time has been run already.   &lt;br /&gt;
    sim = WindLabGui.getActiveSimulation()&lt;br /&gt;
&lt;br /&gt;
    # get the simulation data as list assuming that a wind simulation is run and &lt;br /&gt;
    # the result is shown in an AlphaPlot table called &amp;quot;table&amp;quot;. Please, edit this table name&lt;br /&gt;
    # according to the name of the table where your simulated data are stored.&lt;br /&gt;
    velocities = GeneralToolsGui.GeneralToolsPyTool.getTableByName(&amp;quot;table&amp;quot;)&lt;br /&gt;
    &lt;br /&gt;
    # create new table tool&lt;br /&gt;
    pdfCheck = WindLabObjects.makeFeature(&amp;quot;pdfCheck&amp;quot;, sim.Name,  &amp;quot;PDF Check Tool&amp;quot;, &amp;quot;Table Tool&amp;quot;)&lt;br /&gt;
    &lt;br /&gt;
    # check if the created randomness provider feature&lt;br /&gt;
    if not pdfCheck:&lt;br /&gt;
        LabRPS.Console.PrintError(&amp;quot;The creation of the table tool was not successuful.\n&amp;quot;)&lt;br /&gt;
        return None&lt;br /&gt;
    &lt;br /&gt;
    pdfCheck.MeanSpeedIncrement = &amp;#039;0.50 m/s&amp;#039;&lt;br /&gt;
    pdfCheck.WeibulParametersEstimationMethod = &amp;quot;Density Power Method&amp;quot;&lt;br /&gt;
    pdfCheck.NumberOfBins = 30&lt;br /&gt;
    sim.setActiveFeature(pdfCheck)        &lt;br /&gt;
    pdfCheckRest = sim.tableToolCompute(velocities)&lt;br /&gt;
&lt;br /&gt;
    # if we are in Gui mode, show plots&lt;br /&gt;
    if LabRPS.GuiUp:&lt;br /&gt;
        import numpy&lt;br /&gt;
        import matplotlib.pyplot as plt&lt;br /&gt;
&lt;br /&gt;
        # convert the list to numpy array&lt;br /&gt;
        array = numpy.asarray(pdfCheckRest)&lt;br /&gt;
&lt;br /&gt;
        location = sim.LocationIndexJ + 1&lt;br /&gt;
        str = &amp;quot;Velocity at Location {:d}&amp;quot;.format(location)&lt;br /&gt;
        fig, ax = plt.subplots()&lt;br /&gt;
        ax.set_title(str)&lt;br /&gt;
        pl = pdfCheck.pdfLength - 1      &lt;br /&gt;
        ax.plot(array[0:pl,2], array[0:pl,3], color=&amp;#039;red&amp;#039;)&lt;br /&gt;
        ax.hist(array[:,1], bins = pdfCheck.NumberOfBins, density = 1, color=&amp;#039;skyblue&amp;#039;, edgecolor=&amp;#039;black&amp;#039;)&lt;br /&gt;
        ax.set_xlabel(&amp;#039;Velocity (m/s)&amp;#039;)&lt;br /&gt;
        ax.set_ylabel(&amp;#039;Probability Density&amp;#039;)&lt;br /&gt;
        # ax.grid(True)&lt;br /&gt;
        fig.tight_layout()&lt;br /&gt;
        ax.legend([&amp;quot;Weibull fit&amp;quot;, &amp;quot;Velocity&amp;quot;], loc=&amp;quot;upper left&amp;quot;, frameon=False)&lt;br /&gt;
        plt.show()&lt;br /&gt;
&lt;br /&gt;
checkResult()&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>LabRPS</name></author>
	</entry>
</feed>