Skip to content

Commit f280d59

Browse files
Added readme
1 parent 8b8db5e commit f280d59

File tree

2 files changed

+58
-4
lines changed

2 files changed

+58
-4
lines changed

Readme.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
11
# pyobs allsky cloudcover
2+
[![Build](https://github.com/pyobs/pyobs-allsky-cloudcover/actions/workflows/build.yml/badge.svg)](https://github.com/pyobs/pyobs-allsky-cloudcover/actions/workflows/build.yml)
3+
[![Tests](https://github.com/pyobs/pyobs-allsky-cloudcover/actions/workflows/tests.yaml/badge.svg)](https://github.com/pyobs/pyobs-allsky-cloudcover/actions/workflows/tests.yaml)
24

3-
This modules
5+
This module analyzes Allsky images for cloud cover and writes the (zenith) cloud fraction and cloud change into an Influx DB.
6+
It also includes a web service to query celestial positions for the limiting magnitude, which is calculated in an intermediate step.
7+
8+
## How does it work?
9+
The module listens for a new image from the configured camera. If a new image has been captured, an image analysis pipeline is run on the image, depending on the solar altitude when the image was captured. Currently there is only a "night" pipeline, which works best after astronomical twilight (solar altitude below -18°).
10+
This pipeline estimates the limiting magnitude of each pixel based on the visibility of the stars. Pixels are considered cloudy if their limiting magnitude falls below a defined threshold.
11+
12+
## Web Service
13+
14+
Route: `/query?ra={Right ascension in degree}&dec={Declination in degree}`
15+
16+
### Result
17+
| Field | Type | Description |
18+
|----------|-------|-------------------------------------------------|
19+
| obs_time | float | Observation Unix time of the last analyzed image |
20+
| value | float | Limiting magnitude in mag |
21+
22+
23+
## Configuration
24+
25+
See [example.yaml](https://github.com/pyobs/pyobs-allsky-cloudcover/blob/main/example.yaml)

example.yaml

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
class: pyobs_cloudcover.application.Application
22

3+
# Camera which images are used for cloud detection
34
image_sender: "allskycam"
45

6+
# Astronomical solution
7+
# Possible models:
8+
# Simple Model
9+
# class: pyobs_cloudcover.world_model.SimpleModel
10+
# parameters: (a0, F, R, c_x, c_y) see https://ui.adsabs.harvard.edu/abs/2019A&A...626A.105B
11+
# WCS Model
12+
# class: pyobs_cloudcover.world_model.WCSModel
13+
# parameters:
14+
# file_path: Path to FITS file containing WCS
515
model:
616
class: pyobs_cloudcover.world_model.SimpleModel
717
a0: 4.81426598e-03
@@ -10,44 +20,66 @@ model:
1020
c_x: 7.57115607e+02
1121
c_y: 5.11194838e+02
1222

23+
# Web Service
1324
server:
25+
# Host Name
1426
url: "localhost"
27+
# Port
1528
port: 8080
1629

30+
# Influx DB
1731
measurement_log:
1832
url: ""
1933
bucket: ""
2034
org: ""
2135
token: ""
2236

37+
# Different image analysis pipelines can be used for different solar altitude intervals
38+
# Currently only the "night" pipeline is available, which works best after the astronomical dawn
2339
pipelines:
2440
night:
41+
# Solar altitude interval (in degree), in which this pipeline should be used
2542
alt_interval:
2643
start:
2744
end: -18
2845

2946
options:
3047
preprocessor:
48+
# Filepath to the image mask
3149
mask_filepath: "tests/integration/mask.npy"
50+
# Which image binning should be applied
3251
bin_size: 2
33-
bkg_sigma_clip: 3.0
34-
bkg_box_size: (5, 5)
3552

3653
catalog:
37-
filepath: "tests/integration/catalog.csv"
54+
# Filepath to the star catalog
55+
filepath: "data/catalog_v50.csv"
3856
filter:
57+
# Lower altitude boundary (in degree)
3958
alt: 30.0
59+
# Upper magnitude boundary (in mag)
4060
v_mag: 7.0
61+
# Minimum allowed distance between stars (in px after binning)
4162
distance: 0.0
4263

64+
# Determines the visibility of a star
4365
reverse_matcher:
66+
# How many standard deviations a signal has to be over the average brightness to count as a star detection
4467
sigma_threshold: 3.0
68+
# Maximum allowed distance between a signal and the calculated position of the star (in px)
69+
distance: 4.0
70+
# Maximum allowed median brightness of the window
71+
median_limit: 8e3
72+
# Rectangle around the calculated star position with 2 * window_size + 1 length, in which the star searched for (in px)
4573
window_size: 6.0
4674

4775
cloud_map:
76+
# Radius in which to use stars for estimating the limiting magnitude (in degree)
4877
radius: 7.0
78+
# Number of consecutive images in which a star has to be visible to be considered visible for the limiting magnitude estimation
4979
integration_length: 1
5080

5181
coverage_info:
82+
# Under which limiting magnitude a pixel is considered cloudy (in mag)
5283
cloud_threshold: 5.5
84+
# Radius around the zenith to average for the zenith cloud fraction measurement (in degree)
5385
zenith_radius: 20

0 commit comments

Comments
 (0)