PySQM the UCM open source software to read, plot and store data from SQM photometers



Similar documents
Definition of the community standard for skyglow observations

Working paper: Sky Quality Meter cross-calibration in the BMP project

More Information on Light Pollution

How to install phpbb forum on NTU student club web server

Demo of Data transferring (.CSV Files) from EGX300 to Our local PC/Laptop using- FTP

Online Monitoring User Guide

USER GUIDE. Diagnostic Web Server FW ver BrightSign, LLC Lark Ave., Suite B Los Gatos, CA

To perform Ethernet setup and communication verification, first perform RS232 setup and communication verification:

POPP Hub Gateway. Manual

Home Station ADSL. You may also use the following address (regardless of whether you have changed the primary address or not):

POS Integration. Prepared by: Binh Nguyen

NI InsightCM Server Version 1.0

Assets, Groups & Networks

Prestige 650R-31/33 Read Me First

Setup Manual and Programming Reference. RGA Ethernet Adapter. Stanford Research Systems. Revision 1.05 (11/2010)

Birriel et al., JAAVSO Volume 38, 2010

Honeywell Internet Connection Module

Gigabyte Management Console User s Guide (For ASPEED AST 2400 Chipset)

ServerView Inventory Manager

Quick Note 32. Using Digi RealPort with a Digi TransPort Router. UK Support September 2012

Example Program for Crestron - Setup Guide -

MAGIC TH6. System Configuration SW Version 2.000

IP Phone Configuration and Troubleshooting Guide

V2.0 Attendance System Hardware Suite Guide Instructions Manual

Setting up an MS SQL Server for IGSS

ALOHA Load Balancer Quickstart guide

Axel Remote Management

IP Surveillance TroubleShooting Guide Version: 0.9 Release:

Ethernet Radio Configuration Guide

InventoryControl for use with QuoteWerks Quick Start Guide

GV-Data Capture V3 Series User's Manual

ACR Triad Site Server Click Once Software System

Gigabyte Content Management System Console User s Guide. Version: 0.1

System Overview and Terms

Maintaining the Content Server

Evaluating the Accuracy of Maxim Real-Time Clocks (RTCs)

USER GUIDE. Diagnostic Web Server FW ver BrightSign, LLC Lark Ave., Suite B Los Gatos, CA

Internet Filtering Appliance. User s Guide VERSION 1.2

Korosi Monitoring System (KMS) Software Manual

Network Management Card. User Manual

How To Test The Bandwidth Meter For Hyperv On Windows V (Windows) On A Hyperv Server (Windows V2) On An Uniden V2 (Amd64) Or V2A (Windows 2

DAKTON µ BOX MANUAL µbox User Manual 1

TX3 Series TELEPHONE ACCESS SYSTEMS. Configurator Quick Start. Version 2.2 Mircom Copyright 2014 LT-973

How to deploy console cable to connect WIAS-3200N and PC, to reset setting or check status via console

IP BOOT MANAGER 9280 USERS MANUAL. IP Boot Manager 9280 User Manual

SETTING UP A WEATHER DATA WEB PAGE Application Note 26

CONNECTING TO DEPARTMENT OF COMPUTER SCIENCE SERVERS BOTH FROM ON AND OFF CAMPUS USING TUNNELING, PuTTY, AND VNC Client Utilities

Configuring the WT-4 for ftp (Ad-hoc Mode)

I2C PRESSURE MONITORING THROUGH USB PROTOCOL.

System Area Manager. Remote Management

VRC 7900/8900 Avalanche Enabler User s Manual

Foglight Experience Monitor and Foglight Experience Viewer

TAO Installation Guide v0.1. September 2012

USER S MANUAL. AXIS Mobile Monitor

Data Transfer Management with esync 1.5

LifeSize Networker Installation Guide

CONTROL CODE GENERATOR USED FOR CONTROL EXPERIMENTS IN SHIP SCALE MODEL

Setting up the local FTP server

Extreme Control Center, NAC, and Purview Virtual Appliance Installation Guide

MANUAL FOR RX700 LR and NR

This section will focus on basic operation of the interface including pan/tilt, video, audio, etc.

DAS202Tools v1.0.0 for DAS202 Operating Manual

A6210 WiFi USB Adapter ac USB 3.0 Dual Band User Manual

Configuring the WT-4 for ftp (Infrastructure Mode)

AdRadionet to IBM Bluemix Connectivity Quickstart User Guide

OSM 2007 MONITORING SOFTWARE

mysensors mysensors Wireless Sensors and Ethernet Gateway Quick Start Guide Information to Users Inside the Box mysensors Ethernet Gateway Quick Start

IceWarp Server. Log Analyzer. Version 10

EM6230 e-camview HD outdoor IP camera

SC-T35/SC-T45/SC-T46/SC-T47 ViewSonic Device Manager User Guide

Savvius Insight Initial Configuration

SMS Alarm Messenger. Setup Software Guide. SMSPro_Setup. Revision [Version 2.2]

Sharp Remote Device Manager (SRDM) Server Software Setup Guide

Device Support in PowerLogic ION Enterprise 5.6 Service Pack 2

Addonics T E C H N O L O G I E S. NAS Adapter. Model: NASU Key Features

Switch Quick Configuration CLI Guide for

DataLINE Data Retrieval

Installing The SysAidTM Server Locally

Deploying Windows Streaming Media Servers NLB Cluster and metasan

JUL / 07 VERSION 3.2

Lenovo IdeaCentre Q180 Series

Update Firmware from GUI

AKIPS Network Monitor Installation, Configuration & Upgrade Guide Version 16. AKIPS Pty Ltd

TDP43ME NetPS. Network Printer Server. Control Center. for Ethernet Module

PC/POLL SYSTEMS Version 7 Polling SPS2000 Cash Register TCP/IP Communications

Device Log Export ENGLISH

19 LCD / 8 CHANNEL DVR COMBO WITH 160GB HDD & 4 CAMERAS

Compulite File Server

- 1 - SmartStor Cloud Web Admin Manual

Download Software 2.33 For Vigil civil I, II, 2 + & Military II, II+, II+c -

Management Software. Web Browser User s Guide AT-S106. For the AT-GS950/48 Gigabit Ethernet Smart Switch. Version Rev.

USB Edition TM-STD30 User Guide

Clock Link Installation Guide. Detailed brief on installing Clock Link

801.11n Wireless Broadband Router

LOREX CLIENT Remote Software 4.0

BlackHawk for MAC Software User Guide

Table of Contents. 1. Introduction PDU Package Function Installation Web Interface...7

CM400 High Speed Cable Modem User Manual

MEDIA CONTROL SERVER 2.0

Transcription:

Departamento de Astrofísica y Ciencias de la Atmósfera Grupo de Astrofísica Extragaláctica e Instrumentación Astronómica PySQM the UCM open source software to read, plot and store data from SQM photometers Authors: Miguel Nievas & Jaime Zamorano Version 1.2 2014/06/17 Abstract A multi platform software (PySQM) has been designed to read, store and plot data from Unihedron SQM- LE and SQM- LU photometers. It is intended to record night sky brightness data obtained with fixed SQM photometers. PySQM is distributed as open source software. 1. Introduction The Sky Quality Meter (SQM) photometers are simple and reliable devices that are intended to measure the night sky brightness (NSB) with a precision around 0.1 mag/arcsec 2 as stated by the manufacturer [1] (http://www.unihedron.com) and tested by several studies ([2], [3], [4], [5]). They have in addition a very wide dynamic range, of more than 10mag/arcsec2, which makes them suitable to study the sky brightness under very different conditions. The SQM photometers are also user friendly and not expensive. All these characteristics have made the SQM very popular and it has become a de facto standard device used by many researchers and people interested in light pollution studies. Besides the SQM- L photometers, designed for hand held measures, there are some models whose data can be read from a computed connected via USB link (SQM- LU) or a LAN cable (SQM- LE). The information about the reading protocol is provided by Unihedron and there are some software available like SQM Reader, a free program that reads and displays data from SQMs, and SQM Reader Pro which has more features, both from Knightware (http://knightware.biz/sqm/index.htm). Some research groups are setting SQM networks to monitor night sky brightness with the aim of studying the NSB evolution ([6], [7], [8]). There is an increasing interest in comparing measurements from different sites, and to develop databases containing long term measurements from around the world. This is why at the Cabauw Lightmeter InterComparison (CLIC) workshop in May 2012, a group of light pollution researchers defined a proposal for a new, standard format to be used for recording skyglow measurement. The "NSBM Community Standards for Reporting Skyglow Observations" was officially adopted at the 12th European Symposium for the Protection of the Night Sky and endorsed by The International Dark Sky Association (IDA) and also by the International Astronomical Union (IAU) in Beijing 2012 (SpS17: "Light Pollution: Protecting Astronomical Sites and Increasing Global Awareness

through Education") (extracted from IDA webpage http://www.darksky.org/night- sky- conservation/248). The ascii files (one for each night) should include a header and the NSB data (including date and time) with an standard format. A preliminary version of this standard was defined at the Cabauw Lightmeter Inter Comparison Workshop in May, 2012 and the first version is described in [9, 10] We have written PySQM as 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 IDA and IAU NSB standard format. 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. This software has been developed by Miguel Nievas (UCM) with the invaluable help of: Jaime Zamorano (UCM), Laura Barbas (OAN) & Pablo de Vicente (OAN). 2. How it works 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. These calibration measures are added to the NSB file header, prior to the real data. After that, the program begins data acquisition. In every iteration, it checks whether it is night time or not by calculating the sun altitude for the given location and comparing with an user defined threshold. In that case new data is taken and stored in 2 different files, the first for the current night and the last one for the accumulated monthly data. The main program calls a plotting function every N measurements to generate a graphical representation of the current nightly data. The results for some SQM devices in Spain can be browsed at http://guaix.fis.ucm.es/sqm- UCM Figure 1: Plot of the night 2013 September 01 to 02 for the SQM located at Observatorio UCM obtained with PySQM. Night sky brightness in magn/arcsec2 versus time (lower panel) and versus solar altitude (upper panel). During a typical night the sky is darker in the second part of the night when the human activity is lower and some ornamental lights are switched off. The pink shadow indicates the presence of the Moon over the horizon. Higher NSB values mean darker skies.

Figure 2: Plot of the night 2014 March 22 to 23 for the SQM located at Villaverde del Ducado (a small village in a rural area 130 km from Madrid). The night sky is darker than Madrid's sky, as expected. Some episodes of clouds during the night are clearly marked as a brightening of the sky. When the Moon rises the sky brightens. Dashed vertical lines correspond to the astronomical twilight. Part of the data file for the night plotted in figure 2 follows: # Definition of the community standard for skyglow observations 1.0 # URL: http://www.darksky.org/nsbm/sdf1.0.pdf # Number of header lines: 35 # This data is released under the following license: ODbL 1.0 http://opendatacommons.org/licenses/odbl/summary/ # Device type: SQM- LE # Instrument ID: SQM_LE- VILLAVERDE # Data supplier: Jaime Zamorano / Universidad Complutense de Madrid # Location name: Villaverde del Ducado/Spain - Observatorio VILLAVERDE # Position: 41.002703, - 2.490978, 1100 # Local timezone: UTC+1 # Time Synchronization: NTP # Moving / Stationary position: STATIONARY # Moving / Fixed look direction: FIXED # Number of channels: 1 # Filters per channel: HOYA CM- 500 # Measurement direction per channel: 0., 0. # Field of view: 20 # Number of fields per line: 6 # SQM serial number: 845 # SQM firmware version: 14 # SQM cover offset value: - 0.11 # SQM readout test ix: i,00000004,00000003,00000014,00000845 # SQM readout test rx: r, 14.61m,0000000117Hz,0000003598c,0000000.008s, 018.3C # SQM readout test cx: c,00000019.88m,0000300.000s, 025.7C,00000008.71m, 029.0C # Comment: # Comment: # Comment: # Comment: # Comment: Capture program: PySQM # blank line 30 # blank line 31

# blank line 32 # UTC Date & Time, Local Date & Time, Temperature, Counts, Frequency, MSAS # YYYY- MM- DDTHH:mm:ss.fff;YYYY- MM- DDTHH:mm:ss.fff;Celsius;number;Hz;mag/arcsec^2 # END OF HEADER 2014-03- 22T17:28:01.000;2014-03- 22T18:28:01.000;21.20;0.000;535487.250;- 0.000 2014-03- 22T17:28:43.000;2014-03- 22T18:28:43.000;21.20;0.000;535492.250;- 0.000 2014-03- 22T17:29:25.000;2014-03- 22T18:29:25.000;21.20;0.000;535514.200;- 0.000 - - - - - 2014-03- 22T20:40:19.000;2014-03- 22T21:40:19.000;15.40;1785195.250;0.258;21.370 2014-03- 22T20:41:01.000;2014-03- 22T21:41:01.000;15.40;1916379.600;0.240;21.458 2014-03- 22T20:41:43.000;2014-03- 22T21:41:43.000;15.40;1944375.250;0.237;21.470 2014-03- 22T20:42:25.000;2014-03- 22T21:42:25.000;15.40;1966964.000;0.234;21.480 2014-03- 22T20:43:06.000;2014-03- 22T21:43:06.000;15.40;1953631.000;0.236;21.480 2014-03- 22T20:43:48.000;2014-03- 22T21:43:48.000;15.40;1969286.250;0.234;21.490 2014-03- 22T20:44:30.000;2014-03- 22T21:44:30.000;15.40;1981012.333;0.233;21.490 2014-03- 22T20:45:12.000;2014-03- 22T21:45:12.000;15.40;1974723.500;0.233;21.492 2014-03- 22T20:45:54.000;2014-03- 22T21:45:54.000;15.40;1981154.333;0.233;21.490 - - - - - - 2014-03- 22T22:40:06.000;2014-03- 22T23:40:06.000;13.20;2055410.750;0.224;21.532 2014-03- 22T22:40:48.000;2014-03- 22T23:40:48.000;13.20;2083115.333;0.221;21.550 2014-03- 22T22:41:30.000;2014-03- 22T23:41:30.000;13.20;2100927.333;0.219;21.560 2014-03- 22T22:42:12.000;2014-03- 22T23:42:12.000;13.20;2043240.000;0.226;21.522 - - - - - - 2014-03- 23T07:03:52.000;2014-03- 23T08:03:52.000;12.20;0.000;534058.400;- 0.000 2014-03- 23T07:04:34.000;2014-03- 23T08:04:34.000;12.50;0.000;534042.400;- 0.000 2014-03- 23T07:05:16.000;2014-03- 23T08:05:16.000;12.50;0.000;534002.000;- 0.000 2014-03- 23T07:05:58.000;2014-03- 23T08:05:58.000;12.50;0.000;534046.667;- 0.000 Figure 3. : The plots of some two SQM located at Observatorio UCM and near Alcalá de Henares for the same night obtained with PySQM at http://guaix.fis.ucm.es/sqm- UCM

3. Software setup After downloading the software, you need to modify the file pysqm/config.py. 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). 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. The configuration file for Villaverde del Ducado SQM- LU is reproduced as an example #!/usr/bin/env python PySQM reading program Configuration File Configuration variables. Change it as needed for your observatory. NOTE: Python syntax is mandatory. _observatory_name = 'VILLAVERDE' _observatory_latitude = 41.002703 _observatory_longitude = - 2.490978 _observatory_altitude = 1100 _observatory_horizon = 10 # If Sun is below this altitude, the program will take data _device_shorttype = 'SQM_LU' # Device STR in the file _device_type = 'SQM_LU' # Device type in the Header _device_id = _device_type + '- ' + _observatory_name # Long Device lame _device_locationname = 'Villaverde del Ducado/Spain - Observatorio VILLAVERDE' # Device location in the world _data_supplier = 'Jaime Zamorano / Universidad Complutense de Madrid' # Data supplier (contact) _device_addr = 'COM7' # Default IP address of the ethernet device (if not automatically found) _measures_to_promediate = 5 # Take the mean of N measures _delay_between_measures = 20 # Delay between two measures. In seconds. _cache_measures = 5 # Get X measures before writing on screen/file _plot_each = 60 # Call the plot function each X measures. _use_mysql = False # Set to True if you want to store data on a MySQL db. _mysql_host = None # Host (ip:port / localhost) of the MySQL engine. _mysql_user = None # User with write permission on the db. _mysql_pass = None # Password for that user. _mysql_database = None # Name of the database. _mysql_port = None # Port of the MySQL server. _local_timezone = +1 # UTC+1 _computer_timezone = +0 # UTC _offset_calibration = - 0.11 # magnitude = read_magnitude + offset _reboot_on_connlost = False # Reboot if we loose connection # Monthly (permanent) data monthly_data_directory = "C:/Users/Jaime/Dropbox/sqm_villaverde/SQM_LU/" # Daily (permanent) data daily_data_directory = monthly_data_directory+"/datos_diarios/"

# Daily (permanent) graph daily_graph_directory = monthly_data_directory+"/graficos_diarios/" # Current data, deleted each day current_data_directory = monthly_data_directory # Current graph, deleted each day. current_graph_directory = monthly_data_directory # Summary with statistics for the night summary_data_directory = monthly_data_directory Ploting options limits_nsb = [18.5,22.0] # Limits in Y- axis limits_time = [17,9] # Hours limits_sunalt = [- 80,5] # Degrees Email options _send_data_by_email = False 4. How to run PySQM After configuring the software, make sure you are in the parent directory were the README, LICENSE and MANIFEST files are located > ls LICENSE.txt MANIFEST.in README.txt pysqm setup.py And then run the software. > python - m pysqm The program should find your SQM device and the data acquisition will start (if it's night- time). 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: > python2 - m pysqm or (if you have more than one versions of python2), > python2.7 - m pysqm Note: running the setup.py script is neither tested nor necessary at the moment. The program is currently being redesigned as a normal python package, but at present no setup is required. There is an additional way of running PySQM, only available for Microsoft Windows platforms now, by using the selft- contained PySQM.exe file. It contains both the program and the Python interpreter, so it is no need to set up python 2.7. In this case, only two files are needed: the executable PySQM.exe and the configuration file config.py. Both files should be stored in the same directory. 5. PySQM output The measurements taken by the connected SQM are displayed in the console along with the date and time. Periodically, a new NSB plot is generated. At the same time NSB plot is generated and can be displayed in real time. The same is true for the standard file with the measurements. At any time of the night there is a provisional ascii file a png image with the data up to this time. At the end of the night these files

with all the data for the night are closed. The files are named using the date and location name (for instance 20131017_1200000_SQM_LU- VILLAVERDE.dat and.png) and they are stored in dedicated directories. PySQM also yield a monthly file including the data for all the nights of the month. 6. PySQM download If you wish to use it, please download the PySQM software from the PySQM webpage: http://guaix.fis.ucm.es/pysqm 7. Final remarks More info including known issues, FAQ and troubleshooting in the PySQM info page http://guaix.fis.ucm.es/pysqm_info References [1] "Sky Quality Meter Lens Ethernet Users manual". Unihedron (2009) Unihedron, Grimsby, Ontario, revision 1.22 [2] "Night sky photometry with sky quality meter". Cinzano P. (2005) Technical Report 9, ISTIL. V1.4. [3] "Sky Quality Meter cross- calibration in the BMP project" Francesco Giubbilini, Andrea Giacomelli March 2011 http://www.attivarti.org/bmp/out/docsito/bmpcrosscalibration2011.pdf [4] "Calibration of SQM- L photometers for the NixNox project" Zamorano, Jaime and Muñoz Marín, Víctor Manuel (2010) http://eprints.ucm.es/12262/ [5] "Sky Quality Meter cross- calibration for the NixNox project " Zamorano, Jaime and Ruiz Carmona, Roque (2013) http://eprints.ucm.es/18015/ [6] "Contributions of artificial lighting sources on light pollution in Hong Kong measured through a night sky brightness monitoring network" Chun Shing Jason Pun, Chu Wing So, Wai Yan Leung & Chung Fai Wong (2014) Journal of Quantitative Spectroscopy and Radiative Transfer Volume 139, Pages 90 108 [7] "Night sky photometry and spectroscopy performed at the Vienna University Observatory" Johanes Puschnig, Thomas Posch & Stefan Uttenthaler, (2014) Journal of Quantitative Spectroscopy and Radiative Transfer Volume 139, Pages 64-75 [8] "The night sky brightness at Potsdam- Babelsberg including overcast and moonlit conditions" Johanes Puschnig, Axel Schwope, Thomas Posch & Robert Schwartz (2014) Journal of Quantitative Spectroscopy and Radiative Transfer Volume 139, Pages 76-81 [9] "A community standard for recording skyglow data" (2012) C. Kyba & D.E.

Lolkema A&G (2012) 53 (6): 6.17-6.18. doi: 10.1111/j.1468-4004.2012.53617.x [10] "Definition of the community standard for skyglow observations" Version 1.0 April 10, 2013 http://www.darksky.org/nsbm/sdf1.0.pdf Acknowledgements The software has been developed and tested at Universidad Complutense de Madrid, Dept. of Astrofísica y CC. de la Atmósfera and Dept. of Física Atómica Molecular and Nuclear. This work has been partially funded by the Spanish MICINN (AYA2009-10368, AYA2012-30717, AYA2012-31277 and FPA2010-22056- C06-06), by the Spanish program of International Campus of Excellence Moncloa (CEI) and by the Madrid Regional Government through the AstroMadrid Project (CAM S2009/ESP- 1496). The devices were tested at Laboratorio de Investigación Científica Avanzada (LICA), a facility of UCM- UPM Campus de Excelencia Internacional. The support of the Spanish Network for Light Pollution Studies (Ministerio de Economía y Competitividad, Acción Complementaria AYA2011-15808- E) is acknowledged.