Overview#
The library#
All functionality in magali is available from the base namespace of the
magali
package. This means that you can access all of them with a
single import:
# magali is usually imported as mg
import magali as mg
import pooch
import matplotlib.pyplot as plt
Load some data:
path = pooch.retrieve(
"doi:10.6084/m9.figshare.22965200.v1/Bz_uc0.mat",
known_hash="md5:268bd3af5e350188d239ff8bd0a88227",
)
print(path)
/home/runner/.cache/pooch/37cafac63fd8b1e21e8fed50e4e1c87e-Bz_uc0.mat
data = mg.read_qdm_harvard(path)
data
<xarray.Dataset> Size: 9MB Dimensions: (y: 600, x: 960) Coordinates: * x (x) float64 8kB 0.0 2.35 4.7 7.05 ... 2.249e+03 2.251e+03 2.254e+03 * y (y) float64 5kB 0.0 2.35 4.7 7.05 ... 1.403e+03 1.405e+03 1.408e+03 z (y, x) float64 5MB 5.0 5.0 5.0 5.0 5.0 5.0 ... 5.0 5.0 5.0 5.0 5.0 Data variables: bz (y, x) float64 5MB 352.4 94.89 41.62 288.4 ... -4.196 -53.56 2.103 Attributes: file_name: /home/runner/.cache/pooch/37cafac63fd8b1e21e8fed50e4e1c87e-Bz...
data.bz.plot(cmap="RdBu_r", vmin=-1000, vmax=1000)
<matplotlib.collections.QuadMesh at 0x7f8e45b6dfa0>