Code Monkey home page Code Monkey logo

weewx-polarwindplot's People

Contributors

gjr80 avatar nellyt avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

weewx-polarwindplot's Issues

Colour options : code is inconsistent

Think I confused Gary with a poor comment .... the use of string none and None is inconsistent and he has implemented different versions of none/None

Poor comments on my part!

Effects marker and line colours that can take both a default, a colour or a description string (ie speed)

In some instances colors do not work or throw errors

Errors with python 3

I tried this on bullseye with python 3.9.2 and WeeWx 4.5.1 and got the following error:

Jan 10 11:16:57 raspberrypi weewx[5736] ERROR weewx.reportengine: Unable to instantiate generator 'user.polarWindPlot.PolarWindPlotGenerator' Jan 10 11:16:57 raspberrypi weewx[5736] ERROR weewx.reportengine: **** invalid syntax (polarWindPlot.py, line 261) Jan 10 11:16:57 raspberrypi weewx[5736] ERROR weewx.reportengine: **** Traceback (most recent call last): Jan 10 11:16:57 raspberrypi weewx[5736] ERROR weewx.reportengine: **** File "/home/weewx/bin/weewx/reportengine.py", line 179, in run Jan 10 11:16:57 raspberrypi weewx[5736] ERROR weewx.reportengine: **** obj = weeutil.weeutil.get_object(generator)( Jan 10 11:16:57 raspberrypi weewx[5736] ERROR weewx.reportengine: **** File "/home/weewx/bin/weeutil/weeutil.py", line 1119, in get_o bject Jan 10 11:16:57 raspberrypi weewx[5736] ERROR weewx.reportengine: **** mod = __import__(module) Jan 10 11:16:57 raspberrypi weewx[5736] ERROR weewx.reportengine: **** File "/home/weewx/bin/user/polarWindPlot.py", line 261 Jan 10 11:16:57 raspberrypi weewx[5736] ERROR weewx.reportengine: **** except IOError, e: Jan 10 11:16:57 raspberrypi weewx[5736] ERROR weewx.reportengine: **** ^ Jan 10 11:16:57 raspberrypi weewx[5736] ERROR weewx.reportengine: **** SyntaxError: invalid syntax Jan 10 11:16:57 raspberrypi weewx[5736] ERROR weewx.reportengine: **** Generator ignored

I commented out that line and adjusted the indentation to get another error:

Jan 10 13:27:04 raspberrypi weewx[6193] ERROR weewx.reportengine: Unable to instantiate generator 'user.polarWindPlot.PolarWindPlotGenerator' Jan 10 13:27:04 raspberrypi weewx[6193] ERROR weewx.reportengine: **** cannot import name 'to_unicode' from 'weeutil.weeutil' (/home/weewx/bin/weeutil/weeutil.py) Jan 10 13:27:04 raspberrypi weewx[6193] ERROR weewx.reportengine: **** Traceback (most recent call last): Jan 10 13:27:04 raspberrypi weewx[6193] ERROR weewx.reportengine: **** File "/home/weewx/bin/weewx/reportengine.py", line 179, in run Jan 10 13:27:04 raspberrypi weewx[6193] ERROR weewx.reportengine: **** obj = weeutil.weeutil.get_object(generator)( Jan 10 13:27:04 raspberrypi weewx[6193] ERROR weewx.reportengine: **** File "/home/weewx/bin/weeutil/weeutil.py", line 1119, in get_object Jan 10 13:27:04 raspberrypi weewx[6193] ERROR weewx.reportengine: **** mod = __import__(module) Jan 10 13:27:04 raspberrypi weewx[6193] ERROR weewx.reportengine: **** File "/home/weewx/bin/user/polarWindPlot.py", line 61, in <module> Jan 10 13:27:04 raspberrypi weewx[6193] ERROR weewx.reportengine: **** from weeutil.weeutil import accumulateLeaves, option_as_list, TimeSpan, tobool, to_unicode Jan 10 13:27:04 raspberrypi weewx[6193] ERROR weewx.reportengine: **** ImportError: cannot import name 'to_unicode' from 'weeutil.weeutil' (/home/weewx/bin/weeutil/weeutil.py) Jan 10 13:27:04 raspberrypi weewx[6193] ERROR weewx.reportengine: **** Generator ignored
At that point I gave up!

Execution speed

According to syslog Neils polarWind plots take about twice as long to generate than his fork of stackwindrose.

Is this related to font or image size? the conf file is different ?

First point on scatter is joined to origin, should it : REVIEW

Gary said in email : I noticed on the scatter plot that the plot started with a line from the origin to the first point. That was giving me some odd looking lines on my test data and it made me wonder should that first point be joined to the origin or not? I changed the plot so that it is not(which is what is on GitHub now), now that I think again I am not sure. In any case it is a fairly trivial change to put it back as it was.

Division by zero error - Trail plot

Suspect it's due to a lack of data as error disappeared on next archive period. Simulator that had been silent for > 24 hours. Following log refers:

Jan 20 08:07:53 bullseye33 weewx[510] INFO __main__: Starting up weewx version 4.5.1
Jan 20 08:07:53 bullseye33 weewx[510] INFO weewx.engine: Clock error is -5.93 seconds (positive is fast)
Jan 20 08:07:53 bullseye33 weewx[510] INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'
Jan 20 08:07:53 bullseye33 weewx[510] INFO weewx.manager: Starting backfill of daily summaries
Jan 20 08:07:53 bullseye33 weewx[510] INFO weewx.manager: Daily summaries up to date
Jan 20 08:07:53 bullseye33 weewx[510] INFO weewx.engine: Starting main packet loop.
Jan 20 08:08:15 bullseye33 weewx[510] INFO weewx.manager: Added record 2022-01-20 08:08:00 AEST (1642630080) to database 'weewx.sdb'
Jan 20 08:08:15 bullseye33 weewx[510] INFO weewx.manager: Added record 2022-01-20 08:08:00 AEST (1642630080) to daily summary in 'weewx.sdb'
Jan 20 08:08:16 bullseye33 weewx[510] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 0.52 seconds
Jan 20 08:08:18 bullseye33 weewx[510] INFO weewx.imagegenerator: Generated 60 images for report SeasonsReport in 1.91 seconds
Jan 20 08:08:18 bullseye33 weewx[510] INFO weewx.reportengine: Copied 5 files to /home/weewx/public_html
Jan 20 08:08:18 bullseye33 weewx[510] ERROR weewx.reportengine: Caught unrecoverable exception in generator 'user.polarwindplot.PolarWindPlotGenerator'
Jan 20 08:08:18 bullseye33 weewx[510] ERROR weewx.reportengine:         ****  float division by zero
Jan 20 08:08:18 bullseye33 weewx[510] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Jan 20 08:08:18 bullseye33 weewx[510] ERROR weewx.reportengine:         ****    File "/home/weewx/bin/weewx/reportengine.py", line 196, in run
Jan 20 08:08:18 bullseye33 weewx[510] ERROR weewx.reportengine:         ****      obj.start()
Jan 20 08:08:18 bullseye33 weewx[510] ERROR weewx.reportengine:         ****    File "/home/weewx/bin/weewx/reportengine.py", line 281, in start
Jan 20 08:08:18 bullseye33 weewx[510] ERROR weewx.reportengine:         ****      self.run()
Jan 20 08:08:18 bullseye33 weewx[510] ERROR weewx.reportengine:         ****    File "/home/weewx/bin/user/polarwindplot.py", line 169, in run
Jan 20 08:08:18 bullseye33 weewx[510] ERROR weewx.reportengine:         ****      self.genPlots(self.gen_ts)
Jan 20 08:08:18 bullseye33 weewx[510] ERROR weewx.reportengine:         ****    File "/home/weewx/bin/user/polarwindplot.py", line 288, in genPlots
Jan 20 08:08:18 bullseye33 weewx[510] ERROR weewx.reportengine:         ****      image = plot_obj.render(title)
Jan 20 08:08:18 bullseye33 weewx[510] ERROR weewx.reportengine:         ****    File "/home/weewx/bin/user/polarwindplot.py", line 1983, in render
Jan 20 08:08:18 bullseye33 weewx[510] ERROR weewx.reportengine:         ****      self.render_plot()
Jan 20 08:08:18 bullseye33 weewx[510] ERROR weewx.reportengine:         ****    File "/home/weewx/bin/user/polarwindplot.py", line 2070, in render_plot
Jan 20 08:08:18 bullseye33 weewx[510] ERROR weewx.reportengine:         ****      scale = plot_radius / self.max_vector_radius
Jan 20 08:08:18 bullseye33 weewx[510] ERROR weewx.reportengine:         ****  ZeroDivisionError: float division by zero
Jan 20 08:08:18 bullseye33 weewx[510] ERROR weewx.reportengine:         ****  Generator terminated

These dictionary items do not have defaults

    image_width = 382
    image_height = 361
    image_background_circle_color = 0xF5F5F5
    image_background_box_color = 0xF5C696
    image_background_range_ring_color = 0xC3D9DD
    image_background_image = none
    font_path = /usr/share/fonts/truetype/freefont/FreeSansBold.ttf
    plot_font_size  = 10
    plot_font_color = 0x000000
    plot_border = 5
    legend_bar_width = 10
    legend_font_size = 10
    legend_font_color = 0x000000
    label_font_size = 12
    label_font_color = 0x000000

My attempt at a minimal skin.conf for testing shows that the above items (possibly) should have defaults

Setting legend=False in rose/trail/spiral throws error

Suspect solution will be in line 562 ish...

Something like -

def render_legend(self):
        """Render a polar plot legend."""
                if self.legend = False
                     return
  • Test generation in test skin.config is currently commented out...uncomment it!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.