コード例 #1
0
    def body(self, master):

        self.prepareColumns(master)

        self.addTitleRow(master, "Power Deviation Matrix Dimension Settings:")

        self.parameter = self.addOption(master, "Parameter:", [
            'Hub Wind Speed', 'Hub Turbulence Intensity',
            'Rotor Wind Speed Ratio', 'Normalised Hub Wind Speed'
        ], self.item.parameter)
        self.index = self.addEntry(master, "Index:",
                                   validation.ValidatePositiveInteger(master),
                                   self.item.index)
        self.center_of_first_bin = self.addEntry(
            master, "Center of First Bin:", validation.ValidateFloat(master),
            self.item.centerOfFirstBin)
        self.bin_width = self.addEntry(
            master, "Bin Width:", validation.ValidatePositiveFloat(master),
            self.item.binWidth)
        self.number_of_bins = self.addEntry(
            master, "Number of Bins:",
            validation.ValidatePositiveInteger(master), self.item.numberOfBins)
        self.center_of_last_bin = self.addEntry(master,
                                                "Center of Last Bin:",
                                                None,
                                                self.item.centerOfLastBin,
                                                read_only=True)

        self.center_of_first_bin.variable.trace('w', self.update_last)
        self.bin_width.variable.trace('w', self.update_last)
        self.number_of_bins.variable.trace('w', self.update_last)
コード例 #2
0
ファイル: dataset.py プロジェクト: pablo-esteban/PCWG
    def add_measurements(self, master):

        self.timeStepInSeconds = self.addEntry(master, "Time Step In Seconds:", validation.ValidatePositiveInteger(master), self.config.timeStepInSeconds)
        self.badData = self.addEntry(master, "Bad Data Value:", validation.ValidateFloat(master), self.config.badData)

        self.dateFormat = self.addEntry(master, "Date Format:", validation.ValidateNotBlank(master), self.config.dateFormat, width = 60)
        pickDateFormatButton = tk.Button(master, text=".", command = base_dialog.DateFormatPicker(self, self.dateFormat, ['%Y-%m-%d %H:%M:%S', '%Y-%m-%dT%H:%M:%S', '%d-%m-%y %H:%M', '%y-%m-%d %H:%M', '%d/%m/%Y %H:%M', '%d/%m/%Y %H:%M:%S', '%d/%m/%y %H:%M', '%y/%m/%d %H:%M']), width=5, height=1)
        pickDateFormatButton.grid(row=(self.row-1), sticky=tk.E+tk.N, column=self.buttonColumn)              

        self.timeStamp = self.addPickerEntry(master, "Time Stamp:", validation.ValidateNotBlank(master), self.config.timeStamp, width = 60) 
        self.turbineLocationWindSpeed = self.addPickerEntry(master, "Turbine Location Wind Speed:", None, self.config.turbineLocationWindSpeed, width = 60) #Should this be with reference wind speed?
        self.hubWindSpeed = self.addPickerEntry(master, "Hub Wind Speed:", None, self.config.hubWindSpeed, width = 60)
        self.hubTurbulence = self.addPickerEntry(master, "Hub Turbulence:", None, self.config.hubTurbulence, width = 60)
        self.temperature = self.addPickerEntry(master, "Temperature:", None, self.config.temperature, width = 60)
        self.pressure = self.addPickerEntry(master, "Pressure:", None, self.config.pressure, width = 60)
        self.density = self.addPickerEntry(master, "Density:", None, self.config.density, width = 60)
        self.inflowAngle = self.addPickerEntry(master, "Inflow Angle:", None, self.config.inflowAngle, width = 60)
        self.inflowAngle.setTip('Not required')
コード例 #3
0
ファイル: analysis.py プロジェクト: pablo-esteban/PCWG
    def add_general(self, master, path):

        self.powerCurveMinimumCount = self.addEntry(
            master, "Power Curve Minimum Count:",
            validation.ValidatePositiveInteger(master),
            self.config.powerCurveMinimumCount)

        powerCurveModes = [
            "Specified", "AllMeasured", "InnerMeasured", "OuterMeasured"
        ]
        self.powerCurveMode = self.addOption(master,
                                             "Reference Power Curve Mode:",
                                             powerCurveModes,
                                             self.config.powerCurveMode)

        self.powerCurvePaddingMode = self.addOption(
            master, "Power Curve Padding Mode:",
            ["None", "Last Observed", "Max", "Rated"],
            self.config.powerCurvePaddingMode)