mireianievas / pysqm Goto Github PK
View Code? Open in Web Editor NEWPython client for the Sky Quality Meter
Home Page: https://guaix.fis.ucm.es/splpr/SQM-REECL
License: GNU General Public License v3.0
Python client for the Sky Quality Meter
Home Page: https://guaix.fis.ucm.es/splpr/SQM-REECL
License: GNU General Public License v3.0
Hello,
to be displayed "mag/arcsec2" at the axis label correctly "mag/arcsec²" with the superscript ^2
can please anyone change the sourcecode in file "pysqm/plot.py" at
Line 456
self.thegraph_sunalt.set_ylabel('Sky Brightness (mag/arcsec2)',fontsize='medium')
to
self.thegraph_sunalt.set_ylabel('Sky Brightness (mag/arcsec$\mathregular{^2}$)',fontsize='medium')
Line 499
self.thegraph_time.set_ylabel('Sky Brightness (mag/arcsec2)',fontsize='medium')
to
self.thegraph_time.set_ylabel('Sky Brightness (mag/arcsec$\mathregular{^2}$)',fontsize='medium')
The command
Is it possible the write the Moonphase in the Statistics_SQM file. Could be usefull to check data for moonless nights?
Thanks
Got since 9th of June an error and -no- graph files anymore. The datafiles are okay and contain the SQM values, as usual.
The Error at the cronlog:
Plotting photometer data ...
Warning: Error plotting data.
(<class 'ephem.AlwaysUpError'>, AlwaysUpError("'Sun' is above the horizon at 2022/6/9 23:25:56",), <traceback object at 0xb498dc88>)
.........................350 2022-06-11T02:01:14.000;2022-06-11T04:01:14.000;15.34;45188.800;10.213;17.392
.........................355 2022-06-11T02:04:44.000;2022-06-11T04:04:44.000;15.16;28115.000;16.411;16.877
.........................360 2022-06-11T02:08:14.000;2022-06-11T04:08:14.000;15.10;23277.200;19.843;16.674
Plotting photometer data ...
Warning: Error plotting data.
(<class 'ephem.AlwaysUpError'>, AlwaysUpError("'Sun' is above the horizon at 2022/6/9 23:25:56",), <traceback object at 0xb498dee0>)
.........................365 2022-06-11T02:11:45.000;2022-06-11T04:11:45.000;15.10;21047.000;21.848;16.558
.........................370 2022-06-11T02:15:15.000;2022-06-11T04:15:15.000;15.10;13672.000;33.600;16.094
.........................375 2022-06-11T02:18:46.000;2022-06-11T04:18:46.000;15.10;9478.800;48.800;15.695
The files an the pi were untouched since months (yes, rebooted several times), so some file modification can't be an issue.
i think its because there is no night anymore (location coordinates around 51° N).
My knowledge of the code and python itself is very limited ... but it must be somewhere at file plot.py, around line 260 after 'Sun = ephem.Sun(Ephem.Observatory)' .
Can the ephem error(s) being catched by the following construct:
try:
[something]
except (ephem.AlwaysUpError, ephem.NeverUpError):
pass
It should be catched (or the not-set variable filled with standard value), that on those dates without a true night a plot is being created. The Values are complete present, only the graph is missing on these days.
:)
The code calling the save_data_datacenter()
uses an assertion to shield against sending data, if the feature is deactivated.
Like so:
config._send_to_datacenter = False ### Not enabled by default
try:
assert(config._send_to_datacenter == True)
assert(niter == 0)
mydevice.save_data_datacenter("NEWFILE")
except: pass
This means, the code IS run, when running with "python -O" according to python assert documentation.
This could create a GDPR risk for the server's operators for european users, as this leaks the observatory location - which very often may be the home address of the respective operators (One "not amused" user will be enough). To make matters worse data is sent in clear text over an unencrypted channel.
I see MySQL settings in config.py
but how should I create the MySQL table for PySQM to be able to save readings?
Since Python2 has been sunsetted on Jan, 1st, 2020, i.e. no updates since then. PySQM needs to be updated to use Python3.
Plugged in the SQM-LU at the Raspi4, Installed the package, edited the config.py, created the temp dir, but when i tried to run it by python i got this:
Also tried 'python2 -m pysqm' and 'python2.7 -m pysqm' .. result was the same.
What am i doing wrong?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.