Gamhelio package
Primary Package
kaipy.gamhelio.helioViz module
- kaipy.gamhelio.helioViz.AddSizeArgs(parser)
- kaipy.gamhelio.helioViz.GetSizeBds(pic)
- kaipy.gamhelio.helioViz.PlotDensityProf(gsph, nStp, xyBds, Ax, AxCB=None, doClear=True, doDeco=True)
- kaipy.gamhelio.helioViz.PlotEqBr(gsph, nStp, xyBds, Ax, AxCB=None, doClear=True, doDeco=True, MJDc=None, MJD_plot=None, hgsplot=False)
Plot normalized solar wind radial magnetic field in the solar equatorial plane.
Plot normalized solar wind radial magnetic field in the solar equatorial plane. By default, the plot is produced in the GH(MJDc) frame (the gamhelio frame used for the simulation results). If hgsplot is True, MJDc and MJD_plot must be specified. In that case, the coordinates are mapped from the GH(MJDc) frame to the HGS(MJD_plot) frame.
The radial magnetic field is normalized with the factor (r/r0)**2, where r0 is 21.5 Rsun (the inner edge of the gamhelio grid).
The gamhelio frame GH is based on the Heliographic Stonyhurst frame (HGS) frame. The difference is that, at any particular MJD:
x (GH) = -x (HGS) y (GH) = -y (HGS) z (GH) = z (HGS)
The GH frame is defined at MJDc (the MJD of the central meridian in the WSA file used for initial conditions), meaning it is fixed in spatial orientation at that time. The HGS frame is defined at MJD_plot, also producing a (different) fixed spatial orientation. The conversion maps points in the GH(MJDc) frame to the HGS(MJD_plot) frame, which is almost a rotation about the z-axis, but also accounting for the eccentricity of Earth’s orbit and other astronomical parameters.
- Parameters:
gsph (kaipy.gamhelio.heliosphere.GamsphPipe) – Pipe to simulation results
nStp (int) – Index of simulation step to use in plot
xyBds (list of 4 float) – Minimum and maximum values to plot for x- and y-axes
Ax (matplotlib.axes.Axes) – Axes object to use for plot
AxCB (matplotlib.axes.Axes) – Axes object to use for color bar
doClear (bool) – If True, clear the plot Axes before further plotting
doDeco (bool) – If True, add axis labels and other decorations to the plot
hgsplot (bool) – If True, plot in HGS(MJD_plot) frame
MJDc (float) – MJD used for the GH frame of the simulation
MJD_plot (float) – MJD to use for the HGS frame of the plot
- Returns:
Br – Data values used in plot
- Return type:
np.array of float
- Raises:
None –
- kaipy.gamhelio.helioViz.PlotEqBx(gsph, nStp, xyBds, Ax, AxCB=None, doClear=True, doDeco=True, MJDc=None, MJD_plot=None, hgsplot=False)
Plot solar wind x-magnetic field in the solar equatorial plane.
Plot solar wind x-magnetic field in the solar equatorial plane. By default, the plot is produced in the GH(MJDc) frame (the gamhelio frame used for the simulation results). If MJD_plot is specified, MJDc must also be specified. In that case, the coordinates are mapped from the GH(MJDc) frame to the HGS(MJD_plot) frame.
The gamhelio frame GH is based on the Heliographic Stonyhurst frame (HGS) frame. The difference is that:
x (GH) = -x (HGS) y (GH) = -y (HGS) z (GH) = z (HGS)
The GH frame is defined at MJDc, meaning it is fixed in spatial orientation at that time. The HGS frame is defined at MJD_plot, also producing a (different) fixed spatial orientation. The conversion maps points in the GH(MJDc) frame to the HGS(MJD_plot) frame, which is almost a rotation about the z-axis, but also accounting for the Earth’s orbit and other astronomical and geodetic parameters.
- Parameters:
gsph (kaipy.gamhelio.heliosphere.GamsphPipe) – Pipe to simulation results
nStp (int) – Index of simulation step to use in plot
xyBds (list of 4 float) – Minimum and maximum values to plot for x- and y-axes
Ax (matplotlib.axes.Axes) – Axes object to use for plot
AxCB (matplotlib.axes.Axes) – Axes object to use for color bar
doClear (bool) – If true, clear the plot Axes before further plotting.
doDeco (bool) – If true, add axis labels to the plot.
MJDc (float) – MJD used for the coordinate GH frame of the simulation.
MJD_plot (float) – MJD to use for the HGS frame of the plot.
hgsplot (bool) – If true, plot in HGS(MJD_plot) frame.
- Returns:
Bx – Data for solar wind x-magnetic field in equatorial plane, same shape as the equatorial grid in the gamhelio results.
- Return type:
np.array of float
- Raises:
None –
- kaipy.gamhelio.helioViz.PlotEqBy(gsph, nStp, xyBds, Ax, AxCB=None, doClear=True, doDeco=True, MJDc=None, MJD_plot=None, hgsplot=False)
Plot solar wind y-magnetic field in the solar equatorial plane.
Plot solar wind y-magnetic field in the solar equatorial plane. By default, the plot is produced in the GH(MJDc) frame (the gamhelio frame used for the simulation results). If MJD_plot is specified, MJDc must also be specified. In that case, the coordinates are mapped from the GH(MJDc) frame to the HGS(MJD_plot) frame.
The gamhelio frame GH is based on the Heliographic Stonyhurst frame (HGS) frame. The difference is that:
x (GH) = -x (HGS) y (GH) = -y (HGS) z (GH) = z (HGS)
The GH frame is defined at MJDc, meaning it is fixed in spatial orientation at that time. The HGS frame is defined at MJD_plot, also producing a (different) fixed spatial orientation. The conversion maps points in the GH(MJDc) frame to the HGS(MJD_plot) frame, which is almost a rotation about the z-axis, but also accounting for the Earth’s orbit and other astronomical and geodetic parameters.
- Parameters:
gsph (kaipy.gamhelio.heliosphere.GamsphPipe) – Pipe to simulation results
nStp (int) – Index of simulation step to use in plot
xyBds (list of 4 float) – Minimum and maximum values to plot for x- and y-axes
Ax (matplotlib.axes.Axes) – Axes object to use for plot
AxCB (matplotlib.axes.Axes) – Axes object to use for color bar
doClear (bool) – If true, clear the plot Axes before further plotting.
doDeco (bool) – If true, add axis labels to the plot.
MJDc (float) – MJD used for the coordinate GH frame of the simulation.
MJD_plot (float) – MJD to use for the HGS frame of the plot.
hgsplot (bool) – If true, plot in HGS(MJD_plot) frame.
- Returns:
By – Data for solar wind y-magnetic field in equatorial plane, same shape as the equatorial grid in the gamhelio results.
- Return type:
np.array of float
- Raises:
None –
- kaipy.gamhelio.helioViz.PlotEqBz(gsph, nStp, xyBds, Ax, AxCB=None, doClear=True, doDeco=True, MJDc=None, MJD_plot=None, hgsplot=False)
Plot solar wind z-magnetic field in the solar equatorial plane.
Plot solar wind z-magnetic field in the solar equatorial plane. By default, the plot is produced in the GH(MJDc) frame (the gamhelio frame used for the simulation results). If MJD_plot is specified, MJDc must also be specified. In that case, the coordinates are mapped from the GH(MJDc) frame to the HGS(MJD_plot) frame.
The gamhelio frame GH is based on the Heliographic Stonyhurst frame (HGS) frame. The difference is that:
x (GH) = -x (HGS) y (GH) = -y (HGS) z (GH) = z (HGS)
The GH frame is defined at MJDc, meaning it is fixed in spatial orientation at that time. The HGS frame is defined at MJD_plot, also producing a (different) fixed spatial orientation. The conversion maps points in the GH(MJDc) frame to the HGS(MJD_plot) frame, which is almost a rotation about the z-axis, but also accounting for the Earth’s orbit and other astronomical and geodetic parameters.
- Parameters:
gsph (kaipy.gamhelio.heliosphere.GamsphPipe) – Pipe to simulation results
nStp (int) – Index of simulation step to use in plot
xyBds (list of 4 float) – Minimum and maximum values to plot for x- and y-axes
Ax (matplotlib.axes.Axes) – Axes object to use for plot
AxCB (matplotlib.axes.Axes) – Axes object to use for color bar
doClear (bool) – If true, clear the plot Axes before further plotting.
doDeco (bool) – If true, add axis labels to the plot.
MJDc (float) – MJD used for the coordinate GH frame of the simulation.
MJD_plot (float) – MJD to use for the HGS frame of the plot.
hgsplot (bool) – If true, plot in HGS(MJD_plot) frame.
- Returns:
Bz – Data for solar wind z-magnetic field in equatorial plane, same shape as the equatorial grid in the gamhelio results.
- Return type:
np.array of float
- Raises:
None –
- kaipy.gamhelio.helioViz.PlotEqD(gsph, nStp, xyBds, Ax, AxCB=None, doClear=True, doDeco=True, hgsplot=False, MJDc=None, MJD_plot=None)
Plot normalized solar wind number density in the solar equatorial plane.
Plot normalized solar wind number density in the solar equatorial plane. By default, the plot is produced in the GH(MJDc) frame (the gamhelio frame used for the simulation results). If hgsplot is True, MJDc and MJD_plot must be specified. In that case, the coordinates are mapped from the GH(MJDc) frame to the HGS(MJD_plot) frame.
The density is normalized with the factor (r/r0)**2, where r0 is radius of the inner edge of the gamhelio grid (should be 21.5 Rsun).
The gamhelio frame GH is based on the Heliographic Stonyhurst frame (HGS) frame. The difference is that, at any particular MJD:
x (GH) = -x (HGS) y (GH) = -y (HGS) z (GH) = z (HGS)
The GH frame is defined at MJDc (the MJD of the central meridian in the WSA file used for initial conditions), meaning it is fixed in spatial orientation at that time. The HGS frame is defined at MJD_plot, also producing a (different) fixed spatial orientation. The conversion maps points in the GH(MJDc) frame to the HGS(MJD_plot) frame, which is almost a rotation about the z-axis, but also accounting for the eccentricity of Earth’s orbit and other astronomical parameters.
- Parameters:
gsph (kaipy.gamhelio.heliosphere.GamsphPipe) – Pipe to simulation results
nStp (int) – Index of simulation step to use in plot
xyBds (list of 4 float) – Minimum and maximum values to plot for x- and y-axes
Ax (matplotlib.axes.Axes) – Axes object to use for plot
AxCB (matplotlib.axes.Axes) – Axes object to use for color bar
doClear (bool) – If True, clear the plot Axes before further plotting
doDeco (bool) – If True, add axis labels and other decorations to the plot
hgsplot (bool) – If True, plot in HGS(MJD_plot) frame
MJDc (float) – MJD used for the GH frame of the simulation
MJD_plot (float) – MJD to use for the HGS frame of the plot
- Returns:
MagV – Data values used in plot
- Return type:
np.array of float
- Raises:
None –
- kaipy.gamhelio.helioViz.PlotEqMagV(gsph, nStp, xyBds, Ax, AxCB=None, doClear=True, doDeco=True, hgsplot=False, MJDc=None, MJD_plot=None)
Plot solar wind speed in the solar equatorial plane.
Plot solar wind speed in the solar equatorial plane. By default, the plot is produced in the GH(MJDc) frame (the gamhelio frame used for the simulation results). If hgsplot is True, MJDc and MJD_plot must be specified. In that case, the coordinates are mapped from the GH(MJDc) frame to the HGS(MJD_plot) frame.
The gamhelio frame GH is based on the Heliographic Stonyhurst frame (HGS) frame. The difference is that, at any particular MJD:
x (GH) = -x (HGS) y (GH) = -y (HGS) z (GH) = z (HGS)
The GH frame is defined at MJDc (the MJD of the central meridian in the WSA file used for initial conditions), meaning it is fixed in spatial orientation at that time. The HGS frame is defined at MJD_plot, also producing a (different) fixed spatial orientation. The conversion maps points in the GH(MJDc) frame to the HGS(MJD_plot) frame, which is almost a rotation about the z-axis, but also accounting for the eccentricity of Earth’s orbit and other astronomical parameters.
- Parameters:
gsph (kaipy.gamhelio.heliosphere.GamsphPipe) – Pipe to simulation results
nStp (int) – Index of simulation step to use in plot
xyBds (list of 4 float) – Minimum and maximum values to plot for x- and y-axes
Ax (matplotlib.axes.Axes) – Axes object to use for plot
AxCB (matplotlib.axes.Axes) – Axes object to use for color bar
doClear (bool) – If True, clear the plot Axes before further plotting
doDeco (bool) – If True, add axis labels and other decorations to the plot
hgsplot (bool) – If True, plot in HGS(MJD_plot) frame
MJDc (float) – MJD used for the GH frame of the simulation
MJD_plot (float) – MJD to use for the HGS frame of the plot
- Returns:
MagV – Data values used in plot
- Return type:
np.array of float
- Raises:
None –
- kaipy.gamhelio.helioViz.PlotEqTemp(gsph, nStp, xyBds, Ax, AxCB=None, doClear=True, doDeco=True, MJDc=None, MJD_plot=None, hgsplot=False)
Plot normalized solar wind temperature in the solar equatorial plane.
Plot normalized solar wind temperature in the solar equatorial plane. By default, the plot is produced in the GH(MJDc) frame (the gamhelio frame used for the simulation results). If hgsplot is True, MJDc and MJD_plot must be specified. In that case, the coordinates are mapped from the GH(MJDc) frame to the HGS(MJD_plot) frame.
The temperature is normalized with the factor (r/r0), where r0 is 21.5 Rsun (the inner edge of the gamhelio grid).
The gamhelio frame GH is based on the Heliographic Stonyhurst frame (HGS) frame. The difference is that, at any particular MJD:
x (GH) = -x (HGS) y (GH) = -y (HGS) z (GH) = z (HGS)
The GH frame is defined at MJDc (the MJD of the central meridian in the WSA file used for initial conditions), meaning it is fixed in spatial orientation at that time. The HGS frame is defined at MJD_plot, also producing a (different) fixed spatial orientation. The conversion maps points in the GH(MJDc) frame to the HGS(MJD_plot) frame, which is almost a rotation about the z-axis, but also accounting for the eccentricity of Earth’s orbit and other astronomical parameters.
- Parameters:
gsph (kaipy.gamhelio.heliosphere.GamsphPipe) – Pipe to simulation results
nStp (int) – Index of simulation step to use in plot
xyBds (list of 4 float) – Minimum and maximum values to plot for x- and y-axes
Ax (matplotlib.axes.Axes) – Axes object to use for plot
AxCB (matplotlib.axes.Axes) – Axes object to use for color bar
doClear (bool) – If True, clear the plot Axes before further plotting
doDeco (bool) – If True, add axis labels and other decorations to the plot
hgsplot (bool) – If True, plot in HGS(MJD_plot) frame
MJDc (float) – MJD used for the GH frame of the simulation
MJD_plot (float) – MJD to use for the HGS frame of the plot
- Returns:
Temp – Data values used in plot
- Return type:
np.array of float
- Raises:
None –
- kaipy.gamhelio.helioViz.PlotFluxProf(gsph, nStp, xyBds, Ax, AxCB=None, doClear=True, doDeco=True)
- kaipy.gamhelio.helioViz.PlotMPI(gsph, Ax, ashd=0.5)
- kaipy.gamhelio.helioViz.PlotMerBrNorm(gsph, nStp, xyBds, Ax, AxCB=None, doClear=True, doDeco=True, indx=(None, None), MJDc=None, MJD_plot=None, hgsplot=False)
Plot normalized solar wind radial magnetic field in a meridional plane.
Plot normalized solar wind radial magnetic field in a meridional plane. By default, the plot is produced in the GH(MJDc) frame (the gamhelio frame used for the simulation results). If hgsplot is True, MJDc and MJD_plot must be specified. In that case, the coordinates are mapped from the GH(MJDc) frame to the HGS(MJD_plot) frame.
The temperature is normalized with the factor (r/r0)**2, where r0 is 21.5 Rsun (the inner edge of the gamhelio grid).
The gamhelio frame GH is based on the Heliographic Stonyhurst frame (HGS) frame. The difference is that, at any particular MJD:
x (GH) = -x (HGS) y (GH) = -y (HGS) z (GH) = z (HGS)
The GH frame is defined at MJDc (the MJD of the central meridian in the WSA file used for initial conditions), meaning it is fixed in spatial orientation at that time. The HGS frame is defined at MJD_plot, also producing a (different) fixed spatial orientation. The conversion maps points in the GH(MJDc) frame to the HGS(MJD_plot) frame, which is almost a rotation about the z-axis, but also accounting for the eccentricity of Earth’s orbit and other astronomical parameters.
- Parameters:
gsph (kaipy.gamhelio.heliosphere.GamsphPipe) – Pipe to simulation results
nStp (int) – Index of simulation step to use in plot
xyBds (list of 4 float) – Minimum and maximum values to plot for x- and y-axes
Ax (matplotlib.axes.Axes) – Axes object to use for plot
AxCB (matplotlib.axes.Axes) – Axes object to use for color bar
doClear (bool) – If True, clear the plot Axes before further plotting.
doDeco (bool) – If True, add axis labels to the plot.
indx (tuple of 2 int or float) – Index or angle of meridional slice to plot
hgsplot (bool) – If True, plot in HGS(MJD_plot) frame.
MJDc (float) – MJD used for the coordinate GH frame of the simulation.
MJD_plot (float) – MJD to use for the HGS frame of the plot.
- Returns:
Br_r, Br_l – Data values used in plot
- Return type:
np.array of float
- Raises:
None –
- kaipy.gamhelio.helioViz.PlotMerDNorm(gsph, nStp, xyBds, Ax, AxCB=None, doClear=True, doDeco=True, indx=(None, None), hgsplot=False, MJDc=None, MJD_plot=None)
Plot normalized solar wind number density in a meridional plane.
Plot normalized solar wind number density in a meridional plane. By default, the plot is produced in the GH(MJDc) frame (the gamhelio frame used for the simulation results). If hgsplot is True, MJDc and MJD_plot must be specified. In that case, the coordinates are mapped from the GH(MJDc) frame to the HGS(MJD_plot) frame.
The density is normalized with the factor (r/r0)**2, where r0 is 21.5 Rsun (the inner edge of the gamhelio grid).
The gamhelio frame GH is based on the Heliographic Stonyhurst frame (HGS) frame. The difference is that, at any particular MJD:
x (GH) = -x (HGS) y (GH) = -y (HGS) z (GH) = z (HGS)
The GH frame is defined at MJDc (the MJD of the central meridian in the WSA file used for initial conditions), meaning it is fixed in spatial orientation at that time. The HGS frame is defined at MJD_plot, also producing a (different) fixed spatial orientation. The conversion maps points in the GH(MJDc) frame to the HGS(MJD_plot) frame, which is almost a rotation about the z-axis, but also accounting for the eccentricity of Earth’s orbit and other astronomical parameters.
- Parameters:
gsph (kaipy.gamhelio.heliosphere.GamsphPipe) – Pipe to simulation results
nStp (int) – Index of simulation step to use in plot
xyBds (list of 4 float) – Minimum and maximum values to plot for x- and y-axes
Ax (matplotlib.axes.Axes) – Axes object to use for plot
AxCB (matplotlib.axes.Axes) – Axes object to use for color bar
doClear (bool) – If True, clear the plot Axes before further plotting.
doDeco (bool) – If True, add axis labels to the plot.
indx (tuple of 2 int or float) – Index or angle of meridional slice to plot
hgsplot (bool) – If True, plot in HGS(MJD_plot) frame.
MJDc (float) – MJD used for the coordinate GH frame of the simulation.
MJD_plot (float) – MJD to use for the HGS frame of the plot.
- Returns:
Dr, Dl – Data values used in plot
- Return type:
np.array of float
- Raises:
None –
- kaipy.gamhelio.helioViz.PlotMerMagV(gsph, nStp, xyBds, Ax, AxCB=None, doClear=True, doDeco=True, indx=(None, None), hgsplot=False, MJDc=None, MJD_plot=None)
Plot solar wind speed in a meridional plane.
Plot solar wind speed in a meridional plane. By default, the plot is produced in the GH(MJDc) frame (the gamhelio frame used for the simulation results). If hgsplot is True, MJDc and MJD_plot must be specified. In that case, the coordinates are mapped from the GH(MJDc) frame to the HGS(MJD_plot) frame.
The gamhelio frame GH is based on the Heliographic Stonyhurst frame (HGS) frame. The difference is that, at any particular MJD:
x (GH) = -x (HGS) y (GH) = -y (HGS) z (GH) = z (HGS)
The GH frame is defined at MJDc (the MJD of the central meridian in the WSA file used for initial conditions), meaning it is fixed in spatial orientation at that time. The HGS frame is defined at MJD_plot, also producing a (different) fixed spatial orientation. The conversion maps points in the GH(MJDc) frame to the HGS(MJD_plot) frame, which is almost a rotation about the z-axis, but also accounting for the eccentricity of Earth’s orbit and other astronomical parameters.
- Parameters:
gsph (kaipy.gamhelio.heliosphere.GamsphPipe) – Pipe to simulation results
nStp (int) – Index of simulation step to use in plot
xyBds (list of 4 float) – Minimum and maximum values to plot for x- and y-axes
Ax (matplotlib.axes.Axes) – Axes object to use for plot
AxCB (matplotlib.axes.Axes) – Axes object to use for color bar
doClear (bool) – If True, clear the plot Axes before further plotting
doDeco (bool) – If True, add axis labels and other decorations to the plot
indx (tuple of 2 int or float) – Index or angle of meridional slice to plot
hgsplot (bool) – If True, plot in HGS(MJD_plot) frame
MJDc (float) – MJD used for the GH frame of the simulation
MJD_plot (float) – MJD to use for the HGS frame of the plot
- Returns:
Vr, Vl – Data values used in plot
- Return type:
np.array of float
- Raises:
None –
- kaipy.gamhelio.helioViz.PlotMerTemp(gsph, nStp, xyBds, Ax, AxCB=None, doClear=True, doDeco=True, indx=(None, None), MJDc=None, MJD_plot=None, hgsplot=False)
Plot normalized solar wind temperature in a meridional plane.
Plot normalized solar wind temperature in a meridional plane. By default, the plot is produced in the GH(MJDc) frame (the gamhelio frame used for the simulation results). If hgsplot is True, MJDc and MJD_plot must be specified. In that case, the coordinates are mapped from the GH(MJDc) frame to the HGS(MJD_plot) frame.
The temperature is normalized with the factor (r/r0), where r0 is 21.5 Rsun (the inner edge of the gamhelio grid).
The gamhelio frame GH is based on the Heliographic Stonyhurst frame (HGS) frame. The difference is that, at any particular MJD:
x (GH) = -x (HGS) y (GH) = -y (HGS) z (GH) = z (HGS)
The GH frame is defined at MJDc (the MJD of the central meridian in the WSA file used for initial conditions), meaning it is fixed in spatial orientation at that time. The HGS frame is defined at MJD_plot, also producing a (different) fixed spatial orientation. The conversion maps points in the GH(MJDc) frame to the HGS(MJD_plot) frame, which is almost a rotation about the z-axis, but also accounting for the eccentricity of Earth’s orbit and other astronomical parameters.
- Parameters:
gsph (kaipy.gamhelio.heliosphere.GamsphPipe) – Pipe to simulation results
nStp (int) – Index of simulation step to use in plot
xyBds (list of 4 float) – Minimum and maximum values to plot for x- and y-axes
Ax (matplotlib.axes.Axes) – Axes object to use for plot
AxCB (matplotlib.axes.Axes) – Axes object to use for color bar
doClear (bool) – If True, clear the plot Axes before further plotting.
doDeco (bool) – If True, add axis labels to the plot.
indx (tuple of 2 int or float) – Index or angle of meridional slice to plot
hgsplot (bool) – If True, plot in HGS(MJD_plot) frame.
MJDc (float) – MJD used for the coordinate GH frame of the simulation.
MJD_plot (float) – MJD to use for the HGS frame of the plot.
- Returns:
Tempr, Templ – Data values used in plot
- Return type:
np.array of float
- Raises:
None –
- kaipy.gamhelio.helioViz.PlotSpeedProf(gsph, nStp, xyBds, Ax, AxCB=None, doClear=True, doDeco=True)
- kaipy.gamhelio.helioViz.PlotiSlBr(gsph, nStp, xyBds, Ax, AxCB=None, doClear=True, doDeco=True, idx=-1, idx_is_radius=False, hgsplot=False, MJDc=None, MJD_plot=None, use_outer_range=False)
Plot solar wind radial magnetic field and current sheet at a specified radial slice.
Plot solar wind radial magnetic field and current sheet at a specified radial slice.
- Parameters:
gsph (kaipy.gamhelio.heliosphere.GamsphPipe) – Pipe to simulation results
nStp (int) – Index of simulation step to use in plot
xyBds (list of 4 float) – Minimum and maximum values to plot for x- and y-axes
Ax (matplotlib.axes.Axes) – Axes object to use for plot
AxCB (matplotlib.axes.Axes) – Axes object to use for color bar
doClear (bool) – If True, clear the plot Axes before further plotting.
doDeco (bool) – If True, add axis labels to the plot.
idx (int OR float) – Index of radial slice to plot, OR radius in Rsun.
idx_is_radius (bool) – If True, interpret idx as a radius in Rsun.
hgsplot (bool) – If True, plot in HGS(MJD_plot) frame
MJDc (float) – MJD used for the GH frame of the simulation
MJD_plot (float) – MJD to use for the HGS frame of the plot
use_outer_range (bool) – If True, use a colorbar range optimized for use at large radius.
- Returns:
Br – Data values used in plot
- Return type:
np.array of float
- Raises:
None –
- kaipy.gamhelio.helioViz.PlotiSlBrRotatingFrame(gsph, nStp, xyBds, Ax, AxCB=None, doClear=True, doDeco=True, idx=-1)
- kaipy.gamhelio.helioViz.PlotiSlD(gsph, nStp, xyBds, Ax, AxCB=None, doClear=True, doDeco=True, idx=-1, idx_is_radius=False, hgsplot=False, MJDc=None, MJD_plot=None, use_outer_range=False)
Plot solar wind number density at a specified radial slice.
Plot solar wind number density at a specified radial slice. The plot uses a latitude/longitude coordinate system in the GH(MJDc) frame. The resulting plot is, in effect, a view toward the origin (the Sun) along the X-axis in the GH(MJDc) frame. That is, the X-axis is positive out of the page, and longitude increases to the right. Think of it as the +X axis out of the figure at the middle of the left edge of the image, and the Sun is “unrolled” to the right.
- Parameters:
gsph (kaipy.gamhelio.heliosphere.GamsphPipe) – Pipe to simulation results
nStp (int) – Index of simulation step to use in plot
xyBds (list of 4 float) – Minimum and maximum values to plot for x- and y-axes
Ax (matplotlib.axes.Axes) – Axes object to use for plot
AxCB (matplotlib.axes.Axes) – Axes object to use for color bar
doClear (bool) – If True, clear the plot Axes before further plotting.
doDeco (bool) – If True, add axis labels to the plot.
idx (int OR float) – Index of radial slice to plot, OR radius in Rsun.
idx_is_radius (bool) – If True, interpret idx as a radius in Rsun.
hgsplot (bool) – If True, plot in HGS(MJD_plot) frame
MJDc (float) – MJD used for the GH frame of the simulation
MJD_plot (float) – MJD to use for the HGS frame of the plot
use_outer_range (bool) – If True, use a colorbar range optimized for use at large radius.
- Returns:
D – Data values used in plot
- Return type:
np.array of float
- Raises:
None –
- kaipy.gamhelio.helioViz.PlotiSlMagV(gsph, nStp, xyBds, Ax, AxCB=None, doClear=True, doDeco=True, idx=-1, idx_is_radius=False, hgsplot=False, MJDc=None, MJD_plot=None)
Plot solar wind speed at a specified radial slice.
Plot solar wind speed at a specified radial slice. The plot uses a latitude/longitude coordinate system in the GH(MJDc) frame. The resulting plot is, in effect, a view toward the origin (the Sun) along the X-axis in the GH(MJDc) frame. That is, the X-axis is positive out of the page, and longitude increases to the right. Think of it as the +X axis out of the figure at the middle of the left edge of the image, and the Sun is “unrolled” to the right.
- Parameters:
gsph (kaipy.gamhelio.heliosphere.GamsphPipe) – Pipe to simulation results
nStp (int) – Index of simulation step to use in plot
xyBds (list of 4 float) – Minimum and maximum values to plot for x- and y-axes
Ax (matplotlib.axes.Axes) – Axes object to use for plot
AxCB (matplotlib.axes.Axes) – Axes object to use for color bar
doClear (bool) – If True, clear the plot Axes before further plotting.
doDeco (bool) – If True, add axis labels to the plot.
idx (int OR float) – Index of radial slice to plot, OR radius in Rsun.
idx_is_radius (bool) – If True, interpret idx as a radius in Rsun.
hgsplot (bool) – If True, plot in HGS(MJD_plot) frame
MJDc (float) – MJD used for the GH frame of the simulation
MJD_plot (float) – MJD to use for the HGS frame of the plot
- Returns:
V – Data values used in plot
- Return type:
np.array of float
- Raises:
None –
- kaipy.gamhelio.helioViz.PlotiSlTemp(gsph, nStp, xyBds, Ax, AxCB=None, doClear=True, doDeco=True, idx=-1, idx_is_radius=False, hgsplot=False, MJDc=None, MJD_plot=None, use_outer_range=False)
Plot solar wind temperature at a specified radial slice.
Plot solar wind temperature at a specified radial slice.
- Parameters:
gsph (kaipy.gamhelio.heliosphere.GamsphPipe) – Pipe to simulation results
nStp (int) – Index of simulation step to use in plot
xyBds (list of 4 float) – Minimum and maximum values to plot for x- and y-axes
Ax (matplotlib.axes.Axes) – Axes object to use for plot
AxCB (matplotlib.axes.Axes) – Axes object to use for color bar
doClear (bool) – If True, clear the plot Axes before further plotting.
doDeco (bool) – If True, add axis labels to the plot.
idx (int OR float) – Index of radial slice to plot, OR radius in Rsun.
idx_is_radius (bool) – If True, interpret idx as a radius in Rsun.
hgsplot (bool) – If True, plot in HGS(MJD_plot) frame
MJDc (float) – MJD used for the GH frame of the simulation
MJD_plot (float) – MJD to use for the HGS frame of the plot
use_outer_range (bool) – If True, use a colorbar range optimized for use at large radius.
- Returns:
Temp – Data values used in plot
- Return type:
np.array of float
- Raises:
None –
- kaipy.gamhelio.helioViz.PlotjBr(gsph, nStp, xyBds, Ax, AxCB=None, doClear=True, doDeco=True, jidx=-1, MJDc=None, MJD_plot=None, hgsplot=False)
Plot normalized radial magnetic field in a specific j plane.
Plot normalized radial magnetic field in the a specific j plane. By default, the plot is produced in the GH(MJDc) frame (the gamhelio frame used for the simulation results). If MJD_plot is specified, MJDc must also be specified. In that case, the coordinates are mapped from the GH(MJDc) frame to the HGS(MJD_plot) frame.
The gamhelio frame GH is based on the Heliographic Stonyhurst frame (HGS) frame. The difference is that:
x (GH) = -x (HGS) y (GH) = -y (HGS) z (GH) = z (HGS)
The GH frame is defined at MJDc, meaning it is fixed in spatial orientation at that time. The HGS frame is defined at MJD_plot, also producing a (different) fixed spatial orientation. The conversion maps points in the GH(MJDc) frame to the HGS(MJD_plot) frame, which is almost a rotation about the z-axis, but also accounting for the Earth’s orbit and other astronomical and geodetic parameters.
- Parameters:
gsph (kaipy.gamhelio.heliosphere.GamsphPipe) – Pipe to simulation results
nStp (int) – Index of simulation step to use in plot
xyBds (list of 4 float) – Minimum and maximum values to plot for x- and y-axes
Ax (matplotlib.axes.Axes) – Axes object to use for plot
AxCB (matplotlib.axes.Axes) – Axes object to use for color bar
doClear (bool) – If true, clear the plot Axes before further plotting.
doDeco (bool) – If true, add axis labels to the plot.
jidx (int) – Index of j-plane to plot.
MJDc (float) – MJD used for the coordinate GH frame of the simulation.
MJD_plot (float) – MJD to use for the HGS frame of the plot.
hgsplot (bool) – If true, plot in HGS(MJD_plot) frame.
- Returns:
Br – Normalized radial magnetic field in selected j-plane, same shape as the j-plane in the gamhelio results.
- Return type:
np.array of float
- Raises:
None –
- kaipy.gamhelio.helioViz.PlotjD(gsph, nStp, xyBds, Ax, AxCB=None, doClear=True, doDeco=True, jidx=-1, MJDc=None, MJD_plot=None, hgsplot=False)
Plot normalized density in a specific j plane.
Plot normalized density in the a specific j plane. By default, the plot is produced in the GH(MJDc) frame (the gamhelio frame used for the simulation results). If MJD_plot is specified, MJDc must also be specified. In that case, the coordinates are mapped from the GH(MJDc) frame to the HGS(MJD_plot) frame.
The gamhelio frame GH is based on the Heliographic Stonyhurst frame (HGS) frame. The difference is that:
x (GH) = -x (HGS) y (GH) = -y (HGS) z (GH) = z (HGS)
The GH frame is defined at MJDc, meaning it is fixed in spatial orientation at that time. The HGS frame is defined at MJD_plot, also producing a (different) fixed spatial orientation. The conversion maps points in the GH(MJDc) frame to the HGS(MJD_plot) frame, which is almost a rotation about the z-axis, but also accounting for the Earth’s orbit and other astronomical and geodetic parameters.
- Parameters:
gsph (kaipy.gamhelio.heliosphere.GamsphPipe) – Pipe to simulation results
nStp (int) – Index of simulation step to use in plot
xyBds (list of 4 float) – Minimum and maximum values to plot for x- and y-axes
Ax (matplotlib.axes.Axes) – Axes object to use for plot
AxCB (matplotlib.axes.Axes) – Axes object to use for color bar
doClear (bool) – If true, clear the plot Axes before further plotting.
doDeco (bool) – If true, add axis labels to the plot.
jidx (int) – Index of j-plane to plot.
MJDc (float) – MJD used for the coordinate GH frame of the simulation.
MJD_plot (float) – MJD to use for the HGS frame of the plot.
hgsplot (bool) – If true, plot in HGS(MJD_plot) frame.
- Returns:
NormD – Normalized number density in selected j-plane, same shape as the j-plane in the gamhelio results.
- Return type:
np.array of float
- Raises:
None –
- kaipy.gamhelio.helioViz.PlotjMagV(gsph, nStp, xyBds, Ax, AxCB=None, doClear=True, doDeco=True, jidx=-1, hgsplot=False, MJDc=None, MJD_plot=None)
Plot solar wind speed in a specific j plane.
Plot solar wind speed in the a specific j plane. By default, the plot is produced in the GH(MJDc) frame (the gamhelio frame used for the simulation results). If MJD_plot is specified, MJDc must also be specified. In that case, the coordinates are mapped from the GH(MJDc) frame to the HGS(MJD_plot) frame.
The gamhelio frame GH is based on the Heliographic Stonyhurst frame (HGS) frame. The difference is that:
x (GH) = -x (HGS) y (GH) = -y (HGS) z (GH) = z (HGS)
The GH frame is defined at MJDc, meaning it is fixed in spatial orientation at that time. The HGS frame is defined at MJD_plot, also producing a (different) fixed spatial orientation. The conversion maps points in the GH(MJDc) frame to the HGS(MJD_plot) frame, which is almost a rotation about the z-axis, but also accounting for the Earth’s orbit and other astronomical and geodetic parameters.
- Parameters:
gsph (kaipy.gamhelio.heliosphere.GamsphPipe) – Pipe to simulation results
nStp (int) – Index of simulation step to use in plot
xyBds (list of 4 float) – Minimum and maximum values to plot for x- and y-axes
Ax (matplotlib.axes.Axes) – Axes object to use for plot
AxCB (matplotlib.axes.Axes) – Axes object to use for color bar
doClear (bool) – If true, clear the plot Axes before further plotting.
doDeco (bool) – If true, add axis labels to the plot.
jidx (int) – Index of j-plane to plot.
hgsplot (bool) – If true, plot in HGS(MJD_plot) frame.
MJDc (float) – MJD used for the coordinate GH frame of the simulation.
MJD_plot (float) – MJD to use for the HGS frame of the plot.
- Returns:
MagV – Data for solar wind speed in selected j-plane, same shape as the j-plane in the gamhelio results.
- Return type:
np.array of float
- Raises:
None –
- kaipy.gamhelio.helioViz.PlotjTemp(gsph, nStp, xyBds, Ax, AxCB=None, doClear=True, doDeco=True, jidx=-1, MJDc=None, MJD_plot=None, hgsplot=False)
Plot normalized temperature in a specific j plane.
Plot normalized temperature in the a specific j plane. By default, the plot is produced in the GH(MJDc) frame (the gamhelio frame used for the simulation results). If MJD_plot is specified, MJDc must also be specified. In that case, the coordinates are mapped from the GH(MJDc) frame to the HGS(MJD_plot) frame.
The gamhelio frame GH is based on the Heliographic Stonyhurst frame (HGS) frame. The difference is that:
x (GH) = -x (HGS) y (GH) = -y (HGS) z (GH) = z (HGS)
The GH frame is defined at MJDc, meaning it is fixed in spatial orientation at that time. The HGS frame is defined at MJD_plot, also producing a (different) fixed spatial orientation. The conversion maps points in the GH(MJDc) frame to the HGS(MJD_plot) frame, which is almost a rotation about the z-axis, but also accounting for the Earth’s orbit and other astronomical and geodetic parameters.
- Parameters:
gsph (kaipy.gamhelio.heliosphere.GamsphPipe) – Pipe to simulation results
nStp (int) – Index of simulation step to use in plot
xyBds (list of 4 float) – Minimum and maximum values to plot for x- and y-axes
Ax (matplotlib.axes.Axes) – Axes object to use for plot
AxCB (matplotlib.axes.Axes) – Axes object to use for color bar
doClear (bool) – If true, clear the plot Axes before further plotting.
doDeco (bool) – If true, add axis labels to the plot.
jidx (int) – Index of j-plane to plot.
MJDc (float) – MJD used for the coordinate GH frame of the simulation.
MJD_plot (float) – MJD to use for the HGS frame of the plot.
hgsplot (bool) – If true, plot in HGS(MJD_plot) frame.
- Returns:
Temp – Normalized temperature in selected j-plane, same shape as the j-plane in the gamhelio results.
- Return type:
np.array of float
- Raises:
None –
- kaipy.gamhelio.helioViz.find_radial_slice(gsph, radius)
Find the index of the radial slice containing a radius.
Find the index of the radial slice containing a radius. This is the index of the radial grid cell edge just less than the given radius.
This routine should work for LFM grids of any resolution.
- Parameters:
gsph (kaipy.gamhelio.heliosphere.GamsphPipe) – Pipe to simulation results
radius (float) – Radius in Rsun
- Returns:
idx – Index of radial slice containing radius.
- Return type:
int
- Raises:
None –
kaipy.gamhelio.heliosphere module
- class kaipy.gamhelio.heliosphere.GamsphPipe(fdir, ftag, doFast=False, uID='Inner', doParallel=False, nWorkers=4)
Bases:
GameraPipe- AddTime(n, Ax, xy=[0.9, 0.95], cLab='black', fs='medium', T0=0.0, doBox=True, BoxC='lightgrey')
- EqSlice(vID, sID=None, vScl=None, doEq=True, doVerb=True)
- MerBrNrm(s0=0, indx=(None, None))
- MerDNrm(s0=0, indx=(None, None))
- MerMagV(s0=0, indx=(None, None))
- MerTemp(s0=0, indx=(None, None))
- MeridGrid()
- MeridGridHalfs(kidx=None, phi=None)
- MeridSlice(vID, sID=None, vScl=None, doVerb=True, indx=(None, None))
- OpenPipe(doVerbose=True)
Opens a pipe for reading data from a database file.
- Parameters:
doVerbose (bool) – Flag indicating whether to print verbose output. Default is True.
- Returns:
None
- Raises:
None –
- RadProfDen(s0=0)
- RadProfFlux(s0=0)
- RadProfSpeed(s0=0)
- RadialProfileGrid()
- RadialProfileVar(vID, sID=None, vScl=None, doVerb=True)
- bStream(s0=0, xyBds=[-35, 25, -25, 25], dx=0.05)
- eqBx(s0=0)
- eqBy(s0=0)
- eqBz(s0=0)
- eqMagV(s0=0)
- eqNormBr(s0=0)
- eqNormD(s0=0)
Compute the normalized number density in the equatorial plane.
Compute the normalized number density in the equatorial plane.
The number density is normalized by the factor (r/r0)**2, where r0 is the radius of the inner edge of the grid (should be 21.5 Rsun).
- Parameters:
self (GamsphPipe) – This object
s0 (int) – Simulation step number to fetch
- Returns:
NormDeq – Normalized number density in equatorial plane
- Return type:
np.ndarray, shape same as self.xxc
- Raises:
None –
- eqTemp(s0=0)
- iSliceBr(s0=0, idx=-1)
- iSliceBrBound(s0=0, idx=-1)
- iSliceBx(s0=0, idx=-1)
- iSliceBy(s0=0, idx=-1)
- iSliceBz(s0=0, idx=-1)
- iSliceD(s0=0, idx=-1)
- iSliceGrid(idx=-1)
- iSliceMagV(s0=0, idx=-1)
- iSliceT(s0=0, idx=-1)
- iSliceVar(vID, sID=None, vScl=None, doVerb=True, idx=-1)
- jMagV(s0=0, jidx=-1)
- jNormBr(s0=0, jidx=-1)
- jNormD(s0=0, jidx=-1)
- jSlice(vID, sID=None, vScl=None, doEq=True, doVerb=True, jidx=-1)
- jTemp(s0=0, jidx=-1)
- vStream(s0=0, xyBds=[-35, 25, -25, 25], dx=0.05)
Lib Package
kaipy.gamhelio.lib.wsa module
- kaipy.gamhelio.lib.wsa.info(wsa_file)
- kaipy.gamhelio.lib.wsa.plot(wsa_file, savefig)
- kaipy.gamhelio.lib.wsa.read(wsa_file, densTempInfile, normalized=False, verbose=True)
wsa2gamera Package
kaipy.gamhelio.wsa2gamera.params module
- class kaipy.gamhelio.wsa2gamera.params.params(ConfigFileName)
Bases:
object