Output.jl
Amalthea.Output.EveryNthCondition — Type
Condition which saves every nth native point
Amalthea.Output.GridCondition — Type
Condition callable that distributes save points evenly on a grid
Amalthea.Output.HDF5Output — Type
Internal constructor - creates the file
Amalthea.Output.HDF5Output — Type
Simple constructor
Amalthea.Output.HDF5Output — Type
Output handler for writing to an HDF5 file
Amalthea.Output.HDF5Output — Method
Calling the output handler writes data to the file Arguments: y: current function value t: current propagation point dt: current stepsize yfun: callable which returns interpolated function value at different t Note that from RK45.jl, this will be called with yn and tn as arguments.
Amalthea.Output.HDF5Output — Method
Calling the output on a dictionary writes the items to the file
Amalthea.Output.HDF5Output — Method
Calling the output on a key, value pair writes the value to the file
Amalthea.Output.MemoryOutput — Type
Output handler for writing only to memory
Amalthea.Output.MemoryOutput — Method
Calling the output handler saves data in the arrays Arguments: y: current function value t: current propagation point dt: current stepsize yfun: callable which returns interpolated function value at different t Note that from RK45.jl, this will be called with yn and tn as arguments.
Amalthea.Output.MemoryOutput — Method
Calling the output with a key, value pair writes the value to the array.
Amalthea.Output.MemoryOutput — Method
Calling the output on a dictionary writes the items to the array
Amalthea.Output.ScanHDF5Output — Method
ScanHDF5Output(scan, scanidx, args...; fname=nothing, fdir=nothing, kwargs...)Create an HDF5Output for the given scan at the current scanidx and automatically save the scan arrays and current values of the scan variables in the file. If given, fdir is used as a directory in which to store the scan output. fname can be used to manually name files. The running scan index will be appended to fname for each file.
Amalthea.Output.always — Method
Condition which saves every native point of the propagation
Amalthea.Output.check_cache — Method
check_cache(o::HDF5Output, y, t, dt)Check for an existing cached propagation in the output o and return this cache if present.
Amalthea.Output.init_dims — Method
Making initial array dimensions. For a GridCondition, we know in advance how many points there will be.
Amalthea.Output.init_dims — Method
For other conditions, we do not know in advance.
Amalthea.Output.scansave — Method
scansave(scan, scanidx; grid, stats, fpath, script, kwargs...)While running the given scan, save the variables given as keyword arguments into the scan grid as determined from the variables of the scan. Special keyword arguments are:
grid::AbstractGrid: Save the simulation grid in a dictionary (but only once)stats: The statistics dictionary from a simulation is saved in scan grid andNaN-padded to account for variable lengths in the output arraysfpath: Path to the file. Defaults to the scan name plus "_collected"script: Path to the Julia scrpt file running the scan. Can be grabbed automatically using the macro@scansave.
Another keyword argument lock_stale_age sets the time in seconds after which the function ignores the lock on the file and writes to it anyway. Defaults to 300 s (5 min). (Note that if the PID of the locking process appears valid, this is automatically increased 25x.)
Amalthea.Output.scansave_stats_array — Method
scansave_stats_array(stats_dict)Convert the statistics dictionary created by scansave into a dictionary containing arrays of arrays. This removes unused elements in the arrays and the need to use valid_length to avoid including NaNs.
Amalthea.Output.write_scan_point_native — Method
write_scan_point_native(fpath, y, z; yname="Eω", tname="z", lockpath=nothing)Opt-in backend (BACKLOG.md S6 item 2): write one completed scan point's output arrays directly to the HDF5 file at fpath via the native Rust writer (scan_write_point_ffi), bypassing HDF5.jl for the large field array y.
y is the complex field array (any shape; its last dimension indexes the propagation coordinate) and z the propagation coordinates. The resulting file matches the on-disk layout HDF5Output produces (groups stats/meta, a complex yname dataset, and an f64 tname dataset), so it reads back through HDF5Output/HDF5.read unchanged.
If lockpath is given, the create+write is performed while holding the same process-level file lock the scan queue uses — for concurrent workers writing a shared file. Per-scanidx files (the usual case) can leave it nothing.
This is a deliberate opt-in: the default Julia HDF5Output path is unchanged.
Base.getindex — Method
getindex works interchangeably so when switching from one Output to another, subsequent code can stay the same
Amalthea.Output.@ScanHDF5Output — Macro
@ScanHDF5Output(scan, scanidx, args...)Create an HDF5Output for the given scan at the current scanidx and automatically save the running script, scan arrays, and current values of the scan variables in the file. All arguments, including keyword arguments, after scanidx are identical to HDF5Output.
Amalthea.Output.@scansave — Macro
@scansave(scan, scanidx; kwargs...)Like scansave but also saves the script being run automatically.