Creates an EPI readout with given `resolution` and `fov` or `voxel_size`.
## Parameters
- `optimise`: set to true to optimise this readout separately from the embedding sequence.
- `scanner`: overrides the [`global_scanner`](@ref) for this part of the sequence. Recommended to set only if not part of a larger sequence.
- `resolution`: 2-element vector with number of voxels of the output image in the x- and y-direction. This parameter is required.
- `fov`: 2-element vector with size of the output image in the x- and y-direction in mm. Either this parameter or `voxel_size` should be set.
- `voxel_size`: 2-element vector with size of the voxels in the output image in the x- and y-direction in mm. Either this parameter or `fov` should be set.
- `oversample`: by how much to oversample in the x-direction.
"""
function epi_readout(;resolution,fov=nothing,voxel_size=nothing,kwargs...)
Creates a readout that scans a single line in k-space at a time with given `resolution` and `fov` or `voxel_size`.
Adds a readout event to the sequence.
## Parameters
- `optimise`: set to true to optimise this readout separately from the embedding sequence.
- `scanner`: overrides the [`global_scanner`](@ref) for this part of the sequence. Recommended to set only if not part of a larger sequence.
- `resolution`: 2-element vector with number of voxels of the output image in the x- and y-direction. This parameter is required.
- `fov`: 2-element vector with size of the output image in the x- and y-direction in mm. Either this parameter or `voxel_size` should be set.
- `voxel_size`: 2-element vector with size of the voxels in the output image in the x- and y-direction in mm. Either this parameter or `fov` should be set.
- `oversample`: by how much to oversample in the x-direction.
"""
function single_line_readout(;resolution,fov=nothing,voxel_size=nothing,kwargs...)
Helper function that detects consistency between `fov`, `voxel_size`, and `resolution`.
It computes the `fov` if needed.
- `type`: A symbol describing the type of readout. One of the following:
- `:epi`: EPI readout. See [`EPIReadout`](@ref) for the relevant `variables`.
- `:instant`: single isolated readout event [`SingleReadout`](@ref) (e.g., for NMR). Does not expect any `variables`.
- `optimise`: Whether to optimise this readout event in isolation from the rest of the sequence. Use this with caution. It can speed up the optimisation (and for very complicated sequences make it more robust), however the resulting parameters might not represent the optimal solution of any external constraints (which are ignored if the readout is optimised in isolation).
- `scanner`: Used for testing. Do not set this parameter at this level (instead set it for the total sequence using [`build_sequence`](@ref)).
"""
function _get_fov(fov,voxel_size,resolution)
ifisnothing(fov)
ifisnothing(voxel_size)
error("Set either FOV or voxel size when creating an single line readout.")
end
returnvoxel_size.*resolution
elseif!isnothing(voxel_size)
@assertall(fov.≈voxel_size.*resolution)"FOV, resolution, and voxel_size have been set to inconsistent values."
function readout_event(;type,optimise=false,scanner=nothing,variables...)