kipp_state Module

Viewer state shared by more than one kipp module.

st written by REPL and cursor keys, read by every render. Per-model axes (nmodels, xval, xedge, ystar) rebuilt on load and on axis-quantity or time-unit change.


Uses


Variables

Type Visibility Attributes Name Initial
type(kstate_t), public :: st

Viewer settings.

real(kind=real64), public :: chs = 1.d0

giza character height of current render: 1, or PDF_CHS during PDF save.

integer(kind=int32), public :: nmodels = 0

Loaded model count, size(convdata%data).

real(kind=real64), public, allocatable :: xval(:)

x coordinate of each model: time in st%tunit, or model number.

real(kind=real64), public, allocatable :: xedge(:)

Model strip edges (nmodels + 1): midpoints of successive xval, ends half a step outside.

real(kind=real64), public, allocatable :: ystar(:)

Outer mass or radius of each model (cgs), per st%yaxis.


Derived Types

type, public ::  kstate_t

Viewer settings: axes, units, view limits, colour field and device.

Components

Type Visibility Attributes Name Initial
character(len=8), public :: xaxis = 'time'

x-axis quantity, 'time' or 'model' (model number).

character(len=8), public :: yaxis = 'mass'

y-axis quantity, 'mass' or 'radius'.

character(len=4), public :: tunit = 'yr'

Time-axis display unit, a units%UNAME entry.

character(len=4), public :: munit = 'Msun'

Mass-axis display unit, a units%UNAME entry.

character(len=4), public :: runit = 'Rsun'

Radius-axis display unit, a units%UNAME entry.

logical, public :: tauto = .true.

Time unit follows visible span on each render (units auto).

logical, public :: xoffset = .true.

Label linear time axis relative to matplotlib-style offset.

logical, public :: xlog = .false.

Logarithmic x axis.

logical, public :: ylog = .false.

Logarithmic y axis.

real(kind=real64), public :: xmin = 0

View limits. x in xval units, y in munit or runit; linear values even on log axes.

real(kind=real64), public :: xmax = 0

View limits. x in xval units, y in munit or runit; linear values even on log axes.

real(kind=real64), public :: ymin = 0

View limits. x in xval units, y in munit or runit; linear values even on log axes.

real(kind=real64), public :: ymax = 0

View limits. x in xval units, y in munit or runit; linear values even on log axes.

logical, public :: xauto = .true.

Limits follow data: kipp_autoscale resets only these axes.

logical, public :: yauto = .true.

Limits follow data: kipp_autoscale resets only these axes.

character(len=32), public :: cfield = 'epsnuc'

Colour field: convtype, epsnuc, neu or a column field name.

logical, public :: cflip = .false.

Show column field in its non-default linear/log scale.

character(len=16), public :: cmap = 'teal'

Colormap of column fields, a CMAP_NAMES entry; _r reverses it.

character(len=64), public :: device = '/xw'

giza device: /xw when $DISPLAY is set, else /png.

character(len=64), public :: prefix = 'convview'

/png file name prefix: each render writes <prefix>.png.

logical, public :: interactive = .true.

Renders reuse one open /xw window; otherwise each opens, writes and closes a PNG.

logical, public :: showmodels = .true.

Draw the model-density strip (models on|off).

logical, public :: showgrid = .false.

Draw the cell and strip-edge grid (grid on|off).

integer, public :: devid = -1

giza id of the open interactive device, -1 when none is open.