{"id":22903113,"url":"https://github.com/space-physics/dascasi","last_synced_at":"2025-07-15T20:33:05.920Z","repository":{"id":56933942,"uuid":"51016067","full_name":"space-physics/dascasi","owner":"space-physics","description":"Digital All Sky Camera utilities, for U. Alaska Geophysical Institute cameras","archived":false,"fork":false,"pushed_at":"2023-03-21T02:30:21.000Z","size":3941,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-10T10:18:25.475Z","etag":null,"topics":["all-sky-camera","aurora","camera"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/space-physics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION","codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-02-03T17:10:31.000Z","updated_at":"2023-03-20T21:21:15.000Z","dependencies_parsed_at":"2022-08-21T00:40:25.111Z","dependency_job_id":null,"html_url":"https://github.com/space-physics/dascasi","commit_stats":{"total_commits":261,"total_committers":8,"mean_commits":32.625,"dds":"0.48659003831417624","last_synced_commit":"4d72aa91e471a495566044c3fc387344dd12461f"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/space-physics/dascasi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-physics%2Fdascasi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-physics%2Fdascasi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-physics%2Fdascasi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-physics%2Fdascasi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/space-physics","download_url":"https://codeload.github.com/space-physics/dascasi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-physics%2Fdascasi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265457940,"owners_count":23769031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["all-sky-camera","aurora","camera"],"created_at":"2024-12-14T02:33:52.401Z","updated_at":"2025-07-15T20:33:05.855Z","avatar_url":"https://github.com/space-physics.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DASC all-sky camera utilities\n\n[![image](https://zenodo.org/badge/51016067.svg)](https://zenodo.org/badge/latestdoi/51016067)\n![ci](https://github.com/space-physics/dascasi/workflows/ci/badge.svg)\n[![PyPi Download stats](http://pepy.tech/badge/dascasi)](http://pepy.tech/project/dascasi)\n\nUtilities for plotting, saving, analyzing the Poker Flat Research Range Digital All Sky Camera. (Other locations, too).\nThis program handles the corrupted FITS files due to the RAID array failure on 2013 data.\nThe raw data FITS contain one image per file.\n\n![DASC projected images](./src/dascasi/tests/data/dasc_projection_plot_pc.png)\n(using scripts/PlotProjectedImage.py\n)\n![DASC az/el PKR](./src/dascasi/tests/data/dasc_azel.png)\n(using scripts/PlotAzimuthElevation.py)\n\n\n## Install\n\nMost people will find it useful to have the example scripts and the tests built into the Git repo.\n\n```sh\ngit clone https://github.com/space-physics/dascasi\n\npip install -e dascasi\n```\n\n## Usage\n\nTo use the API directly, like:\n\n```python\nimport dascasi as du\n\ndata = du.load('tests/PKR_DASC_0558_20151007_082351.743.FITS')\n```\n\nThis returns a dictionary of\n[xarray.DataArray](http://xarray.pydata.org/en/stable/generated/xarray.DataArray.html),\nwhich is like a \"smart\" Numpy array.\nThe images are indexed by wavelength if it was specified in the data file, or '0000' otherwise.\nThe images are in a 3-D stack: (time, x, y).\n`data.time` is the time of each image.\nalso several metadata parameters are included like the location of the camera.\n\nSave the data using lossless compression to HDF5 by\n\n```python\ndu.save_hdf5(data, \"foo.h5\")\n```\n\nNow we give several examples.\n\n### Download raw DASC files by time\n\nDownload Poker Flat Research Range \"PKR\" October 7, 2015 from 8:23 to 8:54 UTC to `~/data/`:\n\n```sh\npython -m dascasi.download PKR 2015-10-07T08:23 2015-10-07T08:54 ~/data\n```\n\n* `-w` four-letter wavelength in nanometers e.g. 0630\n\nAs usual, we assume UTC and do NOT specify the timezone.\n\n### convert FITS stack to HDF5\n\nIt is very tedious to download large amounts of DASC data in single FITS files.\nWe have tried to make this faster by multi-threading the download, but then the FTP server anti-leeching\nleaves us with broken downloads.\nAs an alternative in general, it's more convenient to have a single HDF5 file for a day rather than 10,000 FITS files.\nConvert a bunch of FITS files to HDF5 like:\n\n```sh\npython scripts/ConvertDASC_FITS_to_HDF5.py ~/data/2015-10-07 ~/data/2015-10-07.h5\n```\n\n* `-t` start stop times to convert\n\n### Make movies from DASC raw data files\n\nPlay movie of all wavelengths in subplots for files in a directory, for example:\n\n```sh\npython -m dascasi.movie dascasi/tests/\n```\n\nadditional options include:\n\n* `-t` specify time limits e.g.  `-t 2014-01-02T02:30 2014-01-02T02:35`\n* `-w` choose only certain wavelength(s)\n\n### Spatial registration (plate scale)\n\nTo match data from DASC with other instruments, it is vital that the plate scale data user be appropriate for the time and instrument.\nCalibration data may be [downloaded](ftp://optics.gi.alaska.edu/Cal_data/), for other times / instruments please contact UAF-GI.\n\n```python\nimport dascasi as du\n\ndata = du.load('dascasi/tests/', azelfn='/path/to/your_calibration_file')\n```\n\nnow `data` includes data variables `az` and `el`, same shape as the image(s), along with camera position in `lat` `lon` `alt_m`.\n\n* Be sure you know if you're using magnetic north or geographic north\n* Note the calibration date in the filename--was the camera was moved since that date?\n\nIn all cases, the end user must manually verify the calibration with sky features such as stars / moon.\n\n### Map Projection\n\nA 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.\nEach wavelength has a distinctive peak emission altitude due to the energies, kinetic reactions and vertical density profiles involved.\n\nIt takes considerable time to stretch the image stack pixels to fit a project geographic grid, so this is not enabled by default.\nIt will be enabled if the du.load(..., wavelength_altitude_km=) parameter is used.\nSee PlotProjectedImage.py for an example.\n\nSome analyses can be done far more rapidly by just projecting pixel(s) of interest rather than an entire 3-D image stack.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspace-physics%2Fdascasi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspace-physics%2Fdascasi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspace-physics%2Fdascasi/lists"}