Imagers.animate_map()
andImagers.animate_map_gen()
methods to animate mosaics.Imagers.__iter__()
to iterate over every imager synchronously. This won't work perfectly when you mix multiple imager arrays such as REGO and THEMIS, as their cadences are 6- and 3-seconds, respectively.Imagers.__str__()
to print details regarding each ASI imager.- Tests for the above methods.
- A warning in the Calgary downloader function if there was no image data locally or online.
- A mosaic animation example in the documentation.
- A bug when no data from an hour exists and
asilib.Downloader()
crashed when it did not find the folder.
- Incremented the dependencies in
requirements.txt
.
- Renamed
aurora-asi-lib
toasilib
in PyPI. Now the package can be installed viapython3 -m pip install asilib
.
- Removed support for python 3.8
- Added support for python 3.12
- Incremented two package versions in requirements.txt:
scipy==1.20.0
andh5py==3.10.0
.
- Project metadata in
pyproject.toml
and removedsetup.cfg
. - Additional package URLs in PyPI.
- Edited the Acknowledgments section and clarified the source of skymap files.
- Animate mosaics via
asilib.Imagers.animate_map()
. This method relies on synchronous iteration of allasilib.Imager
objects passed intoasilib.Imagers
. - Loop over images of all
asilib.Imager
objects passed intoasilib.Imagers
as a function of time viaasilib.Imagers__iter__()
. This method returns a valid time stamp and image for all time synchronizedasilib.Imager
images, and returns a placeholderNone
if anasilib.Imager
is off, or the imager is not synchorized (closest time stamp is more than a cadence away in time).
- Auroral intensities resulted in an index error is the satellite was at the horizon.
- Removed the RGB normalization in the
trex_rgb()
loader. This fixed the vertical stripes in the keograms, but made the fisheye and mapped images much darker (since thenorm
kwarg inplt.pcolormesh
andplt.imshow
does nothing). - Refactored the TREx and Imager tests reflecting the minor changes.
- A
color_brighten
kwarg to by default enhance the RGB colors when calling the following asilib.Imager methods,plot_fisheye
,animate_fisheye_gen
,plot_map
, andanimate_map_gen
. Unlesscolor_brighten=False
, the plots remain the same.
- A bug raised in issue #15 (#15) where an
asilib.Imagers
class, initiated with a singleasilib.Imager
, would try to incorrectly indexasilib.Imager
unless it is wrapper in a tuple.
- The
n_avg
andimager
kawrgs to thepsa_emccd()
function. These kwargs allow for custom Imager instance, as well as average the images overn_avg
times.
custom_alt
kwarg to the THEMIS, REGO, and TREx loaders. Credit: Cassandra M.- A test for the
custom_alt
functionality. - Tests for the custom colors.
- How RGB color channels are loaded. By picking one or multiple color channels, the underlying data for the unselected channels is masked as NaNs. matplotlib handles these images well.
- An advertisement figure and script. The script in
examples/global_coverage_map.py
plots a geographic map showing the spatial coverage (low-elevation field of view rings) of all imagers supported by aurora-asi-lib. The resulting plot is located indocs/_static/global_coverage.png
and is shown in theREADME.md
andindex.rst
files.
- A bug with TREx RGB which resulted in a
ValueError: A problematic PGM file…
error when new data files are downloaded. I added a Warning block to the documentation to instruct users to update asilib
- Incremented the minimum
trex-imager-readfile
version to 1.5.1 to work with the updated TREx-RGB image files.
- A bug in
Imager._calc_cardinal_direction()
method that manifested in non-orthogonal directions when the ASI (az, el) skymaps are offset such that the low elevations are outside of the field of view. - A bug in the REGO example.
- Shortened the namespace paths in the Imager API Reference page. Their namespace is the same as it would be imported.
- RGB auroral intensities in
asilib.Conjunction.intensity()
. - An auroral intensity test (from the nearest pixel and equal area) using the TREx-RGB data.
asilib.skymap.geodetic.skymap()
function that maps the (az, el) skymaps to (lat, lon) skymaps assuming Earth is a sphere (i.e., not an ellipsoid).- Added a plot test comparing the official and the asilib THEMIS GILL (lat, lon) skymaps.
- The
asilib.Conjunction()
class had am ambiguity regarding whether if the satellite ephemeris was interpolated (or downsampled to) the ASI time stamps, or kept at the original cadence. This ambiguity made calculating auroral intensity error-prone, so nowasilib.Conjunction.intensity()
automatically interpolates the satellite ephemeris.
- A bug in the asilib.Imager.data property that relied on hard-coded filtering of unfilled images using
np.where()
. This led to duplicate time stamps for RGB images, and a crash withasilib.Conjunction.intensity()
. - Removed the THEMIS and REGO imports at the top-level of asilib, i.e., in
asilib/__init__.py
. Now they are imported inasilib/asi/__init__.py
, so users must always import asilib.asi when using ASI modules contained within theasi/
folder.
- The TREx-RGB loader,
asilib.asi.trex_rgb()
, courtesy of C. McKenna. asilib.asi.trex_rgb()
testsConjunction.lla_footprint
testsasilib.asi.trex_rgb()
to the online documentation.
- A bug in
Imager.keogram()
that calculated the incorrect pixels that is used for slicing images when assembling a keogram. While this bug does not affect ASIs with square pixel resolution, it did for TREx-RGB which is rectangular. The fix slightly modified the keograms, by about a pixel, so I regenerated the baseline keogram plots. - A bug in
Conjunction.lla_footprint
where thealt
variable was rewritten. As a result, IRBEM did not map to the requested altitude.
asilib.Imagers.get_points()
method to get the (lon, lat) and pixel intensity points.- Tests for
asilib.Imagers.get_points()
asilib.Imagers()
class to make mosaics and synchronize plotting multiple imagers. The first two methods implemented are:asilib.Imagers.plot_fisheye()
to plot fisheye lens images from multiple imagers, andasilib.Imagers.plot_map()
to project images from multiple imagers onto a map. This method has anoverlap
kwarg that by default masks out the (lat, lon) skymaps that map to pixels that overlap with a neighboring imager. This is a surprisingly efficient method that needs to be run just once (tested for up to five imagers; I'm unsure how a 10 or a 20 imager array will fare).
- Added plot tests for the two
Imagers
methods. - Added an
Imagers()
description in the Get Started and API pages.
- Refactored the Donovan+2008 auroral arc example to use
asilib.Imagers.plot_map()
. - Added a check to allow custom
matplotlib.colors.Normalization
object to be passed forcolor_norm
.
- Support for RGB images in
asilib.Imager.keogram()
.
- Simplified
asilib.Imager.__getitem__()
to repay the technical debt. Before the method was difficult to reason about and it processed the [time] and [start_time:end_time] slice cases separately. Now__getitem__
handles both of those cases in the same way. - Simplified how the
Imager._keogram
array is allocated whenasilib.Imager.keogram()
is called. - Edited the Imager flowchart.
- Deprecation warnings to the legacy asilib plotting functions and in the API reference. They will be removed in or after December 2023.
- Fixed the
color_norm
keyword argument inasilib.Imager()
methods. Now it defaults toNone
so the normalization is correctly overridden. Also, thecolor_norm
docstring is updated to clarify the hierarchy. - Changed the
data
tofile_info
argument inasilib.Imager()
, and all ASI loaders, to more clearly convey the purpose of the variable.
- A tutorial using
asilib.Imager()
. - Documentation in contribute.rst describing the
asilib.Imager()
interface. Simplified theasilib.Imager().__init__()
docstring and point to the thorough interface description in the new Contribute section.
- Refactored how
asilib.Imager()
deals with single- and multi-image instances. Now, each ASIwrapper
function does not need to load a single image iftime
is specified,asilib.Imager()
does this instead. - Refactored the
themis
,rego
,trex_nir
,lamp_phantom
, andpsa_emccd
wrapper functions with the newasilib.Imager()
interface. - Due to this change, the
asilib.Imager.__getitem__()
method significantly simplified.
- Refactored all examples from
examples/v0/
and saved them inexamples/v1/
. - Added the v1 examples to the Examples documentation tab. During the v0->v1 transition, users can see the examples in both the v0 and v1 interfaces.
- Removed experimental warning from Imager API Reference and moved it to the Legacy API Reference.
- The example in
examples/v1/animate_conjunction.py
.
- Bumped the Calgary dependencies to avoid the freeze support multiprocessing bug for windows users
- rego-imager-readfile>=1.2.0
- themis-imager-readfile>=1.2.1
- trex-imager-readfile>=1.4.0
- TREx-NIR loader
- TREx-NIR API documentation with examples
- TREx-NIR tests
- A bug in
asilib.Imager.keogram()
. If the data was already loaded (via the.data
method), any subsequent calls toasilib.Imager.keogram()
orasilib.Imager.plot_keogram()
crashed.
- ASI loader functions for
asilib.Imager()
should now be imported as:
import asilib.asi
asi = asilib.asi.themis(...)
(old version is)
import asilib
asi = asilib.themis(...)
- Finalizing the
asilib.Conjunction
API - Added
asilib.Conjunction.intensity
method. Depending on if thebox
argument is specified or not, this method will calculate either the auoral intensity for the nearest pixel to the footprint (box=None
) or in a rectangular area around the footprint otherwise (e.g.,box=(10x10)
). - Added tests for
asilib.Conjunction.map_azel()
. - Angular distances in
asilib.Conjunction.map_azel()
(and elsewhere) are now calculated using the _haversine equation. - Moved original examples to
examples/v0/
folder and started writing the examples usingImager()
andConjunction()
to theexamples/v1/
folder.
- Updated GitHub Actions:
- test the
cartopy
maps, - test using
ubuntu-latest
.
- test the
- The following
asilib.Imager
methods are now tested:
plot_fisheye()
,plot_map()
,animate_fisheye()
,animate_map()
,plot_keogram()
,iter_files
,__getitem__
,__str__
, and__repr__
.
-
The
asilib.themis()
andasilib.rego()
examples are now tested as well. -
Fixed a
asilib.Imager
bug that was triggered when the time slicing is outside of the time_range. Before, it raised an unhelpfulAssertionError
, but now it raises an informativeFileNotFoundError
.
- Added a
asilib.asi.fake_asi
function to quickly testasilib.Imager
. - Using the
fake_asi
I found and fixed a few errors inasilib.Imager
. - Added more tests for
asilib.asi.themis()
,asilib.map.create_map()
and began adding tests forasilib.Imager
.
- Added tests for
asilib.themis()
plotting functions - Moved map creating examples to
asilib.map.create_map()
. - Fixed numerous minor bugs in
asilib.Imager()
.
- Added
Imager.plot_map()
,Imager.animate_map()
,Imager.animate_map_gen()
methods and documentation that project images, or a series of images, onto a geographic map. - Added
Imager.keogram()
, andImager.plot_keogram()
methods to make keograms- Along the meridian or a custom path
- With geographic or magnetic latitudes, depending on the
aacgm
kwarg.
asilib.Imager
functionality is complete, with a first draft of the documentation & examples.
- Added an Active Development warning in the
asilib
docs. - Simplified the
Downloader
class. - Fixed a download bug. It arose because the
overwrite
kwarg played two overlapping roles: to redownload data and overwrite animations (the ffmpeg argument). I fixed the bug with theredownload
kwarg reserved only for downloading data, andoverwrite
kwarg reserved for overwriting animations. - Added cardinal directions to
asilib.imager.plot_fisheye()
andasilib.imager.plot_fisheye_gen()
methods. To use it, set thecardinal_directions
kwarg to one or more directions, e.g., 'NE' for north and east directions (default), or 'NEWS' for all directions. - Improved the
asilib.Downloader
class.- Replaced the
_check_url_status()
implementation that checked if the server is online. Turns out, if the url argument includes a path to a large file,asilib.Downloader
will download the file just to check the server status. I replaced it withrequest.raise_for_status()
that doesn't download the file. - Added a try-catch block for streaming large files. This addresses the bug where a file is partially-downloaded if the stream is interrupted. This goes unnoticed until
asilib
raises file-corrupted errors that are hard to track down. The fix first deletes the partially-downloaded file if the stream is interrupted, and then raises the error.
- Replaced the
- Added functions, documentaion, and examples for
asilib.map.create_map()
,asilib.map.create_cartopy_map()
, andasilib.map.create_simple_map()
to use withasilib.Imager
.
- First merge of the Imager class. The
asilib.Imager
andasilib.Conjunction
classes are still under development, but you can try it out! Call theasilib.themis()
function to play around with an Imager instance. - Removed the deprecated functions. Once Imager is fully implemented, most of the original functions will be deprecated.
- Removed the cartopy dependency. While some users were able to install it, overall it proved to be difficult to reliably build across multiple operating systems. Instead, I use the pyshp pure python library to read in the Esri shapefile files to make the map. Currently, only the mercator projection is supported. However, in the future, I plan to add other projections such as orthographic.
- Renamed asilib.create_cartopy_map() to asilib.make_map()
- Added a
path
kwarg tokeogram
andplot_keogram
to create a keogram along a custom (lat, lon) path. - Clarified the documentation.
- Added
animate_map
andanimate_map_generator
functions to asilib. I also added examples to the examples and tutorial sections of the docs. - Added a warning in
equal_area
if the lat/lon values are outside of the skymap range.
- Renamed and deprecated
plot_movie
andplot_movie_generator
foranimate_fisheye
andanimate_fisheye_generator
functions. This change is necessary for consistency with new functions such asanimate_map
andanimate_map_generator
functions. - Updated the examples.
- Combined the download functions to
download_image
anddownload_skymap
.
- Renamed the
_make_map
function tocreate_cartopy_map()
so users can use this function to create maps from now on. - Updated the information in
CONTRIBUTE.md
.
- Fixed a bug where the
color_bounds
inplot_movie_generator()
were static after the first image. - Renamed and deprecated
plot_image
forplot_fisheye
.
- Rotated the 2- and 3-D
skymap
arrays and fixed a bug inkeogram.py
where the skymap latitudes were a few pixels off.
- Swapped the order of most functions to
asi_array_code, location_code, time
. This is a major API change that is not backwards-compatible. - Many edits the the docstrings.
- Renamed the example scripts and added example scripts for
plot_map
. - Finished a first complete draft of tutorial.ipynb.
- Changed all instances of the word
station
and replaced it withlocation_code
.
- The main change is the
ignore_missing_files
parameter that is passed to the download functions. When True, thedownload_themis_img
anddownload_rego_img
will not raise a missing file error when data from that hour does not exist.
- The biggest API change is the parameter order for
download_rego_img
anddownload_themis_img
. Now it is(location code (i.e. station), time, and time_range)
. Beware that now the parameter order API is inconsistent across all of the functions---I will standardize it to (asi_array_code
,location code (i.e. station)
,time
, andtime_range
) in the next minor (0.X.0 release).
- For consistency, I removed most instances of the word "frame" and changed them to "image". This propagated to the following function renaming (deprecation of the old name).
- Deprecated the get_frame and get_frames functions for load_image. It is a wrapper for _load_image and _load_images functions that were once get_frame and get_frames. I added this function to standardize the load/download names. It returns either one or multiple images, depending on if the time or time_range keyword arguments are given; it will raise an error unless time or time_range is passed (not both).
- Renamed the plot_frame function to
plot_image
; plot_frame is now deprecated.
- Removed deprecated functions