Skip to main content

UAF Digital All-Sky Camera: reading and plotting

Project description

DASC all-sky camera utilities

image ci PyPi Download stats

Utilities for plotting, saving, analyzing the Poker Flat Research Range Digital All Sky Camera. (Other locations, too). This program handles the corrupted FITS files due to the RAID array failure on 2013 data. The raw data FITS contain one image per file.

DASC projected images (using scripts/PlotProjectedImage.py ) DASC az/el PKR (using scripts/PlotAzimuthElevation.py)

Install

Most people will find it useful to have the example scripts and the tests built into the Git repo.

git clone https://github.com/space-physics/dascasi

pip install -e dascasi

Usage

To use the API directly, like:

import dascasi as du

data = du.load('tests/PKR_DASC_0558_20151007_082351.743.FITS')

This returns a dictionary of xarray.DataArray, which is like a "smart" Numpy array. The images are indexed by wavelength if it was specified in the data file, or '0000' otherwise. The images are in a 3-D stack: (time, x, y). data.time is the time of each image. also several metadata parameters are included like the location of the camera.

Save the data using lossless compression to HDF5 by

du.save_hdf5(data, "foo.h5")

Now we give several examples.

Download raw DASC files by time

Download Poker Flat Research Range "PKR" October 7, 2015 from 8:23 to 8:54 UTC to ~/data/:

python -m dascasi.download PKR 2015-10-07T08:23 2015-10-07T08:54 ~/data
  • -w four-letter wavelength in nanometers e.g. 0630

As usual, we assume UTC and do NOT specify the timezone.

convert FITS stack to HDF5

It is very tedious to download large amounts of DASC data in single FITS files. We have tried to make this faster by multi-threading the download, but then the FTP server anti-leeching leaves us with broken downloads. As an alternative in general, it's more convenient to have a single HDF5 file for a day rather than 10,000 FITS files. Convert a bunch of FITS files to HDF5 like:

python scripts/ConvertDASC_FITS_to_HDF5.py ~/data/2015-10-07 ~/data/2015-10-07.h5
  • -t start stop times to convert

Make movies from DASC raw data files

Play movie of all wavelengths in subplots for files in a directory, for example:

python -m dascasi.movie dascasi/tests/

additional options include:

  • -t specify time limits e.g. -t 2014-01-02T02:30 2014-01-02T02:35
  • -w choose only certain wavelength(s)

Spatial registration (plate scale)

To match data from DASC with other instruments, it is vital that the plate scale data user be appropriate for the time and instrument. Calibration data may be downloaded, for other times / instruments please contact UAF-GI.

import dascasi as du

data = du.load('dascasi/tests/', azelfn='/path/to/your_calibration_file')

now data includes data variables az and el, same shape as the image(s), along with camera position in lat lon alt_m.

  • Be sure you know if you're using magnetic north or geographic north
  • Note the calibration date in the filename--was the camera was moved since that date?

In all cases, the end user must manually verify the calibration with sky features such as stars / moon.

Map Projection

A common task in auroral and airglow analysis is to project the image to an imaginary alttiude, that is, as if all the brightness were coming from that altitude. Each wavelength has a distinctive peak emission altitude due to the energies, kinetic reactions and vertical density profiles involved.

It takes considerable time to stretch the image stack pixels to fit a project geographic grid, so this is not enabled by default. It will be enabled if the du.load(..., wavelength_altitude_km=) parameter is used. See PlotProjectedImage.py for an example.

Some analyses can be done far more rapidly by just projecting pixel(s) of interest rather than an entire 3-D image stack.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dascasi-3.0.0.tar.gz (2.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dascasi-3.0.0-py3-none-any.whl (2.9 MB view details)

Uploaded Python 3

File details

Details for the file dascasi-3.0.0.tar.gz.

File metadata

  • Download URL: dascasi-3.0.0.tar.gz
  • Upload date:
  • Size: 2.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dascasi-3.0.0.tar.gz
Algorithm Hash digest
SHA256 7f16322d1d83c802e9a7e670846024d172a05d112d0428197a04dde332852d5b
MD5 7513781e784e2c0ffbc9a2498cf2d886
BLAKE2b-256 0aa1917269d4d12d9c73fa93de1e394c3762ef4bdd20f8bda897323bc5db1fe0

See more details on using hashes here.

Provenance

The following attestation bundles were made for dascasi-3.0.0.tar.gz:

Publisher: publish-python-package.yml on space-physics/dascasi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dascasi-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: dascasi-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dascasi-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c4df12b4781d88702fa0387a95afe2e7ed8e33cd6d04028ac68a8b60d46465a
MD5 d24f25b2091a2725ec13786e21dea331
BLAKE2b-256 7315364bcc5870dac364b0f29d79e90c855e33b1d887d82dc8ff66a1af31b104

See more details on using hashes here.

Provenance

The following attestation bundles were made for dascasi-3.0.0-py3-none-any.whl:

Publisher: publish-python-package.yml on space-physics/dascasi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page