mirror of
https://github.com/JHUAPL/kaipy.git
synced 2026-01-08 23:38:11 -05:00
Merge branch 'development' into dashboard
This commit is contained in:
64
CITATION.cff
Normal file
64
CITATION.cff
Normal file
@@ -0,0 +1,64 @@
|
||||
cff-version: 1.2.0
|
||||
message: "If you use this software, please cite it using the metadata below."
|
||||
title: "Kaipy: Python package for analysis and visualization of MAGE and space weather modeling data"
|
||||
version: "1.1.2"
|
||||
date-released: 2025-07-03
|
||||
doi: 10.5281/zenodo.15801041
|
||||
repository-code: "https://github.com/JHUAPL/kaipy"
|
||||
license: "BSD 3-Clause"
|
||||
|
||||
authors:
|
||||
- family-names: Wiltberger
|
||||
given-names: Michael
|
||||
orcid: https://orcid.org/0000-0002-4844-3148
|
||||
affiliation: "NSF National Center for Atmospheric Research"
|
||||
- family-names: Bao
|
||||
given-names: Shanshan
|
||||
orcid: https://orcid.org/0000-0002-5209-3988
|
||||
affiliation: "Rice University"
|
||||
- family-names: Garretson
|
||||
given-names: Jeffery
|
||||
orcid: https://orcid.org/0000-0003-3805-9860
|
||||
affiliation: "Johns Hopkins University Applied Physics Laboratory"
|
||||
- family-names: McCubbin
|
||||
given-names: Andrew
|
||||
orcid: https://orcid.org/0000-0002-6222-3627
|
||||
affiliation: "Johns Hopkins University Applied Physics Laboratory"
|
||||
- family-names: Merkin
|
||||
given-names: Slava
|
||||
orcid: https://orcid.org/0000-0003-4344-5424
|
||||
affiliation: "Johns Hopkins University Applied Physics Laboratory"
|
||||
- family-names: Michael
|
||||
given-names: Adam
|
||||
orcid: https://orcid.org/0000-0003-2227-1242
|
||||
affiliation: "Johns Hopkins University Applied Physics Laboratory"
|
||||
- family-names: Pham
|
||||
given-names: Kevin
|
||||
orcid: https://orcid.org/0000-0001-5031-5519
|
||||
affiliation: "NSF National Center for Atmospheric Research"
|
||||
- family-names: Provornikova
|
||||
given-names: Elena
|
||||
orcid: https://orcid.org/0000-0001-8875-7478
|
||||
affiliation: "Johns Hopkins University Applied Physics Laboratory"
|
||||
- family-names: Rao
|
||||
given-names: Nikhil
|
||||
affiliation: "NSF National Center for Atmospheric Research"
|
||||
orcid: https://orcid.org/0000-0003-2639-9892
|
||||
- family-names: Sciola
|
||||
given-names: Anthony
|
||||
orcid: https://orcid.org/0000-0002-9752-9618
|
||||
affiliation: "Johns Hopkins University Applied Physics Laboratory"
|
||||
- family-names: Sorathia
|
||||
given-names: Kareem
|
||||
orcid: https://orcid.org/0000-0002-6011-5470
|
||||
affiliation: "Johns Hopkins University Applied Physics Laboratory"
|
||||
- family-names: Winter
|
||||
given-names: Eric
|
||||
orcid: https://orcid.org/0000-0001-5226-2107
|
||||
affiliation: "Johns Hopkins University Applied Physics Laboratory"
|
||||
|
||||
keywords:
|
||||
- "space weather"
|
||||
- "MAGE"
|
||||
- "kaipy"
|
||||
- "geospace modeling"
|
||||
@@ -1,7 +1,8 @@
|
||||
alive_progress
|
||||
astropy
|
||||
#cartopy
|
||||
cartopy
|
||||
cdasws
|
||||
cmasher
|
||||
configparser
|
||||
h5py
|
||||
jupyterlab
|
||||
|
||||
0
kaipy/cmaps/__init__.py
Normal file
0
kaipy/cmaps/__init__.py
Normal file
@@ -660,7 +660,7 @@ def AddIonBoxes(gs, ion):
|
||||
ion.init_vars('SOUTH')
|
||||
ax = ion.plot('current', gs=gsRM[-dY-wXY:-dY, dX:dX+wXY], doInset=True)
|
||||
|
||||
def plotPlane(gsph, data, xyBds, Ax, AxCB, var='D', vMin=None, vMax=None, doDeco=True, cmap='viridis', doLog=False, midp=None):
|
||||
def plotPlane(gsph, data, xyBds, Ax, AxCB, var='D', vMin=None, vMax=None, doDeco=True, cmap='viridis', doLog=False, midp=None, doVert=False):
|
||||
"""
|
||||
Base plotting routine for gsph plane
|
||||
|
||||
@@ -677,6 +677,7 @@ def plotPlane(gsph, data, xyBds, Ax, AxCB, var='D', vMin=None, vMax=None, doDeco
|
||||
cmap (str, optional): The colormap to be used (default is 'viridis').
|
||||
doLog (bool, optional): Whether to use logarithmic scaling for the colorbar (default is False).
|
||||
midp (float, optional): The midpoint value for the colorbar (default is None).
|
||||
doVert (bool, optional): Whether to display the colorbar vertically (default is False).
|
||||
|
||||
Returns:
|
||||
None
|
||||
@@ -693,12 +694,12 @@ def plotPlane(gsph, data, xyBds, Ax, AxCB, var='D', vMin=None, vMax=None, doDeco
|
||||
vMax = np.max(np.abs([np.min(data), np.max(data)]))
|
||||
vMin = -1.0 * vMax
|
||||
vNorm = kv.genNorm(vMin, vMax=vMax, doLog=doLog, midP=midp)
|
||||
kv.genCB(AxCB, vNorm, cbT=var, cM=cmap, Ntk=7)
|
||||
kv.genCB(AxCB, vNorm, cbT=var, cM=cmap, Ntk=7, doVert=doVert)
|
||||
Ax.pcolormesh(gsph.xxi, gsph.yyi, data, cmap=cmap, norm=vNorm)
|
||||
kv.SetAx(xyBds, Ax)
|
||||
return
|
||||
|
||||
def plotXY(gsph, nStp, xyBds, Ax, AxCB, var='D', vMin=None, vMax=None, doDeco=True, cmap='viridis', doLog=False, midp=None):
|
||||
def plotXY(gsph, nStp, xyBds, Ax, AxCB, var='D', vMin=None, vMax=None, doDeco=True, cmap='viridis', doLog=False, midp=None, doVert=False):
|
||||
"""
|
||||
Plot a 2D slice of data on the XY plane of the gsph object.
|
||||
|
||||
@@ -715,19 +716,20 @@ def plotXY(gsph, nStp, xyBds, Ax, AxCB, var='D', vMin=None, vMax=None, doDeco=Tr
|
||||
cmap (str, optional): The colormap to use for the plot (default is 'viridis').
|
||||
doLog (bool, optional): Whether to use a logarithmic scale for the colorbar (default is False).
|
||||
midp (float, optional): The midpoint value for the colorbar (default is None).
|
||||
doVert (bool, optional): Whether to display the colorbar vertically (default is False).
|
||||
|
||||
Returns:
|
||||
data: The 2D slice of data.
|
||||
"""
|
||||
data = gsph.EggSlice(var, nStp, doEq=True)
|
||||
plotPlane(gsph, data, xyBds, Ax, AxCB, var, vMin=vMin, vMax=vMax, doDeco=doDeco, cmap=cmap, doLog=doLog, midp=midp)
|
||||
plotPlane(gsph, data, xyBds, Ax, AxCB, var, vMin=vMin, vMax=vMax, doDeco=doDeco, cmap=cmap, doLog=doLog, midp=midp, doVert=doVert)
|
||||
if doDeco:
|
||||
kv.addEarth2D(ax=Ax)
|
||||
Ax.set_xlabel('SM_X [Re]')
|
||||
Ax.set_ylabel('SM-Y [Re]')
|
||||
return data
|
||||
|
||||
def plotXZ(gsph, nStp, xzBds, Ax, AxCB, var='D', vMin=None, vMax=None, doDeco=True, cmap='viridis', doLog=False, midp=None):
|
||||
def plotXZ(gsph, nStp, xzBds, Ax, AxCB, var='D', vMin=None, vMax=None, doDeco=True, cmap='viridis', doLog=False, midp=None, doVert=False):
|
||||
"""
|
||||
Plot a 2D slice of data in the XZ plane.
|
||||
|
||||
@@ -744,12 +746,13 @@ def plotXZ(gsph, nStp, xzBds, Ax, AxCB, var='D', vMin=None, vMax=None, doDeco=Tr
|
||||
cmap (str): The colormap to use. Default is 'viridis'.
|
||||
doLog (bool): Whether to use a logarithmic scale for the colorbar. Default is False.
|
||||
midp (float): The midpoint value for the colorbar. Default is None.
|
||||
doVert (bool, optional): Whether to display the colorbar vertically (default is False).
|
||||
|
||||
Returns:
|
||||
data (numpy.ndarray): The 2D slice of data.
|
||||
"""
|
||||
data = gsph.EggSlice(var,nStp,doEq=False)
|
||||
plotPlane(gsph,data,xzBds,Ax,AxCB,var,vMin=vMin,vMax=vMax,doDeco=doDeco,cmap=cmap,doLog=doLog,midp=midp)
|
||||
plotPlane(gsph,data,xzBds,Ax,AxCB,var,vMin=vMin,vMax=vMax,doDeco=doDeco,cmap=cmap,doLog=doLog,midp=midp,doVert=doVert)
|
||||
if (doDeco):
|
||||
kv.addEarth2D(ax=Ax)
|
||||
Ax.set_xlabel('SM_X [Re]')
|
||||
|
||||
@@ -7,7 +7,7 @@ include-package-data = true
|
||||
|
||||
[project]
|
||||
name = "kaipy"
|
||||
version = "1.1.0"
|
||||
version = "1.1.3"
|
||||
authors = [
|
||||
{name = "Eric Winter", email = "eric.winter@jhuapl.edu"},
|
||||
]
|
||||
@@ -22,7 +22,9 @@ classifiers = [
|
||||
dependencies = [
|
||||
"alive_progress",
|
||||
"astropy",
|
||||
"cartopy",
|
||||
"cdasws",
|
||||
"cmasher",
|
||||
"configparser",
|
||||
"h5py",
|
||||
"jupyterlab",
|
||||
@@ -34,6 +36,7 @@ dependencies = [
|
||||
"slack_sdk",
|
||||
"spacepy",
|
||||
"sphinx-rtd-theme",
|
||||
"sphinxcontrib-autoprogram",
|
||||
"sunpy",
|
||||
"gfz-api-client",
|
||||
"supermag-api"
|
||||
|
||||
@@ -2,6 +2,7 @@ alive_progress
|
||||
astropy
|
||||
cartopy
|
||||
cdasws
|
||||
cmasher
|
||||
configparser
|
||||
h5py
|
||||
jupyterlab
|
||||
|
||||
5
setup.py
5
setup.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
||||
|
||||
setup(
|
||||
name='kaipy',
|
||||
version='1.1.0',
|
||||
version='1.1.3',
|
||||
description='Python software for CGS MAGE and other Kaiju models',
|
||||
author='Kaiju team',
|
||||
author_email='wiltbemj@ucar.edu',
|
||||
@@ -21,7 +21,9 @@ setup(
|
||||
install_requires=[
|
||||
'alive_progress',
|
||||
'astropy',
|
||||
'cartopy',
|
||||
'cdasws',
|
||||
'cmasher',
|
||||
'configparser',
|
||||
'h5py',
|
||||
'jupyterlab',
|
||||
@@ -33,6 +35,7 @@ setup(
|
||||
'slack_sdk',
|
||||
'spacepy',
|
||||
'sphinx-rtd-theme',
|
||||
'sphinxcontrib-autoprogram',
|
||||
'sunpy',
|
||||
'gfz-api-client',
|
||||
'supermag-api'
|
||||
|
||||
Reference in New Issue
Block a user