Output.jl
Luna.Output.GridCondition — Type
Condition callable that distributes save points evenly on a grid
Luna.Output.HDF5Output — Type
Internal constructor - creates the file
Luna.Output.HDF5Output — Type
Simple constructor
Luna.Output.HDF5Output — Type
Output handler for writing to an HDF5 file
Luna.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.
Luna.Output.HDF5Output — Method
Calling the output on a dictionary writes the items to the file
Luna.Output.HDF5Output — Method
Calling the output on a key, value pair writes the value to the file
Luna.Output.MemoryOutput — Type
Output handler for writing only to memory
Luna.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.
Luna.Output.MemoryOutput — Method
Calling the output with a key, value pair writes the value to the array.
Luna.Output.MemoryOutput — Method
Calling the output on a dictionary writes the items to the array
Base.getindex — Method
getindex works interchangeably so when switching from one Output to another, subsequent code can stay the same
Luna.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.
Luna.Output.always — Method
Condition which saves every native point of the propagation
Luna.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.
Luna.Output.every_nth — Method
Condition which saves every nth native point
Luna.Output.init_dims — Method
For other conditions, we do not know in advance.
Luna.Output.init_dims — Method
Making initial array dimensions. For a GridCondition, we know in advance how many points there will be.
Luna.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.)
Luna.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.
Luna.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.
Luna.Output.@scansave — Macro
@scansave(scan, scanidx; kwargs...)Like scansave but also saves the script being run automatically.