Parameters

Daisho.DaishoParametersType
DaishoParameters

Top-level immutable runtime configuration loaded from a TOML file. Construct via DaishoParameters() for the bundled template or DaishoParameters(path) for a user file.

[fields] and [io] are mandatory (no sensible default: every driver needs fields, and the two [io] sentinels distinguish true-missing vs undetect on every NetCDF write). [qc], [gridding], and the [grid.*] sub-tables are optional and default-construct when absent; an operation that actually needs a missing block raises a clear point-of-use error (see require_section) rather than silently gridding with template numbers. Validation within any present block stays strict.

Fields

  • moments::MomentParameters
  • qc::QCParameters
  • gridding::GriddingParameters
  • grid::GridParameters
  • io::IOParameters
  • synthesis::SynthesisParameters
  • provided::Set{Symbol}: which optional top-level sections (:qc, :gridding, :grid, :synthesis) were actually present in the loaded TOML. Absence is tracked explicitly — it is not inferred from default values.

Examples

print_config("mygrid.toml")            # write the template
# edit mygrid.toml for your radar, grid, and CF metadata
p = DaishoParameters("mygrid.toml")    # strict load
threshold_qc!(sweep, p)
grid_radar_volume(volume, "out.nc", time, p)
source
Daisho.print_configFunction
print_config([io::IO = stdout])
print_config(path::AbstractString; force::Bool=false) -> String

Write the bundled Daisho parameter template (currently config/defaults.toml) to io, or copy it to a file at path. The file form refuses to overwrite an existing file unless force=true, and returns the destination path.

DaishoParameters(path) requires every documented key to be present in the file you pass it, so the typical workflow is:

using Daisho
print_config("mygrid.toml")          # write template
# edit mygrid.toml for your radar, grid, and CF metadata
p = DaishoParameters("mygrid.toml")  # strict load
source
Daisho.require_sectionFunction
require_section(p, root::Symbol, sub::Symbol...; for_op::String) -> Any

Point-of-use accessor for an optional section. Raises a clear ArgumentError naming the operation and the missing block if root was absent from the loaded TOML; otherwise returns p.root drilled through any sub fields.

source
Daisho.MomentParametersType
MomentParameters

Canonical fields of interest, each a FieldSpec carrying a flat tag list. The CfRadial 2.1 refactor dropped the historical raw/qc distinction: a field is just a field, and its CfRadial relationships (e.g. is_quality_field, qualified_variables) are recorded in Field.metadata.

Fields

  • fields::Vector{FieldSpec}: canonical fields of interest. Field order is insignificant — internal column order is derived deterministically by sorted field name.
source
Daisho.has_tagFunction
has_tag(fs::FieldSpec, t::Symbol) -> Bool

Whether field fs carries tag t.

source
Daisho.interp_ofFunction
interp_of(fs::FieldSpec) -> Symbol

Interpolation mode derived from a field's tags: :linear (linear_interp), :nearest (nearest_interp), or :weighted (the default when no interpolation tag is present). A :beam_height field is always :weighted (a height must never be dB-averaged), regardless of any interpolation tag.

source
Daisho.field_with_tagFunction
field_with_tag(p::DaishoParameters, tag::Symbol; for_op::String="") -> String

Resolve the single field carrying a singular role tag (e.g. :define_scanned, :define_detection). Point-of-use replacement for the old missing_key/valid_key: a non-gridding workflow need not declare these, so the error is raised here (naming the operation) rather than at load.

source
Daisho.field_index_dictFunction
field_index_dict(p::DaishoParameters) -> Dict{String,Int}

Build a name→column-index dict over the fields sorted by name. Used by drivers that need a moment_dict for the legacy gridding workers. Column order is order-independent of the source TOML.

source
Daisho.grid_type_index_dictFunction
grid_type_index_dict(p::DaishoParameters) -> Dict{Int,Symbol}

Build a column-index→interpolation-mode dict over the fields sorted by name (matching field_index_dict). Used by drivers that need a gridtypedict for the legacy gridding workers.

source
Daisho.QCParametersType
QCParameters

Quality-control thresholds applied by threshold_qc!.

Fields

  • sqi_threshold::Float64: minimum signal quality index.
  • snr_threshold::Float64: minimum signal-to-noise ratio (dB).
  • spectrum_width_max::Float64: maximum spectrum width (m/s).
  • rhohv_threshold::Float64: minimum cross-correlation coefficient.
source
Daisho.GriddingParametersType
GriddingParameters

Engine-level gridding knobs shared across all gridding drivers.

Fields

  • power_threshold::Float64: the beam power level that defines the beam edge. The edge-referenced gate inclusion sets the beam half-angle to beam_cutoff = ln(1/power_threshold) / beam_coef, so lower power_threshold ⇒ wider beam (more of the exponential tail is counted as "the beam"). At the default 0.5 this is the half-power half-beamwidth, reproducing the legacy behaviour.
  • horizontal_roi_factor::Float64: multiplier on the horizontal grid increment setting the box half-width for gate inclusion (default 0.75).
  • vertical_roi_factor::Float64: multiplier on the vertical grid increment setting the box half-height for gate inclusion (default 0.75).
  • range_guard_min::Float64: lower clamp (metres) on the gate slant range used as the range_weight divisor, guarding the near-radar singularity (default 1.0). This is a weighting guard, not a gate filter — see range_minimum below.
  • range_weight_max::Float64: upper clamp on the (unitless) range_weight ratio, bounding the near-radar singularity (default 10.0).
  • range_minimum::Float64 / range_maximum::Float64: slant-range gate-inclusion bounds (metres). A gate is gridded only when its slant range r satisfies range_minimum ≤ r ≤ range_maximum; out-of-range gates are excluded entirely (they contribute no coverage and no value), so a grid cell reachable only by excluded gates is left as true-missing. Defaults 0.0 / Inf apply no filtering. Use them to homogenise a volume whose low sweep ranges farther than the others, or to cap a product at a higher-quality range. Distinct from the range_guard_min / range_weight_max weighting guards above.

The *_factor/range_* knobs are optional in a config file (they fall back to the defaults above when omitted) so existing configs still load. The former beam_inflation knob is deprecated and removed — per-range beam reach is now derived from the radar beamwidth and the edge-referenced footprint. A leftover beam_inflation key in a config is accepted and ignored.

The two gate-role moments are no longer configured here: the field whose presence proves a gate was scanned (formerly missing_key) and the field whose presence proves a detectable echo (formerly valid_key) are now declared as the define_scanned / define_detection tags in [fields] and resolved via field_with_tag.

source
Daisho.GridParametersType
GridParameters

Aggregates the spatial-grid sub-specs plus the NetCDF metadata block. Pull out the one matching the gridding driver you are calling.

The Cartesian-family products each get their own section so a single config can drive different geometries for each: volume (grid_radar_volume), composite (grid_radar_composite), ppi (grid_radar_ppi), and column (grid_radar_column, used for QVPs). Each defaults to cartesian when its own [grid.<product>] table is absent, so [grid.cartesian] acts as the shared base geometry and the per-product tables are overrides.

source
Daisho.CartesianGridParametersType
CartesianGridParameters

Regular Cartesian grid specification (3D Easting × Northing × Altitude, meters).

range_minimum/range_maximum are optional per-product overrides of the [gridding] slant-range gate-inclusion bounds: when set (non-nothing) on a product's table (e.g. [grid.volume]) they take precedence over the [gridding] global for that product only; nothing (default) inherits the global. This lets, say, the volume grid cap range at 120 km while composite/PPI stay full-range from one config.

source
Daisho.LatLonGridParametersType
LatLonGridParameters

Geographic regular grid specification used by grid_radar_latlon_volume. Spacing is degincr for both lon and lat directions; vertical is in meters.

source
Daisho.SpringsteelGridConfigType
SpringsteelGridConfig

Geometry-general Springsteel grid specification loaded from [grid.springsteel]. Expresses a Springsteel.SpringsteelGridParameters directly — geometry, quadrature, per-axis bounds/sizes, per-variable boundary conditions, and output resampling counts — with no intermediate x/y/z vocabulary (x/y/z only makes sense for the Cartesian geometries; i/j/k spans them all: i = easting or radius, j = northing or azimuth, k = altitude).

Supported geometries (the spline-i families): Cartesian R/RZ/RR/RRR, cylindrical RL/RLZ/RLR, spherical SL/SLZ/SLR. The Springsteel variable map is not configured here — it is always derived from [fields] via field_index_dict so the gridded-array column order and the spectral-grid variable order can never disagree. Anything beyond this schema (per-variable spectral filters, exotic setups) should be built in Julia with Springsteel.SpringsteelGridParameters(vars = radar_vars(p), …) + createGrid and passed to the gridding entry points directly.

Fields

  • geometry::String: Springsteel geometry code (see above).
  • mubar::Int: quadrature points per spline cell.
  • quadrature::Symbol: :gauss or :regular.
  • i, j, k: per-axis SpringsteelAxisConfig.
source
Daisho.SpringsteelAxisConfigType
SpringsteelAxisConfig

One axis of a [grid.springsteel] section, in Springsteel's native i/j/k vocabulary. Which keys are meaningful depends on the basis the geometry puts on the axis (see SpringsteelGridConfig and SPRINGSTEEL_AXIS_BASES):

  • spline axes use min/max/cells. cells counts B-spline cells (the Springsteel num_cells), not gridpoints; physical quadrature points per axis = cells × mubar.
  • Chebyshev axes (the k of RZ/RLZ/SLZ) use min/max/points (physical gridpoints, the Springsteel kDim).
  • Fourier axes (the j of cylindrical/spherical geometries) are auto-sized by Springsteel from the ring formula; only max_wavenumber applies (-1 = uncapped).

regular_out is the number of regularly spaced output points write_radar_netcdf resamples onto along this axis; 0 selects the geometry-aware default (cells + 1 for spline axes, Springsteel's default otherwise). bc_min/bc_max hold the boundary conditions for the axis' min/max sides as per-variable dicts keyed by field name with a "default" fallback, mirroring Springsteel's own convention.

source
Daisho.SPRINGSTEEL_AXIS_BASESConstant
SPRINGSTEEL_AXIS_BASES

Basis placed on each (i, j, k) axis by every Springsteel geometry the [grid.springsteel] schema supports: :spline, :chebyshev, :fourier (auto-sized azimuthal), or :none (the axis does not exist). Drives both the TOML validation (which keys an axis table must/may carry) and the SpringsteelGridParameters construction in create_radar_grid.

The Fourier/Chebyshev-primary geometries (L*, Z*) need explicit spectral dimensions and are out of the schema's scope — build those in Julia via Springsteel.SpringsteelGridParameters/createGrid and pass the grid to the gridding entry points directly.

source
Daisho.MetadataParametersType
MetadataParameters

CF-1.12 global attributes written to every gridded NetCDF output. Every field must be set in the user TOML under [grid.metadata]; the bundled template ships generic placeholders (e.g. institution = "Your Institution") so an unedited config produces files that are obviously templates rather than masquerading as someone else's data.

Fields

  • Conventions::String: CF metadata conventions version.
  • history::String: provenance string written into the file.
  • institution::String: producing institution.
  • source::String: producing instrument / platform identifier.
  • instrument::String: short instrument name.
  • title::String: dataset title.
  • summary::String: longer-form summary (often equal to title).
  • creator_name::String: data creator's name.
  • creator_email::String: data creator's email address.
  • creator_id::String: data creator's identifier (e.g., ORCID URL).
  • project::String: associated field projects, comma-separated.
  • platform::String: hosting platform (vessel, aircraft, fixed site).
  • keywords::String: comma-separated CF/ACDD keywords.
  • processing_level::String: ACDD processing level (e.g., "Level 4").
  • license::String: data license (e.g., "CC-BY-4.0").
  • references::String: optional URL/DOI list. May be set to ""; the empty string suppresses the corresponding NetCDF global attribute.

Examples

[grid.metadata]
Conventions      = "CF-1.12"
history          = "v1.0"
institution      = "Example University"
source           = "Example C-band radar"
instrument       = "EXAMPLE"
title            = "Gridded Radar Data"
summary          = "Gridded Radar Data"
creator_name     = "Data Creator"
creator_email    = "creator@example.org"
creator_id       = "https://orcid.org/0000-0000-0000-0000"
project          = "EXAMPLE-2026"
platform         = "Field site"
keywords         = "radar, precipitation"
processing_level = "Level 4"
license          = "CC-BY-4.0"
references       = "https://doi.org/10.0000/example"
source
Daisho.IOParametersType
IOParameters

I/O sentinels, named to mirror FieldMetadata and the CfRadial 2.1 / ODIM data model exactly. Daisho preserves the distinction between true missing (fill_value, CF _FillValue — gate not measured) and undetect (undetect, ODIM _Undetect — gate scanned, no detectable signal). These two values are authoritative across the gridding/finalize/NetCDF-write path; the defaults are not a universal convention and users will legitimately differ.

source