Skip to content
Snippets Groups Projects
Commit 354b44e1 authored by Dario Barghini's avatar Dario Barghini
Browse files

Update README.md

parent 40d649fb
No related branches found
No related tags found
No related merge requests found
PySQM # PySQM
=====
PySQM is a multi-platform, open-source software designed to read and PySQM is a multi-platform, open-source software designed to read and plot data from Unihedron SQM-LE and SQM-LU photometers, giving as an output files with the 'International Dark Sky Association (IDA) NSBM Community Standards for Reporting Skyglow Observations' format (http://www.darksky.org/night-sky-conservation/248).
plot data from Unihedron SQM-LE and SQM-LU photometers, giving as
an output files with the 'International Dark Sky Association (IDA)
NSBM Community Standards for Reporting Skyglow Observations' format
(http://www.darksky.org/night-sky-conservation/248).
PySQM is distributed under GNU GPL, either version 3 of the License, PySQM is distributed under GNU GPL, either version 3 of the License, or (at your option) any later version. See the file LICENSE.txt for details.
or (at your option) any later version. See the file LICENSE.txt for details.
This software has been developed by Mireia Nievas <mnievas@ucm.es> with This software has been developed by Mireia Nievas <mnievas@ucm.es> with the invaluable help of:
the invaluable help of:
- Sergio Pascual (UCM) - Sergio Pascual (UCM)
- Jaime Zamorano (UCM) - Jaime Zamorano (UCM)
...@@ -20,39 +13,32 @@ the invaluable help of: ...@@ -20,39 +13,32 @@ the invaluable help of:
The initial port to Python3 has been done by Anthony Tekatch (Unihedron). The initial port to Python3 has been done by Anthony Tekatch (Unihedron).
SETUP This repository was created to host the PySQM version deployed in the SQM LE (Unihedron) of the Photometre Network of the Darkersky4CE Interreg Central Europe project (https://www.interreg-central.eu/projects/darkersky4ce/).
=====
After downloading the software, you need to modify the file config.py. ### Setup
In this file you will find several variables that need to be configured
to match your hardware settings. For example:
- Location of the observatory (geographical coordinates). After downloading the software, you need to modify the file config.py. In this file you will find several variables that need to be configured to match your hardware settings. For example:
- Device identifier.
- Device address (either IP address for SQM-LE or COM/ttyUSB port).
- Location of the data files.
- Axis limits for the plot.
Remember that python (2.7) syntax is mandatory in this file - Location of the observatory (geographical coordinates)
- Device identifier
- Device address (either IP address for SQM-LE or COM/ttyUSB port)
- Location of the data files
- Axis limits for the plot
Remember that python (2.7) syntax is mandatory in this file
HOW TO USE THE SOFTWARE ### How to use the software
=======================
After configuring the software, make sure you are in the parent directory were After configuring the software, make sure you are in the parent directory were the README, LICENSE and MANIFEST files are located
the README, LICENSE and MANIFEST files are located
> ls > ls
LICENSE.txt MANIFEST.in README.txt pysqm config.py setup.py LICENSE.txt MANIFEST.in README.txt pysqm config.py setup.py
And then run the software. And then run the software.
> python -m pysqm > python -m pysqm
The program should find your SQM device and the data adquisition.will start The program should find your SQM device and the data adquisition.will start (if it's night-time).
(if it's night-time).
In some systems, where python3 is the default version of python, you need In some systems, where python3 is the default version of python, you need to specify python2 as the interpreter to use. This is done usually running it as:
to specify python2 as the interpreter to use. This is done usually running
it as:
> python2 -m pysqm > python2 -m pysqm
...@@ -60,49 +46,40 @@ or ...@@ -60,49 +46,40 @@ or
> python2.7 -m pysqm > python2.7 -m pysqm
Note: running the setup.py script is neither tested nor required. Note: running the setup.py script is neither tested nor required. The program is currently being redesigned as a normal python package, but at present no setup is required.
The program is currently being redesigned as a normal python package, but at
present no setup is required.
HOW IT WORKS ### How it works
============
In a first step, the program tries to connect to the SQM photometer and takes In a first step, the program tries to connect to the SQM photometer and takes some 'tests' measures (metadata/information, calibration and data) to check that the device is working as expected.
some 'tests' measures (metadata/information, calibration and data) to check
that the device is working as expected.
After that, the program begins data acdquisition. In each iteration, it checks After that, the program begins data acdquisition. In each iteration, it checks whether it is night-time. In that case new data is taken.
whether it is night-time. In that case new data is taken.
Each N measurements, the main program calls a plotting function to generate Each N measurements, the main program calls a plotting function to generate a graphical representation of the current nightly data.
a graphical representation of the current nightly data.
PySQM known issues ### PySQM known issues
==================
Non-ASCII characters are not supported in the config.py file. Please, avoid using 'ñ', accented vowels, etc. Non-ASCII characters are not supported in the config.py file. Please, avoid using 'ñ', accented vowels, etc.
In headless systems, such as the Raspberry PI, if you run the program without X, you may suffer from the following fatal error when the program tries to generate the plot: In headless systems, such as the Raspberry PI, if you run the program without X, you may suffer from the following fatal error when the program tries to generate the plot:
This application failed to start because it could not find or load the Qt platform plugin “xcb”. > This application failed to start because it could not find or load the Qt platform plugin “xcb”.
Available platform plugins are: eglfs, kms, linuxfb, minimal, minimalegl, offscreen, xcb. > Available platform plugins are: eglfs, kms, linuxfb, minimal, minimalegl, offscreen, xcb.
Reinstalling the application may fix this problem. Aborted (core dumped) > Reinstalling the application may fix this problem. Aborted (core dumped)
In order to avoid this problem, you need to create (or modify if the file exists) in your HOME directory the following file: In order to avoid this problem, you need to create (or modify if the file exists) in your HOME directory the following file:
.config/matplotlib/matplotlibrc > .config/matplotlib/matplotlibrc
You just need to set the matplotlib backend to Agg: You just need to set the matplotlib backend to Agg:
backend : Agg > backend : Agg
Save the changes and exit. Now, PySQM should make the plots without issues. You may need to restart PySQM to apply the changes. Save the changes and exit. Now, PySQM should make the plots without issues. You may need to restart PySQM to apply the changes.
Path to EXE files (windows only): Path to EXE files (windows only):
https://www.dropbox.com/s/xlbr6ktk8spjsse/PySQM.exe?dl=0 https://www.dropbox.com/s/xlbr6ktk8spjsse/PySQM.exe?dl=0
CHANGELOG ### CHANGELOG
=========
v0.3: v0.3:
Added datacenter option (optional, disabled by default) Added datacenter option (optional, disabled by default)
...@@ -112,4 +89,3 @@ v0.2: ...@@ -112,4 +89,3 @@ v0.2:
v0.1: v0.1:
... ...
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment