Skip to content

Commit

Permalink
Merge branch 'pietern:main' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
nqbit authored Apr 9, 2022
2 parents cb3e5ae + 9f21e52 commit 8947495
Show file tree
Hide file tree
Showing 49 changed files with 689 additions and 374 deletions.
11 changes: 0 additions & 11 deletions .circleci/build.sh

This file was deleted.

16 changes: 0 additions & 16 deletions .circleci/config.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .circleci/install.sh

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
"Ubuntu":
strategy:
fail-fast: false
matrix:
version:
- "16.04"
- "18.04"
- "20.04"
- "21.04"
- "21.10"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- run: docker build --tag build:ubuntu-${{ matrix.version }} --build-arg version=${{ matrix.version }} docker/ubuntu
name: "docker build"
- run: docker run --detach --interactive --name build --volume $PWD:/goestools build:ubuntu-${{ matrix.version }}
name: "docker run"
- run: docker exec -t build /run_cmake.sh
name: "cmake"
- run: docker exec -t build /run_compile.sh
name: "make"
51 changes: 51 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Documentation

on:
push:
paths:
- 'docs/**'
branches:
- main
pull_request:
paths:
- 'docs/**'
branches:
- main

jobs:
"Build":
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
cache: 'pip'
- run: pip install -r docs/requirements.txt
- run: make html
working-directory: docs
- uses: actions/upload-artifact@v2
with:
path: docs/_build/html

"Deploy":
needs: "Build"
if: success() && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: refs/heads/gh-pages
# Remove all tracked files such that we're left with a snapshot of the artifact.
- name: clean
run: git ls-files -z | xargs -0 rm -f
- uses: actions/download-artifact@v2
- name: commit
run: |
rsync -a artifact/ .
rm -rf artifact
git add -A
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git commit --allow-empty -m "Snapshot of $GITHUB_SHA"
- name: push
run: git push origin gh-pages
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,14 @@ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm")
endif()
endif()

set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/vendor/sanitizers-cmake/cmake ${CMAKE_MODULE_PATH})
find_package(Sanitizers)
if(SANITIZE_ADDRESS OR SANITIZE_MEMORY OR
SANITIZE_THREAD OR SANITIZE_UNDEFINED)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/vendor/sanitizers-cmake/cmake ${CMAKE_MODULE_PATH})
find_package(Sanitizers)
else()
function(add_sanitizers)
endfunction()
endif()

# Force static build of libaec
set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "" FORCE)
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,14 @@ convert -loop 0 -delay 50 *.png GOES15_FD_VS_20170821.gif

## Resources

All PDFs at http://www.noaasis.noaa.gov/LRIT/pdf-files/ are useful, in
particular the receiver specs, transmitter specs, and mission data
documents.

* http://www.noaasis.noaa.gov/LRIT/pdf-files/3_LRIT_Receiver-specs.pdf
* http://www.noaasis.noaa.gov/LRIT/pdf-files/4_LRIT_Transmitter-specs.pdf
* http://www.noaasis.noaa.gov/LRIT/pdf-files/5_LRIT_Mission-data.pdf
Because HRIT is similar to LRIT at a higher baud rate, documentation for
LRIT is also relevant for HRIT. The documents below used to be hosted
by NOAA until ~2020. They're mirrored here for posterity (thanks @gojimmypi;
see https://github.com/pietern/goestools/pull/102).

* [LRIT Receiver Specification](./docs/files/3_LRIT_Receiver-specs.pdf)
* [LRIT Transmitter Specification](./docs/files/4_LRIT_Transmitter-specs.pdf)
* [LRIT Mission Specific Data](./docs/files/5_LRIT_Mission-data.pdf)

Also, these blog series:

Expand Down
19 changes: 19 additions & 0 deletions docker/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
ARG version
FROM ubuntu:${version}

ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=UTC

RUN apt-get update && apt-get install -y \
build-essential \
cmake \
git-core \
libairspy-dev \
libopencv-dev \
libproj-dev \
librtlsdr-dev \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*

COPY ./run_cmake.sh /
COPY ./run_compile.sh /
7 changes: 7 additions & 0 deletions docker/ubuntu/run_cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

set -e

mkdir -p /tmp/goestools
cd /tmp/goestools
cmake /goestools
6 changes: 6 additions & 0 deletions docker/ubuntu/run_compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

set -e

cd /tmp/goestools
make -j $(nproc)
3 changes: 3 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# full list see the documentation:
# http://www.sphinx-doc.org/en/stable/config

import sphinx_rtd_theme

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
Expand Down Expand Up @@ -77,6 +79,7 @@
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down
Binary file added docs/files/3_LRIT_Receiver-specs.pdf
Binary file not shown.
Binary file added docs/files/4_LRIT_Transmitter-specs.pdf
Binary file not shown.
Binary file added docs/files/5_LRIT_Mission-data.pdf
Binary file not shown.
4 changes: 3 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ sphinx
sphinx-autobuild
sphinx_rtd_theme
pygments-github-lexers
hg+https://bitbucket.org/birkenfeld/sphinx-contrib#subdirectory=googleanalytics
# Note: this refers to a fork because upstream is not compatible with newer Sphinx versions.
# See https://github.com/sphinx-contrib/googleanalytics/pull/1.
git+https://github.com/jelmer/googleanalytics@983680d
16 changes: 7 additions & 9 deletions docs/resources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ About the satellites and the signals (GOES-R series):
* https://www.goes-r.gov/users/grb.html
* https://www.goes-r.gov/users/docs/GRB_downlink.pdf

Since HRIT is a higher baud rate LRIT, all the docs about the LRIT
signal and file format still apply:

* http://www.noaasis.noaa.gov/LRIT/pdf-files/3_LRIT_Receiver-specs.pdf
* http://www.noaasis.noaa.gov/LRIT/pdf-files/4_LRIT_Transmitter-specs.pdf
* http://www.noaasis.noaa.gov/LRIT/pdf-files/5_LRIT_Mission-data.pdf
* All PDFs at http://www.noaasis.noaa.gov/LRIT/pdf-files/ are useful,
in particular the receiver specs, transmitter specs, and mission
data documents.
Because HRIT is similar to LRIT at a higher baud rate, documentation for
LRIT is also relevant for HRIT. The documents below used to be hosted
by NOAA until ~2020. They're mirrored here for posterity.

* :download:`3_LRIT_Receiver-specs.pdf <files/3_LRIT_Receiver-specs.pdf>`
* :download:`4_LRIT_Transmitter-specs.pdf <files/4_LRIT_Transmitter-specs.pdf>`
* :download:`5_LRIT_Mission-data.pdf <files/5_LRIT_Mission-data.pdf>`

The blog series by Lucas Teske is a great resource:

Expand Down
16 changes: 8 additions & 8 deletions etc/goesproc.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@
# It can be used more than once if needed.
[[handler]]
type = "image"
product = "goes16"
origin = "goes16"
region = "m1"
dir = "./goes16/m1/{time:%Y-%m-%d}"

# GOES-16 full disk originals.
[[handler]]
type = "image"
product = "goes16"
origin = "goes16"
region = "fd"
dir = "./goes16/fd/{time:%Y-%m-%d}"

# GOES-16 full disk, channel 2, with contrast curve applied.
# The section [handler.remap] below applies to this handler.
[[handler]]
type = "image"
product = "goes16"
origin = "goes16"
region = "fd"
channels = [ "ch02" ]
directory = "./goes16/fd/{time:%Y-%m-%d}"
Expand All @@ -43,7 +43,7 @@ filename = "{filename}_contrast"
# The sections [handler.remap] and [handler.lut] below apply to this handler.
[[handler]]
type = "image"
product = "goes16"
origin = "goes16"
region = "fd"
channels = [ "ch02", "ch13" ]
directory = "./goes16/false-color/fd/{time:%Y-%m-%d}"
Expand All @@ -60,7 +60,7 @@ directory = "./goes16/false-color/fd/{time:%Y-%m-%d}"
# identical crops regardless of alignment.
[[handler]]
type = "image"
product = "goes15"
origin = "goes15"
region = "fd"
crop = [ -2373, 2371, -1357, 1347 ]
directory = "./goes15/fd/{time:%Y-%m-%d}"
Expand Down Expand Up @@ -92,7 +92,7 @@ directory = "./emwin/{time:%Y-%m-%d}"
#
[[handler]]
type = "text"
product = "nws"
origin = "nws"
directory = "./nws/{time:%Y-%m-%d}"
filename = "{time:%Y%m%dT%H%M%SZ}_{awips:nnn}{awips:xxx}"

Expand All @@ -108,13 +108,13 @@ filename = "{time:%Y%m%dT%H%M%SZ}_{awips:nnn}{awips:xxx}"
#
[[handler]]
type = "image"
product = "nws"
origin = "nws"
directory = "./nws/{time:%Y-%m-%d}"
filename = "{time:%Y%m%dT%H%M%SZ}_{filename}"

# Miscellaneous text.
[[handler]]
type = "text"
product = "other"
origin = "other"
directory = "./text/{time:%Y-%m-%d}"
filename = "{time:%Y%m%dT%H%M%SZ}_{filename}"
Loading

0 comments on commit 8947495

Please sign in to comment.